generated-configure.sh revision 1918:eb465c89d643
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
790TOOLCHAIN_PATH_CXX
791POTENTIAL_CXX
792OBJEXT
793EXEEXT
794ac_ct_CC
795CPPFLAGS
796LDFLAGS
797CFLAGS
798CC
799TOOLCHAIN_PATH_CC
800POTENTIAL_CC
801TOOLCHAIN_VERSION
802VS_LIB
803VS_INCLUDE
804VS_PATH
805CYGWIN_LINK
806SYSROOT_LDFLAGS
807SYSROOT_CFLAGS
808LEGACY_EXTRA_LDFLAGS
809LEGACY_EXTRA_CXXFLAGS
810LEGACY_EXTRA_CFLAGS
811EXE_SUFFIX
812OBJ_SUFFIX
813STATIC_LIBRARY
814SHARED_LIBRARY
815STATIC_LIBRARY_SUFFIX
816SHARED_LIBRARY_SUFFIX
817LIBRARY_PREFIX
818TOOLCHAIN_TYPE
819STATIC_BUILD
820BUILD_HOTSPOT
821HOTSPOT_DIST
822BUILD_OUTPUT
823JDK_TOPDIR
824NASHORN_TOPDIR
825HOTSPOT_TOPDIR
826JAXWS_TOPDIR
827JAXP_TOPDIR
828CORBA_TOPDIR
829LANGTOOLS_TOPDIR
830BOOT_JDK_BITS
831JAVAC_FLAGS
832BOOT_JDK_SOURCETARGET
833JARSIGNER
834JAR
835JAVAH
836JAVAC
837JAVA
838BOOT_JDK
839JAVA_CHECK
840JAVAC_CHECK
841VERSION_IS_GA
842VERSION_SHORT
843VERSION_STRING
844VERSION_NUMBER_FOUR_POSITIONS
845VERSION_NUMBER
846VERSION_OPT
847VERSION_BUILD
848VERSION_PRE
849VERSION_PATCH
850VERSION_SECURITY
851VERSION_MINOR
852VERSION_MAJOR
853MACOSX_BUNDLE_ID_BASE
854MACOSX_BUNDLE_NAME_BASE
855COMPANY_NAME
856JDK_RC_PLATFORM_NAME
857PRODUCT_SUFFIX
858PRODUCT_NAME
859LAUNCHER_NAME
860TEST_IN_BUILD
861COPYRIGHT_YEAR
862COMPRESS_JARS
863UNLIMITED_CRYPTO
864CACERTS_FILE
865BUILD_HEADLESS
866SUPPORT_HEADFUL
867SUPPORT_HEADLESS
868DEFAULT_MAKE_TARGET
869OS_VERSION_MICRO
870OS_VERSION_MINOR
871OS_VERSION_MAJOR
872PKG_CONFIG
873BASH_ARGS
874SETFILE
875CODESIGN
876XATTR
877DSYMUTIL
878IS_GNU_TIME
879PATCH
880TIME
881STAT
882HG
883READELF
884OTOOL
885LDD
886ZIP
887UNZIP
888FIND_DELETE
889OUTPUT_SYNC
890OUTPUT_SYNC_SUPPORTED
891CHECK_TOOLSDIR_MAKE
892CHECK_TOOLSDIR_GMAKE
893CHECK_MAKE
894CHECK_GMAKE
895MAKE
896PKGHANDLER
897CONFIGURESUPPORT_OUTPUTDIR
898OUTPUT_ROOT
899CONF_NAME
900SPEC
901SDKROOT
902XCODEBUILD
903BUILD_VARIANT_RELEASE
904DEBUG_CLASSFILES
905FASTDEBUG
906VARIANT
907DEBUG_LEVEL
908MACOSX_UNIVERSAL
909INCLUDE_SA
910JVM_VARIANT_CORE
911JVM_VARIANT_ZEROSHARK
912JVM_VARIANT_ZERO
913JVM_VARIANT_MINIMAL1
914JVM_VARIANT_CLIENT
915JVM_VARIANT_SERVER
916JVM_VARIANTS
917JVM_INTERPRETER
918JDK_VARIANT
919SET_OPENJDK
920USERNAME
921CANONICAL_TOPDIR
922ORIGINAL_TOPDIR
923TOPDIR
924PATH_SEP
925ZERO_ARCHDEF
926DEFINE_CROSS_COMPILE_ARCH
927LP64
928OPENJDK_TARGET_OS_EXPORT_DIR
929OPENJDK_TARGET_CPU_JLI_CFLAGS
930OPENJDK_TARGET_CPU_OSARCH
931OPENJDK_TARGET_CPU_ISADIR
932OPENJDK_TARGET_CPU_LIBDIR
933OPENJDK_TARGET_CPU_LEGACY_LIB
934OPENJDK_TARGET_CPU_LEGACY
935REQUIRED_OS_VERSION
936REQUIRED_OS_NAME
937COMPILE_TYPE
938OPENJDK_TARGET_CPU_ENDIAN
939OPENJDK_TARGET_CPU_BITS
940OPENJDK_TARGET_CPU_ARCH
941OPENJDK_TARGET_CPU
942OPENJDK_TARGET_OS_ENV
943OPENJDK_TARGET_OS_TYPE
944OPENJDK_TARGET_OS
945OPENJDK_BUILD_CPU_ENDIAN
946OPENJDK_BUILD_CPU_BITS
947OPENJDK_BUILD_CPU_ARCH
948OPENJDK_BUILD_CPU
949OPENJDK_BUILD_OS_ENV
950OPENJDK_BUILD_OS_TYPE
951OPENJDK_BUILD_OS
952OPENJDK_BUILD_AUTOCONF_NAME
953OPENJDK_TARGET_AUTOCONF_NAME
954target_os
955target_vendor
956target_cpu
957target
958host_os
959host_vendor
960host_cpu
961host
962build_os
963build_vendor
964build_cpu
965build
966NICE
967CPIO
968DF
969READLINK
970CYGPATH
971SED
972FGREP
973EGREP
974GREP
975AWK
976XARGS
977WHICH
978WC
979UNIQ
980UNAME
981TR
982TOUCH
983TEE
984TAR
985TAIL
986SORT
987SH
988RMDIR
989RM
990PRINTF
991NAWK
992MV
993MKTEMP
994MKDIR
995LS
996LN
997HEAD
998FIND
999FILE
1000EXPR
1001ECHO
1002DIRNAME
1003DIFF
1004DATE
1005CUT
1006CP
1007COMM
1008CMP
1009CHMOD
1010CAT
1011BASH
1012BASENAME
1013DATE_WHEN_CONFIGURED
1014ORIGINAL_PATH
1015CONFIGURE_COMMAND_LINE
1016target_alias
1017host_alias
1018build_alias
1019LIBS
1020ECHO_T
1021ECHO_N
1022ECHO_C
1023DEFS
1024mandir
1025localedir
1026libdir
1027psdir
1028pdfdir
1029dvidir
1030htmldir
1031infodir
1032docdir
1033oldincludedir
1034includedir
1035localstatedir
1036sharedstatedir
1037sysconfdir
1038datadir
1039datarootdir
1040libexecdir
1041sbindir
1042bindir
1043program_transform_name
1044prefix
1045exec_prefix
1046PACKAGE_URL
1047PACKAGE_BUGREPORT
1048PACKAGE_STRING
1049PACKAGE_VERSION
1050PACKAGE_TARNAME
1051PACKAGE_NAME
1052PATH_SEPARATOR
1053SHELL'
1054ac_subst_files=''
1055ac_user_opts='
1056enable_option_checking
1057with_target_bits
1058enable_openjdk_only
1059with_custom_make_dir
1060with_jdk_variant
1061with_jvm_interpreter
1062with_jvm_variants
1063enable_debug
1064with_debug_level
1065with_devkit
1066with_sys_root
1067with_sysroot
1068with_tools_dir
1069with_toolchain_path
1070with_extra_path
1071with_sdk_name
1072with_conf_name
1073with_output_sync
1074with_default_make_target
1075enable_headful
1076with_cacerts_file
1077enable_unlimited_crypto
1078with_copyright_year
1079enable_hotspot_test_in_build
1080with_milestone
1081with_update_version
1082with_user_release_suffix
1083with_build_number
1084with_version_string
1085with_version_pre
1086with_version_opt
1087with_version_build
1088with_version_major
1089with_version_minor
1090with_version_security
1091with_version_patch
1092with_boot_jdk
1093with_add_source_root
1094with_override_source_root
1095with_adds_and_overrides
1096with_override_langtools
1097with_override_corba
1098with_override_jaxp
1099with_override_jaxws
1100with_override_hotspot
1101with_override_nashorn
1102with_override_jdk
1103with_import_hotspot
1104enable_static_build
1105with_toolchain_type
1106with_extra_cflags
1107with_extra_cxxflags
1108with_extra_ldflags
1109with_toolchain_version
1110with_build_devkit
1111with_jtreg
1112enable_warnings_as_errors
1113with_native_debug_symbols
1114enable_debug_symbols
1115enable_zip_debug_info
1116enable_native_coverage
1117with_stdc__lib
1118with_msvcr_dll
1119with_msvcp_dll
1120with_x
1121with_cups
1122with_cups_include
1123with_freetype
1124with_freetype_include
1125with_freetype_lib
1126with_freetype_src
1127enable_freetype_bundling
1128with_alsa
1129with_alsa_include
1130with_alsa_lib
1131with_libffi
1132with_libffi_include
1133with_libffi_lib
1134with_libjpeg
1135with_giflib
1136with_libpng
1137with_zlib
1138with_lcms
1139with_dxsdk
1140with_dxsdk_lib
1141with_dxsdk_include
1142with_num_cores
1143with_memory_size
1144with_jobs
1145with_test_jobs
1146with_boot_jdk_jvmargs
1147with_sjavac_server_java
1148enable_sjavac
1149enable_javac_server
1150enable_icecc
1151enable_precompiled_headers
1152enable_ccache
1153with_ccache_dir
1154'
1155      ac_precious_vars='build_alias
1156host_alias
1157target_alias
1158BASENAME
1159BASH
1160CAT
1161CHMOD
1162CMP
1163COMM
1164CP
1165CUT
1166DATE
1167DIFF
1168DIRNAME
1169ECHO
1170EXPR
1171FILE
1172FIND
1173HEAD
1174LN
1175LS
1176MKDIR
1177MKTEMP
1178MV
1179NAWK
1180PRINTF
1181RM
1182RMDIR
1183SH
1184SORT
1185TAIL
1186TAR
1187TEE
1188TOUCH
1189TR
1190UNAME
1191UNIQ
1192WC
1193WHICH
1194XARGS
1195AWK
1196GREP
1197EGREP
1198FGREP
1199SED
1200CYGPATH
1201READLINK
1202DF
1203CPIO
1204NICE
1205MAKE
1206UNZIP
1207ZIP
1208LDD
1209OTOOL
1210READELF
1211HG
1212STAT
1213TIME
1214PATCH
1215DSYMUTIL
1216XATTR
1217CODESIGN
1218SETFILE
1219PKG_CONFIG
1220JAVA
1221JAVAC
1222JAVAH
1223JAR
1224JARSIGNER
1225CC
1226CFLAGS
1227LDFLAGS
1228LIBS
1229CPPFLAGS
1230CXX
1231CXXFLAGS
1232CCC
1233CPP
1234CXXCPP
1235AS
1236AR
1237LIPO
1238STRIP
1239NM
1240GNM
1241OBJCOPY
1242OBJDUMP
1243BUILD_CC
1244BUILD_CXX
1245BUILD_NM
1246BUILD_AR
1247JTREGEXE
1248XMKMF
1249FREETYPE_CFLAGS
1250FREETYPE_LIBS
1251ALSA_CFLAGS
1252ALSA_LIBS
1253LIBFFI_CFLAGS
1254LIBFFI_LIBS
1255PNG_CFLAGS
1256PNG_LIBS
1257LCMS_CFLAGS
1258LCMS_LIBS
1259ICECC_CMD
1260ICECC_CREATE_ENV
1261ICECC_WRAPPER
1262CCACHE'
1263
1264
1265# Initialize some variables set by options.
1266ac_init_help=
1267ac_init_version=false
1268ac_unrecognized_opts=
1269ac_unrecognized_sep=
1270# The variables have the same names as the options, with
1271# dashes changed to underlines.
1272cache_file=/dev/null
1273exec_prefix=NONE
1274no_create=
1275no_recursion=
1276prefix=NONE
1277program_prefix=NONE
1278program_suffix=NONE
1279program_transform_name=s,x,x,
1280silent=
1281site=
1282srcdir=
1283verbose=
1284x_includes=NONE
1285x_libraries=NONE
1286
1287# Installation directory options.
1288# These are left unexpanded so users can "make install exec_prefix=/foo"
1289# and all the variables that are supposed to be based on exec_prefix
1290# by default will actually change.
1291# Use braces instead of parens because sh, perl, etc. also accept them.
1292# (The list follows the same order as the GNU Coding Standards.)
1293bindir='${exec_prefix}/bin'
1294sbindir='${exec_prefix}/sbin'
1295libexecdir='${exec_prefix}/libexec'
1296datarootdir='${prefix}/share'
1297datadir='${datarootdir}'
1298sysconfdir='${prefix}/etc'
1299sharedstatedir='${prefix}/com'
1300localstatedir='${prefix}/var'
1301includedir='${prefix}/include'
1302oldincludedir='/usr/include'
1303docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1304infodir='${datarootdir}/info'
1305htmldir='${docdir}'
1306dvidir='${docdir}'
1307pdfdir='${docdir}'
1308psdir='${docdir}'
1309libdir='${exec_prefix}/lib'
1310localedir='${datarootdir}/locale'
1311mandir='${datarootdir}/man'
1312
1313ac_prev=
1314ac_dashdash=
1315for ac_option
1316do
1317  # If the previous option needs an argument, assign it.
1318  if test -n "$ac_prev"; then
1319    eval $ac_prev=\$ac_option
1320    ac_prev=
1321    continue
1322  fi
1323
1324  case $ac_option in
1325  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1326  *=)   ac_optarg= ;;
1327  *)    ac_optarg=yes ;;
1328  esac
1329
1330  # Accept the important Cygnus configure options, so we can diagnose typos.
1331
1332  case $ac_dashdash$ac_option in
1333  --)
1334    ac_dashdash=yes ;;
1335
1336  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1337    ac_prev=bindir ;;
1338  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1339    bindir=$ac_optarg ;;
1340
1341  -build | --build | --buil | --bui | --bu)
1342    ac_prev=build_alias ;;
1343  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1344    build_alias=$ac_optarg ;;
1345
1346  -cache-file | --cache-file | --cache-fil | --cache-fi \
1347  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1348    ac_prev=cache_file ;;
1349  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1350  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1351    cache_file=$ac_optarg ;;
1352
1353  --config-cache | -C)
1354    cache_file=config.cache ;;
1355
1356  -datadir | --datadir | --datadi | --datad)
1357    ac_prev=datadir ;;
1358  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1359    datadir=$ac_optarg ;;
1360
1361  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1362  | --dataroo | --dataro | --datar)
1363    ac_prev=datarootdir ;;
1364  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1365  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1366    datarootdir=$ac_optarg ;;
1367
1368  -disable-* | --disable-*)
1369    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1370    # Reject names that are not valid shell variable names.
1371    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1372      as_fn_error $? "invalid feature name: $ac_useropt"
1373    ac_useropt_orig=$ac_useropt
1374    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1375    case $ac_user_opts in
1376      *"
1377"enable_$ac_useropt"
1378"*) ;;
1379      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1380	 ac_unrecognized_sep=', ';;
1381    esac
1382    eval enable_$ac_useropt=no ;;
1383
1384  -docdir | --docdir | --docdi | --doc | --do)
1385    ac_prev=docdir ;;
1386  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1387    docdir=$ac_optarg ;;
1388
1389  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1390    ac_prev=dvidir ;;
1391  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1392    dvidir=$ac_optarg ;;
1393
1394  -enable-* | --enable-*)
1395    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1396    # Reject names that are not valid shell variable names.
1397    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398      as_fn_error $? "invalid feature name: $ac_useropt"
1399    ac_useropt_orig=$ac_useropt
1400    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401    case $ac_user_opts in
1402      *"
1403"enable_$ac_useropt"
1404"*) ;;
1405      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1406	 ac_unrecognized_sep=', ';;
1407    esac
1408    eval enable_$ac_useropt=\$ac_optarg ;;
1409
1410  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1411  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1412  | --exec | --exe | --ex)
1413    ac_prev=exec_prefix ;;
1414  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1415  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1416  | --exec=* | --exe=* | --ex=*)
1417    exec_prefix=$ac_optarg ;;
1418
1419  -gas | --gas | --ga | --g)
1420    # Obsolete; use --with-gas.
1421    with_gas=yes ;;
1422
1423  -help | --help | --hel | --he | -h)
1424    ac_init_help=long ;;
1425  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1426    ac_init_help=recursive ;;
1427  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1428    ac_init_help=short ;;
1429
1430  -host | --host | --hos | --ho)
1431    ac_prev=host_alias ;;
1432  -host=* | --host=* | --hos=* | --ho=*)
1433    host_alias=$ac_optarg ;;
1434
1435  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1436    ac_prev=htmldir ;;
1437  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1438  | --ht=*)
1439    htmldir=$ac_optarg ;;
1440
1441  -includedir | --includedir | --includedi | --included | --include \
1442  | --includ | --inclu | --incl | --inc)
1443    ac_prev=includedir ;;
1444  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1445  | --includ=* | --inclu=* | --incl=* | --inc=*)
1446    includedir=$ac_optarg ;;
1447
1448  -infodir | --infodir | --infodi | --infod | --info | --inf)
1449    ac_prev=infodir ;;
1450  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1451    infodir=$ac_optarg ;;
1452
1453  -libdir | --libdir | --libdi | --libd)
1454    ac_prev=libdir ;;
1455  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1456    libdir=$ac_optarg ;;
1457
1458  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1459  | --libexe | --libex | --libe)
1460    ac_prev=libexecdir ;;
1461  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1462  | --libexe=* | --libex=* | --libe=*)
1463    libexecdir=$ac_optarg ;;
1464
1465  -localedir | --localedir | --localedi | --localed | --locale)
1466    ac_prev=localedir ;;
1467  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1468    localedir=$ac_optarg ;;
1469
1470  -localstatedir | --localstatedir | --localstatedi | --localstated \
1471  | --localstate | --localstat | --localsta | --localst | --locals)
1472    ac_prev=localstatedir ;;
1473  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1474  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1475    localstatedir=$ac_optarg ;;
1476
1477  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1478    ac_prev=mandir ;;
1479  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1480    mandir=$ac_optarg ;;
1481
1482  -nfp | --nfp | --nf)
1483    # Obsolete; use --without-fp.
1484    with_fp=no ;;
1485
1486  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1487  | --no-cr | --no-c | -n)
1488    no_create=yes ;;
1489
1490  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1491  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1492    no_recursion=yes ;;
1493
1494  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1495  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1496  | --oldin | --oldi | --old | --ol | --o)
1497    ac_prev=oldincludedir ;;
1498  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1499  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1500  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1501    oldincludedir=$ac_optarg ;;
1502
1503  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1504    ac_prev=prefix ;;
1505  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1506    prefix=$ac_optarg ;;
1507
1508  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1509  | --program-pre | --program-pr | --program-p)
1510    ac_prev=program_prefix ;;
1511  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1512  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1513    program_prefix=$ac_optarg ;;
1514
1515  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1516  | --program-suf | --program-su | --program-s)
1517    ac_prev=program_suffix ;;
1518  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1519  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1520    program_suffix=$ac_optarg ;;
1521
1522  -program-transform-name | --program-transform-name \
1523  | --program-transform-nam | --program-transform-na \
1524  | --program-transform-n | --program-transform- \
1525  | --program-transform | --program-transfor \
1526  | --program-transfo | --program-transf \
1527  | --program-trans | --program-tran \
1528  | --progr-tra | --program-tr | --program-t)
1529    ac_prev=program_transform_name ;;
1530  -program-transform-name=* | --program-transform-name=* \
1531  | --program-transform-nam=* | --program-transform-na=* \
1532  | --program-transform-n=* | --program-transform-=* \
1533  | --program-transform=* | --program-transfor=* \
1534  | --program-transfo=* | --program-transf=* \
1535  | --program-trans=* | --program-tran=* \
1536  | --progr-tra=* | --program-tr=* | --program-t=*)
1537    program_transform_name=$ac_optarg ;;
1538
1539  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1540    ac_prev=pdfdir ;;
1541  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1542    pdfdir=$ac_optarg ;;
1543
1544  -psdir | --psdir | --psdi | --psd | --ps)
1545    ac_prev=psdir ;;
1546  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1547    psdir=$ac_optarg ;;
1548
1549  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1550  | -silent | --silent | --silen | --sile | --sil)
1551    silent=yes ;;
1552
1553  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1554    ac_prev=sbindir ;;
1555  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1556  | --sbi=* | --sb=*)
1557    sbindir=$ac_optarg ;;
1558
1559  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1560  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1561  | --sharedst | --shareds | --shared | --share | --shar \
1562  | --sha | --sh)
1563    ac_prev=sharedstatedir ;;
1564  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1565  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1566  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1567  | --sha=* | --sh=*)
1568    sharedstatedir=$ac_optarg ;;
1569
1570  -site | --site | --sit)
1571    ac_prev=site ;;
1572  -site=* | --site=* | --sit=*)
1573    site=$ac_optarg ;;
1574
1575  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1576    ac_prev=srcdir ;;
1577  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1578    srcdir=$ac_optarg ;;
1579
1580  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1581  | --syscon | --sysco | --sysc | --sys | --sy)
1582    ac_prev=sysconfdir ;;
1583  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1584  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1585    sysconfdir=$ac_optarg ;;
1586
1587  -target | --target | --targe | --targ | --tar | --ta | --t)
1588    ac_prev=target_alias ;;
1589  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1590    target_alias=$ac_optarg ;;
1591
1592  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1593    verbose=yes ;;
1594
1595  -version | --version | --versio | --versi | --vers | -V)
1596    ac_init_version=: ;;
1597
1598  -with-* | --with-*)
1599    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1600    # Reject names that are not valid shell variable names.
1601    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1602      as_fn_error $? "invalid package name: $ac_useropt"
1603    ac_useropt_orig=$ac_useropt
1604    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1605    case $ac_user_opts in
1606      *"
1607"with_$ac_useropt"
1608"*) ;;
1609      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1610	 ac_unrecognized_sep=', ';;
1611    esac
1612    eval with_$ac_useropt=\$ac_optarg ;;
1613
1614  -without-* | --without-*)
1615    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1616    # Reject names that are not valid shell variable names.
1617    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1618      as_fn_error $? "invalid package name: $ac_useropt"
1619    ac_useropt_orig=$ac_useropt
1620    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1621    case $ac_user_opts in
1622      *"
1623"with_$ac_useropt"
1624"*) ;;
1625      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1626	 ac_unrecognized_sep=', ';;
1627    esac
1628    eval with_$ac_useropt=no ;;
1629
1630  --x)
1631    # Obsolete; use --with-x.
1632    with_x=yes ;;
1633
1634  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1635  | --x-incl | --x-inc | --x-in | --x-i)
1636    ac_prev=x_includes ;;
1637  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1638  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1639    x_includes=$ac_optarg ;;
1640
1641  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1642  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1643    ac_prev=x_libraries ;;
1644  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1645  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1646    x_libraries=$ac_optarg ;;
1647
1648  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1649Try \`$0 --help' for more information"
1650    ;;
1651
1652  *=*)
1653    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1654    # Reject names that are not valid shell variable names.
1655    case $ac_envvar in #(
1656      '' | [0-9]* | *[!_$as_cr_alnum]* )
1657      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1658    esac
1659    eval $ac_envvar=\$ac_optarg
1660    export $ac_envvar ;;
1661
1662  *)
1663    # FIXME: should be removed in autoconf 3.0.
1664    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1665    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1666      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1667    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1668    ;;
1669
1670  esac
1671done
1672
1673if test -n "$ac_prev"; then
1674  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1675  as_fn_error $? "missing argument to $ac_option"
1676fi
1677
1678if test -n "$ac_unrecognized_opts"; then
1679  case $enable_option_checking in
1680    no) ;;
1681    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1682    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1683  esac
1684fi
1685
1686# Check all directory arguments for consistency.
1687for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1688		datadir sysconfdir sharedstatedir localstatedir includedir \
1689		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1690		libdir localedir mandir
1691do
1692  eval ac_val=\$$ac_var
1693  # Remove trailing slashes.
1694  case $ac_val in
1695    */ )
1696      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1697      eval $ac_var=\$ac_val;;
1698  esac
1699  # Be sure to have absolute directory names.
1700  case $ac_val in
1701    [\\/$]* | ?:[\\/]* )  continue;;
1702    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1703  esac
1704  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1705done
1706
1707# There might be people who depend on the old broken behavior: `$host'
1708# used to hold the argument of --host etc.
1709# FIXME: To remove some day.
1710build=$build_alias
1711host=$host_alias
1712target=$target_alias
1713
1714# FIXME: To remove some day.
1715if test "x$host_alias" != x; then
1716  if test "x$build_alias" = x; then
1717    cross_compiling=maybe
1718  elif test "x$build_alias" != "x$host_alias"; then
1719    cross_compiling=yes
1720  fi
1721fi
1722
1723ac_tool_prefix=
1724test -n "$host_alias" && ac_tool_prefix=$host_alias-
1725
1726test "$silent" = yes && exec 6>/dev/null
1727
1728
1729ac_pwd=`pwd` && test -n "$ac_pwd" &&
1730ac_ls_di=`ls -di .` &&
1731ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1732  as_fn_error $? "working directory cannot be determined"
1733test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1734  as_fn_error $? "pwd does not report name of working directory"
1735
1736
1737# Find the source files, if location was not specified.
1738if test -z "$srcdir"; then
1739  ac_srcdir_defaulted=yes
1740  # Try the directory containing this script, then the parent directory.
1741  ac_confdir=`$as_dirname -- "$as_myself" ||
1742$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1743	 X"$as_myself" : 'X\(//\)[^/]' \| \
1744	 X"$as_myself" : 'X\(//\)$' \| \
1745	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1746$as_echo X"$as_myself" |
1747    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1748	    s//\1/
1749	    q
1750	  }
1751	  /^X\(\/\/\)[^/].*/{
1752	    s//\1/
1753	    q
1754	  }
1755	  /^X\(\/\/\)$/{
1756	    s//\1/
1757	    q
1758	  }
1759	  /^X\(\/\).*/{
1760	    s//\1/
1761	    q
1762	  }
1763	  s/.*/./; q'`
1764  srcdir=$ac_confdir
1765  if test ! -r "$srcdir/$ac_unique_file"; then
1766    srcdir=..
1767  fi
1768else
1769  ac_srcdir_defaulted=no
1770fi
1771if test ! -r "$srcdir/$ac_unique_file"; then
1772  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1773  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1774fi
1775ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1776ac_abs_confdir=`(
1777	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1778	pwd)`
1779# When building in place, set srcdir=.
1780if test "$ac_abs_confdir" = "$ac_pwd"; then
1781  srcdir=.
1782fi
1783# Remove unnecessary trailing slashes from srcdir.
1784# Double slashes in file names in object file debugging info
1785# mess up M-x gdb in Emacs.
1786case $srcdir in
1787*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1788esac
1789for ac_var in $ac_precious_vars; do
1790  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1791  eval ac_env_${ac_var}_value=\$${ac_var}
1792  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1793  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1794done
1795
1796#
1797# Report the --help message.
1798#
1799if test "$ac_init_help" = "long"; then
1800  # Omit some internal or obsolete options to make the list less imposing.
1801  # This message is too long to be a string in the A/UX 3.1 sh.
1802  cat <<_ACEOF
1803\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1804
1805Usage: $0 [OPTION]... [VAR=VALUE]...
1806
1807To assign environment variables (e.g., CC, CFLAGS...), specify them as
1808VAR=VALUE.  See below for descriptions of some of the useful variables.
1809
1810Defaults for the options are specified in brackets.
1811
1812Configuration:
1813  -h, --help              display this help and exit
1814      --help=short        display options specific to this package
1815      --help=recursive    display the short help of all the included packages
1816  -V, --version           display version information and exit
1817  -q, --quiet, --silent   do not print \`checking ...' messages
1818      --cache-file=FILE   cache test results in FILE [disabled]
1819  -C, --config-cache      alias for \`--cache-file=config.cache'
1820  -n, --no-create         do not create output files
1821      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1822
1823Installation directories:
1824  --prefix=PREFIX         install architecture-independent files in PREFIX
1825                          [$ac_default_prefix]
1826  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1827                          [PREFIX]
1828
1829By default, \`make install' will install all the files in
1830\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1831an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1832for instance \`--prefix=\$HOME'.
1833
1834For better control, use the options below.
1835
1836Fine tuning of the installation directories:
1837  --bindir=DIR            user executables [EPREFIX/bin]
1838  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1839  --libexecdir=DIR        program executables [EPREFIX/libexec]
1840  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1841  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1842  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1843  --libdir=DIR            object code libraries [EPREFIX/lib]
1844  --includedir=DIR        C header files [PREFIX/include]
1845  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1846  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1847  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1848  --infodir=DIR           info documentation [DATAROOTDIR/info]
1849  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1850  --mandir=DIR            man documentation [DATAROOTDIR/man]
1851  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1852  --htmldir=DIR           html documentation [DOCDIR]
1853  --dvidir=DIR            dvi documentation [DOCDIR]
1854  --pdfdir=DIR            pdf documentation [DOCDIR]
1855  --psdir=DIR             ps documentation [DOCDIR]
1856_ACEOF
1857
1858  cat <<\_ACEOF
1859
1860X features:
1861  --x-includes=DIR    X include files are in DIR
1862  --x-libraries=DIR   X library files are in DIR
1863
1864System types:
1865  --build=BUILD     configure for building on BUILD [guessed]
1866  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1867  --target=TARGET   configure for building compilers for TARGET [HOST]
1868_ACEOF
1869fi
1870
1871if test -n "$ac_init_help"; then
1872  case $ac_init_help in
1873     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1874   esac
1875  cat <<\_ACEOF
1876
1877Optional Features:
1878  --disable-option-checking  ignore unrecognized --enable/--with options
1879  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1880  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1881  --enable-openjdk-only   suppress building custom source even if present
1882                          [disabled]
1883  --enable-debug          set the debug level to fastdebug (shorthand for
1884                          --with-debug-level=fastdebug) [disabled]
1885  --disable-headful       disable building headful support (graphical UI
1886                          support) [enabled]
1887  --enable-unlimited-crypto
1888                          Enable unlimited crypto policy [disabled]
1889  --enable-hotspot-test-in-build
1890                          run the Queens test after Hotspot build [disabled]
1891  --enable-static-build   enable static library build [disabled]
1892  --disable-warnings-as-errors
1893                          do not consider native warnings to be an error
1894                          [enabled]
1895  --enable-debug-symbols  Deprecated. Option is kept for backwards
1896                          compatibility and is ignored
1897  --enable-zip-debug-info Deprecated. Option is kept for backwards
1898                          compatibility and is ignored
1899  --enable-native-coverage
1900                          enable native compilation with code coverage
1901                          data[disabled]
1902  --disable-freetype-bundling
1903                          disable bundling of the freetype library with the
1904                          build result [enabled on Windows or when using
1905                          --with-freetype, disabled otherwise]
1906  --enable-sjavac         use sjavac to do fast incremental compiles
1907                          [disabled]
1908  --disable-javac-server  disable javac server [enabled]
1909  --enable-icecc          enable distribted compilation of native code using
1910                          icecc/icecream [disabled]
1911  --disable-precompiled-headers
1912                          disable using precompiled headers when compiling C++
1913                          [enabled]
1914  --enable-ccache         enable using ccache to speed up recompilations
1915                          [disabled]
1916
1917Optional Packages:
1918  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1919  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1920  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1921                          support it), e.g. --with-target-bits=32 [guessed]
1922  --with-custom-make-dir  Deprecated. Option is kept for backwards
1923                          compatibility and is ignored
1924  --with-jdk-variant      JDK variant to build (normal) [normal]
1925  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1926  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1927                          client, minimal1, zero, zeroshark, core) [server]
1928  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1929                          optimized (HotSpot build only)) [release]
1930  --with-devkit           use this devkit for compilers, tools and resources
1931  --with-sys-root         alias for --with-sysroot for backwards compatability
1932  --with-sysroot          use this directory as sysroot
1933  --with-tools-dir        alias for --with-toolchain-path for backwards
1934                          compatibility
1935  --with-toolchain-path   prepend these directories when searching for
1936                          toolchain binaries (compilers etc)
1937  --with-extra-path       prepend these directories to the default path
1938  --with-sdk-name         use the platform SDK of the given name. [macosx]
1939  --with-conf-name        use this as the name of the configuration [generated
1940                          from important configuration options]
1941  --with-output-sync      set make output sync type if supported by make.
1942                          [recurse]
1943  --with-default-make-target
1944                          set the default make target [exploded-image]
1945  --with-cacerts-file     specify alternative cacerts file
1946  --with-copyright-year   Set copyright year value for build [current year]
1947  --with-milestone        Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-update-version   Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-user-release-suffix
1952                          Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-build-number     Deprecated. Option is kept for backwards
1955                          compatibility and is ignored
1956  --with-version-string   Set version string [calculated]
1957  --with-version-pre      Set the base part of the version 'PRE' field
1958                          (pre-release identifier) ['internal']
1959  --with-version-opt      Set version 'OPT' field (build metadata)
1960                          [<timestamp>.<user>.<dirname>]
1961  --with-version-build    Set version 'BUILD' field (build number) [not
1962                          specified]
1963  --with-version-major    Set version 'MAJOR' field (first number) [current
1964                          source value]
1965  --with-version-minor    Set version 'MINOR' field (second number) [current
1966                          source value]
1967  --with-version-security Set version 'SECURITY' field (third number) [current
1968                          source value]
1969  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1970                          specified]
1971  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1972  --with-add-source-root  Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-override-source-root
1975                          Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-adds-and-overrides
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-override-langtools
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-corba   Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-override-jaxp    Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-override-jaxws   Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-override-hotspot Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-override-nashorn Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-override-jdk     Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-import-hotspot   import hotspot binaries from this jdk image or
1996                          hotspot build dist dir instead of building from
1997                          source
1998  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1999                          to show possible values [platform dependent]
2000  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2001  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2002  --with-extra-ldflags    extra flags to be used when linking jdk
2003  --with-toolchain-version
2004                          the version of the toolchain to look for, use
2005                          '--help' to show possible values [platform
2006                          dependent]
2007  --with-build-devkit     Devkit to use for the build platform toolchain
2008  --with-jtreg            Regression Test Harness [probed]
2009  --with-native-debug-symbols
2010                          set the native debug symbol configuration (none,
2011                          internal, external, zipped) [zipped]
2012  --with-stdc++lib=<static>,<dynamic>,<default>
2013                          force linking of the C++ runtime on Linux to either
2014                          static or dynamic, default is static with dynamic as
2015                          fallback
2016  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2017                          (Windows only) [probed]
2018  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2019                          (Windows only) [probed]
2020  --with-x                use the X Window System
2021  --with-cups             specify prefix directory for the cups package
2022                          (expecting the headers under PATH/include)
2023  --with-cups-include     specify directory for the cups include files
2024  --with-freetype         specify prefix directory for the freetype package
2025                          (expecting the libraries under PATH/lib and the
2026                          headers under PATH/include)
2027  --with-freetype-include specify directory for the freetype include files
2028  --with-freetype-lib     specify directory for the freetype library
2029  --with-freetype-src     specify directory with freetype sources to
2030                          automatically build the library (experimental,
2031                          Windows-only)
2032  --with-alsa             specify prefix directory for the alsa package
2033                          (expecting the libraries under PATH/lib and the
2034                          headers under PATH/include)
2035  --with-alsa-include     specify directory for the alsa include files
2036  --with-alsa-lib         specify directory for the alsa library
2037  --with-libffi           specify prefix directory for the libffi package
2038                          (expecting the libraries under PATH/lib and the
2039                          headers under PATH/include)
2040  --with-libffi-include   specify directory for the libffi include files
2041  --with-libffi-lib       specify directory for the libffi library
2042  --with-libjpeg          use libjpeg from build system or OpenJDK source
2043                          (system, bundled) [bundled]
2044  --with-giflib           use giflib from build system or OpenJDK source
2045                          (system, bundled) [bundled]
2046  --with-libpng           use libpng from build system or OpenJDK source
2047                          (system, bundled) [bundled]
2048  --with-zlib             use zlib from build system or OpenJDK source
2049                          (system, bundled) [bundled]
2050  --with-lcms             use lcms2 from build system or OpenJDK source
2051                          (system, bundled) [bundled]
2052  --with-dxsdk            Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-dxsdk-include    Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-num-cores        number of cores in the build system, e.g.
2059                          --with-num-cores=8 [probed]
2060  --with-memory-size      memory (in MB) available in the build system, e.g.
2061                          --with-memory-size=1024 [probed]
2062  --with-jobs             number of parallel jobs to let make run [calculated
2063                          based on cores and memory]
2064  --with-test-jobs        number of parallel tests jobs to run [based on build
2065                          jobs]
2066  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2067                          invocations of boot JDK, overriding the default
2068                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2069                          -enableassertions"
2070  --with-sjavac-server-java
2071                          use this java binary for running the sjavac
2072                          background server [Boot JDK java]
2073  --with-ccache-dir       where to store ccache files [~/.ccache]
2074
2075Some influential environment variables:
2076  BASENAME    Override default value for BASENAME
2077  BASH        Override default value for BASH
2078  CAT         Override default value for CAT
2079  CHMOD       Override default value for CHMOD
2080  CMP         Override default value for CMP
2081  COMM        Override default value for COMM
2082  CP          Override default value for CP
2083  CUT         Override default value for CUT
2084  DATE        Override default value for DATE
2085  DIFF        Override default value for DIFF
2086  DIRNAME     Override default value for DIRNAME
2087  ECHO        Override default value for ECHO
2088  EXPR        Override default value for EXPR
2089  FILE        Override default value for FILE
2090  FIND        Override default value for FIND
2091  HEAD        Override default value for HEAD
2092  LN          Override default value for LN
2093  LS          Override default value for LS
2094  MKDIR       Override default value for MKDIR
2095  MKTEMP      Override default value for MKTEMP
2096  MV          Override default value for MV
2097  NAWK        Override default value for NAWK
2098  PRINTF      Override default value for PRINTF
2099  RM          Override default value for RM
2100  RMDIR       Override default value for RMDIR
2101  SH          Override default value for SH
2102  SORT        Override default value for SORT
2103  TAIL        Override default value for TAIL
2104  TAR         Override default value for TAR
2105  TEE         Override default value for TEE
2106  TOUCH       Override default value for TOUCH
2107  TR          Override default value for TR
2108  UNAME       Override default value for UNAME
2109  UNIQ        Override default value for UNIQ
2110  WC          Override default value for WC
2111  WHICH       Override default value for WHICH
2112  XARGS       Override default value for XARGS
2113  AWK         Override default value for AWK
2114  GREP        Override default value for GREP
2115  EGREP       Override default value for EGREP
2116  FGREP       Override default value for FGREP
2117  SED         Override default value for SED
2118  CYGPATH     Override default value for CYGPATH
2119  READLINK    Override default value for READLINK
2120  DF          Override default value for DF
2121  CPIO        Override default value for CPIO
2122  NICE        Override default value for NICE
2123  MAKE        Override default value for MAKE
2124  UNZIP       Override default value for UNZIP
2125  ZIP         Override default value for ZIP
2126  LDD         Override default value for LDD
2127  OTOOL       Override default value for OTOOL
2128  READELF     Override default value for READELF
2129  HG          Override default value for HG
2130  STAT        Override default value for STAT
2131  TIME        Override default value for TIME
2132  PATCH       Override default value for PATCH
2133  DSYMUTIL    Override default value for DSYMUTIL
2134  XATTR       Override default value for XATTR
2135  CODESIGN    Override default value for CODESIGN
2136  SETFILE     Override default value for SETFILE
2137  PKG_CONFIG  path to pkg-config utility
2138  JAVA        Override default value for JAVA
2139  JAVAC       Override default value for JAVAC
2140  JAVAH       Override default value for JAVAH
2141  JAR         Override default value for JAR
2142  JARSIGNER   Override default value for JARSIGNER
2143  CC          C compiler command
2144  CFLAGS      C compiler flags
2145  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2146              nonstandard directory <lib dir>
2147  LIBS        libraries to pass to the linker, e.g. -l<library>
2148  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2149              you have headers in a nonstandard directory <include dir>
2150  CXX         C++ compiler command
2151  CXXFLAGS    C++ compiler flags
2152  CPP         C preprocessor
2153  CXXCPP      C++ preprocessor
2154  AS          Override default value for AS
2155  AR          Override default value for AR
2156  LIPO        Override default value for LIPO
2157  STRIP       Override default value for STRIP
2158  NM          Override default value for NM
2159  GNM         Override default value for GNM
2160  OBJCOPY     Override default value for OBJCOPY
2161  OBJDUMP     Override default value for OBJDUMP
2162  BUILD_CC    Override default value for BUILD_CC
2163  BUILD_CXX   Override default value for BUILD_CXX
2164  BUILD_NM    Override default value for BUILD_NM
2165  BUILD_AR    Override default value for BUILD_AR
2166  JTREGEXE    Override default value for JTREGEXE
2167  XMKMF       Path to xmkmf, Makefile generator for X Window System
2168  FREETYPE_CFLAGS
2169              C compiler flags for FREETYPE, overriding pkg-config
2170  FREETYPE_LIBS
2171              linker flags for FREETYPE, overriding pkg-config
2172  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2173  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2174  LIBFFI_CFLAGS
2175              C compiler flags for LIBFFI, overriding pkg-config
2176  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2177  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2178  PNG_LIBS    linker flags for PNG, overriding pkg-config
2179  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2180  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2181  ICECC_CMD   Override default value for ICECC_CMD
2182  ICECC_CREATE_ENV
2183              Override default value for ICECC_CREATE_ENV
2184  ICECC_WRAPPER
2185              Override default value for ICECC_WRAPPER
2186  CCACHE      Override default value for CCACHE
2187
2188Use these variables to override the choices made by `configure' or to help
2189it to find libraries and programs with nonstandard names/locations.
2190
2191Report bugs to <build-dev@openjdk.java.net>.
2192OpenJDK home page: <http://openjdk.java.net>.
2193_ACEOF
2194ac_status=$?
2195fi
2196
2197if test "$ac_init_help" = "recursive"; then
2198  # If there are subdirs, report their specific --help.
2199  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2200    test -d "$ac_dir" ||
2201      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2202      continue
2203    ac_builddir=.
2204
2205case "$ac_dir" in
2206.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2207*)
2208  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2209  # A ".." for each directory in $ac_dir_suffix.
2210  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2211  case $ac_top_builddir_sub in
2212  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2213  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2214  esac ;;
2215esac
2216ac_abs_top_builddir=$ac_pwd
2217ac_abs_builddir=$ac_pwd$ac_dir_suffix
2218# for backward compatibility:
2219ac_top_builddir=$ac_top_build_prefix
2220
2221case $srcdir in
2222  .)  # We are building in place.
2223    ac_srcdir=.
2224    ac_top_srcdir=$ac_top_builddir_sub
2225    ac_abs_top_srcdir=$ac_pwd ;;
2226  [\\/]* | ?:[\\/]* )  # Absolute name.
2227    ac_srcdir=$srcdir$ac_dir_suffix;
2228    ac_top_srcdir=$srcdir
2229    ac_abs_top_srcdir=$srcdir ;;
2230  *) # Relative name.
2231    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2232    ac_top_srcdir=$ac_top_build_prefix$srcdir
2233    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2234esac
2235ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2236
2237    cd "$ac_dir" || { ac_status=$?; continue; }
2238    # Check for guested configure.
2239    if test -f "$ac_srcdir/configure.gnu"; then
2240      echo &&
2241      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2242    elif test -f "$ac_srcdir/configure"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure" --help=recursive
2245    else
2246      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2247    fi || ac_status=$?
2248    cd "$ac_pwd" || { ac_status=$?; break; }
2249  done
2250fi
2251
2252test -n "$ac_init_help" && exit $ac_status
2253if $ac_init_version; then
2254  cat <<\_ACEOF
2255OpenJDK configure jdk9
2256generated by GNU Autoconf 2.69
2257
2258Copyright (C) 2012 Free Software Foundation, Inc.
2259This configure script is free software; the Free Software Foundation
2260gives unlimited permission to copy, distribute and modify it.
2261_ACEOF
2262  exit
2263fi
2264
2265## ------------------------ ##
2266## Autoconf initialization. ##
2267## ------------------------ ##
2268
2269# ac_fn_c_try_compile LINENO
2270# --------------------------
2271# Try to compile conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_c_try_compile ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  rm -f conftest.$ac_objext
2276  if { { ac_try="$ac_compile"
2277case "(($ac_try" in
2278  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2279  *) ac_try_echo=$ac_try;;
2280esac
2281eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2282$as_echo "$ac_try_echo"; } >&5
2283  (eval "$ac_compile") 2>conftest.err
2284  ac_status=$?
2285  if test -s conftest.err; then
2286    grep -v '^ *+' conftest.err >conftest.er1
2287    cat conftest.er1 >&5
2288    mv -f conftest.er1 conftest.err
2289  fi
2290  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2291  test $ac_status = 0; } && {
2292	 test -z "$ac_c_werror_flag" ||
2293	 test ! -s conftest.err
2294       } && test -s conftest.$ac_objext; then :
2295  ac_retval=0
2296else
2297  $as_echo "$as_me: failed program was:" >&5
2298sed 's/^/| /' conftest.$ac_ext >&5
2299
2300	ac_retval=1
2301fi
2302  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2303  as_fn_set_status $ac_retval
2304
2305} # ac_fn_c_try_compile
2306
2307# ac_fn_cxx_try_compile LINENO
2308# ----------------------------
2309# Try to compile conftest.$ac_ext, and return whether this succeeded.
2310ac_fn_cxx_try_compile ()
2311{
2312  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2313  rm -f conftest.$ac_objext
2314  if { { ac_try="$ac_compile"
2315case "(($ac_try" in
2316  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2317  *) ac_try_echo=$ac_try;;
2318esac
2319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2320$as_echo "$ac_try_echo"; } >&5
2321  (eval "$ac_compile") 2>conftest.err
2322  ac_status=$?
2323  if test -s conftest.err; then
2324    grep -v '^ *+' conftest.err >conftest.er1
2325    cat conftest.er1 >&5
2326    mv -f conftest.er1 conftest.err
2327  fi
2328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2329  test $ac_status = 0; } && {
2330	 test -z "$ac_cxx_werror_flag" ||
2331	 test ! -s conftest.err
2332       } && test -s conftest.$ac_objext; then :
2333  ac_retval=0
2334else
2335  $as_echo "$as_me: failed program was:" >&5
2336sed 's/^/| /' conftest.$ac_ext >&5
2337
2338	ac_retval=1
2339fi
2340  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341  as_fn_set_status $ac_retval
2342
2343} # ac_fn_cxx_try_compile
2344
2345# ac_fn_c_try_cpp LINENO
2346# ----------------------
2347# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2348ac_fn_c_try_cpp ()
2349{
2350  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351  if { { ac_try="$ac_cpp conftest.$ac_ext"
2352case "(($ac_try" in
2353  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2354  *) ac_try_echo=$ac_try;;
2355esac
2356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2357$as_echo "$ac_try_echo"; } >&5
2358  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2359  ac_status=$?
2360  if test -s conftest.err; then
2361    grep -v '^ *+' conftest.err >conftest.er1
2362    cat conftest.er1 >&5
2363    mv -f conftest.er1 conftest.err
2364  fi
2365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2366  test $ac_status = 0; } > conftest.i && {
2367	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2368	 test ! -s conftest.err
2369       }; then :
2370  ac_retval=0
2371else
2372  $as_echo "$as_me: failed program was:" >&5
2373sed 's/^/| /' conftest.$ac_ext >&5
2374
2375    ac_retval=1
2376fi
2377  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378  as_fn_set_status $ac_retval
2379
2380} # ac_fn_c_try_cpp
2381
2382# ac_fn_cxx_try_cpp LINENO
2383# ------------------------
2384# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2385ac_fn_cxx_try_cpp ()
2386{
2387  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388  if { { ac_try="$ac_cpp conftest.$ac_ext"
2389case "(($ac_try" in
2390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391  *) ac_try_echo=$ac_try;;
2392esac
2393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394$as_echo "$ac_try_echo"; } >&5
2395  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2396  ac_status=$?
2397  if test -s conftest.err; then
2398    grep -v '^ *+' conftest.err >conftest.er1
2399    cat conftest.er1 >&5
2400    mv -f conftest.er1 conftest.err
2401  fi
2402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2403  test $ac_status = 0; } > conftest.i && {
2404	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2405	 test ! -s conftest.err
2406       }; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: failed program was:" >&5
2410sed 's/^/| /' conftest.$ac_ext >&5
2411
2412    ac_retval=1
2413fi
2414  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415  as_fn_set_status $ac_retval
2416
2417} # ac_fn_cxx_try_cpp
2418
2419# ac_fn_c_try_link LINENO
2420# -----------------------
2421# Try to link conftest.$ac_ext, and return whether this succeeded.
2422ac_fn_c_try_link ()
2423{
2424  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2425  rm -f conftest.$ac_objext conftest$ac_exeext
2426  if { { ac_try="$ac_link"
2427case "(($ac_try" in
2428  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2429  *) ac_try_echo=$ac_try;;
2430esac
2431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2432$as_echo "$ac_try_echo"; } >&5
2433  (eval "$ac_link") 2>conftest.err
2434  ac_status=$?
2435  if test -s conftest.err; then
2436    grep -v '^ *+' conftest.err >conftest.er1
2437    cat conftest.er1 >&5
2438    mv -f conftest.er1 conftest.err
2439  fi
2440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2441  test $ac_status = 0; } && {
2442	 test -z "$ac_c_werror_flag" ||
2443	 test ! -s conftest.err
2444       } && test -s conftest$ac_exeext && {
2445	 test "$cross_compiling" = yes ||
2446	 test -x conftest$ac_exeext
2447       }; then :
2448  ac_retval=0
2449else
2450  $as_echo "$as_me: failed program was:" >&5
2451sed 's/^/| /' conftest.$ac_ext >&5
2452
2453	ac_retval=1
2454fi
2455  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2456  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2457  # interfere with the next link command; also delete a directory that is
2458  # left behind by Apple's compiler.  We do this before executing the actions.
2459  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2460  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461  as_fn_set_status $ac_retval
2462
2463} # ac_fn_c_try_link
2464
2465# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2466# ---------------------------------------------------------
2467# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2468# the include files in INCLUDES and setting the cache variable VAR
2469# accordingly.
2470ac_fn_cxx_check_header_mongrel ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if eval \${$3+:} false; then :
2474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2475$as_echo_n "checking for $2... " >&6; }
2476if eval \${$3+:} false; then :
2477  $as_echo_n "(cached) " >&6
2478fi
2479eval ac_res=\$$3
2480	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481$as_echo "$ac_res" >&6; }
2482else
2483  # Is the header compilable?
2484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2485$as_echo_n "checking $2 usability... " >&6; }
2486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2487/* end confdefs.h.  */
2488$4
2489#include <$2>
2490_ACEOF
2491if ac_fn_cxx_try_compile "$LINENO"; then :
2492  ac_header_compiler=yes
2493else
2494  ac_header_compiler=no
2495fi
2496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2498$as_echo "$ac_header_compiler" >&6; }
2499
2500# Is the header present?
2501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2502$as_echo_n "checking $2 presence... " >&6; }
2503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2504/* end confdefs.h.  */
2505#include <$2>
2506_ACEOF
2507if ac_fn_cxx_try_cpp "$LINENO"; then :
2508  ac_header_preproc=yes
2509else
2510  ac_header_preproc=no
2511fi
2512rm -f conftest.err conftest.i conftest.$ac_ext
2513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2514$as_echo "$ac_header_preproc" >&6; }
2515
2516# So?  What about this header?
2517case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2518  yes:no: )
2519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2520$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2522$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2523    ;;
2524  no:yes:* )
2525    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2526$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2527    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2528$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2530$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2532$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2533    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2534$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2535( $as_echo "## ----------------------------------------- ##
2536## Report this to build-dev@openjdk.java.net ##
2537## ----------------------------------------- ##"
2538     ) | sed "s/^/$as_me: WARNING:     /" >&2
2539    ;;
2540esac
2541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2542$as_echo_n "checking for $2... " >&6; }
2543if eval \${$3+:} false; then :
2544  $as_echo_n "(cached) " >&6
2545else
2546  eval "$3=\$ac_header_compiler"
2547fi
2548eval ac_res=\$$3
2549	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550$as_echo "$ac_res" >&6; }
2551fi
2552  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2553
2554} # ac_fn_cxx_check_header_mongrel
2555
2556# ac_fn_cxx_try_run LINENO
2557# ------------------------
2558# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2559# that executables *can* be run.
2560ac_fn_cxx_try_run ()
2561{
2562  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2563  if { { ac_try="$ac_link"
2564case "(($ac_try" in
2565  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2566  *) ac_try_echo=$ac_try;;
2567esac
2568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2569$as_echo "$ac_try_echo"; } >&5
2570  (eval "$ac_link") 2>&5
2571  ac_status=$?
2572  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2573  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2574  { { case "(($ac_try" in
2575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2576  *) ac_try_echo=$ac_try;;
2577esac
2578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2579$as_echo "$ac_try_echo"; } >&5
2580  (eval "$ac_try") 2>&5
2581  ac_status=$?
2582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2583  test $ac_status = 0; }; }; then :
2584  ac_retval=0
2585else
2586  $as_echo "$as_me: program exited with status $ac_status" >&5
2587       $as_echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
2589
2590       ac_retval=$ac_status
2591fi
2592  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2593  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594  as_fn_set_status $ac_retval
2595
2596} # ac_fn_cxx_try_run
2597
2598# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2599# ---------------------------------------------------------
2600# Tests whether HEADER exists and can be compiled using the include files in
2601# INCLUDES, setting the cache variable VAR accordingly.
2602ac_fn_cxx_check_header_compile ()
2603{
2604  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2606$as_echo_n "checking for $2... " >&6; }
2607if eval \${$3+:} false; then :
2608  $as_echo_n "(cached) " >&6
2609else
2610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  eval "$3=yes"
2617else
2618  eval "$3=no"
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2626
2627} # ac_fn_cxx_check_header_compile
2628
2629# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2630# ----------------------------------------------
2631# Tries to find the compile-time value of EXPR in a program that includes
2632# INCLUDES, setting VAR accordingly. Returns whether the value could be
2633# computed
2634ac_fn_cxx_compute_int ()
2635{
2636  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2637  if test "$cross_compiling" = yes; then
2638    # Depending upon the size, compute the lo and hi bounds.
2639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641$4
2642int
2643main ()
2644{
2645static int test_array [1 - 2 * !(($2) >= 0)];
2646test_array [0] = 0;
2647return test_array [0];
2648
2649  ;
2650  return 0;
2651}
2652_ACEOF
2653if ac_fn_cxx_try_compile "$LINENO"; then :
2654  ac_lo=0 ac_mid=0
2655  while :; do
2656    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2657/* end confdefs.h.  */
2658$4
2659int
2660main ()
2661{
2662static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2663test_array [0] = 0;
2664return test_array [0];
2665
2666  ;
2667  return 0;
2668}
2669_ACEOF
2670if ac_fn_cxx_try_compile "$LINENO"; then :
2671  ac_hi=$ac_mid; break
2672else
2673  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2674			if test $ac_lo -le $ac_mid; then
2675			  ac_lo= ac_hi=
2676			  break
2677			fi
2678			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681  done
2682else
2683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h.  */
2685$4
2686int
2687main ()
2688{
2689static int test_array [1 - 2 * !(($2) < 0)];
2690test_array [0] = 0;
2691return test_array [0];
2692
2693  ;
2694  return 0;
2695}
2696_ACEOF
2697if ac_fn_cxx_try_compile "$LINENO"; then :
2698  ac_hi=-1 ac_mid=-1
2699  while :; do
2700    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701/* end confdefs.h.  */
2702$4
2703int
2704main ()
2705{
2706static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2707test_array [0] = 0;
2708return test_array [0];
2709
2710  ;
2711  return 0;
2712}
2713_ACEOF
2714if ac_fn_cxx_try_compile "$LINENO"; then :
2715  ac_lo=$ac_mid; break
2716else
2717  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2718			if test $ac_mid -le $ac_hi; then
2719			  ac_lo= ac_hi=
2720			  break
2721			fi
2722			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2723fi
2724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2725  done
2726else
2727  ac_lo= ac_hi=
2728fi
2729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2730fi
2731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732# Binary search between lo and hi bounds.
2733while test "x$ac_lo" != "x$ac_hi"; do
2734  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736/* end confdefs.h.  */
2737$4
2738int
2739main ()
2740{
2741static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2742test_array [0] = 0;
2743return test_array [0];
2744
2745  ;
2746  return 0;
2747}
2748_ACEOF
2749if ac_fn_cxx_try_compile "$LINENO"; then :
2750  ac_hi=$ac_mid
2751else
2752  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2753fi
2754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2755done
2756case $ac_lo in #((
2757?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2758'') ac_retval=1 ;;
2759esac
2760  else
2761    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764static long int longval () { return $2; }
2765static unsigned long int ulongval () { return $2; }
2766#include <stdio.h>
2767#include <stdlib.h>
2768int
2769main ()
2770{
2771
2772  FILE *f = fopen ("conftest.val", "w");
2773  if (! f)
2774    return 1;
2775  if (($2) < 0)
2776    {
2777      long int i = longval ();
2778      if (i != ($2))
2779	return 1;
2780      fprintf (f, "%ld", i);
2781    }
2782  else
2783    {
2784      unsigned long int i = ulongval ();
2785      if (i != ($2))
2786	return 1;
2787      fprintf (f, "%lu", i);
2788    }
2789  /* Do not output a trailing newline, as this causes \r\n confusion
2790     on some platforms.  */
2791  return ferror (f) || fclose (f) != 0;
2792
2793  ;
2794  return 0;
2795}
2796_ACEOF
2797if ac_fn_cxx_try_run "$LINENO"; then :
2798  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2799else
2800  ac_retval=1
2801fi
2802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2803  conftest.$ac_objext conftest.beam conftest.$ac_ext
2804rm -f conftest.val
2805
2806  fi
2807  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2808  as_fn_set_status $ac_retval
2809
2810} # ac_fn_cxx_compute_int
2811
2812# ac_fn_cxx_try_link LINENO
2813# -------------------------
2814# Try to link conftest.$ac_ext, and return whether this succeeded.
2815ac_fn_cxx_try_link ()
2816{
2817  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2818  rm -f conftest.$ac_objext conftest$ac_exeext
2819  if { { ac_try="$ac_link"
2820case "(($ac_try" in
2821  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2822  *) ac_try_echo=$ac_try;;
2823esac
2824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2825$as_echo "$ac_try_echo"; } >&5
2826  (eval "$ac_link") 2>conftest.err
2827  ac_status=$?
2828  if test -s conftest.err; then
2829    grep -v '^ *+' conftest.err >conftest.er1
2830    cat conftest.er1 >&5
2831    mv -f conftest.er1 conftest.err
2832  fi
2833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2834  test $ac_status = 0; } && {
2835	 test -z "$ac_cxx_werror_flag" ||
2836	 test ! -s conftest.err
2837       } && test -s conftest$ac_exeext && {
2838	 test "$cross_compiling" = yes ||
2839	 test -x conftest$ac_exeext
2840       }; then :
2841  ac_retval=0
2842else
2843  $as_echo "$as_me: failed program was:" >&5
2844sed 's/^/| /' conftest.$ac_ext >&5
2845
2846	ac_retval=1
2847fi
2848  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2849  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2850  # interfere with the next link command; also delete a directory that is
2851  # left behind by Apple's compiler.  We do this before executing the actions.
2852  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2853  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2854  as_fn_set_status $ac_retval
2855
2856} # ac_fn_cxx_try_link
2857
2858# ac_fn_cxx_check_func LINENO FUNC VAR
2859# ------------------------------------
2860# Tests whether FUNC exists, setting the cache variable VAR accordingly
2861ac_fn_cxx_check_func ()
2862{
2863  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2865$as_echo_n "checking for $2... " >&6; }
2866if eval \${$3+:} false; then :
2867  $as_echo_n "(cached) " >&6
2868else
2869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2870/* end confdefs.h.  */
2871/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2872   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2873#define $2 innocuous_$2
2874
2875/* System header to define __stub macros and hopefully few prototypes,
2876    which can conflict with char $2 (); below.
2877    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2878    <limits.h> exists even on freestanding compilers.  */
2879
2880#ifdef __STDC__
2881# include <limits.h>
2882#else
2883# include <assert.h>
2884#endif
2885
2886#undef $2
2887
2888/* Override any GCC internal prototype to avoid an error.
2889   Use char because int might match the return type of a GCC
2890   builtin and then its argument prototype would still apply.  */
2891#ifdef __cplusplus
2892extern "C"
2893#endif
2894char $2 ();
2895/* The GNU C library defines this for functions which it implements
2896    to always fail with ENOSYS.  Some functions are actually named
2897    something starting with __ and the normal name is an alias.  */
2898#if defined __stub_$2 || defined __stub___$2
2899choke me
2900#endif
2901
2902int
2903main ()
2904{
2905return $2 ();
2906  ;
2907  return 0;
2908}
2909_ACEOF
2910if ac_fn_cxx_try_link "$LINENO"; then :
2911  eval "$3=yes"
2912else
2913  eval "$3=no"
2914fi
2915rm -f core conftest.err conftest.$ac_objext \
2916    conftest$ac_exeext conftest.$ac_ext
2917fi
2918eval ac_res=\$$3
2919	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2920$as_echo "$ac_res" >&6; }
2921  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2922
2923} # ac_fn_cxx_check_func
2924
2925# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2926# -------------------------------------------------------
2927# Tests whether HEADER exists and can be compiled using the include files in
2928# INCLUDES, setting the cache variable VAR accordingly.
2929ac_fn_c_check_header_compile ()
2930{
2931  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2933$as_echo_n "checking for $2... " >&6; }
2934if eval \${$3+:} false; then :
2935  $as_echo_n "(cached) " >&6
2936else
2937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2938/* end confdefs.h.  */
2939$4
2940#include <$2>
2941_ACEOF
2942if ac_fn_c_try_compile "$LINENO"; then :
2943  eval "$3=yes"
2944else
2945  eval "$3=no"
2946fi
2947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2948fi
2949eval ac_res=\$$3
2950	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2951$as_echo "$ac_res" >&6; }
2952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2953
2954} # ac_fn_c_check_header_compile
2955cat >config.log <<_ACEOF
2956This file contains any messages produced by compilers while
2957running configure, to aid debugging if configure makes a mistake.
2958
2959It was created by OpenJDK $as_me jdk9, which was
2960generated by GNU Autoconf 2.69.  Invocation command line was
2961
2962  $ $0 $@
2963
2964_ACEOF
2965exec 5>>config.log
2966{
2967cat <<_ASUNAME
2968## --------- ##
2969## Platform. ##
2970## --------- ##
2971
2972hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2973uname -m = `(uname -m) 2>/dev/null || echo unknown`
2974uname -r = `(uname -r) 2>/dev/null || echo unknown`
2975uname -s = `(uname -s) 2>/dev/null || echo unknown`
2976uname -v = `(uname -v) 2>/dev/null || echo unknown`
2977
2978/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2979/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2980
2981/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2982/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2983/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2984/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2985/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2986/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2987/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2988
2989_ASUNAME
2990
2991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2992for as_dir in $PATH
2993do
2994  IFS=$as_save_IFS
2995  test -z "$as_dir" && as_dir=.
2996    $as_echo "PATH: $as_dir"
2997  done
2998IFS=$as_save_IFS
2999
3000} >&5
3001
3002cat >&5 <<_ACEOF
3003
3004
3005## ----------- ##
3006## Core tests. ##
3007## ----------- ##
3008
3009_ACEOF
3010
3011
3012# Keep a trace of the command line.
3013# Strip out --no-create and --no-recursion so they do not pile up.
3014# Strip out --silent because we don't want to record it for future runs.
3015# Also quote any args containing shell meta-characters.
3016# Make two passes to allow for proper duplicate-argument suppression.
3017ac_configure_args=
3018ac_configure_args0=
3019ac_configure_args1=
3020ac_must_keep_next=false
3021for ac_pass in 1 2
3022do
3023  for ac_arg
3024  do
3025    case $ac_arg in
3026    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3027    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3028    | -silent | --silent | --silen | --sile | --sil)
3029      continue ;;
3030    *\'*)
3031      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3032    esac
3033    case $ac_pass in
3034    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3035    2)
3036      as_fn_append ac_configure_args1 " '$ac_arg'"
3037      if test $ac_must_keep_next = true; then
3038	ac_must_keep_next=false # Got value, back to normal.
3039      else
3040	case $ac_arg in
3041	  *=* | --config-cache | -C | -disable-* | --disable-* \
3042	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3043	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3044	  | -with-* | --with-* | -without-* | --without-* | --x)
3045	    case "$ac_configure_args0 " in
3046	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3047	    esac
3048	    ;;
3049	  -* ) ac_must_keep_next=true ;;
3050	esac
3051      fi
3052      as_fn_append ac_configure_args " '$ac_arg'"
3053      ;;
3054    esac
3055  done
3056done
3057{ ac_configure_args0=; unset ac_configure_args0;}
3058{ ac_configure_args1=; unset ac_configure_args1;}
3059
3060# When interrupted or exit'd, cleanup temporary files, and complete
3061# config.log.  We remove comments because anyway the quotes in there
3062# would cause problems or look ugly.
3063# WARNING: Use '\'' to represent an apostrophe within the trap.
3064# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3065trap 'exit_status=$?
3066  # Save into config.log some information that might help in debugging.
3067  {
3068    echo
3069
3070    $as_echo "## ---------------- ##
3071## Cache variables. ##
3072## ---------------- ##"
3073    echo
3074    # The following way of writing the cache mishandles newlines in values,
3075(
3076  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3077    eval ac_val=\$$ac_var
3078    case $ac_val in #(
3079    *${as_nl}*)
3080      case $ac_var in #(
3081      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3082$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3083      esac
3084      case $ac_var in #(
3085      _ | IFS | as_nl) ;; #(
3086      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3087      *) { eval $ac_var=; unset $ac_var;} ;;
3088      esac ;;
3089    esac
3090  done
3091  (set) 2>&1 |
3092    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3093    *${as_nl}ac_space=\ *)
3094      sed -n \
3095	"s/'\''/'\''\\\\'\'''\''/g;
3096	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3097      ;; #(
3098    *)
3099      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3100      ;;
3101    esac |
3102    sort
3103)
3104    echo
3105
3106    $as_echo "## ----------------- ##
3107## Output variables. ##
3108## ----------------- ##"
3109    echo
3110    for ac_var in $ac_subst_vars
3111    do
3112      eval ac_val=\$$ac_var
3113      case $ac_val in
3114      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3115      esac
3116      $as_echo "$ac_var='\''$ac_val'\''"
3117    done | sort
3118    echo
3119
3120    if test -n "$ac_subst_files"; then
3121      $as_echo "## ------------------- ##
3122## File substitutions. ##
3123## ------------------- ##"
3124      echo
3125      for ac_var in $ac_subst_files
3126      do
3127	eval ac_val=\$$ac_var
3128	case $ac_val in
3129	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3130	esac
3131	$as_echo "$ac_var='\''$ac_val'\''"
3132      done | sort
3133      echo
3134    fi
3135
3136    if test -s confdefs.h; then
3137      $as_echo "## ----------- ##
3138## confdefs.h. ##
3139## ----------- ##"
3140      echo
3141      cat confdefs.h
3142      echo
3143    fi
3144    test "$ac_signal" != 0 &&
3145      $as_echo "$as_me: caught signal $ac_signal"
3146    $as_echo "$as_me: exit $exit_status"
3147  } >&5
3148  rm -f core *.core core.conftest.* &&
3149    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3150    exit $exit_status
3151' 0
3152for ac_signal in 1 2 13 15; do
3153  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3154done
3155ac_signal=0
3156
3157# confdefs.h avoids OS command line length limits that DEFS can exceed.
3158rm -f -r conftest* confdefs.h
3159
3160$as_echo "/* confdefs.h */" > confdefs.h
3161
3162# Predefined preprocessor variables.
3163
3164cat >>confdefs.h <<_ACEOF
3165#define PACKAGE_NAME "$PACKAGE_NAME"
3166_ACEOF
3167
3168cat >>confdefs.h <<_ACEOF
3169#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3170_ACEOF
3171
3172cat >>confdefs.h <<_ACEOF
3173#define PACKAGE_VERSION "$PACKAGE_VERSION"
3174_ACEOF
3175
3176cat >>confdefs.h <<_ACEOF
3177#define PACKAGE_STRING "$PACKAGE_STRING"
3178_ACEOF
3179
3180cat >>confdefs.h <<_ACEOF
3181#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3182_ACEOF
3183
3184cat >>confdefs.h <<_ACEOF
3185#define PACKAGE_URL "$PACKAGE_URL"
3186_ACEOF
3187
3188
3189# Let the site file select an alternate cache file if it wants to.
3190# Prefer an explicitly selected file to automatically selected ones.
3191ac_site_file1=NONE
3192ac_site_file2=NONE
3193if test -n "$CONFIG_SITE"; then
3194  # We do not want a PATH search for config.site.
3195  case $CONFIG_SITE in #((
3196    -*)  ac_site_file1=./$CONFIG_SITE;;
3197    */*) ac_site_file1=$CONFIG_SITE;;
3198    *)   ac_site_file1=./$CONFIG_SITE;;
3199  esac
3200elif test "x$prefix" != xNONE; then
3201  ac_site_file1=$prefix/share/config.site
3202  ac_site_file2=$prefix/etc/config.site
3203else
3204  ac_site_file1=$ac_default_prefix/share/config.site
3205  ac_site_file2=$ac_default_prefix/etc/config.site
3206fi
3207for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3208do
3209  test "x$ac_site_file" = xNONE && continue
3210  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3211    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3212$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3213    sed 's/^/| /' "$ac_site_file" >&5
3214    . "$ac_site_file" \
3215      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3217as_fn_error $? "failed to load site script $ac_site_file
3218See \`config.log' for more details" "$LINENO" 5; }
3219  fi
3220done
3221
3222if test -r "$cache_file"; then
3223  # Some versions of bash will fail to source /dev/null (special files
3224  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3225  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3226    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3227$as_echo "$as_me: loading cache $cache_file" >&6;}
3228    case $cache_file in
3229      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3230      *)                      . "./$cache_file";;
3231    esac
3232  fi
3233else
3234  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3235$as_echo "$as_me: creating cache $cache_file" >&6;}
3236  >$cache_file
3237fi
3238
3239# Check that the precious variables saved in the cache have kept the same
3240# value.
3241ac_cache_corrupted=false
3242for ac_var in $ac_precious_vars; do
3243  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3244  eval ac_new_set=\$ac_env_${ac_var}_set
3245  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3246  eval ac_new_val=\$ac_env_${ac_var}_value
3247  case $ac_old_set,$ac_new_set in
3248    set,)
3249      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3250$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3251      ac_cache_corrupted=: ;;
3252    ,set)
3253      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3254$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3255      ac_cache_corrupted=: ;;
3256    ,);;
3257    *)
3258      if test "x$ac_old_val" != "x$ac_new_val"; then
3259	# differences in whitespace do not lead to failure.
3260	ac_old_val_w=`echo x $ac_old_val`
3261	ac_new_val_w=`echo x $ac_new_val`
3262	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3263	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3264$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3265	  ac_cache_corrupted=:
3266	else
3267	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3268$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3269	  eval $ac_var=\$ac_old_val
3270	fi
3271	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3272$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3273	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3274$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3275      fi;;
3276  esac
3277  # Pass precious variables to config.status.
3278  if test "$ac_new_set" = set; then
3279    case $ac_new_val in
3280    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3281    *) ac_arg=$ac_var=$ac_new_val ;;
3282    esac
3283    case " $ac_configure_args " in
3284      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3285      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3286    esac
3287  fi
3288done
3289if $ac_cache_corrupted; then
3290  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3292  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3293$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3294  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3295fi
3296## -------------------- ##
3297## Main body of script. ##
3298## -------------------- ##
3299
3300ac_ext=c
3301ac_cpp='$CPP $CPPFLAGS'
3302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3304ac_compiler_gnu=$ac_cv_c_compiler_gnu
3305
3306
3307
3308ac_aux_dir=
3309for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3310  if test -f "$ac_dir/install-sh"; then
3311    ac_aux_dir=$ac_dir
3312    ac_install_sh="$ac_aux_dir/install-sh -c"
3313    break
3314  elif test -f "$ac_dir/install.sh"; then
3315    ac_aux_dir=$ac_dir
3316    ac_install_sh="$ac_aux_dir/install.sh -c"
3317    break
3318  elif test -f "$ac_dir/shtool"; then
3319    ac_aux_dir=$ac_dir
3320    ac_install_sh="$ac_aux_dir/shtool install -c"
3321    break
3322  fi
3323done
3324if test -z "$ac_aux_dir"; then
3325  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
3326fi
3327
3328# These three variables are undocumented and unsupported,
3329# and are intended to be withdrawn in a future Autoconf release.
3330# They can cause serious problems if a builder's source tree is in a directory
3331# whose full name contains unusual characters.
3332ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3333ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3334ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3335
3336
3337# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3338
3339#
3340# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3341# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3342#
3343# This code is free software; you can redistribute it and/or modify it
3344# under the terms of the GNU General Public License version 2 only, as
3345# published by the Free Software Foundation.  Oracle designates this
3346# particular file as subject to the "Classpath" exception as provided
3347# by Oracle in the LICENSE file that accompanied this code.
3348#
3349# This code is distributed in the hope that it will be useful, but WITHOUT
3350# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3351# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3352# version 2 for more details (a copy is included in the LICENSE file that
3353# accompanied this code).
3354#
3355# You should have received a copy of the GNU General Public License version
3356# 2 along with this work; if not, write to the Free Software Foundation,
3357# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3358#
3359# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3360# or visit www.oracle.com if you need additional information or have any
3361# questions.
3362#
3363
3364#
3365# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3366#
3367# This program is free software; you can redistribute it and/or modify
3368# it under the terms of the GNU General Public License as published by
3369# the Free Software Foundation; either version 2 of the License, or
3370# (at your option) any later version.
3371#
3372# This program is distributed in the hope that it will be useful, but
3373# WITHOUT ANY WARRANTY; without even the implied warranty of
3374# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3375# General Public License for more details.
3376#
3377# You should have received a copy of the GNU General Public License
3378# along with this program; if not, write to the Free Software
3379# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3380#
3381# As a special exception to the GNU General Public License, if you
3382# distribute this file as part of a program that contains a
3383# configuration script generated by Autoconf, you may include it under
3384# the same distribution terms that you use for the rest of that program.
3385
3386# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3387# ----------------------------------
3388# PKG_PROG_PKG_CONFIG
3389
3390# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3391#
3392# Check to see whether a particular set of modules exists.  Similar
3393# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3394#
3395#
3396# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3397# this or PKG_CHECK_MODULES is called, or make sure to call
3398# PKG_CHECK_EXISTS manually
3399# --------------------------------------------------------------
3400
3401
3402
3403# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3404# ---------------------------------------------
3405# _PKG_CONFIG
3406
3407# _PKG_SHORT_ERRORS_SUPPORTED
3408# -----------------------------
3409# _PKG_SHORT_ERRORS_SUPPORTED
3410
3411
3412# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3413# [ACTION-IF-NOT-FOUND])
3414#
3415#
3416# Note that if there is a possibility the first call to
3417# PKG_CHECK_MODULES might not happen, you should be sure to include an
3418# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3419#
3420#
3421# --------------------------------------------------------------
3422# PKG_CHECK_MODULES
3423
3424
3425# Include these first...
3426#
3427# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3428# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3429#
3430# This code is free software; you can redistribute it and/or modify it
3431# under the terms of the GNU General Public License version 2 only, as
3432# published by the Free Software Foundation.  Oracle designates this
3433# particular file as subject to the "Classpath" exception as provided
3434# by Oracle in the LICENSE file that accompanied this code.
3435#
3436# This code is distributed in the hope that it will be useful, but WITHOUT
3437# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3438# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3439# version 2 for more details (a copy is included in the LICENSE file that
3440# accompanied this code).
3441#
3442# You should have received a copy of the GNU General Public License version
3443# 2 along with this work; if not, write to the Free Software Foundation,
3444# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3445#
3446# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3447# or visit www.oracle.com if you need additional information or have any
3448# questions.
3449#
3450
3451# Create a function/macro that takes a series of named arguments. The call is
3452# similar to AC_DEFUN, but the setup of the function looks like this:
3453# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3454# ... do something
3455#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3456# ])
3457# A star (*) in front of a named argument means that it is required and it's
3458# presence will be verified. To pass e.g. the first value as a normal indexed
3459# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3460# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3461# "ARG_FOO".
3462#
3463# The generated function can be called like this:
3464# MYFUNC(FOO: [foo-val], BAR:
3465#     [
3466#         $ECHO hello world
3467#     ])
3468#
3469#
3470# Argument 1: Name of the function to define
3471# Argument 2: List of legal named arguments, with a * prefix for required arguments
3472# Argument 3: Argument array to treat as named, typically $@
3473# Argument 4: The main function body
3474
3475
3476# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3477# If so, then append $1 to $2 \
3478# Also set JVM_ARG_OK to true/false depending on outcome.
3479
3480
3481# Appends a string to a path variable, only adding the : when needed.
3482
3483
3484# Prepends a string to a path variable, only adding the : when needed.
3485
3486
3487# This will make sure the given variable points to a full and proper
3488# path. This means:
3489# 1) There will be no spaces in the path. On unix platforms,
3490#    spaces in the path will result in an error. On Windows,
3491#    the path will be rewritten using short-style to be space-free.
3492# 2) The path will be absolute, and it will be in unix-style (on
3493#     cygwin).
3494# $1: The name of the variable to fix
3495
3496
3497# This will make sure the given variable points to a executable
3498# with a full and proper path. This means:
3499# 1) There will be no spaces in the path. On unix platforms,
3500#    spaces in the path will result in an error. On Windows,
3501#    the path will be rewritten using short-style to be space-free.
3502# 2) The path will be absolute, and it will be in unix-style (on
3503#     cygwin).
3504# Any arguments given to the executable is preserved.
3505# If the input variable does not have a directory specification, then
3506# it need to be in the PATH.
3507# $1: The name of the variable to fix
3508
3509
3510
3511
3512# Register a --with argument but mark it as deprecated
3513# $1: The name of the with argument to deprecate, not including --with-
3514
3515
3516# Register a --enable argument but mark it as deprecated
3517# $1: The name of the with argument to deprecate, not including --enable-
3518# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3519# $3: Messages to user.
3520
3521
3522
3523
3524# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3525# $1: variable to check
3526
3527
3528# Check that there are no unprocessed overridden variables left.
3529# If so, they are an incorrect argument and we will exit with an error.
3530
3531
3532# Setup a tool for the given variable. If correctly specified by the user,
3533# use that value, otherwise search for the tool using the supplied code snippet.
3534# $1: variable to set
3535# $2: code snippet to call to look for the tool
3536# $3: code snippet to call if variable was used to find tool
3537
3538
3539# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3540# $1: variable to set
3541# $2: executable name (or list of names) to look for
3542
3543
3544# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3545# $1: variable to set
3546# $2: executable name (or list of names) to look for
3547
3548
3549# Like BASIC_PATH_PROGS but fails if no tool was found.
3550# $1: variable to set
3551# $2: executable name (or list of names) to look for
3552
3553
3554# Like BASIC_SETUP_TOOL but fails if no tool was found.
3555# $1: variable to set
3556# $2: autoconf macro to call to look for the special tool
3557
3558
3559# Setup the most fundamental tools that relies on not much else to set up,
3560# but is used by much of the early bootstrap code.
3561
3562
3563# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3564
3565
3566# Evaluates platform specific overrides for devkit variables.
3567# $1: Name of variable
3568
3569
3570
3571
3572
3573
3574#%%% Simple tools %%%
3575
3576# Check if we have found a usable version of make
3577# $1: the path to a potential make binary (or empty)
3578# $2: the description on how we found this
3579
3580
3581
3582
3583# Goes looking for a usable version of GNU make.
3584
3585
3586
3587
3588
3589
3590# Check if build directory is on local disk. If not possible to determine,
3591# we prefer to claim it's local.
3592# Argument 1: directory to test
3593# Argument 2: what to do if it is on local disk
3594# Argument 3: what to do otherwise (remote disk or failure)
3595
3596
3597# Check that source files have basic read permissions set. This might
3598# not be the case in cygwin in certain conditions.
3599
3600
3601
3602
3603# Check for support for specific options in bash
3604
3605
3606################################################################################
3607#
3608# Default make target
3609#
3610
3611
3612# Code to run after AC_OUTPUT
3613
3614
3615#
3616# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3618#
3619# This code is free software; you can redistribute it and/or modify it
3620# under the terms of the GNU General Public License version 2 only, as
3621# published by the Free Software Foundation.  Oracle designates this
3622# particular file as subject to the "Classpath" exception as provided
3623# by Oracle in the LICENSE file that accompanied this code.
3624#
3625# This code is distributed in the hope that it will be useful, but WITHOUT
3626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3628# version 2 for more details (a copy is included in the LICENSE file that
3629# accompanied this code).
3630#
3631# You should have received a copy of the GNU General Public License version
3632# 2 along with this work; if not, write to the Free Software Foundation,
3633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3634#
3635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3636# or visit www.oracle.com if you need additional information or have any
3637# questions.
3638#
3639
3640
3641
3642
3643
3644# Helper function which possibly converts a path using DOS-style short mode.
3645# If so, the updated path is stored in $new_path.
3646# $1: The path to check
3647
3648
3649# Helper function which possibly converts a path using DOS-style short mode.
3650# If so, the updated path is stored in $new_path.
3651# $1: The path to check
3652
3653
3654# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3655# and could probably be heavily simplified. However, all changes in this
3656# area tend to need lot of testing in different scenarios, and in lack of
3657# proper unit testing, cleaning this up has not been deemed worth the effort
3658# at the moment.
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3669
3670
3671
3672
3673# ... then the rest
3674#
3675# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3676# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3677#
3678# This code is free software; you can redistribute it and/or modify it
3679# under the terms of the GNU General Public License version 2 only, as
3680# published by the Free Software Foundation.  Oracle designates this
3681# particular file as subject to the "Classpath" exception as provided
3682# by Oracle in the LICENSE file that accompanied this code.
3683#
3684# This code is distributed in the hope that it will be useful, but WITHOUT
3685# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3686# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3687# version 2 for more details (a copy is included in the LICENSE file that
3688# accompanied this code).
3689#
3690# You should have received a copy of the GNU General Public License version
3691# 2 along with this work; if not, write to the Free Software Foundation,
3692# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3693#
3694# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3695# or visit www.oracle.com if you need additional information or have any
3696# questions.
3697#
3698
3699########################################################################
3700# This file handles detection of the Boot JDK. The Boot JDK detection
3701# process has been developed as a response to solve a complex real-world
3702# problem. Initially, it was simple, but it has grown as platform after
3703# platform, idiosyncracy after idiosyncracy has been supported.
3704#
3705# The basic idea is this:
3706# 1) You need an acceptable *) JDK to use as a Boot JDK
3707# 2) There are several ways to locate a JDK, that are mostly platform
3708#    dependent **)
3709# 3) You can have multiple JDKs installed
3710# 4) If possible, configure should try to dig out an acceptable JDK
3711#    automatically, without having to resort to command-line options
3712#
3713# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3714#     javac) and not a JRE, etc.
3715#
3716# **) On Windows we typically use a well-known path.
3717#     On MacOSX we typically use the tool java_home.
3718#     On Linux we typically find javac in the $PATH, and then follow a
3719#     chain of symlinks that often ends up in a real JDK.
3720#
3721# This leads to the code where we check in different ways to locate a
3722# JDK, and if one is found, check if it is acceptable. If not, we print
3723# our reasons for rejecting it (useful when debugging non-working
3724# configure situations) and continue checking the next one.
3725########################################################################
3726
3727# Execute the check given as argument, and verify the result
3728# If the Boot JDK was previously found, do nothing
3729# $1 A command line (typically autoconf macro) to execute
3730
3731
3732# Test: Is bootjdk explicitely set by command line arguments?
3733
3734
3735# Test: Is $JAVA_HOME set?
3736
3737
3738# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3739
3740
3741# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3742# $1: Argument to the java_home binary (optional)
3743
3744
3745# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3746
3747
3748# Look for a jdk in the given path. If there are multiple, try to select the newest.
3749# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3750# $1 = Path to directory containing jdk installations.
3751# $2 = String to append to the found JDK directory to get the proper JDK home
3752
3753
3754# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3755# environmental variable as base for where to look.
3756# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3757
3758
3759# Test: Is there a JDK installed in default, well-known locations?
3760
3761
3762# Check that a command-line tool in the Boot JDK is correct
3763# $1 = name of variable to assign
3764# $2 = name of binary
3765
3766
3767###############################################################################
3768#
3769# We need a Boot JDK to bootstrap the build.
3770#
3771
3772
3773
3774
3775
3776#
3777# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3778# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3779#
3780# This code is free software; you can redistribute it and/or modify it
3781# under the terms of the GNU General Public License version 2 only, as
3782# published by the Free Software Foundation.  Oracle designates this
3783# particular file as subject to the "Classpath" exception as provided
3784# by Oracle in the LICENSE file that accompanied this code.
3785#
3786# This code is distributed in the hope that it will be useful, but WITHOUT
3787# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3788# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3789# version 2 for more details (a copy is included in the LICENSE file that
3790# accompanied this code).
3791#
3792# You should have received a copy of the GNU General Public License version
3793# 2 along with this work; if not, write to the Free Software Foundation,
3794# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3795#
3796# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3797# or visit www.oracle.com if you need additional information or have any
3798# questions.
3799#
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817################################################################################
3818#
3819# Runs icecc-create-env once and prints the error if it fails
3820#
3821# $1: arguments to icecc-create-env
3822# $2: log file
3823#
3824
3825
3826################################################################################
3827#
3828# Optionally enable distributed compilation of native code using icecc/icecream
3829#
3830
3831
3832
3833
3834
3835
3836
3837#
3838# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3839# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3840#
3841# This code is free software; you can redistribute it and/or modify it
3842# under the terms of the GNU General Public License version 2 only, as
3843# published by the Free Software Foundation.  Oracle designates this
3844# particular file as subject to the "Classpath" exception as provided
3845# by Oracle in the LICENSE file that accompanied this code.
3846#
3847# This code is distributed in the hope that it will be useful, but WITHOUT
3848# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3849# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3850# version 2 for more details (a copy is included in the LICENSE file that
3851# accompanied this code).
3852#
3853# You should have received a copy of the GNU General Public License version
3854# 2 along with this work; if not, write to the Free Software Foundation,
3855# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3856#
3857# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3858# or visit www.oracle.com if you need additional information or have any
3859# questions.
3860#
3861
3862# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3863# corresponding configure arguments instead
3864
3865
3866# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3867# that configure can use them while detecting compilers.
3868# TOOLCHAIN_TYPE is available here.
3869# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3870
3871
3872
3873
3874
3875
3876# Documentation on common flags used for solstudio in HIGHEST.
3877#
3878# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3879#          done with care, there are some assumptions below that need to
3880#          be understood about the use of pointers, and IEEE behavior.
3881#
3882# -fns: Use non-standard floating point mode (not IEEE 754)
3883# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3884# -fsingle: Use single precision floating point with 'float'
3885# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3886#   (Source with excessing pointer casting and data access with mixed
3887#    pointer types are not recommended)
3888# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3889#   (If you expect perfect errno behavior, do not use this)
3890# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3891# -xrestrict: Pointer parameters to functions do not overlap
3892#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3893#    If you pass in multiple pointers to the same data, do not use this)
3894# -xlibmil: Inline some library routines
3895#   (If you expect perfect errno behavior, do not use this)
3896# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3897#   (If you expect perfect errno behavior, do not use this)
3898#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3899
3900    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3901    # Bug?
3902    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3903    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3904    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3905    #fi
3906
3907
3908
3909
3910
3911# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3912#                                   IF_FALSE: [RUN-IF-FALSE])
3913# ------------------------------------------------------------
3914# Check that the c and c++ compilers support an argument
3915
3916
3917
3918
3919# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3920#                                   IF_FALSE: [RUN-IF-FALSE])
3921# ------------------------------------------------------------
3922# Check that the linker support an argument
3923
3924
3925
3926
3927
3928
3929#
3930# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3931# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932#
3933# This code is free software; you can redistribute it and/or modify it
3934# under the terms of the GNU General Public License version 2 only, as
3935# published by the Free Software Foundation.  Oracle designates this
3936# particular file as subject to the "Classpath" exception as provided
3937# by Oracle in the LICENSE file that accompanied this code.
3938#
3939# This code is distributed in the hope that it will be useful, but WITHOUT
3940# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942# version 2 for more details (a copy is included in the LICENSE file that
3943# accompanied this code).
3944#
3945# You should have received a copy of the GNU General Public License version
3946# 2 along with this work; if not, write to the Free Software Foundation,
3947# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948#
3949# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950# or visit www.oracle.com if you need additional information or have any
3951# questions.
3952#
3953
3954
3955
3956
3957
3958cygwin_help() {
3959  case $1 in
3960    unzip)
3961      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3962      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3963      ;;
3964    zip)
3965      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3966      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3967      ;;
3968    make)
3969      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3970      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3971      ;;
3972    freetype)
3973      HELP_MSG="
3974The freetype library can now be build during the configure process.
3975Download the freetype sources and unpack them into an arbitrary directory:
3976
3977wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3978tar -xzf freetype-2.5.3.tar.gz
3979
3980Then run configure with '--with-freetype-src=<freetype_src>'. This will
3981automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3982builds or into '<freetype_src>/lib32' for 32-bit builds.
3983Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3984and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3985
3986Alternatively you can unpack the sources like this to use the default directory:
3987
3988tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3989      ;;
3990  esac
3991}
3992
3993msys_help() {
3994  PKGHANDLER_COMMAND=""
3995}
3996
3997apt_help() {
3998  case $1 in
3999    reduced)
4000      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4001    devkit)
4002      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4003    openjdk)
4004      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4005    alsa)
4006      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4007    cups)
4008      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4009    freetype)
4010      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4011    ffi)
4012      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4013    x11)
4014      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4015    ccache)
4016      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4017  esac
4018}
4019
4020yum_help() {
4021  case $1 in
4022    devkit)
4023      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4024    openjdk)
4025      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4026    alsa)
4027      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4028    cups)
4029      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4030    freetype)
4031      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4032    x11)
4033      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4034    ccache)
4035      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4036  esac
4037}
4038
4039port_help() {
4040  PKGHANDLER_COMMAND=""
4041}
4042
4043pkgutil_help() {
4044  PKGHANDLER_COMMAND=""
4045}
4046
4047pkgadd_help() {
4048  PKGHANDLER_COMMAND=""
4049}
4050
4051# This function will check if we're called from the "configure" wrapper while
4052# printing --help. If so, we will print out additional information that can
4053# only be extracted within the autoconf script, and then exit. This must be
4054# called at the very beginning in configure.ac.
4055
4056
4057
4058
4059
4060
4061#
4062# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4063# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4064#
4065# This code is free software; you can redistribute it and/or modify it
4066# under the terms of the GNU General Public License version 2 only, as
4067# published by the Free Software Foundation.  Oracle designates this
4068# particular file as subject to the "Classpath" exception as provided
4069# by Oracle in the LICENSE file that accompanied this code.
4070#
4071# This code is distributed in the hope that it will be useful, but WITHOUT
4072# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4073# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4074# version 2 for more details (a copy is included in the LICENSE file that
4075# accompanied this code).
4076#
4077# You should have received a copy of the GNU General Public License version
4078# 2 along with this work; if not, write to the Free Software Foundation,
4079# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4080#
4081# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4082# or visit www.oracle.com if you need additional information or have any
4083# questions.
4084#
4085
4086###############################################################################
4087# Check which interpreter of the JVM we want to build.
4088# Currently we have:
4089#    template: Template interpreter (the default)
4090#    cpp     : C++ interpreter
4091
4092
4093###############################################################################
4094# Check which variants of the JVM that we want to build.
4095# Currently we have:
4096#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4097#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4098#    minimal1: reduced form of client with optional VM services and features stripped out
4099#    zero: no machine code interpreter, no compiler
4100#    zeroshark: zero interpreter and shark/llvm compiler backend
4101#    core: interpreter only, no compiler (only works on some platforms)
4102
4103
4104
4105###############################################################################
4106# Setup legacy vars/targets and new vars to deal with different debug levels.
4107#
4108#    release: no debug information, all optimizations, no asserts.
4109#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4110#    fastdebug: debug information (-g), all optimizations, all asserts
4111#    slowdebug: debug information (-g), no optimizations, all asserts
4112#
4113
4114
4115
4116
4117
4118
4119#
4120# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4121# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122#
4123# This code is free software; you can redistribute it and/or modify it
4124# under the terms of the GNU General Public License version 2 only, as
4125# published by the Free Software Foundation.  Oracle designates this
4126# particular file as subject to the "Classpath" exception as provided
4127# by Oracle in the LICENSE file that accompanied this code.
4128#
4129# This code is distributed in the hope that it will be useful, but WITHOUT
4130# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132# version 2 for more details (a copy is included in the LICENSE file that
4133# accompanied this code).
4134#
4135# You should have received a copy of the GNU General Public License version
4136# 2 along with this work; if not, write to the Free Software Foundation,
4137# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138#
4139# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140# or visit www.oracle.com if you need additional information or have any
4141# questions.
4142#
4143
4144###############################################################################
4145# Check which variant of the JDK that we want to build.
4146# Currently we have:
4147#    normal:   standard edition
4148# but the custom make system may add other variants
4149#
4150# Effectively the JDK variant gives a name to a specific set of
4151# modules to compile into the JDK.
4152
4153
4154###############################################################################
4155# Set the debug level
4156#    release: no debug information, all optimizations, no asserts.
4157#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4158#    fastdebug: debug information (-g), all optimizations, all asserts
4159#    slowdebug: debug information (-g), no optimizations, all asserts
4160
4161
4162###############################################################################
4163#
4164# Should we build only OpenJDK even if closed sources are present?
4165#
4166
4167
4168
4169
4170###############################################################################
4171#
4172# Enable or disable the elliptic curve crypto implementation
4173#
4174
4175
4176
4177
4178################################################################################
4179#
4180# Gcov coverage data for hotspot
4181#
4182
4183
4184################################################################################
4185#
4186# Static build support.  When enabled will generate static
4187# libraries instead of shared libraries for all JDK libs.
4188#
4189
4190
4191#
4192# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4193# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4194#
4195# This code is free software; you can redistribute it and/or modify it
4196# under the terms of the GNU General Public License version 2 only, as
4197# published by the Free Software Foundation.  Oracle designates this
4198# particular file as subject to the "Classpath" exception as provided
4199# by Oracle in the LICENSE file that accompanied this code.
4200#
4201# This code is distributed in the hope that it will be useful, but WITHOUT
4202# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4203# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4204# version 2 for more details (a copy is included in the LICENSE file that
4205# accompanied this code).
4206#
4207# You should have received a copy of the GNU General Public License version
4208# 2 along with this work; if not, write to the Free Software Foundation,
4209# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4210#
4211# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4212# or visit www.oracle.com if you need additional information or have any
4213# questions.
4214#
4215
4216###############################################################################
4217#
4218# Setup version numbers
4219#
4220
4221# Verify that a given string represents a valid version number, and assign it
4222# to a variable.
4223
4224# Argument 1: the variable to assign to
4225# Argument 2: the value given by the user
4226
4227
4228
4229
4230#
4231# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233#
4234# This code is free software; you can redistribute it and/or modify it
4235# under the terms of the GNU General Public License version 2 only, as
4236# published by the Free Software Foundation.  Oracle designates this
4237# particular file as subject to the "Classpath" exception as provided
4238# by Oracle in the LICENSE file that accompanied this code.
4239#
4240# This code is distributed in the hope that it will be useful, but WITHOUT
4241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243# version 2 for more details (a copy is included in the LICENSE file that
4244# accompanied this code).
4245#
4246# You should have received a copy of the GNU General Public License version
4247# 2 along with this work; if not, write to the Free Software Foundation,
4248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249#
4250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251# or visit www.oracle.com if you need additional information or have any
4252# questions.
4253#
4254
4255# Major library component reside in separate files.
4256#
4257# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4258# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4259#
4260# This code is free software; you can redistribute it and/or modify it
4261# under the terms of the GNU General Public License version 2 only, as
4262# published by the Free Software Foundation.  Oracle designates this
4263# particular file as subject to the "Classpath" exception as provided
4264# by Oracle in the LICENSE file that accompanied this code.
4265#
4266# This code is distributed in the hope that it will be useful, but WITHOUT
4267# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4268# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4269# version 2 for more details (a copy is included in the LICENSE file that
4270# accompanied this code).
4271#
4272# You should have received a copy of the GNU General Public License version
4273# 2 along with this work; if not, write to the Free Software Foundation,
4274# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4275#
4276# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4277# or visit www.oracle.com if you need additional information or have any
4278# questions.
4279#
4280
4281################################################################################
4282# Setup alsa (Advanced Linux Sound Architecture)
4283################################################################################
4284
4285
4286#
4287# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4288# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4289#
4290# This code is free software; you can redistribute it and/or modify it
4291# under the terms of the GNU General Public License version 2 only, as
4292# published by the Free Software Foundation.  Oracle designates this
4293# particular file as subject to the "Classpath" exception as provided
4294# by Oracle in the LICENSE file that accompanied this code.
4295#
4296# This code is distributed in the hope that it will be useful, but WITHOUT
4297# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4298# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4299# version 2 for more details (a copy is included in the LICENSE file that
4300# accompanied this code).
4301#
4302# You should have received a copy of the GNU General Public License version
4303# 2 along with this work; if not, write to the Free Software Foundation,
4304# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4305#
4306# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4307# or visit www.oracle.com if you need additional information or have any
4308# questions.
4309#
4310
4311################################################################################
4312# Setup bundled libraries.
4313#
4314# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4315# OpenJDK repository. Default is to use these libraries as bundled, but they
4316# might be replaced by en external version by the user.
4317################################################################################
4318
4319
4320################################################################################
4321# Setup libjpeg
4322################################################################################
4323
4324
4325################################################################################
4326# Setup giflib
4327################################################################################
4328
4329
4330################################################################################
4331# Setup libpng
4332################################################################################
4333
4334
4335################################################################################
4336# Setup zlib
4337################################################################################
4338
4339
4340################################################################################
4341# Setup lcms (Little CMS)
4342################################################################################
4343
4344
4345#
4346# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4347# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4348#
4349# This code is free software; you can redistribute it and/or modify it
4350# under the terms of the GNU General Public License version 2 only, as
4351# published by the Free Software Foundation.  Oracle designates this
4352# particular file as subject to the "Classpath" exception as provided
4353# by Oracle in the LICENSE file that accompanied this code.
4354#
4355# This code is distributed in the hope that it will be useful, but WITHOUT
4356# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4357# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4358# version 2 for more details (a copy is included in the LICENSE file that
4359# accompanied this code).
4360#
4361# You should have received a copy of the GNU General Public License version
4362# 2 along with this work; if not, write to the Free Software Foundation,
4363# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4364#
4365# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4366# or visit www.oracle.com if you need additional information or have any
4367# questions.
4368#
4369
4370################################################################################
4371# Setup cups (Common Unix Printing System)
4372################################################################################
4373
4374
4375#
4376# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4377# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4378#
4379# This code is free software; you can redistribute it and/or modify it
4380# under the terms of the GNU General Public License version 2 only, as
4381# published by the Free Software Foundation.  Oracle designates this
4382# particular file as subject to the "Classpath" exception as provided
4383# by Oracle in the LICENSE file that accompanied this code.
4384#
4385# This code is distributed in the hope that it will be useful, but WITHOUT
4386# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4387# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4388# version 2 for more details (a copy is included in the LICENSE file that
4389# accompanied this code).
4390#
4391# You should have received a copy of the GNU General Public License version
4392# 2 along with this work; if not, write to the Free Software Foundation,
4393# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4394#
4395# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4396# or visit www.oracle.com if you need additional information or have any
4397# questions.
4398#
4399
4400################################################################################
4401# Setup libffi (Foreign Function Interface)
4402################################################################################
4403
4404
4405#
4406# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4407# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4408#
4409# This code is free software; you can redistribute it and/or modify it
4410# under the terms of the GNU General Public License version 2 only, as
4411# published by the Free Software Foundation.  Oracle designates this
4412# particular file as subject to the "Classpath" exception as provided
4413# by Oracle in the LICENSE file that accompanied this code.
4414#
4415# This code is distributed in the hope that it will be useful, but WITHOUT
4416# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4417# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4418# version 2 for more details (a copy is included in the LICENSE file that
4419# accompanied this code).
4420#
4421# You should have received a copy of the GNU General Public License version
4422# 2 along with this work; if not, write to the Free Software Foundation,
4423# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4424#
4425# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4426# or visit www.oracle.com if you need additional information or have any
4427# questions.
4428#
4429
4430################################################################################
4431# Build the freetype lib from source
4432################################################################################
4433
4434
4435################################################################################
4436# Check if a potential freeype library match is correct and usable
4437################################################################################
4438
4439
4440################################################################################
4441# Setup freetype (The FreeType2 font rendering library)
4442################################################################################
4443
4444
4445#
4446# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4447# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448#
4449# This code is free software; you can redistribute it and/or modify it
4450# under the terms of the GNU General Public License version 2 only, as
4451# published by the Free Software Foundation.  Oracle designates this
4452# particular file as subject to the "Classpath" exception as provided
4453# by Oracle in the LICENSE file that accompanied this code.
4454#
4455# This code is distributed in the hope that it will be useful, but WITHOUT
4456# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458# version 2 for more details (a copy is included in the LICENSE file that
4459# accompanied this code).
4460#
4461# You should have received a copy of the GNU General Public License version
4462# 2 along with this work; if not, write to the Free Software Foundation,
4463# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464#
4465# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466# or visit www.oracle.com if you need additional information or have any
4467# questions.
4468#
4469
4470################################################################################
4471# Setup the standard C/C++ runtime libraries.
4472#
4473# Most importantly, determine if stdc++ should be linked statically or
4474# dynamically.
4475################################################################################
4476
4477
4478#
4479# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4480# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4481#
4482# This code is free software; you can redistribute it and/or modify it
4483# under the terms of the GNU General Public License version 2 only, as
4484# published by the Free Software Foundation.  Oracle designates this
4485# particular file as subject to the "Classpath" exception as provided
4486# by Oracle in the LICENSE file that accompanied this code.
4487#
4488# This code is distributed in the hope that it will be useful, but WITHOUT
4489# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4490# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4491# version 2 for more details (a copy is included in the LICENSE file that
4492# accompanied this code).
4493#
4494# You should have received a copy of the GNU General Public License version
4495# 2 along with this work; if not, write to the Free Software Foundation,
4496# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4497#
4498# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4499# or visit www.oracle.com if you need additional information or have any
4500# questions.
4501#
4502
4503################################################################################
4504# Setup X11 Windows system
4505################################################################################
4506
4507
4508
4509################################################################################
4510# Determine which libraries are needed for this configuration
4511################################################################################
4512
4513
4514################################################################################
4515# Parse library options, and setup needed libraries
4516################################################################################
4517
4518
4519################################################################################
4520# Setup llvm (Low-Level VM)
4521################################################################################
4522
4523
4524################################################################################
4525# Setup various libraries, typically small system libraries
4526################################################################################
4527
4528
4529#
4530# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4532#
4533# This code is free software; you can redistribute it and/or modify it
4534# under the terms of the GNU General Public License version 2 only, as
4535# published by the Free Software Foundation.  Oracle designates this
4536# particular file as subject to the "Classpath" exception as provided
4537# by Oracle in the LICENSE file that accompanied this code.
4538#
4539# This code is distributed in the hope that it will be useful, but WITHOUT
4540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4542# version 2 for more details (a copy is included in the LICENSE file that
4543# accompanied this code).
4544#
4545# You should have received a copy of the GNU General Public License version
4546# 2 along with this work; if not, write to the Free Software Foundation,
4547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4548#
4549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4550# or visit www.oracle.com if you need additional information or have any
4551# questions.
4552#
4553
4554# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4555# Converts autoconf style CPU name to OpenJDK style, into
4556# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4557
4558
4559# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4560# Converts autoconf style OS name to OpenJDK style, into
4561# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4562
4563
4564# Expects $host_os $host_cpu $build_os and $build_cpu
4565# and $with_target_bits to have been setup!
4566#
4567# Translate the standard triplet(quadruplet) definition
4568# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4569# OPENJDK_BUILD_OS, etc.
4570
4571
4572# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4573# accordingly. Must be done after setting up build and target system, but before
4574# doing anything else with these values.
4575
4576
4577# Setup the legacy variables, for controlling the old makefiles.
4578#
4579
4580
4581
4582
4583#%%% Build and target systems %%%
4584
4585
4586
4587
4588# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4589# Add -mX to various FLAGS variables.
4590
4591
4592
4593
4594
4595
4596#
4597# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4599#
4600# This code is free software; you can redistribute it and/or modify it
4601# under the terms of the GNU General Public License version 2 only, as
4602# published by the Free Software Foundation.  Oracle designates this
4603# particular file as subject to the "Classpath" exception as provided
4604# by Oracle in the LICENSE file that accompanied this code.
4605#
4606# This code is distributed in the hope that it will be useful, but WITHOUT
4607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4609# version 2 for more details (a copy is included in the LICENSE file that
4610# accompanied this code).
4611#
4612# You should have received a copy of the GNU General Public License version
4613# 2 along with this work; if not, write to the Free Software Foundation,
4614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4615#
4616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4617# or visit www.oracle.com if you need additional information or have any
4618# questions.
4619#
4620
4621
4622
4623
4624
4625
4626
4627#
4628# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4629# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4630#
4631# This code is free software; you can redistribute it and/or modify it
4632# under the terms of the GNU General Public License version 2 only, as
4633# published by the Free Software Foundation.  Oracle designates this
4634# particular file as subject to the "Classpath" exception as provided
4635# by Oracle in the LICENSE file that accompanied this code.
4636#
4637# This code is distributed in the hope that it will be useful, but WITHOUT
4638# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4639# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4640# version 2 for more details (a copy is included in the LICENSE file that
4641# accompanied this code).
4642#
4643# You should have received a copy of the GNU General Public License version
4644# 2 along with this work; if not, write to the Free Software Foundation,
4645# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4646#
4647# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4648# or visit www.oracle.com if you need additional information or have any
4649# questions.
4650#
4651
4652########################################################################
4653# This file is responsible for detecting, verifying and setting up the
4654# toolchain, i.e. the compiler, linker and related utilities. It will setup
4655# proper paths to the binaries, but it will not setup any flags.
4656#
4657# The binaries used is determined by the toolchain type, which is the family of
4658# compilers and related tools that are used.
4659########################################################################
4660
4661
4662# All valid toolchains, regardless of platform (used by help.m4)
4663VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4664
4665# These toolchains are valid on different platforms
4666VALID_TOOLCHAINS_linux="gcc clang"
4667VALID_TOOLCHAINS_solaris="solstudio"
4668VALID_TOOLCHAINS_macosx="gcc clang"
4669VALID_TOOLCHAINS_aix="xlc"
4670VALID_TOOLCHAINS_windows="microsoft"
4671
4672# Toolchain descriptions
4673TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4674TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4675TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4676TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4677TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4678
4679# Setup a number of variables describing how native output files are
4680# named on this platform/toolchain.
4681
4682
4683# Determine which toolchain type to use, and make sure it is valid for this
4684# platform. Setup various information about the selected toolchain.
4685
4686
4687# Before we start detecting the toolchain executables, we might need some
4688# special setup, e.g. additional paths etc.
4689
4690
4691# Restore path, etc
4692
4693
4694# Check if a compiler is of the toolchain type we expect, and save the version
4695# information from it. If the compiler does not match the expected type,
4696# this function will abort using AC_MSG_ERROR. If it matches, the version will
4697# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4698# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4699#
4700# $1 = compiler to test (CC or CXX)
4701# $2 = human readable name of compiler (C or C++)
4702
4703
4704# Try to locate the given C or C++ compiler in the path, or otherwise.
4705#
4706# $1 = compiler to test (CC or CXX)
4707# $2 = human readable name of compiler (C or C++)
4708# $3 = list of compiler names to search for
4709
4710
4711# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4712# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4713# archiver (AR). Verify that the compilers are correct according to the
4714# toolchain type.
4715
4716
4717# Setup additional tools that is considered a part of the toolchain, but not the
4718# core part. Many of these are highly platform-specific and do not exist,
4719# and/or are not needed on all platforms.
4720
4721
4722# Setup the build tools (i.e, the compiler and linker used to build programs
4723# that should be run on the build platform, not the target platform, as a build
4724# helper). Since the non-cross-compile case uses the normal, target compilers
4725# for this, we can only do this after these have been setup.
4726
4727
4728# Setup legacy variables that are still needed as alternative ways to refer to
4729# parts of the toolchain.
4730
4731
4732# Do some additional checks on the detected tools.
4733
4734
4735# Setup the JTReg Regression Test Harness.
4736
4737
4738#
4739# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4740# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4741#
4742# This code is free software; you can redistribute it and/or modify it
4743# under the terms of the GNU General Public License version 2 only, as
4744# published by the Free Software Foundation.  Oracle designates this
4745# particular file as subject to the "Classpath" exception as provided
4746# by Oracle in the LICENSE file that accompanied this code.
4747#
4748# This code is distributed in the hope that it will be useful, but WITHOUT
4749# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4750# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4751# version 2 for more details (a copy is included in the LICENSE file that
4752# accompanied this code).
4753#
4754# You should have received a copy of the GNU General Public License version
4755# 2 along with this work; if not, write to the Free Software Foundation,
4756# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4757#
4758# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4759# or visit www.oracle.com if you need additional information or have any
4760# questions.
4761#
4762
4763################################################################################
4764# The order of these defines the priority by which we try to find them.
4765VALID_VS_VERSIONS="2013 2012 2010"
4766
4767VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4768VS_VERSION_INTERNAL_2010=100
4769VS_MSVCR_2010=msvcr100.dll
4770# We don't use msvcp on Visual Studio 2010
4771#VS_MSVCP_2010=msvcp100.dll
4772VS_ENVVAR_2010="VS100COMNTOOLS"
4773VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4774VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4775VS_VS_PLATFORM_NAME_2010="v100"
4776VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4777
4778VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4779VS_VERSION_INTERNAL_2012=110
4780VS_MSVCR_2012=msvcr110.dll
4781VS_MSVCP_2012=msvcp110.dll
4782VS_ENVVAR_2012="VS110COMNTOOLS"
4783VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4784VS_SDK_INSTALLDIR_2012=
4785VS_VS_PLATFORM_NAME_2012="v110"
4786VS_SDK_PLATFORM_NAME_2012=
4787
4788VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4789VS_VERSION_INTERNAL_2013=120
4790VS_MSVCR_2013=msvcr120.dll
4791VS_MSVCP_2013=msvcp120.dll
4792VS_ENVVAR_2013="VS120COMNTOOLS"
4793VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4794VS_SDK_INSTALLDIR_2013=
4795VS_VS_PLATFORM_NAME_2013="v120"
4796VS_SDK_PLATFORM_NAME_2013=
4797
4798################################################################################
4799
4800
4801
4802################################################################################
4803
4804
4805
4806################################################################################
4807# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4808# build environment and assigns it to VS_ENV_CMD
4809
4810
4811################################################################################
4812
4813
4814
4815################################################################################
4816# Check if the VS env variables were setup prior to running configure.
4817# If not, then find vcvarsall.bat and run it automatically, and integrate
4818# the set env variables into the spec file.
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833# This line needs to be here, verbatim, after all includes and the dummy hook
4834# definitions. It is replaced with custom functionality when building
4835# custom sources.
4836#CUSTOM_AUTOCONF_INCLUDE
4837
4838# Do not change or remove the following line, it is needed for consistency checks:
4839DATE_WHEN_GENERATED=1454436146
4840
4841###############################################################################
4842#
4843# Initialization / Boot-strapping
4844#
4845# The bootstrapping process needs to solve the "chicken or the egg" problem,
4846# thus it jumps back and forth, each time gaining something needed later on.
4847#
4848###############################################################################
4849
4850# If we are requested to print additional help, do that and then exit.
4851# This must be the very first call.
4852
4853  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4854    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4855    $PRINTF "Which are valid to use depends on the build platform.\n"
4856    for toolchain in $VALID_TOOLCHAINS_all; do
4857      # Use indirect variable referencing
4858      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4859      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4860      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4861    done
4862
4863    # And now exit directly
4864    exit 0
4865  fi
4866
4867
4868# Basic initialization that must happen first of all in the normal process.
4869
4870  # Save the original command line. This is passed to us by the wrapper configure script.
4871
4872  # Save the path variable before it gets changed
4873  ORIGINAL_PATH="$PATH"
4874
4875  DATE_WHEN_CONFIGURED=`LANG=C date`
4876
4877  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4878$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4879  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4880$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4881
4882
4883  # Start with tools that do not need have cross compilation support
4884  # and can be expected to be found in the default PATH. These tools are
4885  # used by configure.
4886
4887  # First are all the simple required tools.
4888
4889
4890
4891  # Publish this variable in the help.
4892
4893
4894  if [ -z "${BASENAME+x}" ]; then
4895    # The variable is not set by user, try to locate tool using the code snippet
4896    for ac_prog in basename
4897do
4898  # Extract the first word of "$ac_prog", so it can be a program name with args.
4899set dummy $ac_prog; ac_word=$2
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4901$as_echo_n "checking for $ac_word... " >&6; }
4902if ${ac_cv_path_BASENAME+:} false; then :
4903  $as_echo_n "(cached) " >&6
4904else
4905  case $BASENAME in
4906  [\\/]* | ?:[\\/]*)
4907  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4908  ;;
4909  *)
4910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4911for as_dir in $PATH
4912do
4913  IFS=$as_save_IFS
4914  test -z "$as_dir" && as_dir=.
4915    for ac_exec_ext in '' $ac_executable_extensions; do
4916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4917    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4919    break 2
4920  fi
4921done
4922  done
4923IFS=$as_save_IFS
4924
4925  ;;
4926esac
4927fi
4928BASENAME=$ac_cv_path_BASENAME
4929if test -n "$BASENAME"; then
4930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4931$as_echo "$BASENAME" >&6; }
4932else
4933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4934$as_echo "no" >&6; }
4935fi
4936
4937
4938  test -n "$BASENAME" && break
4939done
4940
4941  else
4942    # The variable is set, but is it from the command line or the environment?
4943
4944    # Try to remove the string !BASENAME! from our list.
4945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4947      # If it failed, the variable was not from the command line. Ignore it,
4948      # but warn the user (except for BASH, which is always set by the calling BASH).
4949      if test "xBASENAME" != xBASH; then
4950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4951$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4952      fi
4953      # Try to locate tool using the code snippet
4954      for ac_prog in basename
4955do
4956  # Extract the first word of "$ac_prog", so it can be a program name with args.
4957set dummy $ac_prog; ac_word=$2
4958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959$as_echo_n "checking for $ac_word... " >&6; }
4960if ${ac_cv_path_BASENAME+:} false; then :
4961  $as_echo_n "(cached) " >&6
4962else
4963  case $BASENAME in
4964  [\\/]* | ?:[\\/]*)
4965  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4966  ;;
4967  *)
4968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4969for as_dir in $PATH
4970do
4971  IFS=$as_save_IFS
4972  test -z "$as_dir" && as_dir=.
4973    for ac_exec_ext in '' $ac_executable_extensions; do
4974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4977    break 2
4978  fi
4979done
4980  done
4981IFS=$as_save_IFS
4982
4983  ;;
4984esac
4985fi
4986BASENAME=$ac_cv_path_BASENAME
4987if test -n "$BASENAME"; then
4988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4989$as_echo "$BASENAME" >&6; }
4990else
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
4993fi
4994
4995
4996  test -n "$BASENAME" && break
4997done
4998
4999    else
5000      # If it succeeded, then it was overridden by the user. We will use it
5001      # for the tool.
5002
5003      # First remove it from the list of overridden variables, so we can test
5004      # for unknown variables in the end.
5005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5006
5007      # Check if we try to supply an empty value
5008      if test "x$BASENAME" = x; then
5009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5010$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5012$as_echo_n "checking for BASENAME... " >&6; }
5013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5014$as_echo "disabled" >&6; }
5015      else
5016        # Check if the provided tool contains a complete path.
5017        tool_specified="$BASENAME"
5018        tool_basename="${tool_specified##*/}"
5019        if test "x$tool_basename" = "x$tool_specified"; then
5020          # A command without a complete path is provided, search $PATH.
5021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5022$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5023          # Extract the first word of "$tool_basename", so it can be a program name with args.
5024set dummy $tool_basename; ac_word=$2
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
5027if ${ac_cv_path_BASENAME+:} false; then :
5028  $as_echo_n "(cached) " >&6
5029else
5030  case $BASENAME in
5031  [\\/]* | ?:[\\/]*)
5032  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5033  ;;
5034  *)
5035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038  IFS=$as_save_IFS
5039  test -z "$as_dir" && as_dir=.
5040    for ac_exec_ext in '' $ac_executable_extensions; do
5041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044    break 2
5045  fi
5046done
5047  done
5048IFS=$as_save_IFS
5049
5050  ;;
5051esac
5052fi
5053BASENAME=$ac_cv_path_BASENAME
5054if test -n "$BASENAME"; then
5055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5056$as_echo "$BASENAME" >&6; }
5057else
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
5060fi
5061
5062
5063          if test "x$BASENAME" = x; then
5064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5065          fi
5066        else
5067          # Otherwise we believe it is a complete path. Use it as it is.
5068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5069$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5071$as_echo_n "checking for BASENAME... " >&6; }
5072          if test ! -x "$tool_specified"; then
5073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5074$as_echo "not found" >&6; }
5075            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5076          fi
5077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5078$as_echo "$tool_specified" >&6; }
5079        fi
5080      fi
5081    fi
5082
5083  fi
5084
5085
5086
5087  if test "x$BASENAME" = x; then
5088    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5089  fi
5090
5091
5092
5093
5094
5095  # Publish this variable in the help.
5096
5097
5098  if [ -z "${BASH+x}" ]; then
5099    # The variable is not set by user, try to locate tool using the code snippet
5100    for ac_prog in bash
5101do
5102  # Extract the first word of "$ac_prog", so it can be a program name with args.
5103set dummy $ac_prog; ac_word=$2
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5105$as_echo_n "checking for $ac_word... " >&6; }
5106if ${ac_cv_path_BASH+:} false; then :
5107  $as_echo_n "(cached) " >&6
5108else
5109  case $BASH in
5110  [\\/]* | ?:[\\/]*)
5111  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5112  ;;
5113  *)
5114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5115for as_dir in $PATH
5116do
5117  IFS=$as_save_IFS
5118  test -z "$as_dir" && as_dir=.
5119    for ac_exec_ext in '' $ac_executable_extensions; do
5120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5121    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5123    break 2
5124  fi
5125done
5126  done
5127IFS=$as_save_IFS
5128
5129  ;;
5130esac
5131fi
5132BASH=$ac_cv_path_BASH
5133if test -n "$BASH"; then
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5135$as_echo "$BASH" >&6; }
5136else
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138$as_echo "no" >&6; }
5139fi
5140
5141
5142  test -n "$BASH" && break
5143done
5144
5145  else
5146    # The variable is set, but is it from the command line or the environment?
5147
5148    # Try to remove the string !BASH! from our list.
5149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5151      # If it failed, the variable was not from the command line. Ignore it,
5152      # but warn the user (except for BASH, which is always set by the calling BASH).
5153      if test "xBASH" != xBASH; then
5154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5155$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5156      fi
5157      # Try to locate tool using the code snippet
5158      for ac_prog in bash
5159do
5160  # Extract the first word of "$ac_prog", so it can be a program name with args.
5161set dummy $ac_prog; ac_word=$2
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163$as_echo_n "checking for $ac_word... " >&6; }
5164if ${ac_cv_path_BASH+:} false; then :
5165  $as_echo_n "(cached) " >&6
5166else
5167  case $BASH in
5168  [\\/]* | ?:[\\/]*)
5169  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5170  ;;
5171  *)
5172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175  IFS=$as_save_IFS
5176  test -z "$as_dir" && as_dir=.
5177    for ac_exec_ext in '' $ac_executable_extensions; do
5178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5179    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5181    break 2
5182  fi
5183done
5184  done
5185IFS=$as_save_IFS
5186
5187  ;;
5188esac
5189fi
5190BASH=$ac_cv_path_BASH
5191if test -n "$BASH"; then
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5193$as_echo "$BASH" >&6; }
5194else
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
5197fi
5198
5199
5200  test -n "$BASH" && break
5201done
5202
5203    else
5204      # If it succeeded, then it was overridden by the user. We will use it
5205      # for the tool.
5206
5207      # First remove it from the list of overridden variables, so we can test
5208      # for unknown variables in the end.
5209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5210
5211      # Check if we try to supply an empty value
5212      if test "x$BASH" = x; then
5213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5214$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5216$as_echo_n "checking for BASH... " >&6; }
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5218$as_echo "disabled" >&6; }
5219      else
5220        # Check if the provided tool contains a complete path.
5221        tool_specified="$BASH"
5222        tool_basename="${tool_specified##*/}"
5223        if test "x$tool_basename" = "x$tool_specified"; then
5224          # A command without a complete path is provided, search $PATH.
5225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5226$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5227          # Extract the first word of "$tool_basename", so it can be a program name with args.
5228set dummy $tool_basename; ac_word=$2
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5230$as_echo_n "checking for $ac_word... " >&6; }
5231if ${ac_cv_path_BASH+:} false; then :
5232  $as_echo_n "(cached) " >&6
5233else
5234  case $BASH in
5235  [\\/]* | ?:[\\/]*)
5236  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5237  ;;
5238  *)
5239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240for as_dir in $PATH
5241do
5242  IFS=$as_save_IFS
5243  test -z "$as_dir" && as_dir=.
5244    for ac_exec_ext in '' $ac_executable_extensions; do
5245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5246    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5248    break 2
5249  fi
5250done
5251  done
5252IFS=$as_save_IFS
5253
5254  ;;
5255esac
5256fi
5257BASH=$ac_cv_path_BASH
5258if test -n "$BASH"; then
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5260$as_echo "$BASH" >&6; }
5261else
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5263$as_echo "no" >&6; }
5264fi
5265
5266
5267          if test "x$BASH" = x; then
5268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5269          fi
5270        else
5271          # Otherwise we believe it is a complete path. Use it as it is.
5272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5273$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5275$as_echo_n "checking for BASH... " >&6; }
5276          if test ! -x "$tool_specified"; then
5277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5278$as_echo "not found" >&6; }
5279            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5280          fi
5281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5282$as_echo "$tool_specified" >&6; }
5283        fi
5284      fi
5285    fi
5286
5287  fi
5288
5289
5290
5291  if test "x$BASH" = x; then
5292    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5293  fi
5294
5295
5296
5297
5298
5299  # Publish this variable in the help.
5300
5301
5302  if [ -z "${CAT+x}" ]; then
5303    # The variable is not set by user, try to locate tool using the code snippet
5304    for ac_prog in cat
5305do
5306  # Extract the first word of "$ac_prog", so it can be a program name with args.
5307set dummy $ac_prog; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if ${ac_cv_path_CAT+:} false; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313  case $CAT in
5314  [\\/]* | ?:[\\/]*)
5315  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5316  ;;
5317  *)
5318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321  IFS=$as_save_IFS
5322  test -z "$as_dir" && as_dir=.
5323    for ac_exec_ext in '' $ac_executable_extensions; do
5324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5325    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327    break 2
5328  fi
5329done
5330  done
5331IFS=$as_save_IFS
5332
5333  ;;
5334esac
5335fi
5336CAT=$ac_cv_path_CAT
5337if test -n "$CAT"; then
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5339$as_echo "$CAT" >&6; }
5340else
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344
5345
5346  test -n "$CAT" && break
5347done
5348
5349  else
5350    # The variable is set, but is it from the command line or the environment?
5351
5352    # Try to remove the string !CAT! from our list.
5353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5355      # If it failed, the variable was not from the command line. Ignore it,
5356      # but warn the user (except for BASH, which is always set by the calling BASH).
5357      if test "xCAT" != xBASH; then
5358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5359$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5360      fi
5361      # Try to locate tool using the code snippet
5362      for ac_prog in cat
5363do
5364  # Extract the first word of "$ac_prog", so it can be a program name with args.
5365set dummy $ac_prog; ac_word=$2
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5367$as_echo_n "checking for $ac_word... " >&6; }
5368if ${ac_cv_path_CAT+:} false; then :
5369  $as_echo_n "(cached) " >&6
5370else
5371  case $CAT in
5372  [\\/]* | ?:[\\/]*)
5373  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5374  ;;
5375  *)
5376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5377for as_dir in $PATH
5378do
5379  IFS=$as_save_IFS
5380  test -z "$as_dir" && as_dir=.
5381    for ac_exec_ext in '' $ac_executable_extensions; do
5382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5383    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5385    break 2
5386  fi
5387done
5388  done
5389IFS=$as_save_IFS
5390
5391  ;;
5392esac
5393fi
5394CAT=$ac_cv_path_CAT
5395if test -n "$CAT"; then
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5397$as_echo "$CAT" >&6; }
5398else
5399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }
5401fi
5402
5403
5404  test -n "$CAT" && break
5405done
5406
5407    else
5408      # If it succeeded, then it was overridden by the user. We will use it
5409      # for the tool.
5410
5411      # First remove it from the list of overridden variables, so we can test
5412      # for unknown variables in the end.
5413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5414
5415      # Check if we try to supply an empty value
5416      if test "x$CAT" = x; then
5417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5418$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5420$as_echo_n "checking for CAT... " >&6; }
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5422$as_echo "disabled" >&6; }
5423      else
5424        # Check if the provided tool contains a complete path.
5425        tool_specified="$CAT"
5426        tool_basename="${tool_specified##*/}"
5427        if test "x$tool_basename" = "x$tool_specified"; then
5428          # A command without a complete path is provided, search $PATH.
5429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5430$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5431          # Extract the first word of "$tool_basename", so it can be a program name with args.
5432set dummy $tool_basename; ac_word=$2
5433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5434$as_echo_n "checking for $ac_word... " >&6; }
5435if ${ac_cv_path_CAT+:} false; then :
5436  $as_echo_n "(cached) " >&6
5437else
5438  case $CAT in
5439  [\\/]* | ?:[\\/]*)
5440  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5441  ;;
5442  *)
5443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5444for as_dir in $PATH
5445do
5446  IFS=$as_save_IFS
5447  test -z "$as_dir" && as_dir=.
5448    for ac_exec_ext in '' $ac_executable_extensions; do
5449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5450    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5452    break 2
5453  fi
5454done
5455  done
5456IFS=$as_save_IFS
5457
5458  ;;
5459esac
5460fi
5461CAT=$ac_cv_path_CAT
5462if test -n "$CAT"; then
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5464$as_echo "$CAT" >&6; }
5465else
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468fi
5469
5470
5471          if test "x$CAT" = x; then
5472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5473          fi
5474        else
5475          # Otherwise we believe it is a complete path. Use it as it is.
5476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5477$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5479$as_echo_n "checking for CAT... " >&6; }
5480          if test ! -x "$tool_specified"; then
5481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5482$as_echo "not found" >&6; }
5483            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5484          fi
5485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5486$as_echo "$tool_specified" >&6; }
5487        fi
5488      fi
5489    fi
5490
5491  fi
5492
5493
5494
5495  if test "x$CAT" = x; then
5496    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5497  fi
5498
5499
5500
5501
5502
5503  # Publish this variable in the help.
5504
5505
5506  if [ -z "${CHMOD+x}" ]; then
5507    # The variable is not set by user, try to locate tool using the code snippet
5508    for ac_prog in chmod
5509do
5510  # Extract the first word of "$ac_prog", so it can be a program name with args.
5511set dummy $ac_prog; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if ${ac_cv_path_CHMOD+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $CHMOD in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540CHMOD=$ac_cv_path_CHMOD
5541if test -n "$CHMOD"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5543$as_echo "$CHMOD" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550  test -n "$CHMOD" && break
5551done
5552
5553  else
5554    # The variable is set, but is it from the command line or the environment?
5555
5556    # Try to remove the string !CHMOD! from our list.
5557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5559      # If it failed, the variable was not from the command line. Ignore it,
5560      # but warn the user (except for BASH, which is always set by the calling BASH).
5561      if test "xCHMOD" != xBASH; then
5562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5563$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5564      fi
5565      # Try to locate tool using the code snippet
5566      for ac_prog in chmod
5567do
5568  # Extract the first word of "$ac_prog", so it can be a program name with args.
5569set dummy $ac_prog; ac_word=$2
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
5572if ${ac_cv_path_CHMOD+:} false; then :
5573  $as_echo_n "(cached) " >&6
5574else
5575  case $CHMOD in
5576  [\\/]* | ?:[\\/]*)
5577  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5578  ;;
5579  *)
5580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581for as_dir in $PATH
5582do
5583  IFS=$as_save_IFS
5584  test -z "$as_dir" && as_dir=.
5585    for ac_exec_ext in '' $ac_executable_extensions; do
5586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5587    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5589    break 2
5590  fi
5591done
5592  done
5593IFS=$as_save_IFS
5594
5595  ;;
5596esac
5597fi
5598CHMOD=$ac_cv_path_CHMOD
5599if test -n "$CHMOD"; then
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5601$as_echo "$CHMOD" >&6; }
5602else
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605fi
5606
5607
5608  test -n "$CHMOD" && break
5609done
5610
5611    else
5612      # If it succeeded, then it was overridden by the user. We will use it
5613      # for the tool.
5614
5615      # First remove it from the list of overridden variables, so we can test
5616      # for unknown variables in the end.
5617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5618
5619      # Check if we try to supply an empty value
5620      if test "x$CHMOD" = x; then
5621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5622$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5624$as_echo_n "checking for CHMOD... " >&6; }
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5626$as_echo "disabled" >&6; }
5627      else
5628        # Check if the provided tool contains a complete path.
5629        tool_specified="$CHMOD"
5630        tool_basename="${tool_specified##*/}"
5631        if test "x$tool_basename" = "x$tool_specified"; then
5632          # A command without a complete path is provided, search $PATH.
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5634$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5635          # Extract the first word of "$tool_basename", so it can be a program name with args.
5636set dummy $tool_basename; ac_word=$2
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5638$as_echo_n "checking for $ac_word... " >&6; }
5639if ${ac_cv_path_CHMOD+:} false; then :
5640  $as_echo_n "(cached) " >&6
5641else
5642  case $CHMOD in
5643  [\\/]* | ?:[\\/]*)
5644  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5645  ;;
5646  *)
5647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5648for as_dir in $PATH
5649do
5650  IFS=$as_save_IFS
5651  test -z "$as_dir" && as_dir=.
5652    for ac_exec_ext in '' $ac_executable_extensions; do
5653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5654    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5656    break 2
5657  fi
5658done
5659  done
5660IFS=$as_save_IFS
5661
5662  ;;
5663esac
5664fi
5665CHMOD=$ac_cv_path_CHMOD
5666if test -n "$CHMOD"; then
5667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5668$as_echo "$CHMOD" >&6; }
5669else
5670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5671$as_echo "no" >&6; }
5672fi
5673
5674
5675          if test "x$CHMOD" = x; then
5676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5677          fi
5678        else
5679          # Otherwise we believe it is a complete path. Use it as it is.
5680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5681$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5683$as_echo_n "checking for CHMOD... " >&6; }
5684          if test ! -x "$tool_specified"; then
5685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5686$as_echo "not found" >&6; }
5687            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5688          fi
5689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5690$as_echo "$tool_specified" >&6; }
5691        fi
5692      fi
5693    fi
5694
5695  fi
5696
5697
5698
5699  if test "x$CHMOD" = x; then
5700    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5701  fi
5702
5703
5704
5705
5706
5707  # Publish this variable in the help.
5708
5709
5710  if [ -z "${CMP+x}" ]; then
5711    # The variable is not set by user, try to locate tool using the code snippet
5712    for ac_prog in cmp
5713do
5714  # Extract the first word of "$ac_prog", so it can be a program name with args.
5715set dummy $ac_prog; ac_word=$2
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5717$as_echo_n "checking for $ac_word... " >&6; }
5718if ${ac_cv_path_CMP+:} false; then :
5719  $as_echo_n "(cached) " >&6
5720else
5721  case $CMP in
5722  [\\/]* | ?:[\\/]*)
5723  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5724  ;;
5725  *)
5726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5727for as_dir in $PATH
5728do
5729  IFS=$as_save_IFS
5730  test -z "$as_dir" && as_dir=.
5731    for ac_exec_ext in '' $ac_executable_extensions; do
5732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5733    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5735    break 2
5736  fi
5737done
5738  done
5739IFS=$as_save_IFS
5740
5741  ;;
5742esac
5743fi
5744CMP=$ac_cv_path_CMP
5745if test -n "$CMP"; then
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5747$as_echo "$CMP" >&6; }
5748else
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; }
5751fi
5752
5753
5754  test -n "$CMP" && break
5755done
5756
5757  else
5758    # The variable is set, but is it from the command line or the environment?
5759
5760    # Try to remove the string !CMP! from our list.
5761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5763      # If it failed, the variable was not from the command line. Ignore it,
5764      # but warn the user (except for BASH, which is always set by the calling BASH).
5765      if test "xCMP" != xBASH; then
5766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5767$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5768      fi
5769      # Try to locate tool using the code snippet
5770      for ac_prog in cmp
5771do
5772  # Extract the first word of "$ac_prog", so it can be a program name with args.
5773set dummy $ac_prog; ac_word=$2
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5775$as_echo_n "checking for $ac_word... " >&6; }
5776if ${ac_cv_path_CMP+:} false; then :
5777  $as_echo_n "(cached) " >&6
5778else
5779  case $CMP in
5780  [\\/]* | ?:[\\/]*)
5781  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5782  ;;
5783  *)
5784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5785for as_dir in $PATH
5786do
5787  IFS=$as_save_IFS
5788  test -z "$as_dir" && as_dir=.
5789    for ac_exec_ext in '' $ac_executable_extensions; do
5790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5791    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5793    break 2
5794  fi
5795done
5796  done
5797IFS=$as_save_IFS
5798
5799  ;;
5800esac
5801fi
5802CMP=$ac_cv_path_CMP
5803if test -n "$CMP"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5805$as_echo "$CMP" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$CMP" && break
5813done
5814
5815    else
5816      # If it succeeded, then it was overridden by the user. We will use it
5817      # for the tool.
5818
5819      # First remove it from the list of overridden variables, so we can test
5820      # for unknown variables in the end.
5821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5822
5823      # Check if we try to supply an empty value
5824      if test "x$CMP" = x; then
5825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5826$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5828$as_echo_n "checking for CMP... " >&6; }
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5830$as_echo "disabled" >&6; }
5831      else
5832        # Check if the provided tool contains a complete path.
5833        tool_specified="$CMP"
5834        tool_basename="${tool_specified##*/}"
5835        if test "x$tool_basename" = "x$tool_specified"; then
5836          # A command without a complete path is provided, search $PATH.
5837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5838$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5839          # Extract the first word of "$tool_basename", so it can be a program name with args.
5840set dummy $tool_basename; ac_word=$2
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5842$as_echo_n "checking for $ac_word... " >&6; }
5843if ${ac_cv_path_CMP+:} false; then :
5844  $as_echo_n "(cached) " >&6
5845else
5846  case $CMP in
5847  [\\/]* | ?:[\\/]*)
5848  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5849  ;;
5850  *)
5851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5852for as_dir in $PATH
5853do
5854  IFS=$as_save_IFS
5855  test -z "$as_dir" && as_dir=.
5856    for ac_exec_ext in '' $ac_executable_extensions; do
5857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5858    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5860    break 2
5861  fi
5862done
5863  done
5864IFS=$as_save_IFS
5865
5866  ;;
5867esac
5868fi
5869CMP=$ac_cv_path_CMP
5870if test -n "$CMP"; then
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5872$as_echo "$CMP" >&6; }
5873else
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875$as_echo "no" >&6; }
5876fi
5877
5878
5879          if test "x$CMP" = x; then
5880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5881          fi
5882        else
5883          # Otherwise we believe it is a complete path. Use it as it is.
5884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5885$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5887$as_echo_n "checking for CMP... " >&6; }
5888          if test ! -x "$tool_specified"; then
5889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5890$as_echo "not found" >&6; }
5891            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5892          fi
5893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5894$as_echo "$tool_specified" >&6; }
5895        fi
5896      fi
5897    fi
5898
5899  fi
5900
5901
5902
5903  if test "x$CMP" = x; then
5904    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5905  fi
5906
5907
5908
5909
5910
5911  # Publish this variable in the help.
5912
5913
5914  if [ -z "${COMM+x}" ]; then
5915    # The variable is not set by user, try to locate tool using the code snippet
5916    for ac_prog in comm
5917do
5918  # Extract the first word of "$ac_prog", so it can be a program name with args.
5919set dummy $ac_prog; ac_word=$2
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
5922if ${ac_cv_path_COMM+:} false; then :
5923  $as_echo_n "(cached) " >&6
5924else
5925  case $COMM in
5926  [\\/]* | ?:[\\/]*)
5927  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5928  ;;
5929  *)
5930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931for as_dir in $PATH
5932do
5933  IFS=$as_save_IFS
5934  test -z "$as_dir" && as_dir=.
5935    for ac_exec_ext in '' $ac_executable_extensions; do
5936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5937    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5939    break 2
5940  fi
5941done
5942  done
5943IFS=$as_save_IFS
5944
5945  ;;
5946esac
5947fi
5948COMM=$ac_cv_path_COMM
5949if test -n "$COMM"; then
5950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5951$as_echo "$COMM" >&6; }
5952else
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5954$as_echo "no" >&6; }
5955fi
5956
5957
5958  test -n "$COMM" && break
5959done
5960
5961  else
5962    # The variable is set, but is it from the command line or the environment?
5963
5964    # Try to remove the string !COMM! from our list.
5965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5967      # If it failed, the variable was not from the command line. Ignore it,
5968      # but warn the user (except for BASH, which is always set by the calling BASH).
5969      if test "xCOMM" != xBASH; then
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5971$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5972      fi
5973      # Try to locate tool using the code snippet
5974      for ac_prog in comm
5975do
5976  # Extract the first word of "$ac_prog", so it can be a program name with args.
5977set dummy $ac_prog; ac_word=$2
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
5980if ${ac_cv_path_COMM+:} false; then :
5981  $as_echo_n "(cached) " >&6
5982else
5983  case $COMM in
5984  [\\/]* | ?:[\\/]*)
5985  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5986  ;;
5987  *)
5988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989for as_dir in $PATH
5990do
5991  IFS=$as_save_IFS
5992  test -z "$as_dir" && as_dir=.
5993    for ac_exec_ext in '' $ac_executable_extensions; do
5994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5995    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5997    break 2
5998  fi
5999done
6000  done
6001IFS=$as_save_IFS
6002
6003  ;;
6004esac
6005fi
6006COMM=$ac_cv_path_COMM
6007if test -n "$COMM"; then
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6009$as_echo "$COMM" >&6; }
6010else
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013fi
6014
6015
6016  test -n "$COMM" && break
6017done
6018
6019    else
6020      # If it succeeded, then it was overridden by the user. We will use it
6021      # for the tool.
6022
6023      # First remove it from the list of overridden variables, so we can test
6024      # for unknown variables in the end.
6025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6026
6027      # Check if we try to supply an empty value
6028      if test "x$COMM" = x; then
6029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6030$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6032$as_echo_n "checking for COMM... " >&6; }
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6034$as_echo "disabled" >&6; }
6035      else
6036        # Check if the provided tool contains a complete path.
6037        tool_specified="$COMM"
6038        tool_basename="${tool_specified##*/}"
6039        if test "x$tool_basename" = "x$tool_specified"; then
6040          # A command without a complete path is provided, search $PATH.
6041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6042$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6043          # Extract the first word of "$tool_basename", so it can be a program name with args.
6044set dummy $tool_basename; ac_word=$2
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6046$as_echo_n "checking for $ac_word... " >&6; }
6047if ${ac_cv_path_COMM+:} false; then :
6048  $as_echo_n "(cached) " >&6
6049else
6050  case $COMM in
6051  [\\/]* | ?:[\\/]*)
6052  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6053  ;;
6054  *)
6055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058  IFS=$as_save_IFS
6059  test -z "$as_dir" && as_dir=.
6060    for ac_exec_ext in '' $ac_executable_extensions; do
6061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6062    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6064    break 2
6065  fi
6066done
6067  done
6068IFS=$as_save_IFS
6069
6070  ;;
6071esac
6072fi
6073COMM=$ac_cv_path_COMM
6074if test -n "$COMM"; then
6075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6076$as_echo "$COMM" >&6; }
6077else
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079$as_echo "no" >&6; }
6080fi
6081
6082
6083          if test "x$COMM" = x; then
6084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6085          fi
6086        else
6087          # Otherwise we believe it is a complete path. Use it as it is.
6088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6089$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6091$as_echo_n "checking for COMM... " >&6; }
6092          if test ! -x "$tool_specified"; then
6093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6094$as_echo "not found" >&6; }
6095            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6096          fi
6097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6098$as_echo "$tool_specified" >&6; }
6099        fi
6100      fi
6101    fi
6102
6103  fi
6104
6105
6106
6107  if test "x$COMM" = x; then
6108    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6109  fi
6110
6111
6112
6113
6114
6115  # Publish this variable in the help.
6116
6117
6118  if [ -z "${CP+x}" ]; then
6119    # The variable is not set by user, try to locate tool using the code snippet
6120    for ac_prog in cp
6121do
6122  # Extract the first word of "$ac_prog", so it can be a program name with args.
6123set dummy $ac_prog; ac_word=$2
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6125$as_echo_n "checking for $ac_word... " >&6; }
6126if ${ac_cv_path_CP+:} false; then :
6127  $as_echo_n "(cached) " >&6
6128else
6129  case $CP in
6130  [\\/]* | ?:[\\/]*)
6131  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6132  ;;
6133  *)
6134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137  IFS=$as_save_IFS
6138  test -z "$as_dir" && as_dir=.
6139    for ac_exec_ext in '' $ac_executable_extensions; do
6140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6141    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6143    break 2
6144  fi
6145done
6146  done
6147IFS=$as_save_IFS
6148
6149  ;;
6150esac
6151fi
6152CP=$ac_cv_path_CP
6153if test -n "$CP"; then
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6155$as_echo "$CP" >&6; }
6156else
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6158$as_echo "no" >&6; }
6159fi
6160
6161
6162  test -n "$CP" && break
6163done
6164
6165  else
6166    # The variable is set, but is it from the command line or the environment?
6167
6168    # Try to remove the string !CP! from our list.
6169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6171      # If it failed, the variable was not from the command line. Ignore it,
6172      # but warn the user (except for BASH, which is always set by the calling BASH).
6173      if test "xCP" != xBASH; then
6174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6175$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6176      fi
6177      # Try to locate tool using the code snippet
6178      for ac_prog in cp
6179do
6180  # Extract the first word of "$ac_prog", so it can be a program name with args.
6181set dummy $ac_prog; ac_word=$2
6182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6183$as_echo_n "checking for $ac_word... " >&6; }
6184if ${ac_cv_path_CP+:} false; then :
6185  $as_echo_n "(cached) " >&6
6186else
6187  case $CP in
6188  [\\/]* | ?:[\\/]*)
6189  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6190  ;;
6191  *)
6192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195  IFS=$as_save_IFS
6196  test -z "$as_dir" && as_dir=.
6197    for ac_exec_ext in '' $ac_executable_extensions; do
6198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6199    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6201    break 2
6202  fi
6203done
6204  done
6205IFS=$as_save_IFS
6206
6207  ;;
6208esac
6209fi
6210CP=$ac_cv_path_CP
6211if test -n "$CP"; then
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6213$as_echo "$CP" >&6; }
6214else
6215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6216$as_echo "no" >&6; }
6217fi
6218
6219
6220  test -n "$CP" && break
6221done
6222
6223    else
6224      # If it succeeded, then it was overridden by the user. We will use it
6225      # for the tool.
6226
6227      # First remove it from the list of overridden variables, so we can test
6228      # for unknown variables in the end.
6229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6230
6231      # Check if we try to supply an empty value
6232      if test "x$CP" = x; then
6233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6234$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6236$as_echo_n "checking for CP... " >&6; }
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6238$as_echo "disabled" >&6; }
6239      else
6240        # Check if the provided tool contains a complete path.
6241        tool_specified="$CP"
6242        tool_basename="${tool_specified##*/}"
6243        if test "x$tool_basename" = "x$tool_specified"; then
6244          # A command without a complete path is provided, search $PATH.
6245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6246$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6247          # Extract the first word of "$tool_basename", so it can be a program name with args.
6248set dummy $tool_basename; ac_word=$2
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6250$as_echo_n "checking for $ac_word... " >&6; }
6251if ${ac_cv_path_CP+:} false; then :
6252  $as_echo_n "(cached) " >&6
6253else
6254  case $CP in
6255  [\\/]* | ?:[\\/]*)
6256  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6257  ;;
6258  *)
6259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH
6261do
6262  IFS=$as_save_IFS
6263  test -z "$as_dir" && as_dir=.
6264    for ac_exec_ext in '' $ac_executable_extensions; do
6265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6266    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6268    break 2
6269  fi
6270done
6271  done
6272IFS=$as_save_IFS
6273
6274  ;;
6275esac
6276fi
6277CP=$ac_cv_path_CP
6278if test -n "$CP"; then
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6280$as_echo "$CP" >&6; }
6281else
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }
6284fi
6285
6286
6287          if test "x$CP" = x; then
6288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6289          fi
6290        else
6291          # Otherwise we believe it is a complete path. Use it as it is.
6292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6293$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6295$as_echo_n "checking for CP... " >&6; }
6296          if test ! -x "$tool_specified"; then
6297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6298$as_echo "not found" >&6; }
6299            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6300          fi
6301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6302$as_echo "$tool_specified" >&6; }
6303        fi
6304      fi
6305    fi
6306
6307  fi
6308
6309
6310
6311  if test "x$CP" = x; then
6312    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6313  fi
6314
6315
6316
6317
6318
6319  # Publish this variable in the help.
6320
6321
6322  if [ -z "${CUT+x}" ]; then
6323    # The variable is not set by user, try to locate tool using the code snippet
6324    for ac_prog in cut
6325do
6326  # Extract the first word of "$ac_prog", so it can be a program name with args.
6327set dummy $ac_prog; ac_word=$2
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6329$as_echo_n "checking for $ac_word... " >&6; }
6330if ${ac_cv_path_CUT+:} false; then :
6331  $as_echo_n "(cached) " >&6
6332else
6333  case $CUT in
6334  [\\/]* | ?:[\\/]*)
6335  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6336  ;;
6337  *)
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_exec_ext in '' $ac_executable_extensions; do
6344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6345    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347    break 2
6348  fi
6349done
6350  done
6351IFS=$as_save_IFS
6352
6353  ;;
6354esac
6355fi
6356CUT=$ac_cv_path_CUT
6357if test -n "$CUT"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6359$as_echo "$CUT" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366  test -n "$CUT" && break
6367done
6368
6369  else
6370    # The variable is set, but is it from the command line or the environment?
6371
6372    # Try to remove the string !CUT! from our list.
6373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6375      # If it failed, the variable was not from the command line. Ignore it,
6376      # but warn the user (except for BASH, which is always set by the calling BASH).
6377      if test "xCUT" != xBASH; then
6378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6379$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6380      fi
6381      # Try to locate tool using the code snippet
6382      for ac_prog in cut
6383do
6384  # Extract the first word of "$ac_prog", so it can be a program name with args.
6385set dummy $ac_prog; ac_word=$2
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387$as_echo_n "checking for $ac_word... " >&6; }
6388if ${ac_cv_path_CUT+:} false; then :
6389  $as_echo_n "(cached) " >&6
6390else
6391  case $CUT in
6392  [\\/]* | ?:[\\/]*)
6393  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6394  ;;
6395  *)
6396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6397for as_dir in $PATH
6398do
6399  IFS=$as_save_IFS
6400  test -z "$as_dir" && as_dir=.
6401    for ac_exec_ext in '' $ac_executable_extensions; do
6402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6403    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6405    break 2
6406  fi
6407done
6408  done
6409IFS=$as_save_IFS
6410
6411  ;;
6412esac
6413fi
6414CUT=$ac_cv_path_CUT
6415if test -n "$CUT"; then
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6417$as_echo "$CUT" >&6; }
6418else
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
6421fi
6422
6423
6424  test -n "$CUT" && break
6425done
6426
6427    else
6428      # If it succeeded, then it was overridden by the user. We will use it
6429      # for the tool.
6430
6431      # First remove it from the list of overridden variables, so we can test
6432      # for unknown variables in the end.
6433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6434
6435      # Check if we try to supply an empty value
6436      if test "x$CUT" = x; then
6437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6438$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6440$as_echo_n "checking for CUT... " >&6; }
6441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6442$as_echo "disabled" >&6; }
6443      else
6444        # Check if the provided tool contains a complete path.
6445        tool_specified="$CUT"
6446        tool_basename="${tool_specified##*/}"
6447        if test "x$tool_basename" = "x$tool_specified"; then
6448          # A command without a complete path is provided, search $PATH.
6449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6450$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6451          # Extract the first word of "$tool_basename", so it can be a program name with args.
6452set dummy $tool_basename; ac_word=$2
6453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6454$as_echo_n "checking for $ac_word... " >&6; }
6455if ${ac_cv_path_CUT+:} false; then :
6456  $as_echo_n "(cached) " >&6
6457else
6458  case $CUT in
6459  [\\/]* | ?:[\\/]*)
6460  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6461  ;;
6462  *)
6463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6464for as_dir in $PATH
6465do
6466  IFS=$as_save_IFS
6467  test -z "$as_dir" && as_dir=.
6468    for ac_exec_ext in '' $ac_executable_extensions; do
6469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6470    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6472    break 2
6473  fi
6474done
6475  done
6476IFS=$as_save_IFS
6477
6478  ;;
6479esac
6480fi
6481CUT=$ac_cv_path_CUT
6482if test -n "$CUT"; then
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6484$as_echo "$CUT" >&6; }
6485else
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6487$as_echo "no" >&6; }
6488fi
6489
6490
6491          if test "x$CUT" = x; then
6492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6493          fi
6494        else
6495          # Otherwise we believe it is a complete path. Use it as it is.
6496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6497$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6499$as_echo_n "checking for CUT... " >&6; }
6500          if test ! -x "$tool_specified"; then
6501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6502$as_echo "not found" >&6; }
6503            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6504          fi
6505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6506$as_echo "$tool_specified" >&6; }
6507        fi
6508      fi
6509    fi
6510
6511  fi
6512
6513
6514
6515  if test "x$CUT" = x; then
6516    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6517  fi
6518
6519
6520
6521
6522
6523  # Publish this variable in the help.
6524
6525
6526  if [ -z "${DATE+x}" ]; then
6527    # The variable is not set by user, try to locate tool using the code snippet
6528    for ac_prog in date
6529do
6530  # Extract the first word of "$ac_prog", so it can be a program name with args.
6531set dummy $ac_prog; ac_word=$2
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533$as_echo_n "checking for $ac_word... " >&6; }
6534if ${ac_cv_path_DATE+:} false; then :
6535  $as_echo_n "(cached) " >&6
6536else
6537  case $DATE in
6538  [\\/]* | ?:[\\/]*)
6539  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6540  ;;
6541  *)
6542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543for as_dir in $PATH
6544do
6545  IFS=$as_save_IFS
6546  test -z "$as_dir" && as_dir=.
6547    for ac_exec_ext in '' $ac_executable_extensions; do
6548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6549    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6551    break 2
6552  fi
6553done
6554  done
6555IFS=$as_save_IFS
6556
6557  ;;
6558esac
6559fi
6560DATE=$ac_cv_path_DATE
6561if test -n "$DATE"; then
6562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6563$as_echo "$DATE" >&6; }
6564else
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
6567fi
6568
6569
6570  test -n "$DATE" && break
6571done
6572
6573  else
6574    # The variable is set, but is it from the command line or the environment?
6575
6576    # Try to remove the string !DATE! from our list.
6577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6579      # If it failed, the variable was not from the command line. Ignore it,
6580      # but warn the user (except for BASH, which is always set by the calling BASH).
6581      if test "xDATE" != xBASH; then
6582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6583$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6584      fi
6585      # Try to locate tool using the code snippet
6586      for ac_prog in date
6587do
6588  # Extract the first word of "$ac_prog", so it can be a program name with args.
6589set dummy $ac_prog; ac_word=$2
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6591$as_echo_n "checking for $ac_word... " >&6; }
6592if ${ac_cv_path_DATE+:} false; then :
6593  $as_echo_n "(cached) " >&6
6594else
6595  case $DATE in
6596  [\\/]* | ?:[\\/]*)
6597  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6598  ;;
6599  *)
6600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6601for as_dir in $PATH
6602do
6603  IFS=$as_save_IFS
6604  test -z "$as_dir" && as_dir=.
6605    for ac_exec_ext in '' $ac_executable_extensions; do
6606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6607    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6609    break 2
6610  fi
6611done
6612  done
6613IFS=$as_save_IFS
6614
6615  ;;
6616esac
6617fi
6618DATE=$ac_cv_path_DATE
6619if test -n "$DATE"; then
6620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6621$as_echo "$DATE" >&6; }
6622else
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6624$as_echo "no" >&6; }
6625fi
6626
6627
6628  test -n "$DATE" && break
6629done
6630
6631    else
6632      # If it succeeded, then it was overridden by the user. We will use it
6633      # for the tool.
6634
6635      # First remove it from the list of overridden variables, so we can test
6636      # for unknown variables in the end.
6637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6638
6639      # Check if we try to supply an empty value
6640      if test "x$DATE" = x; then
6641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6642$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6644$as_echo_n "checking for DATE... " >&6; }
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6646$as_echo "disabled" >&6; }
6647      else
6648        # Check if the provided tool contains a complete path.
6649        tool_specified="$DATE"
6650        tool_basename="${tool_specified##*/}"
6651        if test "x$tool_basename" = "x$tool_specified"; then
6652          # A command without a complete path is provided, search $PATH.
6653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6654$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6655          # Extract the first word of "$tool_basename", so it can be a program name with args.
6656set dummy $tool_basename; ac_word=$2
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6658$as_echo_n "checking for $ac_word... " >&6; }
6659if ${ac_cv_path_DATE+:} false; then :
6660  $as_echo_n "(cached) " >&6
6661else
6662  case $DATE in
6663  [\\/]* | ?:[\\/]*)
6664  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6665  ;;
6666  *)
6667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6668for as_dir in $PATH
6669do
6670  IFS=$as_save_IFS
6671  test -z "$as_dir" && as_dir=.
6672    for ac_exec_ext in '' $ac_executable_extensions; do
6673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6674    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6676    break 2
6677  fi
6678done
6679  done
6680IFS=$as_save_IFS
6681
6682  ;;
6683esac
6684fi
6685DATE=$ac_cv_path_DATE
6686if test -n "$DATE"; then
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6688$as_echo "$DATE" >&6; }
6689else
6690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6691$as_echo "no" >&6; }
6692fi
6693
6694
6695          if test "x$DATE" = x; then
6696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6697          fi
6698        else
6699          # Otherwise we believe it is a complete path. Use it as it is.
6700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6701$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6703$as_echo_n "checking for DATE... " >&6; }
6704          if test ! -x "$tool_specified"; then
6705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6706$as_echo "not found" >&6; }
6707            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6708          fi
6709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6710$as_echo "$tool_specified" >&6; }
6711        fi
6712      fi
6713    fi
6714
6715  fi
6716
6717
6718
6719  if test "x$DATE" = x; then
6720    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6721  fi
6722
6723
6724
6725
6726
6727  # Publish this variable in the help.
6728
6729
6730  if [ -z "${DIFF+x}" ]; then
6731    # The variable is not set by user, try to locate tool using the code snippet
6732    for ac_prog in gdiff diff
6733do
6734  # Extract the first word of "$ac_prog", so it can be a program name with args.
6735set dummy $ac_prog; ac_word=$2
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6737$as_echo_n "checking for $ac_word... " >&6; }
6738if ${ac_cv_path_DIFF+:} false; then :
6739  $as_echo_n "(cached) " >&6
6740else
6741  case $DIFF in
6742  [\\/]* | ?:[\\/]*)
6743  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6744  ;;
6745  *)
6746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6747for as_dir in $PATH
6748do
6749  IFS=$as_save_IFS
6750  test -z "$as_dir" && as_dir=.
6751    for ac_exec_ext in '' $ac_executable_extensions; do
6752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6753    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6755    break 2
6756  fi
6757done
6758  done
6759IFS=$as_save_IFS
6760
6761  ;;
6762esac
6763fi
6764DIFF=$ac_cv_path_DIFF
6765if test -n "$DIFF"; then
6766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6767$as_echo "$DIFF" >&6; }
6768else
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770$as_echo "no" >&6; }
6771fi
6772
6773
6774  test -n "$DIFF" && break
6775done
6776
6777  else
6778    # The variable is set, but is it from the command line or the environment?
6779
6780    # Try to remove the string !DIFF! from our list.
6781    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6782    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6783      # If it failed, the variable was not from the command line. Ignore it,
6784      # but warn the user (except for BASH, which is always set by the calling BASH).
6785      if test "xDIFF" != xBASH; then
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6787$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6788      fi
6789      # Try to locate tool using the code snippet
6790      for ac_prog in gdiff diff
6791do
6792  # Extract the first word of "$ac_prog", so it can be a program name with args.
6793set dummy $ac_prog; ac_word=$2
6794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6795$as_echo_n "checking for $ac_word... " >&6; }
6796if ${ac_cv_path_DIFF+:} false; then :
6797  $as_echo_n "(cached) " >&6
6798else
6799  case $DIFF in
6800  [\\/]* | ?:[\\/]*)
6801  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6802  ;;
6803  *)
6804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6805for as_dir in $PATH
6806do
6807  IFS=$as_save_IFS
6808  test -z "$as_dir" && as_dir=.
6809    for ac_exec_ext in '' $ac_executable_extensions; do
6810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6811    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6813    break 2
6814  fi
6815done
6816  done
6817IFS=$as_save_IFS
6818
6819  ;;
6820esac
6821fi
6822DIFF=$ac_cv_path_DIFF
6823if test -n "$DIFF"; then
6824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6825$as_echo "$DIFF" >&6; }
6826else
6827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6828$as_echo "no" >&6; }
6829fi
6830
6831
6832  test -n "$DIFF" && break
6833done
6834
6835    else
6836      # If it succeeded, then it was overridden by the user. We will use it
6837      # for the tool.
6838
6839      # First remove it from the list of overridden variables, so we can test
6840      # for unknown variables in the end.
6841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6842
6843      # Check if we try to supply an empty value
6844      if test "x$DIFF" = x; then
6845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6846$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6848$as_echo_n "checking for DIFF... " >&6; }
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6850$as_echo "disabled" >&6; }
6851      else
6852        # Check if the provided tool contains a complete path.
6853        tool_specified="$DIFF"
6854        tool_basename="${tool_specified##*/}"
6855        if test "x$tool_basename" = "x$tool_specified"; then
6856          # A command without a complete path is provided, search $PATH.
6857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6858$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6859          # Extract the first word of "$tool_basename", so it can be a program name with args.
6860set dummy $tool_basename; ac_word=$2
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6862$as_echo_n "checking for $ac_word... " >&6; }
6863if ${ac_cv_path_DIFF+:} false; then :
6864  $as_echo_n "(cached) " >&6
6865else
6866  case $DIFF in
6867  [\\/]* | ?:[\\/]*)
6868  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6869  ;;
6870  *)
6871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6872for as_dir in $PATH
6873do
6874  IFS=$as_save_IFS
6875  test -z "$as_dir" && as_dir=.
6876    for ac_exec_ext in '' $ac_executable_extensions; do
6877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6878    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6880    break 2
6881  fi
6882done
6883  done
6884IFS=$as_save_IFS
6885
6886  ;;
6887esac
6888fi
6889DIFF=$ac_cv_path_DIFF
6890if test -n "$DIFF"; then
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6892$as_echo "$DIFF" >&6; }
6893else
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6895$as_echo "no" >&6; }
6896fi
6897
6898
6899          if test "x$DIFF" = x; then
6900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6901          fi
6902        else
6903          # Otherwise we believe it is a complete path. Use it as it is.
6904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6905$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6907$as_echo_n "checking for DIFF... " >&6; }
6908          if test ! -x "$tool_specified"; then
6909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6910$as_echo "not found" >&6; }
6911            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6912          fi
6913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6914$as_echo "$tool_specified" >&6; }
6915        fi
6916      fi
6917    fi
6918
6919  fi
6920
6921
6922
6923  if test "x$DIFF" = x; then
6924    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6925  fi
6926
6927
6928
6929
6930
6931  # Publish this variable in the help.
6932
6933
6934  if [ -z "${DIRNAME+x}" ]; then
6935    # The variable is not set by user, try to locate tool using the code snippet
6936    for ac_prog in dirname
6937do
6938  # Extract the first word of "$ac_prog", so it can be a program name with args.
6939set dummy $ac_prog; ac_word=$2
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6941$as_echo_n "checking for $ac_word... " >&6; }
6942if ${ac_cv_path_DIRNAME+:} false; then :
6943  $as_echo_n "(cached) " >&6
6944else
6945  case $DIRNAME in
6946  [\\/]* | ?:[\\/]*)
6947  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6948  ;;
6949  *)
6950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6951for as_dir in $PATH
6952do
6953  IFS=$as_save_IFS
6954  test -z "$as_dir" && as_dir=.
6955    for ac_exec_ext in '' $ac_executable_extensions; do
6956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6957    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6959    break 2
6960  fi
6961done
6962  done
6963IFS=$as_save_IFS
6964
6965  ;;
6966esac
6967fi
6968DIRNAME=$ac_cv_path_DIRNAME
6969if test -n "$DIRNAME"; then
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6971$as_echo "$DIRNAME" >&6; }
6972else
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974$as_echo "no" >&6; }
6975fi
6976
6977
6978  test -n "$DIRNAME" && break
6979done
6980
6981  else
6982    # The variable is set, but is it from the command line or the environment?
6983
6984    # Try to remove the string !DIRNAME! from our list.
6985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6987      # If it failed, the variable was not from the command line. Ignore it,
6988      # but warn the user (except for BASH, which is always set by the calling BASH).
6989      if test "xDIRNAME" != xBASH; then
6990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6991$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6992      fi
6993      # Try to locate tool using the code snippet
6994      for ac_prog in dirname
6995do
6996  # Extract the first word of "$ac_prog", so it can be a program name with args.
6997set dummy $ac_prog; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_DIRNAME+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $DIRNAME in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026DIRNAME=$ac_cv_path_DIRNAME
7027if test -n "$DIRNAME"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7029$as_echo "$DIRNAME" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035
7036  test -n "$DIRNAME" && break
7037done
7038
7039    else
7040      # If it succeeded, then it was overridden by the user. We will use it
7041      # for the tool.
7042
7043      # First remove it from the list of overridden variables, so we can test
7044      # for unknown variables in the end.
7045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7046
7047      # Check if we try to supply an empty value
7048      if test "x$DIRNAME" = x; then
7049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7050$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7052$as_echo_n "checking for DIRNAME... " >&6; }
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7054$as_echo "disabled" >&6; }
7055      else
7056        # Check if the provided tool contains a complete path.
7057        tool_specified="$DIRNAME"
7058        tool_basename="${tool_specified##*/}"
7059        if test "x$tool_basename" = "x$tool_specified"; then
7060          # A command without a complete path is provided, search $PATH.
7061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7062$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7063          # Extract the first word of "$tool_basename", so it can be a program name with args.
7064set dummy $tool_basename; ac_word=$2
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7066$as_echo_n "checking for $ac_word... " >&6; }
7067if ${ac_cv_path_DIRNAME+:} false; then :
7068  $as_echo_n "(cached) " >&6
7069else
7070  case $DIRNAME in
7071  [\\/]* | ?:[\\/]*)
7072  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7073  ;;
7074  *)
7075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7076for as_dir in $PATH
7077do
7078  IFS=$as_save_IFS
7079  test -z "$as_dir" && as_dir=.
7080    for ac_exec_ext in '' $ac_executable_extensions; do
7081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7082    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7084    break 2
7085  fi
7086done
7087  done
7088IFS=$as_save_IFS
7089
7090  ;;
7091esac
7092fi
7093DIRNAME=$ac_cv_path_DIRNAME
7094if test -n "$DIRNAME"; then
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7096$as_echo "$DIRNAME" >&6; }
7097else
7098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7099$as_echo "no" >&6; }
7100fi
7101
7102
7103          if test "x$DIRNAME" = x; then
7104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7105          fi
7106        else
7107          # Otherwise we believe it is a complete path. Use it as it is.
7108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7109$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7111$as_echo_n "checking for DIRNAME... " >&6; }
7112          if test ! -x "$tool_specified"; then
7113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7114$as_echo "not found" >&6; }
7115            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7116          fi
7117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7118$as_echo "$tool_specified" >&6; }
7119        fi
7120      fi
7121    fi
7122
7123  fi
7124
7125
7126
7127  if test "x$DIRNAME" = x; then
7128    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7129  fi
7130
7131
7132
7133
7134
7135  # Publish this variable in the help.
7136
7137
7138  if [ -z "${ECHO+x}" ]; then
7139    # The variable is not set by user, try to locate tool using the code snippet
7140    for ac_prog in echo
7141do
7142  # Extract the first word of "$ac_prog", so it can be a program name with args.
7143set dummy $ac_prog; ac_word=$2
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7145$as_echo_n "checking for $ac_word... " >&6; }
7146if ${ac_cv_path_ECHO+:} false; then :
7147  $as_echo_n "(cached) " >&6
7148else
7149  case $ECHO in
7150  [\\/]* | ?:[\\/]*)
7151  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7152  ;;
7153  *)
7154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155for as_dir in $PATH
7156do
7157  IFS=$as_save_IFS
7158  test -z "$as_dir" && as_dir=.
7159    for ac_exec_ext in '' $ac_executable_extensions; do
7160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7161    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7163    break 2
7164  fi
7165done
7166  done
7167IFS=$as_save_IFS
7168
7169  ;;
7170esac
7171fi
7172ECHO=$ac_cv_path_ECHO
7173if test -n "$ECHO"; then
7174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7175$as_echo "$ECHO" >&6; }
7176else
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7178$as_echo "no" >&6; }
7179fi
7180
7181
7182  test -n "$ECHO" && break
7183done
7184
7185  else
7186    # The variable is set, but is it from the command line or the environment?
7187
7188    # Try to remove the string !ECHO! from our list.
7189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7191      # If it failed, the variable was not from the command line. Ignore it,
7192      # but warn the user (except for BASH, which is always set by the calling BASH).
7193      if test "xECHO" != xBASH; then
7194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7195$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7196      fi
7197      # Try to locate tool using the code snippet
7198      for ac_prog in echo
7199do
7200  # Extract the first word of "$ac_prog", so it can be a program name with args.
7201set dummy $ac_prog; ac_word=$2
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7203$as_echo_n "checking for $ac_word... " >&6; }
7204if ${ac_cv_path_ECHO+:} false; then :
7205  $as_echo_n "(cached) " >&6
7206else
7207  case $ECHO in
7208  [\\/]* | ?:[\\/]*)
7209  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7210  ;;
7211  *)
7212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213for as_dir in $PATH
7214do
7215  IFS=$as_save_IFS
7216  test -z "$as_dir" && as_dir=.
7217    for ac_exec_ext in '' $ac_executable_extensions; do
7218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7219    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7221    break 2
7222  fi
7223done
7224  done
7225IFS=$as_save_IFS
7226
7227  ;;
7228esac
7229fi
7230ECHO=$ac_cv_path_ECHO
7231if test -n "$ECHO"; then
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7233$as_echo "$ECHO" >&6; }
7234else
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7236$as_echo "no" >&6; }
7237fi
7238
7239
7240  test -n "$ECHO" && break
7241done
7242
7243    else
7244      # If it succeeded, then it was overridden by the user. We will use it
7245      # for the tool.
7246
7247      # First remove it from the list of overridden variables, so we can test
7248      # for unknown variables in the end.
7249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7250
7251      # Check if we try to supply an empty value
7252      if test "x$ECHO" = x; then
7253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7254$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7256$as_echo_n "checking for ECHO... " >&6; }
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7258$as_echo "disabled" >&6; }
7259      else
7260        # Check if the provided tool contains a complete path.
7261        tool_specified="$ECHO"
7262        tool_basename="${tool_specified##*/}"
7263        if test "x$tool_basename" = "x$tool_specified"; then
7264          # A command without a complete path is provided, search $PATH.
7265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7266$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7267          # Extract the first word of "$tool_basename", so it can be a program name with args.
7268set dummy $tool_basename; ac_word=$2
7269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7270$as_echo_n "checking for $ac_word... " >&6; }
7271if ${ac_cv_path_ECHO+:} false; then :
7272  $as_echo_n "(cached) " >&6
7273else
7274  case $ECHO in
7275  [\\/]* | ?:[\\/]*)
7276  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7277  ;;
7278  *)
7279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282  IFS=$as_save_IFS
7283  test -z "$as_dir" && as_dir=.
7284    for ac_exec_ext in '' $ac_executable_extensions; do
7285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7286    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7288    break 2
7289  fi
7290done
7291  done
7292IFS=$as_save_IFS
7293
7294  ;;
7295esac
7296fi
7297ECHO=$ac_cv_path_ECHO
7298if test -n "$ECHO"; then
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7300$as_echo "$ECHO" >&6; }
7301else
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303$as_echo "no" >&6; }
7304fi
7305
7306
7307          if test "x$ECHO" = x; then
7308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7309          fi
7310        else
7311          # Otherwise we believe it is a complete path. Use it as it is.
7312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7313$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7315$as_echo_n "checking for ECHO... " >&6; }
7316          if test ! -x "$tool_specified"; then
7317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7318$as_echo "not found" >&6; }
7319            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7320          fi
7321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7322$as_echo "$tool_specified" >&6; }
7323        fi
7324      fi
7325    fi
7326
7327  fi
7328
7329
7330
7331  if test "x$ECHO" = x; then
7332    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7333  fi
7334
7335
7336
7337
7338
7339  # Publish this variable in the help.
7340
7341
7342  if [ -z "${EXPR+x}" ]; then
7343    # The variable is not set by user, try to locate tool using the code snippet
7344    for ac_prog in expr
7345do
7346  # Extract the first word of "$ac_prog", so it can be a program name with args.
7347set dummy $ac_prog; ac_word=$2
7348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7349$as_echo_n "checking for $ac_word... " >&6; }
7350if ${ac_cv_path_EXPR+:} false; then :
7351  $as_echo_n "(cached) " >&6
7352else
7353  case $EXPR in
7354  [\\/]* | ?:[\\/]*)
7355  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7356  ;;
7357  *)
7358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7359for as_dir in $PATH
7360do
7361  IFS=$as_save_IFS
7362  test -z "$as_dir" && as_dir=.
7363    for ac_exec_ext in '' $ac_executable_extensions; do
7364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7365    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7367    break 2
7368  fi
7369done
7370  done
7371IFS=$as_save_IFS
7372
7373  ;;
7374esac
7375fi
7376EXPR=$ac_cv_path_EXPR
7377if test -n "$EXPR"; then
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7379$as_echo "$EXPR" >&6; }
7380else
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7382$as_echo "no" >&6; }
7383fi
7384
7385
7386  test -n "$EXPR" && break
7387done
7388
7389  else
7390    # The variable is set, but is it from the command line or the environment?
7391
7392    # Try to remove the string !EXPR! from our list.
7393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7395      # If it failed, the variable was not from the command line. Ignore it,
7396      # but warn the user (except for BASH, which is always set by the calling BASH).
7397      if test "xEXPR" != xBASH; then
7398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7399$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7400      fi
7401      # Try to locate tool using the code snippet
7402      for ac_prog in expr
7403do
7404  # Extract the first word of "$ac_prog", so it can be a program name with args.
7405set dummy $ac_prog; ac_word=$2
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7407$as_echo_n "checking for $ac_word... " >&6; }
7408if ${ac_cv_path_EXPR+:} false; then :
7409  $as_echo_n "(cached) " >&6
7410else
7411  case $EXPR in
7412  [\\/]* | ?:[\\/]*)
7413  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7414  ;;
7415  *)
7416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7417for as_dir in $PATH
7418do
7419  IFS=$as_save_IFS
7420  test -z "$as_dir" && as_dir=.
7421    for ac_exec_ext in '' $ac_executable_extensions; do
7422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7423    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7425    break 2
7426  fi
7427done
7428  done
7429IFS=$as_save_IFS
7430
7431  ;;
7432esac
7433fi
7434EXPR=$ac_cv_path_EXPR
7435if test -n "$EXPR"; then
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7437$as_echo "$EXPR" >&6; }
7438else
7439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440$as_echo "no" >&6; }
7441fi
7442
7443
7444  test -n "$EXPR" && break
7445done
7446
7447    else
7448      # If it succeeded, then it was overridden by the user. We will use it
7449      # for the tool.
7450
7451      # First remove it from the list of overridden variables, so we can test
7452      # for unknown variables in the end.
7453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7454
7455      # Check if we try to supply an empty value
7456      if test "x$EXPR" = x; then
7457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7458$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7460$as_echo_n "checking for EXPR... " >&6; }
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7462$as_echo "disabled" >&6; }
7463      else
7464        # Check if the provided tool contains a complete path.
7465        tool_specified="$EXPR"
7466        tool_basename="${tool_specified##*/}"
7467        if test "x$tool_basename" = "x$tool_specified"; then
7468          # A command without a complete path is provided, search $PATH.
7469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7470$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7471          # Extract the first word of "$tool_basename", so it can be a program name with args.
7472set dummy $tool_basename; ac_word=$2
7473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7474$as_echo_n "checking for $ac_word... " >&6; }
7475if ${ac_cv_path_EXPR+:} false; then :
7476  $as_echo_n "(cached) " >&6
7477else
7478  case $EXPR in
7479  [\\/]* | ?:[\\/]*)
7480  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7481  ;;
7482  *)
7483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7484for as_dir in $PATH
7485do
7486  IFS=$as_save_IFS
7487  test -z "$as_dir" && as_dir=.
7488    for ac_exec_ext in '' $ac_executable_extensions; do
7489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7490    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7492    break 2
7493  fi
7494done
7495  done
7496IFS=$as_save_IFS
7497
7498  ;;
7499esac
7500fi
7501EXPR=$ac_cv_path_EXPR
7502if test -n "$EXPR"; then
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7504$as_echo "$EXPR" >&6; }
7505else
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7507$as_echo "no" >&6; }
7508fi
7509
7510
7511          if test "x$EXPR" = x; then
7512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7513          fi
7514        else
7515          # Otherwise we believe it is a complete path. Use it as it is.
7516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7517$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7519$as_echo_n "checking for EXPR... " >&6; }
7520          if test ! -x "$tool_specified"; then
7521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7522$as_echo "not found" >&6; }
7523            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7524          fi
7525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7526$as_echo "$tool_specified" >&6; }
7527        fi
7528      fi
7529    fi
7530
7531  fi
7532
7533
7534
7535  if test "x$EXPR" = x; then
7536    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7537  fi
7538
7539
7540
7541
7542
7543  # Publish this variable in the help.
7544
7545
7546  if [ -z "${FILE+x}" ]; then
7547    # The variable is not set by user, try to locate tool using the code snippet
7548    for ac_prog in file
7549do
7550  # Extract the first word of "$ac_prog", so it can be a program name with args.
7551set dummy $ac_prog; ac_word=$2
7552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7553$as_echo_n "checking for $ac_word... " >&6; }
7554if ${ac_cv_path_FILE+:} false; then :
7555  $as_echo_n "(cached) " >&6
7556else
7557  case $FILE in
7558  [\\/]* | ?:[\\/]*)
7559  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7560  ;;
7561  *)
7562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7563for as_dir in $PATH
7564do
7565  IFS=$as_save_IFS
7566  test -z "$as_dir" && as_dir=.
7567    for ac_exec_ext in '' $ac_executable_extensions; do
7568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7569    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7571    break 2
7572  fi
7573done
7574  done
7575IFS=$as_save_IFS
7576
7577  ;;
7578esac
7579fi
7580FILE=$ac_cv_path_FILE
7581if test -n "$FILE"; then
7582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7583$as_echo "$FILE" >&6; }
7584else
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586$as_echo "no" >&6; }
7587fi
7588
7589
7590  test -n "$FILE" && break
7591done
7592
7593  else
7594    # The variable is set, but is it from the command line or the environment?
7595
7596    # Try to remove the string !FILE! from our list.
7597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7599      # If it failed, the variable was not from the command line. Ignore it,
7600      # but warn the user (except for BASH, which is always set by the calling BASH).
7601      if test "xFILE" != xBASH; then
7602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7603$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7604      fi
7605      # Try to locate tool using the code snippet
7606      for ac_prog in file
7607do
7608  # Extract the first word of "$ac_prog", so it can be a program name with args.
7609set dummy $ac_prog; ac_word=$2
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7611$as_echo_n "checking for $ac_word... " >&6; }
7612if ${ac_cv_path_FILE+:} false; then :
7613  $as_echo_n "(cached) " >&6
7614else
7615  case $FILE in
7616  [\\/]* | ?:[\\/]*)
7617  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7618  ;;
7619  *)
7620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7621for as_dir in $PATH
7622do
7623  IFS=$as_save_IFS
7624  test -z "$as_dir" && as_dir=.
7625    for ac_exec_ext in '' $ac_executable_extensions; do
7626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7627    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7629    break 2
7630  fi
7631done
7632  done
7633IFS=$as_save_IFS
7634
7635  ;;
7636esac
7637fi
7638FILE=$ac_cv_path_FILE
7639if test -n "$FILE"; then
7640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7641$as_echo "$FILE" >&6; }
7642else
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644$as_echo "no" >&6; }
7645fi
7646
7647
7648  test -n "$FILE" && break
7649done
7650
7651    else
7652      # If it succeeded, then it was overridden by the user. We will use it
7653      # for the tool.
7654
7655      # First remove it from the list of overridden variables, so we can test
7656      # for unknown variables in the end.
7657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7658
7659      # Check if we try to supply an empty value
7660      if test "x$FILE" = x; then
7661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7662$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7664$as_echo_n "checking for FILE... " >&6; }
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7666$as_echo "disabled" >&6; }
7667      else
7668        # Check if the provided tool contains a complete path.
7669        tool_specified="$FILE"
7670        tool_basename="${tool_specified##*/}"
7671        if test "x$tool_basename" = "x$tool_specified"; then
7672          # A command without a complete path is provided, search $PATH.
7673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7674$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7675          # Extract the first word of "$tool_basename", so it can be a program name with args.
7676set dummy $tool_basename; ac_word=$2
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7678$as_echo_n "checking for $ac_word... " >&6; }
7679if ${ac_cv_path_FILE+:} false; then :
7680  $as_echo_n "(cached) " >&6
7681else
7682  case $FILE in
7683  [\\/]* | ?:[\\/]*)
7684  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7685  ;;
7686  *)
7687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7688for as_dir in $PATH
7689do
7690  IFS=$as_save_IFS
7691  test -z "$as_dir" && as_dir=.
7692    for ac_exec_ext in '' $ac_executable_extensions; do
7693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7694    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7696    break 2
7697  fi
7698done
7699  done
7700IFS=$as_save_IFS
7701
7702  ;;
7703esac
7704fi
7705FILE=$ac_cv_path_FILE
7706if test -n "$FILE"; then
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7708$as_echo "$FILE" >&6; }
7709else
7710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711$as_echo "no" >&6; }
7712fi
7713
7714
7715          if test "x$FILE" = x; then
7716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7717          fi
7718        else
7719          # Otherwise we believe it is a complete path. Use it as it is.
7720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7721$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7723$as_echo_n "checking for FILE... " >&6; }
7724          if test ! -x "$tool_specified"; then
7725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7726$as_echo "not found" >&6; }
7727            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7728          fi
7729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7730$as_echo "$tool_specified" >&6; }
7731        fi
7732      fi
7733    fi
7734
7735  fi
7736
7737
7738
7739  if test "x$FILE" = x; then
7740    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7741  fi
7742
7743
7744
7745
7746
7747  # Publish this variable in the help.
7748
7749
7750  if [ -z "${FIND+x}" ]; then
7751    # The variable is not set by user, try to locate tool using the code snippet
7752    for ac_prog in find
7753do
7754  # Extract the first word of "$ac_prog", so it can be a program name with args.
7755set dummy $ac_prog; ac_word=$2
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7757$as_echo_n "checking for $ac_word... " >&6; }
7758if ${ac_cv_path_FIND+:} false; then :
7759  $as_echo_n "(cached) " >&6
7760else
7761  case $FIND in
7762  [\\/]* | ?:[\\/]*)
7763  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7764  ;;
7765  *)
7766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767for as_dir in $PATH
7768do
7769  IFS=$as_save_IFS
7770  test -z "$as_dir" && as_dir=.
7771    for ac_exec_ext in '' $ac_executable_extensions; do
7772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7773    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7775    break 2
7776  fi
7777done
7778  done
7779IFS=$as_save_IFS
7780
7781  ;;
7782esac
7783fi
7784FIND=$ac_cv_path_FIND
7785if test -n "$FIND"; then
7786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7787$as_echo "$FIND" >&6; }
7788else
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7790$as_echo "no" >&6; }
7791fi
7792
7793
7794  test -n "$FIND" && break
7795done
7796
7797  else
7798    # The variable is set, but is it from the command line or the environment?
7799
7800    # Try to remove the string !FIND! from our list.
7801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7803      # If it failed, the variable was not from the command line. Ignore it,
7804      # but warn the user (except for BASH, which is always set by the calling BASH).
7805      if test "xFIND" != xBASH; then
7806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7807$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7808      fi
7809      # Try to locate tool using the code snippet
7810      for ac_prog in find
7811do
7812  # Extract the first word of "$ac_prog", so it can be a program name with args.
7813set dummy $ac_prog; ac_word=$2
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7815$as_echo_n "checking for $ac_word... " >&6; }
7816if ${ac_cv_path_FIND+:} false; then :
7817  $as_echo_n "(cached) " >&6
7818else
7819  case $FIND in
7820  [\\/]* | ?:[\\/]*)
7821  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7822  ;;
7823  *)
7824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7825for as_dir in $PATH
7826do
7827  IFS=$as_save_IFS
7828  test -z "$as_dir" && as_dir=.
7829    for ac_exec_ext in '' $ac_executable_extensions; do
7830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7831    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7833    break 2
7834  fi
7835done
7836  done
7837IFS=$as_save_IFS
7838
7839  ;;
7840esac
7841fi
7842FIND=$ac_cv_path_FIND
7843if test -n "$FIND"; then
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7845$as_echo "$FIND" >&6; }
7846else
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848$as_echo "no" >&6; }
7849fi
7850
7851
7852  test -n "$FIND" && break
7853done
7854
7855    else
7856      # If it succeeded, then it was overridden by the user. We will use it
7857      # for the tool.
7858
7859      # First remove it from the list of overridden variables, so we can test
7860      # for unknown variables in the end.
7861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7862
7863      # Check if we try to supply an empty value
7864      if test "x$FIND" = x; then
7865        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7866$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7868$as_echo_n "checking for FIND... " >&6; }
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7870$as_echo "disabled" >&6; }
7871      else
7872        # Check if the provided tool contains a complete path.
7873        tool_specified="$FIND"
7874        tool_basename="${tool_specified##*/}"
7875        if test "x$tool_basename" = "x$tool_specified"; then
7876          # A command without a complete path is provided, search $PATH.
7877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7878$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7879          # Extract the first word of "$tool_basename", so it can be a program name with args.
7880set dummy $tool_basename; ac_word=$2
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7882$as_echo_n "checking for $ac_word... " >&6; }
7883if ${ac_cv_path_FIND+:} false; then :
7884  $as_echo_n "(cached) " >&6
7885else
7886  case $FIND in
7887  [\\/]* | ?:[\\/]*)
7888  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7889  ;;
7890  *)
7891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7892for as_dir in $PATH
7893do
7894  IFS=$as_save_IFS
7895  test -z "$as_dir" && as_dir=.
7896    for ac_exec_ext in '' $ac_executable_extensions; do
7897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7898    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7900    break 2
7901  fi
7902done
7903  done
7904IFS=$as_save_IFS
7905
7906  ;;
7907esac
7908fi
7909FIND=$ac_cv_path_FIND
7910if test -n "$FIND"; then
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7912$as_echo "$FIND" >&6; }
7913else
7914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7915$as_echo "no" >&6; }
7916fi
7917
7918
7919          if test "x$FIND" = x; then
7920            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7921          fi
7922        else
7923          # Otherwise we believe it is a complete path. Use it as it is.
7924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7925$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7926          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7927$as_echo_n "checking for FIND... " >&6; }
7928          if test ! -x "$tool_specified"; then
7929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7930$as_echo "not found" >&6; }
7931            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7932          fi
7933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7934$as_echo "$tool_specified" >&6; }
7935        fi
7936      fi
7937    fi
7938
7939  fi
7940
7941
7942
7943  if test "x$FIND" = x; then
7944    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7945  fi
7946
7947
7948
7949
7950
7951  # Publish this variable in the help.
7952
7953
7954  if [ -z "${HEAD+x}" ]; then
7955    # The variable is not set by user, try to locate tool using the code snippet
7956    for ac_prog in head
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_HEAD+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $HEAD in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988HEAD=$ac_cv_path_HEAD
7989if test -n "$HEAD"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7991$as_echo "$HEAD" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$HEAD" && break
7999done
8000
8001  else
8002    # The variable is set, but is it from the command line or the environment?
8003
8004    # Try to remove the string !HEAD! from our list.
8005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8007      # If it failed, the variable was not from the command line. Ignore it,
8008      # but warn the user (except for BASH, which is always set by the calling BASH).
8009      if test "xHEAD" != xBASH; then
8010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8011$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8012      fi
8013      # Try to locate tool using the code snippet
8014      for ac_prog in head
8015do
8016  # Extract the first word of "$ac_prog", so it can be a program name with args.
8017set dummy $ac_prog; ac_word=$2
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8019$as_echo_n "checking for $ac_word... " >&6; }
8020if ${ac_cv_path_HEAD+:} false; then :
8021  $as_echo_n "(cached) " >&6
8022else
8023  case $HEAD in
8024  [\\/]* | ?:[\\/]*)
8025  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8026  ;;
8027  *)
8028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8029for as_dir in $PATH
8030do
8031  IFS=$as_save_IFS
8032  test -z "$as_dir" && as_dir=.
8033    for ac_exec_ext in '' $ac_executable_extensions; do
8034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8035    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8037    break 2
8038  fi
8039done
8040  done
8041IFS=$as_save_IFS
8042
8043  ;;
8044esac
8045fi
8046HEAD=$ac_cv_path_HEAD
8047if test -n "$HEAD"; then
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8049$as_echo "$HEAD" >&6; }
8050else
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056  test -n "$HEAD" && break
8057done
8058
8059    else
8060      # If it succeeded, then it was overridden by the user. We will use it
8061      # for the tool.
8062
8063      # First remove it from the list of overridden variables, so we can test
8064      # for unknown variables in the end.
8065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8066
8067      # Check if we try to supply an empty value
8068      if test "x$HEAD" = x; then
8069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8070$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8072$as_echo_n "checking for HEAD... " >&6; }
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8074$as_echo "disabled" >&6; }
8075      else
8076        # Check if the provided tool contains a complete path.
8077        tool_specified="$HEAD"
8078        tool_basename="${tool_specified##*/}"
8079        if test "x$tool_basename" = "x$tool_specified"; then
8080          # A command without a complete path is provided, search $PATH.
8081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8082$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8083          # Extract the first word of "$tool_basename", so it can be a program name with args.
8084set dummy $tool_basename; ac_word=$2
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if ${ac_cv_path_HEAD+:} false; then :
8088  $as_echo_n "(cached) " >&6
8089else
8090  case $HEAD in
8091  [\\/]* | ?:[\\/]*)
8092  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8093  ;;
8094  *)
8095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8096for as_dir in $PATH
8097do
8098  IFS=$as_save_IFS
8099  test -z "$as_dir" && as_dir=.
8100    for ac_exec_ext in '' $ac_executable_extensions; do
8101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8102    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8104    break 2
8105  fi
8106done
8107  done
8108IFS=$as_save_IFS
8109
8110  ;;
8111esac
8112fi
8113HEAD=$ac_cv_path_HEAD
8114if test -n "$HEAD"; then
8115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8116$as_echo "$HEAD" >&6; }
8117else
8118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8119$as_echo "no" >&6; }
8120fi
8121
8122
8123          if test "x$HEAD" = x; then
8124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8125          fi
8126        else
8127          # Otherwise we believe it is a complete path. Use it as it is.
8128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8129$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8131$as_echo_n "checking for HEAD... " >&6; }
8132          if test ! -x "$tool_specified"; then
8133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8134$as_echo "not found" >&6; }
8135            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8136          fi
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8138$as_echo "$tool_specified" >&6; }
8139        fi
8140      fi
8141    fi
8142
8143  fi
8144
8145
8146
8147  if test "x$HEAD" = x; then
8148    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8149  fi
8150
8151
8152
8153
8154
8155  # Publish this variable in the help.
8156
8157
8158  if [ -z "${LN+x}" ]; then
8159    # The variable is not set by user, try to locate tool using the code snippet
8160    for ac_prog in ln
8161do
8162  # Extract the first word of "$ac_prog", so it can be a program name with args.
8163set dummy $ac_prog; ac_word=$2
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8165$as_echo_n "checking for $ac_word... " >&6; }
8166if ${ac_cv_path_LN+:} false; then :
8167  $as_echo_n "(cached) " >&6
8168else
8169  case $LN in
8170  [\\/]* | ?:[\\/]*)
8171  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8172  ;;
8173  *)
8174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8175for as_dir in $PATH
8176do
8177  IFS=$as_save_IFS
8178  test -z "$as_dir" && as_dir=.
8179    for ac_exec_ext in '' $ac_executable_extensions; do
8180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8181    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8183    break 2
8184  fi
8185done
8186  done
8187IFS=$as_save_IFS
8188
8189  ;;
8190esac
8191fi
8192LN=$ac_cv_path_LN
8193if test -n "$LN"; then
8194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8195$as_echo "$LN" >&6; }
8196else
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8198$as_echo "no" >&6; }
8199fi
8200
8201
8202  test -n "$LN" && break
8203done
8204
8205  else
8206    # The variable is set, but is it from the command line or the environment?
8207
8208    # Try to remove the string !LN! from our list.
8209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8211      # If it failed, the variable was not from the command line. Ignore it,
8212      # but warn the user (except for BASH, which is always set by the calling BASH).
8213      if test "xLN" != xBASH; then
8214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8215$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8216      fi
8217      # Try to locate tool using the code snippet
8218      for ac_prog in ln
8219do
8220  # Extract the first word of "$ac_prog", so it can be a program name with args.
8221set dummy $ac_prog; ac_word=$2
8222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8223$as_echo_n "checking for $ac_word... " >&6; }
8224if ${ac_cv_path_LN+:} false; then :
8225  $as_echo_n "(cached) " >&6
8226else
8227  case $LN in
8228  [\\/]* | ?:[\\/]*)
8229  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8230  ;;
8231  *)
8232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233for as_dir in $PATH
8234do
8235  IFS=$as_save_IFS
8236  test -z "$as_dir" && as_dir=.
8237    for ac_exec_ext in '' $ac_executable_extensions; do
8238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8239    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8241    break 2
8242  fi
8243done
8244  done
8245IFS=$as_save_IFS
8246
8247  ;;
8248esac
8249fi
8250LN=$ac_cv_path_LN
8251if test -n "$LN"; then
8252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8253$as_echo "$LN" >&6; }
8254else
8255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8256$as_echo "no" >&6; }
8257fi
8258
8259
8260  test -n "$LN" && break
8261done
8262
8263    else
8264      # If it succeeded, then it was overridden by the user. We will use it
8265      # for the tool.
8266
8267      # First remove it from the list of overridden variables, so we can test
8268      # for unknown variables in the end.
8269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8270
8271      # Check if we try to supply an empty value
8272      if test "x$LN" = x; then
8273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8274$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8276$as_echo_n "checking for LN... " >&6; }
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8278$as_echo "disabled" >&6; }
8279      else
8280        # Check if the provided tool contains a complete path.
8281        tool_specified="$LN"
8282        tool_basename="${tool_specified##*/}"
8283        if test "x$tool_basename" = "x$tool_specified"; then
8284          # A command without a complete path is provided, search $PATH.
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8286$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8287          # Extract the first word of "$tool_basename", so it can be a program name with args.
8288set dummy $tool_basename; ac_word=$2
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290$as_echo_n "checking for $ac_word... " >&6; }
8291if ${ac_cv_path_LN+:} false; then :
8292  $as_echo_n "(cached) " >&6
8293else
8294  case $LN in
8295  [\\/]* | ?:[\\/]*)
8296  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8297  ;;
8298  *)
8299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300for as_dir in $PATH
8301do
8302  IFS=$as_save_IFS
8303  test -z "$as_dir" && as_dir=.
8304    for ac_exec_ext in '' $ac_executable_extensions; do
8305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308    break 2
8309  fi
8310done
8311  done
8312IFS=$as_save_IFS
8313
8314  ;;
8315esac
8316fi
8317LN=$ac_cv_path_LN
8318if test -n "$LN"; then
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8320$as_echo "$LN" >&6; }
8321else
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324fi
8325
8326
8327          if test "x$LN" = x; then
8328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8329          fi
8330        else
8331          # Otherwise we believe it is a complete path. Use it as it is.
8332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8333$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8335$as_echo_n "checking for LN... " >&6; }
8336          if test ! -x "$tool_specified"; then
8337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8338$as_echo "not found" >&6; }
8339            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8340          fi
8341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8342$as_echo "$tool_specified" >&6; }
8343        fi
8344      fi
8345    fi
8346
8347  fi
8348
8349
8350
8351  if test "x$LN" = x; then
8352    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8353  fi
8354
8355
8356
8357
8358
8359  # Publish this variable in the help.
8360
8361
8362  if [ -z "${LS+x}" ]; then
8363    # The variable is not set by user, try to locate tool using the code snippet
8364    for ac_prog in ls
8365do
8366  # Extract the first word of "$ac_prog", so it can be a program name with args.
8367set dummy $ac_prog; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_LS+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $LS in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396LS=$ac_cv_path_LS
8397if test -n "$LS"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8399$as_echo "$LS" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406  test -n "$LS" && break
8407done
8408
8409  else
8410    # The variable is set, but is it from the command line or the environment?
8411
8412    # Try to remove the string !LS! from our list.
8413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8415      # If it failed, the variable was not from the command line. Ignore it,
8416      # but warn the user (except for BASH, which is always set by the calling BASH).
8417      if test "xLS" != xBASH; then
8418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8419$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8420      fi
8421      # Try to locate tool using the code snippet
8422      for ac_prog in ls
8423do
8424  # Extract the first word of "$ac_prog", so it can be a program name with args.
8425set dummy $ac_prog; ac_word=$2
8426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8427$as_echo_n "checking for $ac_word... " >&6; }
8428if ${ac_cv_path_LS+:} false; then :
8429  $as_echo_n "(cached) " >&6
8430else
8431  case $LS in
8432  [\\/]* | ?:[\\/]*)
8433  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8434  ;;
8435  *)
8436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8437for as_dir in $PATH
8438do
8439  IFS=$as_save_IFS
8440  test -z "$as_dir" && as_dir=.
8441    for ac_exec_ext in '' $ac_executable_extensions; do
8442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8443    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8445    break 2
8446  fi
8447done
8448  done
8449IFS=$as_save_IFS
8450
8451  ;;
8452esac
8453fi
8454LS=$ac_cv_path_LS
8455if test -n "$LS"; then
8456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8457$as_echo "$LS" >&6; }
8458else
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8460$as_echo "no" >&6; }
8461fi
8462
8463
8464  test -n "$LS" && break
8465done
8466
8467    else
8468      # If it succeeded, then it was overridden by the user. We will use it
8469      # for the tool.
8470
8471      # First remove it from the list of overridden variables, so we can test
8472      # for unknown variables in the end.
8473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8474
8475      # Check if we try to supply an empty value
8476      if test "x$LS" = x; then
8477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8478$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8480$as_echo_n "checking for LS... " >&6; }
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8482$as_echo "disabled" >&6; }
8483      else
8484        # Check if the provided tool contains a complete path.
8485        tool_specified="$LS"
8486        tool_basename="${tool_specified##*/}"
8487        if test "x$tool_basename" = "x$tool_specified"; then
8488          # A command without a complete path is provided, search $PATH.
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8490$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8491          # Extract the first word of "$tool_basename", so it can be a program name with args.
8492set dummy $tool_basename; ac_word=$2
8493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8494$as_echo_n "checking for $ac_word... " >&6; }
8495if ${ac_cv_path_LS+:} false; then :
8496  $as_echo_n "(cached) " >&6
8497else
8498  case $LS in
8499  [\\/]* | ?:[\\/]*)
8500  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8501  ;;
8502  *)
8503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8504for as_dir in $PATH
8505do
8506  IFS=$as_save_IFS
8507  test -z "$as_dir" && as_dir=.
8508    for ac_exec_ext in '' $ac_executable_extensions; do
8509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8510    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8512    break 2
8513  fi
8514done
8515  done
8516IFS=$as_save_IFS
8517
8518  ;;
8519esac
8520fi
8521LS=$ac_cv_path_LS
8522if test -n "$LS"; then
8523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8524$as_echo "$LS" >&6; }
8525else
8526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8527$as_echo "no" >&6; }
8528fi
8529
8530
8531          if test "x$LS" = x; then
8532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8533          fi
8534        else
8535          # Otherwise we believe it is a complete path. Use it as it is.
8536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8537$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8539$as_echo_n "checking for LS... " >&6; }
8540          if test ! -x "$tool_specified"; then
8541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8542$as_echo "not found" >&6; }
8543            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8544          fi
8545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8546$as_echo "$tool_specified" >&6; }
8547        fi
8548      fi
8549    fi
8550
8551  fi
8552
8553
8554
8555  if test "x$LS" = x; then
8556    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8557  fi
8558
8559
8560
8561
8562
8563  # Publish this variable in the help.
8564
8565
8566  if [ -z "${MKDIR+x}" ]; then
8567    # The variable is not set by user, try to locate tool using the code snippet
8568    for ac_prog in mkdir
8569do
8570  # Extract the first word of "$ac_prog", so it can be a program name with args.
8571set dummy $ac_prog; ac_word=$2
8572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8573$as_echo_n "checking for $ac_word... " >&6; }
8574if ${ac_cv_path_MKDIR+:} false; then :
8575  $as_echo_n "(cached) " >&6
8576else
8577  case $MKDIR in
8578  [\\/]* | ?:[\\/]*)
8579  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8580  ;;
8581  *)
8582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8583for as_dir in $PATH
8584do
8585  IFS=$as_save_IFS
8586  test -z "$as_dir" && as_dir=.
8587    for ac_exec_ext in '' $ac_executable_extensions; do
8588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8589    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8591    break 2
8592  fi
8593done
8594  done
8595IFS=$as_save_IFS
8596
8597  ;;
8598esac
8599fi
8600MKDIR=$ac_cv_path_MKDIR
8601if test -n "$MKDIR"; then
8602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8603$as_echo "$MKDIR" >&6; }
8604else
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8606$as_echo "no" >&6; }
8607fi
8608
8609
8610  test -n "$MKDIR" && break
8611done
8612
8613  else
8614    # The variable is set, but is it from the command line or the environment?
8615
8616    # Try to remove the string !MKDIR! from our list.
8617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8619      # If it failed, the variable was not from the command line. Ignore it,
8620      # but warn the user (except for BASH, which is always set by the calling BASH).
8621      if test "xMKDIR" != xBASH; then
8622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8623$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8624      fi
8625      # Try to locate tool using the code snippet
8626      for ac_prog in mkdir
8627do
8628  # Extract the first word of "$ac_prog", so it can be a program name with args.
8629set dummy $ac_prog; ac_word=$2
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631$as_echo_n "checking for $ac_word... " >&6; }
8632if ${ac_cv_path_MKDIR+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  case $MKDIR in
8636  [\\/]* | ?:[\\/]*)
8637  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8638  ;;
8639  *)
8640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641for as_dir in $PATH
8642do
8643  IFS=$as_save_IFS
8644  test -z "$as_dir" && as_dir=.
8645    for ac_exec_ext in '' $ac_executable_extensions; do
8646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8647    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8649    break 2
8650  fi
8651done
8652  done
8653IFS=$as_save_IFS
8654
8655  ;;
8656esac
8657fi
8658MKDIR=$ac_cv_path_MKDIR
8659if test -n "$MKDIR"; then
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8661$as_echo "$MKDIR" >&6; }
8662else
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668  test -n "$MKDIR" && break
8669done
8670
8671    else
8672      # If it succeeded, then it was overridden by the user. We will use it
8673      # for the tool.
8674
8675      # First remove it from the list of overridden variables, so we can test
8676      # for unknown variables in the end.
8677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8678
8679      # Check if we try to supply an empty value
8680      if test "x$MKDIR" = x; then
8681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8682$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8684$as_echo_n "checking for MKDIR... " >&6; }
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8686$as_echo "disabled" >&6; }
8687      else
8688        # Check if the provided tool contains a complete path.
8689        tool_specified="$MKDIR"
8690        tool_basename="${tool_specified##*/}"
8691        if test "x$tool_basename" = "x$tool_specified"; then
8692          # A command without a complete path is provided, search $PATH.
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8694$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8695          # Extract the first word of "$tool_basename", so it can be a program name with args.
8696set dummy $tool_basename; ac_word=$2
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8698$as_echo_n "checking for $ac_word... " >&6; }
8699if ${ac_cv_path_MKDIR+:} false; then :
8700  $as_echo_n "(cached) " >&6
8701else
8702  case $MKDIR in
8703  [\\/]* | ?:[\\/]*)
8704  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8705  ;;
8706  *)
8707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8708for as_dir in $PATH
8709do
8710  IFS=$as_save_IFS
8711  test -z "$as_dir" && as_dir=.
8712    for ac_exec_ext in '' $ac_executable_extensions; do
8713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8714    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8716    break 2
8717  fi
8718done
8719  done
8720IFS=$as_save_IFS
8721
8722  ;;
8723esac
8724fi
8725MKDIR=$ac_cv_path_MKDIR
8726if test -n "$MKDIR"; then
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8728$as_echo "$MKDIR" >&6; }
8729else
8730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8731$as_echo "no" >&6; }
8732fi
8733
8734
8735          if test "x$MKDIR" = x; then
8736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8737          fi
8738        else
8739          # Otherwise we believe it is a complete path. Use it as it is.
8740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8741$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8743$as_echo_n "checking for MKDIR... " >&6; }
8744          if test ! -x "$tool_specified"; then
8745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8746$as_echo "not found" >&6; }
8747            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8748          fi
8749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8750$as_echo "$tool_specified" >&6; }
8751        fi
8752      fi
8753    fi
8754
8755  fi
8756
8757
8758
8759  if test "x$MKDIR" = x; then
8760    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8761  fi
8762
8763
8764
8765
8766
8767  # Publish this variable in the help.
8768
8769
8770  if [ -z "${MKTEMP+x}" ]; then
8771    # The variable is not set by user, try to locate tool using the code snippet
8772    for ac_prog in mktemp
8773do
8774  # Extract the first word of "$ac_prog", so it can be a program name with args.
8775set dummy $ac_prog; ac_word=$2
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8777$as_echo_n "checking for $ac_word... " >&6; }
8778if ${ac_cv_path_MKTEMP+:} false; then :
8779  $as_echo_n "(cached) " >&6
8780else
8781  case $MKTEMP in
8782  [\\/]* | ?:[\\/]*)
8783  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8784  ;;
8785  *)
8786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8787for as_dir in $PATH
8788do
8789  IFS=$as_save_IFS
8790  test -z "$as_dir" && as_dir=.
8791    for ac_exec_ext in '' $ac_executable_extensions; do
8792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8793    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8795    break 2
8796  fi
8797done
8798  done
8799IFS=$as_save_IFS
8800
8801  ;;
8802esac
8803fi
8804MKTEMP=$ac_cv_path_MKTEMP
8805if test -n "$MKTEMP"; then
8806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8807$as_echo "$MKTEMP" >&6; }
8808else
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811fi
8812
8813
8814  test -n "$MKTEMP" && break
8815done
8816
8817  else
8818    # The variable is set, but is it from the command line or the environment?
8819
8820    # Try to remove the string !MKTEMP! from our list.
8821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8823      # If it failed, the variable was not from the command line. Ignore it,
8824      # but warn the user (except for BASH, which is always set by the calling BASH).
8825      if test "xMKTEMP" != xBASH; then
8826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8827$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8828      fi
8829      # Try to locate tool using the code snippet
8830      for ac_prog in mktemp
8831do
8832  # Extract the first word of "$ac_prog", so it can be a program name with args.
8833set dummy $ac_prog; ac_word=$2
8834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8835$as_echo_n "checking for $ac_word... " >&6; }
8836if ${ac_cv_path_MKTEMP+:} false; then :
8837  $as_echo_n "(cached) " >&6
8838else
8839  case $MKTEMP in
8840  [\\/]* | ?:[\\/]*)
8841  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8842  ;;
8843  *)
8844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8845for as_dir in $PATH
8846do
8847  IFS=$as_save_IFS
8848  test -z "$as_dir" && as_dir=.
8849    for ac_exec_ext in '' $ac_executable_extensions; do
8850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8851    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8853    break 2
8854  fi
8855done
8856  done
8857IFS=$as_save_IFS
8858
8859  ;;
8860esac
8861fi
8862MKTEMP=$ac_cv_path_MKTEMP
8863if test -n "$MKTEMP"; then
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8865$as_echo "$MKTEMP" >&6; }
8866else
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8868$as_echo "no" >&6; }
8869fi
8870
8871
8872  test -n "$MKTEMP" && break
8873done
8874
8875    else
8876      # If it succeeded, then it was overridden by the user. We will use it
8877      # for the tool.
8878
8879      # First remove it from the list of overridden variables, so we can test
8880      # for unknown variables in the end.
8881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8882
8883      # Check if we try to supply an empty value
8884      if test "x$MKTEMP" = x; then
8885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8886$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8888$as_echo_n "checking for MKTEMP... " >&6; }
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8890$as_echo "disabled" >&6; }
8891      else
8892        # Check if the provided tool contains a complete path.
8893        tool_specified="$MKTEMP"
8894        tool_basename="${tool_specified##*/}"
8895        if test "x$tool_basename" = "x$tool_specified"; then
8896          # A command without a complete path is provided, search $PATH.
8897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8898$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8899          # Extract the first word of "$tool_basename", so it can be a program name with args.
8900set dummy $tool_basename; ac_word=$2
8901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8902$as_echo_n "checking for $ac_word... " >&6; }
8903if ${ac_cv_path_MKTEMP+:} false; then :
8904  $as_echo_n "(cached) " >&6
8905else
8906  case $MKTEMP in
8907  [\\/]* | ?:[\\/]*)
8908  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8909  ;;
8910  *)
8911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8912for as_dir in $PATH
8913do
8914  IFS=$as_save_IFS
8915  test -z "$as_dir" && as_dir=.
8916    for ac_exec_ext in '' $ac_executable_extensions; do
8917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8918    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8920    break 2
8921  fi
8922done
8923  done
8924IFS=$as_save_IFS
8925
8926  ;;
8927esac
8928fi
8929MKTEMP=$ac_cv_path_MKTEMP
8930if test -n "$MKTEMP"; then
8931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8932$as_echo "$MKTEMP" >&6; }
8933else
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
8936fi
8937
8938
8939          if test "x$MKTEMP" = x; then
8940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8941          fi
8942        else
8943          # Otherwise we believe it is a complete path. Use it as it is.
8944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8945$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8947$as_echo_n "checking for MKTEMP... " >&6; }
8948          if test ! -x "$tool_specified"; then
8949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8950$as_echo "not found" >&6; }
8951            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8952          fi
8953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8954$as_echo "$tool_specified" >&6; }
8955        fi
8956      fi
8957    fi
8958
8959  fi
8960
8961
8962
8963  if test "x$MKTEMP" = x; then
8964    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8965  fi
8966
8967
8968
8969
8970
8971  # Publish this variable in the help.
8972
8973
8974  if [ -z "${MV+x}" ]; then
8975    # The variable is not set by user, try to locate tool using the code snippet
8976    for ac_prog in mv
8977do
8978  # Extract the first word of "$ac_prog", so it can be a program name with args.
8979set dummy $ac_prog; ac_word=$2
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8981$as_echo_n "checking for $ac_word... " >&6; }
8982if ${ac_cv_path_MV+:} false; then :
8983  $as_echo_n "(cached) " >&6
8984else
8985  case $MV in
8986  [\\/]* | ?:[\\/]*)
8987  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8988  ;;
8989  *)
8990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8991for as_dir in $PATH
8992do
8993  IFS=$as_save_IFS
8994  test -z "$as_dir" && as_dir=.
8995    for ac_exec_ext in '' $ac_executable_extensions; do
8996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8997    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8999    break 2
9000  fi
9001done
9002  done
9003IFS=$as_save_IFS
9004
9005  ;;
9006esac
9007fi
9008MV=$ac_cv_path_MV
9009if test -n "$MV"; then
9010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9011$as_echo "$MV" >&6; }
9012else
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
9015fi
9016
9017
9018  test -n "$MV" && break
9019done
9020
9021  else
9022    # The variable is set, but is it from the command line or the environment?
9023
9024    # Try to remove the string !MV! from our list.
9025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9027      # If it failed, the variable was not from the command line. Ignore it,
9028      # but warn the user (except for BASH, which is always set by the calling BASH).
9029      if test "xMV" != xBASH; then
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9031$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9032      fi
9033      # Try to locate tool using the code snippet
9034      for ac_prog in mv
9035do
9036  # Extract the first word of "$ac_prog", so it can be a program name with args.
9037set dummy $ac_prog; ac_word=$2
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9039$as_echo_n "checking for $ac_word... " >&6; }
9040if ${ac_cv_path_MV+:} false; then :
9041  $as_echo_n "(cached) " >&6
9042else
9043  case $MV in
9044  [\\/]* | ?:[\\/]*)
9045  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9046  ;;
9047  *)
9048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049for as_dir in $PATH
9050do
9051  IFS=$as_save_IFS
9052  test -z "$as_dir" && as_dir=.
9053    for ac_exec_ext in '' $ac_executable_extensions; do
9054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9055    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9057    break 2
9058  fi
9059done
9060  done
9061IFS=$as_save_IFS
9062
9063  ;;
9064esac
9065fi
9066MV=$ac_cv_path_MV
9067if test -n "$MV"; then
9068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9069$as_echo "$MV" >&6; }
9070else
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072$as_echo "no" >&6; }
9073fi
9074
9075
9076  test -n "$MV" && break
9077done
9078
9079    else
9080      # If it succeeded, then it was overridden by the user. We will use it
9081      # for the tool.
9082
9083      # First remove it from the list of overridden variables, so we can test
9084      # for unknown variables in the end.
9085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9086
9087      # Check if we try to supply an empty value
9088      if test "x$MV" = x; then
9089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9090$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9092$as_echo_n "checking for MV... " >&6; }
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9094$as_echo "disabled" >&6; }
9095      else
9096        # Check if the provided tool contains a complete path.
9097        tool_specified="$MV"
9098        tool_basename="${tool_specified##*/}"
9099        if test "x$tool_basename" = "x$tool_specified"; then
9100          # A command without a complete path is provided, search $PATH.
9101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9102$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9103          # Extract the first word of "$tool_basename", so it can be a program name with args.
9104set dummy $tool_basename; ac_word=$2
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9106$as_echo_n "checking for $ac_word... " >&6; }
9107if ${ac_cv_path_MV+:} false; then :
9108  $as_echo_n "(cached) " >&6
9109else
9110  case $MV in
9111  [\\/]* | ?:[\\/]*)
9112  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9113  ;;
9114  *)
9115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9116for as_dir in $PATH
9117do
9118  IFS=$as_save_IFS
9119  test -z "$as_dir" && as_dir=.
9120    for ac_exec_ext in '' $ac_executable_extensions; do
9121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9122    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9124    break 2
9125  fi
9126done
9127  done
9128IFS=$as_save_IFS
9129
9130  ;;
9131esac
9132fi
9133MV=$ac_cv_path_MV
9134if test -n "$MV"; then
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9136$as_echo "$MV" >&6; }
9137else
9138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139$as_echo "no" >&6; }
9140fi
9141
9142
9143          if test "x$MV" = x; then
9144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9145          fi
9146        else
9147          # Otherwise we believe it is a complete path. Use it as it is.
9148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9149$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9151$as_echo_n "checking for MV... " >&6; }
9152          if test ! -x "$tool_specified"; then
9153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9154$as_echo "not found" >&6; }
9155            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9156          fi
9157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9158$as_echo "$tool_specified" >&6; }
9159        fi
9160      fi
9161    fi
9162
9163  fi
9164
9165
9166
9167  if test "x$MV" = x; then
9168    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9169  fi
9170
9171
9172
9173
9174
9175  # Publish this variable in the help.
9176
9177
9178  if [ -z "${NAWK+x}" ]; then
9179    # The variable is not set by user, try to locate tool using the code snippet
9180    for ac_prog in nawk gawk awk
9181do
9182  # Extract the first word of "$ac_prog", so it can be a program name with args.
9183set dummy $ac_prog; ac_word=$2
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9185$as_echo_n "checking for $ac_word... " >&6; }
9186if ${ac_cv_path_NAWK+:} false; then :
9187  $as_echo_n "(cached) " >&6
9188else
9189  case $NAWK in
9190  [\\/]* | ?:[\\/]*)
9191  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9192  ;;
9193  *)
9194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9195for as_dir in $PATH
9196do
9197  IFS=$as_save_IFS
9198  test -z "$as_dir" && as_dir=.
9199    for ac_exec_ext in '' $ac_executable_extensions; do
9200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9201    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9203    break 2
9204  fi
9205done
9206  done
9207IFS=$as_save_IFS
9208
9209  ;;
9210esac
9211fi
9212NAWK=$ac_cv_path_NAWK
9213if test -n "$NAWK"; then
9214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9215$as_echo "$NAWK" >&6; }
9216else
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9218$as_echo "no" >&6; }
9219fi
9220
9221
9222  test -n "$NAWK" && break
9223done
9224
9225  else
9226    # The variable is set, but is it from the command line or the environment?
9227
9228    # Try to remove the string !NAWK! from our list.
9229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9231      # If it failed, the variable was not from the command line. Ignore it,
9232      # but warn the user (except for BASH, which is always set by the calling BASH).
9233      if test "xNAWK" != xBASH; then
9234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9235$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9236      fi
9237      # Try to locate tool using the code snippet
9238      for ac_prog in nawk gawk awk
9239do
9240  # Extract the first word of "$ac_prog", so it can be a program name with args.
9241set dummy $ac_prog; ac_word=$2
9242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243$as_echo_n "checking for $ac_word... " >&6; }
9244if ${ac_cv_path_NAWK+:} false; then :
9245  $as_echo_n "(cached) " >&6
9246else
9247  case $NAWK in
9248  [\\/]* | ?:[\\/]*)
9249  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9250  ;;
9251  *)
9252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253for as_dir in $PATH
9254do
9255  IFS=$as_save_IFS
9256  test -z "$as_dir" && as_dir=.
9257    for ac_exec_ext in '' $ac_executable_extensions; do
9258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9259    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9261    break 2
9262  fi
9263done
9264  done
9265IFS=$as_save_IFS
9266
9267  ;;
9268esac
9269fi
9270NAWK=$ac_cv_path_NAWK
9271if test -n "$NAWK"; then
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9273$as_echo "$NAWK" >&6; }
9274else
9275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
9277fi
9278
9279
9280  test -n "$NAWK" && break
9281done
9282
9283    else
9284      # If it succeeded, then it was overridden by the user. We will use it
9285      # for the tool.
9286
9287      # First remove it from the list of overridden variables, so we can test
9288      # for unknown variables in the end.
9289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9290
9291      # Check if we try to supply an empty value
9292      if test "x$NAWK" = x; then
9293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9294$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9296$as_echo_n "checking for NAWK... " >&6; }
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9298$as_echo "disabled" >&6; }
9299      else
9300        # Check if the provided tool contains a complete path.
9301        tool_specified="$NAWK"
9302        tool_basename="${tool_specified##*/}"
9303        if test "x$tool_basename" = "x$tool_specified"; then
9304          # A command without a complete path is provided, search $PATH.
9305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9306$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9307          # Extract the first word of "$tool_basename", so it can be a program name with args.
9308set dummy $tool_basename; ac_word=$2
9309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9310$as_echo_n "checking for $ac_word... " >&6; }
9311if ${ac_cv_path_NAWK+:} false; then :
9312  $as_echo_n "(cached) " >&6
9313else
9314  case $NAWK in
9315  [\\/]* | ?:[\\/]*)
9316  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9317  ;;
9318  *)
9319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9320for as_dir in $PATH
9321do
9322  IFS=$as_save_IFS
9323  test -z "$as_dir" && as_dir=.
9324    for ac_exec_ext in '' $ac_executable_extensions; do
9325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9326    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9328    break 2
9329  fi
9330done
9331  done
9332IFS=$as_save_IFS
9333
9334  ;;
9335esac
9336fi
9337NAWK=$ac_cv_path_NAWK
9338if test -n "$NAWK"; then
9339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9340$as_echo "$NAWK" >&6; }
9341else
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343$as_echo "no" >&6; }
9344fi
9345
9346
9347          if test "x$NAWK" = x; then
9348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9349          fi
9350        else
9351          # Otherwise we believe it is a complete path. Use it as it is.
9352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9353$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9355$as_echo_n "checking for NAWK... " >&6; }
9356          if test ! -x "$tool_specified"; then
9357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9358$as_echo "not found" >&6; }
9359            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9360          fi
9361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9362$as_echo "$tool_specified" >&6; }
9363        fi
9364      fi
9365    fi
9366
9367  fi
9368
9369
9370
9371  if test "x$NAWK" = x; then
9372    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9373  fi
9374
9375
9376
9377
9378
9379  # Publish this variable in the help.
9380
9381
9382  if [ -z "${PRINTF+x}" ]; then
9383    # The variable is not set by user, try to locate tool using the code snippet
9384    for ac_prog in printf
9385do
9386  # Extract the first word of "$ac_prog", so it can be a program name with args.
9387set dummy $ac_prog; ac_word=$2
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9389$as_echo_n "checking for $ac_word... " >&6; }
9390if ${ac_cv_path_PRINTF+:} false; then :
9391  $as_echo_n "(cached) " >&6
9392else
9393  case $PRINTF in
9394  [\\/]* | ?:[\\/]*)
9395  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9396  ;;
9397  *)
9398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9399for as_dir in $PATH
9400do
9401  IFS=$as_save_IFS
9402  test -z "$as_dir" && as_dir=.
9403    for ac_exec_ext in '' $ac_executable_extensions; do
9404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9405    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9407    break 2
9408  fi
9409done
9410  done
9411IFS=$as_save_IFS
9412
9413  ;;
9414esac
9415fi
9416PRINTF=$ac_cv_path_PRINTF
9417if test -n "$PRINTF"; then
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9419$as_echo "$PRINTF" >&6; }
9420else
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
9423fi
9424
9425
9426  test -n "$PRINTF" && break
9427done
9428
9429  else
9430    # The variable is set, but is it from the command line or the environment?
9431
9432    # Try to remove the string !PRINTF! from our list.
9433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9435      # If it failed, the variable was not from the command line. Ignore it,
9436      # but warn the user (except for BASH, which is always set by the calling BASH).
9437      if test "xPRINTF" != xBASH; then
9438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9439$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9440      fi
9441      # Try to locate tool using the code snippet
9442      for ac_prog in printf
9443do
9444  # Extract the first word of "$ac_prog", so it can be a program name with args.
9445set dummy $ac_prog; ac_word=$2
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9447$as_echo_n "checking for $ac_word... " >&6; }
9448if ${ac_cv_path_PRINTF+:} false; then :
9449  $as_echo_n "(cached) " >&6
9450else
9451  case $PRINTF in
9452  [\\/]* | ?:[\\/]*)
9453  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9454  ;;
9455  *)
9456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9457for as_dir in $PATH
9458do
9459  IFS=$as_save_IFS
9460  test -z "$as_dir" && as_dir=.
9461    for ac_exec_ext in '' $ac_executable_extensions; do
9462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9463    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9465    break 2
9466  fi
9467done
9468  done
9469IFS=$as_save_IFS
9470
9471  ;;
9472esac
9473fi
9474PRINTF=$ac_cv_path_PRINTF
9475if test -n "$PRINTF"; then
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9477$as_echo "$PRINTF" >&6; }
9478else
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
9481fi
9482
9483
9484  test -n "$PRINTF" && break
9485done
9486
9487    else
9488      # If it succeeded, then it was overridden by the user. We will use it
9489      # for the tool.
9490
9491      # First remove it from the list of overridden variables, so we can test
9492      # for unknown variables in the end.
9493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9494
9495      # Check if we try to supply an empty value
9496      if test "x$PRINTF" = x; then
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9498$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9500$as_echo_n "checking for PRINTF... " >&6; }
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9502$as_echo "disabled" >&6; }
9503      else
9504        # Check if the provided tool contains a complete path.
9505        tool_specified="$PRINTF"
9506        tool_basename="${tool_specified##*/}"
9507        if test "x$tool_basename" = "x$tool_specified"; then
9508          # A command without a complete path is provided, search $PATH.
9509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9510$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9511          # Extract the first word of "$tool_basename", so it can be a program name with args.
9512set dummy $tool_basename; ac_word=$2
9513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9514$as_echo_n "checking for $ac_word... " >&6; }
9515if ${ac_cv_path_PRINTF+:} false; then :
9516  $as_echo_n "(cached) " >&6
9517else
9518  case $PRINTF in
9519  [\\/]* | ?:[\\/]*)
9520  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9521  ;;
9522  *)
9523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9524for as_dir in $PATH
9525do
9526  IFS=$as_save_IFS
9527  test -z "$as_dir" && as_dir=.
9528    for ac_exec_ext in '' $ac_executable_extensions; do
9529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9530    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9532    break 2
9533  fi
9534done
9535  done
9536IFS=$as_save_IFS
9537
9538  ;;
9539esac
9540fi
9541PRINTF=$ac_cv_path_PRINTF
9542if test -n "$PRINTF"; then
9543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9544$as_echo "$PRINTF" >&6; }
9545else
9546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9547$as_echo "no" >&6; }
9548fi
9549
9550
9551          if test "x$PRINTF" = x; then
9552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9553          fi
9554        else
9555          # Otherwise we believe it is a complete path. Use it as it is.
9556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9557$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9559$as_echo_n "checking for PRINTF... " >&6; }
9560          if test ! -x "$tool_specified"; then
9561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9562$as_echo "not found" >&6; }
9563            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9564          fi
9565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9566$as_echo "$tool_specified" >&6; }
9567        fi
9568      fi
9569    fi
9570
9571  fi
9572
9573
9574
9575  if test "x$PRINTF" = x; then
9576    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9577  fi
9578
9579
9580
9581
9582
9583  # Publish this variable in the help.
9584
9585
9586  if [ -z "${RM+x}" ]; then
9587    # The variable is not set by user, try to locate tool using the code snippet
9588    for ac_prog in rm
9589do
9590  # Extract the first word of "$ac_prog", so it can be a program name with args.
9591set dummy $ac_prog; ac_word=$2
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if ${ac_cv_path_RM+:} false; then :
9595  $as_echo_n "(cached) " >&6
9596else
9597  case $RM in
9598  [\\/]* | ?:[\\/]*)
9599  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9600  ;;
9601  *)
9602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9603for as_dir in $PATH
9604do
9605  IFS=$as_save_IFS
9606  test -z "$as_dir" && as_dir=.
9607    for ac_exec_ext in '' $ac_executable_extensions; do
9608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9609    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9611    break 2
9612  fi
9613done
9614  done
9615IFS=$as_save_IFS
9616
9617  ;;
9618esac
9619fi
9620RM=$ac_cv_path_RM
9621if test -n "$RM"; then
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9623$as_echo "$RM" >&6; }
9624else
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627fi
9628
9629
9630  test -n "$RM" && break
9631done
9632
9633  else
9634    # The variable is set, but is it from the command line or the environment?
9635
9636    # Try to remove the string !RM! from our list.
9637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9639      # If it failed, the variable was not from the command line. Ignore it,
9640      # but warn the user (except for BASH, which is always set by the calling BASH).
9641      if test "xRM" != xBASH; then
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9643$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9644      fi
9645      # Try to locate tool using the code snippet
9646      for ac_prog in rm
9647do
9648  # Extract the first word of "$ac_prog", so it can be a program name with args.
9649set dummy $ac_prog; ac_word=$2
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9651$as_echo_n "checking for $ac_word... " >&6; }
9652if ${ac_cv_path_RM+:} false; then :
9653  $as_echo_n "(cached) " >&6
9654else
9655  case $RM in
9656  [\\/]* | ?:[\\/]*)
9657  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9658  ;;
9659  *)
9660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9661for as_dir in $PATH
9662do
9663  IFS=$as_save_IFS
9664  test -z "$as_dir" && as_dir=.
9665    for ac_exec_ext in '' $ac_executable_extensions; do
9666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9667    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9669    break 2
9670  fi
9671done
9672  done
9673IFS=$as_save_IFS
9674
9675  ;;
9676esac
9677fi
9678RM=$ac_cv_path_RM
9679if test -n "$RM"; then
9680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9681$as_echo "$RM" >&6; }
9682else
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
9685fi
9686
9687
9688  test -n "$RM" && break
9689done
9690
9691    else
9692      # If it succeeded, then it was overridden by the user. We will use it
9693      # for the tool.
9694
9695      # First remove it from the list of overridden variables, so we can test
9696      # for unknown variables in the end.
9697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9698
9699      # Check if we try to supply an empty value
9700      if test "x$RM" = x; then
9701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9702$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9704$as_echo_n "checking for RM... " >&6; }
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9706$as_echo "disabled" >&6; }
9707      else
9708        # Check if the provided tool contains a complete path.
9709        tool_specified="$RM"
9710        tool_basename="${tool_specified##*/}"
9711        if test "x$tool_basename" = "x$tool_specified"; then
9712          # A command without a complete path is provided, search $PATH.
9713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9714$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9715          # Extract the first word of "$tool_basename", so it can be a program name with args.
9716set dummy $tool_basename; ac_word=$2
9717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9718$as_echo_n "checking for $ac_word... " >&6; }
9719if ${ac_cv_path_RM+:} false; then :
9720  $as_echo_n "(cached) " >&6
9721else
9722  case $RM in
9723  [\\/]* | ?:[\\/]*)
9724  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9725  ;;
9726  *)
9727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9728for as_dir in $PATH
9729do
9730  IFS=$as_save_IFS
9731  test -z "$as_dir" && as_dir=.
9732    for ac_exec_ext in '' $ac_executable_extensions; do
9733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9734    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9736    break 2
9737  fi
9738done
9739  done
9740IFS=$as_save_IFS
9741
9742  ;;
9743esac
9744fi
9745RM=$ac_cv_path_RM
9746if test -n "$RM"; then
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9748$as_echo "$RM" >&6; }
9749else
9750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9751$as_echo "no" >&6; }
9752fi
9753
9754
9755          if test "x$RM" = x; then
9756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9757          fi
9758        else
9759          # Otherwise we believe it is a complete path. Use it as it is.
9760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9761$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9763$as_echo_n "checking for RM... " >&6; }
9764          if test ! -x "$tool_specified"; then
9765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9766$as_echo "not found" >&6; }
9767            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9768          fi
9769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9770$as_echo "$tool_specified" >&6; }
9771        fi
9772      fi
9773    fi
9774
9775  fi
9776
9777
9778
9779  if test "x$RM" = x; then
9780    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9781  fi
9782
9783
9784
9785
9786
9787  # Publish this variable in the help.
9788
9789
9790  if [ -z "${RMDIR+x}" ]; then
9791    # The variable is not set by user, try to locate tool using the code snippet
9792    for ac_prog in rmdir
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_RMDIR+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $RMDIR in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824RMDIR=$ac_cv_path_RMDIR
9825if test -n "$RMDIR"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9827$as_echo "$RMDIR" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$RMDIR" && break
9835done
9836
9837  else
9838    # The variable is set, but is it from the command line or the environment?
9839
9840    # Try to remove the string !RMDIR! from our list.
9841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9843      # If it failed, the variable was not from the command line. Ignore it,
9844      # but warn the user (except for BASH, which is always set by the calling BASH).
9845      if test "xRMDIR" != xBASH; then
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9847$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9848      fi
9849      # Try to locate tool using the code snippet
9850      for ac_prog in rmdir
9851do
9852  # Extract the first word of "$ac_prog", so it can be a program name with args.
9853set dummy $ac_prog; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_RMDIR+:} false; then :
9857  $as_echo_n "(cached) " >&6
9858else
9859  case $RMDIR in
9860  [\\/]* | ?:[\\/]*)
9861  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9862  ;;
9863  *)
9864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  test -z "$as_dir" && as_dir=.
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879  ;;
9880esac
9881fi
9882RMDIR=$ac_cv_path_RMDIR
9883if test -n "$RMDIR"; then
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9885$as_echo "$RMDIR" >&6; }
9886else
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891
9892  test -n "$RMDIR" && break
9893done
9894
9895    else
9896      # If it succeeded, then it was overridden by the user. We will use it
9897      # for the tool.
9898
9899      # First remove it from the list of overridden variables, so we can test
9900      # for unknown variables in the end.
9901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9902
9903      # Check if we try to supply an empty value
9904      if test "x$RMDIR" = x; then
9905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9906$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9908$as_echo_n "checking for RMDIR... " >&6; }
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9910$as_echo "disabled" >&6; }
9911      else
9912        # Check if the provided tool contains a complete path.
9913        tool_specified="$RMDIR"
9914        tool_basename="${tool_specified##*/}"
9915        if test "x$tool_basename" = "x$tool_specified"; then
9916          # A command without a complete path is provided, search $PATH.
9917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9918$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9919          # Extract the first word of "$tool_basename", so it can be a program name with args.
9920set dummy $tool_basename; ac_word=$2
9921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9922$as_echo_n "checking for $ac_word... " >&6; }
9923if ${ac_cv_path_RMDIR+:} false; then :
9924  $as_echo_n "(cached) " >&6
9925else
9926  case $RMDIR in
9927  [\\/]* | ?:[\\/]*)
9928  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9929  ;;
9930  *)
9931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9932for as_dir in $PATH
9933do
9934  IFS=$as_save_IFS
9935  test -z "$as_dir" && as_dir=.
9936    for ac_exec_ext in '' $ac_executable_extensions; do
9937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9938    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9940    break 2
9941  fi
9942done
9943  done
9944IFS=$as_save_IFS
9945
9946  ;;
9947esac
9948fi
9949RMDIR=$ac_cv_path_RMDIR
9950if test -n "$RMDIR"; then
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9952$as_echo "$RMDIR" >&6; }
9953else
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
9956fi
9957
9958
9959          if test "x$RMDIR" = x; then
9960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9961          fi
9962        else
9963          # Otherwise we believe it is a complete path. Use it as it is.
9964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9965$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9967$as_echo_n "checking for RMDIR... " >&6; }
9968          if test ! -x "$tool_specified"; then
9969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9970$as_echo "not found" >&6; }
9971            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9972          fi
9973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9974$as_echo "$tool_specified" >&6; }
9975        fi
9976      fi
9977    fi
9978
9979  fi
9980
9981
9982
9983  if test "x$RMDIR" = x; then
9984    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9985  fi
9986
9987
9988
9989
9990
9991  # Publish this variable in the help.
9992
9993
9994  if [ -z "${SH+x}" ]; then
9995    # The variable is not set by user, try to locate tool using the code snippet
9996    for ac_prog in sh
9997do
9998  # Extract the first word of "$ac_prog", so it can be a program name with args.
9999set dummy $ac_prog; ac_word=$2
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10001$as_echo_n "checking for $ac_word... " >&6; }
10002if ${ac_cv_path_SH+:} false; then :
10003  $as_echo_n "(cached) " >&6
10004else
10005  case $SH in
10006  [\\/]* | ?:[\\/]*)
10007  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10008  ;;
10009  *)
10010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10011for as_dir in $PATH
10012do
10013  IFS=$as_save_IFS
10014  test -z "$as_dir" && as_dir=.
10015    for ac_exec_ext in '' $ac_executable_extensions; do
10016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10017    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10019    break 2
10020  fi
10021done
10022  done
10023IFS=$as_save_IFS
10024
10025  ;;
10026esac
10027fi
10028SH=$ac_cv_path_SH
10029if test -n "$SH"; then
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10031$as_echo "$SH" >&6; }
10032else
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
10035fi
10036
10037
10038  test -n "$SH" && break
10039done
10040
10041  else
10042    # The variable is set, but is it from the command line or the environment?
10043
10044    # Try to remove the string !SH! from our list.
10045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10047      # If it failed, the variable was not from the command line. Ignore it,
10048      # but warn the user (except for BASH, which is always set by the calling BASH).
10049      if test "xSH" != xBASH; then
10050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10051$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10052      fi
10053      # Try to locate tool using the code snippet
10054      for ac_prog in sh
10055do
10056  # Extract the first word of "$ac_prog", so it can be a program name with args.
10057set dummy $ac_prog; ac_word=$2
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10059$as_echo_n "checking for $ac_word... " >&6; }
10060if ${ac_cv_path_SH+:} false; then :
10061  $as_echo_n "(cached) " >&6
10062else
10063  case $SH in
10064  [\\/]* | ?:[\\/]*)
10065  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10066  ;;
10067  *)
10068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10069for as_dir in $PATH
10070do
10071  IFS=$as_save_IFS
10072  test -z "$as_dir" && as_dir=.
10073    for ac_exec_ext in '' $ac_executable_extensions; do
10074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10075    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10077    break 2
10078  fi
10079done
10080  done
10081IFS=$as_save_IFS
10082
10083  ;;
10084esac
10085fi
10086SH=$ac_cv_path_SH
10087if test -n "$SH"; then
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10089$as_echo "$SH" >&6; }
10090else
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
10093fi
10094
10095
10096  test -n "$SH" && break
10097done
10098
10099    else
10100      # If it succeeded, then it was overridden by the user. We will use it
10101      # for the tool.
10102
10103      # First remove it from the list of overridden variables, so we can test
10104      # for unknown variables in the end.
10105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10106
10107      # Check if we try to supply an empty value
10108      if test "x$SH" = x; then
10109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10110$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10112$as_echo_n "checking for SH... " >&6; }
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10114$as_echo "disabled" >&6; }
10115      else
10116        # Check if the provided tool contains a complete path.
10117        tool_specified="$SH"
10118        tool_basename="${tool_specified##*/}"
10119        if test "x$tool_basename" = "x$tool_specified"; then
10120          # A command without a complete path is provided, search $PATH.
10121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10122$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10123          # Extract the first word of "$tool_basename", so it can be a program name with args.
10124set dummy $tool_basename; ac_word=$2
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126$as_echo_n "checking for $ac_word... " >&6; }
10127if ${ac_cv_path_SH+:} false; then :
10128  $as_echo_n "(cached) " >&6
10129else
10130  case $SH in
10131  [\\/]* | ?:[\\/]*)
10132  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10133  ;;
10134  *)
10135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136for as_dir in $PATH
10137do
10138  IFS=$as_save_IFS
10139  test -z "$as_dir" && as_dir=.
10140    for ac_exec_ext in '' $ac_executable_extensions; do
10141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10142    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10144    break 2
10145  fi
10146done
10147  done
10148IFS=$as_save_IFS
10149
10150  ;;
10151esac
10152fi
10153SH=$ac_cv_path_SH
10154if test -n "$SH"; then
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10156$as_echo "$SH" >&6; }
10157else
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160fi
10161
10162
10163          if test "x$SH" = x; then
10164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10165          fi
10166        else
10167          # Otherwise we believe it is a complete path. Use it as it is.
10168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10169$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10171$as_echo_n "checking for SH... " >&6; }
10172          if test ! -x "$tool_specified"; then
10173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10174$as_echo "not found" >&6; }
10175            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10176          fi
10177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10178$as_echo "$tool_specified" >&6; }
10179        fi
10180      fi
10181    fi
10182
10183  fi
10184
10185
10186
10187  if test "x$SH" = x; then
10188    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10189  fi
10190
10191
10192
10193
10194
10195  # Publish this variable in the help.
10196
10197
10198  if [ -z "${SORT+x}" ]; then
10199    # The variable is not set by user, try to locate tool using the code snippet
10200    for ac_prog in sort
10201do
10202  # Extract the first word of "$ac_prog", so it can be a program name with args.
10203set dummy $ac_prog; ac_word=$2
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10205$as_echo_n "checking for $ac_word... " >&6; }
10206if ${ac_cv_path_SORT+:} false; then :
10207  $as_echo_n "(cached) " >&6
10208else
10209  case $SORT in
10210  [\\/]* | ?:[\\/]*)
10211  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10212  ;;
10213  *)
10214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10215for as_dir in $PATH
10216do
10217  IFS=$as_save_IFS
10218  test -z "$as_dir" && as_dir=.
10219    for ac_exec_ext in '' $ac_executable_extensions; do
10220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10221    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10223    break 2
10224  fi
10225done
10226  done
10227IFS=$as_save_IFS
10228
10229  ;;
10230esac
10231fi
10232SORT=$ac_cv_path_SORT
10233if test -n "$SORT"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10235$as_echo "$SORT" >&6; }
10236else
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242  test -n "$SORT" && break
10243done
10244
10245  else
10246    # The variable is set, but is it from the command line or the environment?
10247
10248    # Try to remove the string !SORT! from our list.
10249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10251      # If it failed, the variable was not from the command line. Ignore it,
10252      # but warn the user (except for BASH, which is always set by the calling BASH).
10253      if test "xSORT" != xBASH; then
10254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10255$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10256      fi
10257      # Try to locate tool using the code snippet
10258      for ac_prog in sort
10259do
10260  # Extract the first word of "$ac_prog", so it can be a program name with args.
10261set dummy $ac_prog; ac_word=$2
10262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10263$as_echo_n "checking for $ac_word... " >&6; }
10264if ${ac_cv_path_SORT+:} false; then :
10265  $as_echo_n "(cached) " >&6
10266else
10267  case $SORT in
10268  [\\/]* | ?:[\\/]*)
10269  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10270  ;;
10271  *)
10272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10273for as_dir in $PATH
10274do
10275  IFS=$as_save_IFS
10276  test -z "$as_dir" && as_dir=.
10277    for ac_exec_ext in '' $ac_executable_extensions; do
10278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10279    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10281    break 2
10282  fi
10283done
10284  done
10285IFS=$as_save_IFS
10286
10287  ;;
10288esac
10289fi
10290SORT=$ac_cv_path_SORT
10291if test -n "$SORT"; then
10292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10293$as_echo "$SORT" >&6; }
10294else
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10296$as_echo "no" >&6; }
10297fi
10298
10299
10300  test -n "$SORT" && break
10301done
10302
10303    else
10304      # If it succeeded, then it was overridden by the user. We will use it
10305      # for the tool.
10306
10307      # First remove it from the list of overridden variables, so we can test
10308      # for unknown variables in the end.
10309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10310
10311      # Check if we try to supply an empty value
10312      if test "x$SORT" = x; then
10313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10314$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10316$as_echo_n "checking for SORT... " >&6; }
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10318$as_echo "disabled" >&6; }
10319      else
10320        # Check if the provided tool contains a complete path.
10321        tool_specified="$SORT"
10322        tool_basename="${tool_specified##*/}"
10323        if test "x$tool_basename" = "x$tool_specified"; then
10324          # A command without a complete path is provided, search $PATH.
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10326$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10327          # Extract the first word of "$tool_basename", so it can be a program name with args.
10328set dummy $tool_basename; ac_word=$2
10329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10330$as_echo_n "checking for $ac_word... " >&6; }
10331if ${ac_cv_path_SORT+:} false; then :
10332  $as_echo_n "(cached) " >&6
10333else
10334  case $SORT in
10335  [\\/]* | ?:[\\/]*)
10336  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10337  ;;
10338  *)
10339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10340for as_dir in $PATH
10341do
10342  IFS=$as_save_IFS
10343  test -z "$as_dir" && as_dir=.
10344    for ac_exec_ext in '' $ac_executable_extensions; do
10345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10346    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10348    break 2
10349  fi
10350done
10351  done
10352IFS=$as_save_IFS
10353
10354  ;;
10355esac
10356fi
10357SORT=$ac_cv_path_SORT
10358if test -n "$SORT"; then
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10360$as_echo "$SORT" >&6; }
10361else
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363$as_echo "no" >&6; }
10364fi
10365
10366
10367          if test "x$SORT" = x; then
10368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10369          fi
10370        else
10371          # Otherwise we believe it is a complete path. Use it as it is.
10372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10373$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10375$as_echo_n "checking for SORT... " >&6; }
10376          if test ! -x "$tool_specified"; then
10377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10378$as_echo "not found" >&6; }
10379            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10380          fi
10381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10382$as_echo "$tool_specified" >&6; }
10383        fi
10384      fi
10385    fi
10386
10387  fi
10388
10389
10390
10391  if test "x$SORT" = x; then
10392    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10393  fi
10394
10395
10396
10397
10398
10399  # Publish this variable in the help.
10400
10401
10402  if [ -z "${TAIL+x}" ]; then
10403    # The variable is not set by user, try to locate tool using the code snippet
10404    for ac_prog in tail
10405do
10406  # Extract the first word of "$ac_prog", so it can be a program name with args.
10407set dummy $ac_prog; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_TAIL+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $TAIL in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10425    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436TAIL=$ac_cv_path_TAIL
10437if test -n "$TAIL"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10439$as_echo "$TAIL" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446  test -n "$TAIL" && break
10447done
10448
10449  else
10450    # The variable is set, but is it from the command line or the environment?
10451
10452    # Try to remove the string !TAIL! from our list.
10453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10455      # If it failed, the variable was not from the command line. Ignore it,
10456      # but warn the user (except for BASH, which is always set by the calling BASH).
10457      if test "xTAIL" != xBASH; then
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10459$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10460      fi
10461      # Try to locate tool using the code snippet
10462      for ac_prog in tail
10463do
10464  # Extract the first word of "$ac_prog", so it can be a program name with args.
10465set dummy $ac_prog; ac_word=$2
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467$as_echo_n "checking for $ac_word... " >&6; }
10468if ${ac_cv_path_TAIL+:} false; then :
10469  $as_echo_n "(cached) " >&6
10470else
10471  case $TAIL in
10472  [\\/]* | ?:[\\/]*)
10473  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10474  ;;
10475  *)
10476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477for as_dir in $PATH
10478do
10479  IFS=$as_save_IFS
10480  test -z "$as_dir" && as_dir=.
10481    for ac_exec_ext in '' $ac_executable_extensions; do
10482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485    break 2
10486  fi
10487done
10488  done
10489IFS=$as_save_IFS
10490
10491  ;;
10492esac
10493fi
10494TAIL=$ac_cv_path_TAIL
10495if test -n "$TAIL"; then
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10497$as_echo "$TAIL" >&6; }
10498else
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501fi
10502
10503
10504  test -n "$TAIL" && break
10505done
10506
10507    else
10508      # If it succeeded, then it was overridden by the user. We will use it
10509      # for the tool.
10510
10511      # First remove it from the list of overridden variables, so we can test
10512      # for unknown variables in the end.
10513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10514
10515      # Check if we try to supply an empty value
10516      if test "x$TAIL" = x; then
10517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10518$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10520$as_echo_n "checking for TAIL... " >&6; }
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10522$as_echo "disabled" >&6; }
10523      else
10524        # Check if the provided tool contains a complete path.
10525        tool_specified="$TAIL"
10526        tool_basename="${tool_specified##*/}"
10527        if test "x$tool_basename" = "x$tool_specified"; then
10528          # A command without a complete path is provided, search $PATH.
10529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10530$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10531          # Extract the first word of "$tool_basename", so it can be a program name with args.
10532set dummy $tool_basename; ac_word=$2
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10534$as_echo_n "checking for $ac_word... " >&6; }
10535if ${ac_cv_path_TAIL+:} false; then :
10536  $as_echo_n "(cached) " >&6
10537else
10538  case $TAIL in
10539  [\\/]* | ?:[\\/]*)
10540  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10541  ;;
10542  *)
10543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544for as_dir in $PATH
10545do
10546  IFS=$as_save_IFS
10547  test -z "$as_dir" && as_dir=.
10548    for ac_exec_ext in '' $ac_executable_extensions; do
10549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10550    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552    break 2
10553  fi
10554done
10555  done
10556IFS=$as_save_IFS
10557
10558  ;;
10559esac
10560fi
10561TAIL=$ac_cv_path_TAIL
10562if test -n "$TAIL"; then
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10564$as_echo "$TAIL" >&6; }
10565else
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
10568fi
10569
10570
10571          if test "x$TAIL" = x; then
10572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10573          fi
10574        else
10575          # Otherwise we believe it is a complete path. Use it as it is.
10576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10577$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10579$as_echo_n "checking for TAIL... " >&6; }
10580          if test ! -x "$tool_specified"; then
10581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10582$as_echo "not found" >&6; }
10583            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10584          fi
10585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10586$as_echo "$tool_specified" >&6; }
10587        fi
10588      fi
10589    fi
10590
10591  fi
10592
10593
10594
10595  if test "x$TAIL" = x; then
10596    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10597  fi
10598
10599
10600
10601
10602
10603  # Publish this variable in the help.
10604
10605
10606  if [ -z "${TAR+x}" ]; then
10607    # The variable is not set by user, try to locate tool using the code snippet
10608    for ac_prog in tar
10609do
10610  # Extract the first word of "$ac_prog", so it can be a program name with args.
10611set dummy $ac_prog; ac_word=$2
10612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10613$as_echo_n "checking for $ac_word... " >&6; }
10614if ${ac_cv_path_TAR+:} false; then :
10615  $as_echo_n "(cached) " >&6
10616else
10617  case $TAR in
10618  [\\/]* | ?:[\\/]*)
10619  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10620  ;;
10621  *)
10622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10623for as_dir in $PATH
10624do
10625  IFS=$as_save_IFS
10626  test -z "$as_dir" && as_dir=.
10627    for ac_exec_ext in '' $ac_executable_extensions; do
10628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10629    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10631    break 2
10632  fi
10633done
10634  done
10635IFS=$as_save_IFS
10636
10637  ;;
10638esac
10639fi
10640TAR=$ac_cv_path_TAR
10641if test -n "$TAR"; then
10642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10643$as_echo "$TAR" >&6; }
10644else
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10646$as_echo "no" >&6; }
10647fi
10648
10649
10650  test -n "$TAR" && break
10651done
10652
10653  else
10654    # The variable is set, but is it from the command line or the environment?
10655
10656    # Try to remove the string !TAR! from our list.
10657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10659      # If it failed, the variable was not from the command line. Ignore it,
10660      # but warn the user (except for BASH, which is always set by the calling BASH).
10661      if test "xTAR" != xBASH; then
10662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10663$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10664      fi
10665      # Try to locate tool using the code snippet
10666      for ac_prog in tar
10667do
10668  # Extract the first word of "$ac_prog", so it can be a program name with args.
10669set dummy $ac_prog; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if ${ac_cv_path_TAR+:} false; then :
10673  $as_echo_n "(cached) " >&6
10674else
10675  case $TAR in
10676  [\\/]* | ?:[\\/]*)
10677  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10678  ;;
10679  *)
10680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10681for as_dir in $PATH
10682do
10683  IFS=$as_save_IFS
10684  test -z "$as_dir" && as_dir=.
10685    for ac_exec_ext in '' $ac_executable_extensions; do
10686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10687    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10689    break 2
10690  fi
10691done
10692  done
10693IFS=$as_save_IFS
10694
10695  ;;
10696esac
10697fi
10698TAR=$ac_cv_path_TAR
10699if test -n "$TAR"; then
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10701$as_echo "$TAR" >&6; }
10702else
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
10705fi
10706
10707
10708  test -n "$TAR" && break
10709done
10710
10711    else
10712      # If it succeeded, then it was overridden by the user. We will use it
10713      # for the tool.
10714
10715      # First remove it from the list of overridden variables, so we can test
10716      # for unknown variables in the end.
10717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10718
10719      # Check if we try to supply an empty value
10720      if test "x$TAR" = x; then
10721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10722$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10724$as_echo_n "checking for TAR... " >&6; }
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10726$as_echo "disabled" >&6; }
10727      else
10728        # Check if the provided tool contains a complete path.
10729        tool_specified="$TAR"
10730        tool_basename="${tool_specified##*/}"
10731        if test "x$tool_basename" = "x$tool_specified"; then
10732          # A command without a complete path is provided, search $PATH.
10733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10734$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10735          # Extract the first word of "$tool_basename", so it can be a program name with args.
10736set dummy $tool_basename; ac_word=$2
10737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10738$as_echo_n "checking for $ac_word... " >&6; }
10739if ${ac_cv_path_TAR+:} false; then :
10740  $as_echo_n "(cached) " >&6
10741else
10742  case $TAR in
10743  [\\/]* | ?:[\\/]*)
10744  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10745  ;;
10746  *)
10747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10748for as_dir in $PATH
10749do
10750  IFS=$as_save_IFS
10751  test -z "$as_dir" && as_dir=.
10752    for ac_exec_ext in '' $ac_executable_extensions; do
10753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10754    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10756    break 2
10757  fi
10758done
10759  done
10760IFS=$as_save_IFS
10761
10762  ;;
10763esac
10764fi
10765TAR=$ac_cv_path_TAR
10766if test -n "$TAR"; then
10767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10768$as_echo "$TAR" >&6; }
10769else
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
10772fi
10773
10774
10775          if test "x$TAR" = x; then
10776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10777          fi
10778        else
10779          # Otherwise we believe it is a complete path. Use it as it is.
10780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10781$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10783$as_echo_n "checking for TAR... " >&6; }
10784          if test ! -x "$tool_specified"; then
10785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10786$as_echo "not found" >&6; }
10787            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10788          fi
10789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10790$as_echo "$tool_specified" >&6; }
10791        fi
10792      fi
10793    fi
10794
10795  fi
10796
10797
10798
10799  if test "x$TAR" = x; then
10800    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10801  fi
10802
10803
10804
10805
10806
10807  # Publish this variable in the help.
10808
10809
10810  if [ -z "${TEE+x}" ]; then
10811    # The variable is not set by user, try to locate tool using the code snippet
10812    for ac_prog in tee
10813do
10814  # Extract the first word of "$ac_prog", so it can be a program name with args.
10815set dummy $ac_prog; ac_word=$2
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10817$as_echo_n "checking for $ac_word... " >&6; }
10818if ${ac_cv_path_TEE+:} false; then :
10819  $as_echo_n "(cached) " >&6
10820else
10821  case $TEE in
10822  [\\/]* | ?:[\\/]*)
10823  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10824  ;;
10825  *)
10826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10827for as_dir in $PATH
10828do
10829  IFS=$as_save_IFS
10830  test -z "$as_dir" && as_dir=.
10831    for ac_exec_ext in '' $ac_executable_extensions; do
10832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10833    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10835    break 2
10836  fi
10837done
10838  done
10839IFS=$as_save_IFS
10840
10841  ;;
10842esac
10843fi
10844TEE=$ac_cv_path_TEE
10845if test -n "$TEE"; then
10846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10847$as_echo "$TEE" >&6; }
10848else
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10850$as_echo "no" >&6; }
10851fi
10852
10853
10854  test -n "$TEE" && break
10855done
10856
10857  else
10858    # The variable is set, but is it from the command line or the environment?
10859
10860    # Try to remove the string !TEE! from our list.
10861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10863      # If it failed, the variable was not from the command line. Ignore it,
10864      # but warn the user (except for BASH, which is always set by the calling BASH).
10865      if test "xTEE" != xBASH; then
10866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10867$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10868      fi
10869      # Try to locate tool using the code snippet
10870      for ac_prog in tee
10871do
10872  # Extract the first word of "$ac_prog", so it can be a program name with args.
10873set dummy $ac_prog; ac_word=$2
10874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10875$as_echo_n "checking for $ac_word... " >&6; }
10876if ${ac_cv_path_TEE+:} false; then :
10877  $as_echo_n "(cached) " >&6
10878else
10879  case $TEE in
10880  [\\/]* | ?:[\\/]*)
10881  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10882  ;;
10883  *)
10884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10885for as_dir in $PATH
10886do
10887  IFS=$as_save_IFS
10888  test -z "$as_dir" && as_dir=.
10889    for ac_exec_ext in '' $ac_executable_extensions; do
10890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10891    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10893    break 2
10894  fi
10895done
10896  done
10897IFS=$as_save_IFS
10898
10899  ;;
10900esac
10901fi
10902TEE=$ac_cv_path_TEE
10903if test -n "$TEE"; then
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10905$as_echo "$TEE" >&6; }
10906else
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10908$as_echo "no" >&6; }
10909fi
10910
10911
10912  test -n "$TEE" && break
10913done
10914
10915    else
10916      # If it succeeded, then it was overridden by the user. We will use it
10917      # for the tool.
10918
10919      # First remove it from the list of overridden variables, so we can test
10920      # for unknown variables in the end.
10921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10922
10923      # Check if we try to supply an empty value
10924      if test "x$TEE" = x; then
10925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10926$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10928$as_echo_n "checking for TEE... " >&6; }
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10930$as_echo "disabled" >&6; }
10931      else
10932        # Check if the provided tool contains a complete path.
10933        tool_specified="$TEE"
10934        tool_basename="${tool_specified##*/}"
10935        if test "x$tool_basename" = "x$tool_specified"; then
10936          # A command without a complete path is provided, search $PATH.
10937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10938$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10939          # Extract the first word of "$tool_basename", so it can be a program name with args.
10940set dummy $tool_basename; ac_word=$2
10941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10942$as_echo_n "checking for $ac_word... " >&6; }
10943if ${ac_cv_path_TEE+:} false; then :
10944  $as_echo_n "(cached) " >&6
10945else
10946  case $TEE in
10947  [\\/]* | ?:[\\/]*)
10948  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10949  ;;
10950  *)
10951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10952for as_dir in $PATH
10953do
10954  IFS=$as_save_IFS
10955  test -z "$as_dir" && as_dir=.
10956    for ac_exec_ext in '' $ac_executable_extensions; do
10957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10958    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10960    break 2
10961  fi
10962done
10963  done
10964IFS=$as_save_IFS
10965
10966  ;;
10967esac
10968fi
10969TEE=$ac_cv_path_TEE
10970if test -n "$TEE"; then
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10972$as_echo "$TEE" >&6; }
10973else
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10975$as_echo "no" >&6; }
10976fi
10977
10978
10979          if test "x$TEE" = x; then
10980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10981          fi
10982        else
10983          # Otherwise we believe it is a complete path. Use it as it is.
10984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10985$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10987$as_echo_n "checking for TEE... " >&6; }
10988          if test ! -x "$tool_specified"; then
10989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10990$as_echo "not found" >&6; }
10991            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10992          fi
10993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10994$as_echo "$tool_specified" >&6; }
10995        fi
10996      fi
10997    fi
10998
10999  fi
11000
11001
11002
11003  if test "x$TEE" = x; then
11004    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11005  fi
11006
11007
11008
11009
11010
11011  # Publish this variable in the help.
11012
11013
11014  if [ -z "${TOUCH+x}" ]; then
11015    # The variable is not set by user, try to locate tool using the code snippet
11016    for ac_prog in touch
11017do
11018  # Extract the first word of "$ac_prog", so it can be a program name with args.
11019set dummy $ac_prog; ac_word=$2
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11021$as_echo_n "checking for $ac_word... " >&6; }
11022if ${ac_cv_path_TOUCH+:} false; then :
11023  $as_echo_n "(cached) " >&6
11024else
11025  case $TOUCH in
11026  [\\/]* | ?:[\\/]*)
11027  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11028  ;;
11029  *)
11030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033  IFS=$as_save_IFS
11034  test -z "$as_dir" && as_dir=.
11035    for ac_exec_ext in '' $ac_executable_extensions; do
11036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039    break 2
11040  fi
11041done
11042  done
11043IFS=$as_save_IFS
11044
11045  ;;
11046esac
11047fi
11048TOUCH=$ac_cv_path_TOUCH
11049if test -n "$TOUCH"; then
11050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11051$as_echo "$TOUCH" >&6; }
11052else
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
11055fi
11056
11057
11058  test -n "$TOUCH" && break
11059done
11060
11061  else
11062    # The variable is set, but is it from the command line or the environment?
11063
11064    # Try to remove the string !TOUCH! from our list.
11065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11067      # If it failed, the variable was not from the command line. Ignore it,
11068      # but warn the user (except for BASH, which is always set by the calling BASH).
11069      if test "xTOUCH" != xBASH; then
11070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11071$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11072      fi
11073      # Try to locate tool using the code snippet
11074      for ac_prog in touch
11075do
11076  # Extract the first word of "$ac_prog", so it can be a program name with args.
11077set dummy $ac_prog; ac_word=$2
11078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11079$as_echo_n "checking for $ac_word... " >&6; }
11080if ${ac_cv_path_TOUCH+:} false; then :
11081  $as_echo_n "(cached) " >&6
11082else
11083  case $TOUCH in
11084  [\\/]* | ?:[\\/]*)
11085  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11086  ;;
11087  *)
11088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11089for as_dir in $PATH
11090do
11091  IFS=$as_save_IFS
11092  test -z "$as_dir" && as_dir=.
11093    for ac_exec_ext in '' $ac_executable_extensions; do
11094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11095    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11097    break 2
11098  fi
11099done
11100  done
11101IFS=$as_save_IFS
11102
11103  ;;
11104esac
11105fi
11106TOUCH=$ac_cv_path_TOUCH
11107if test -n "$TOUCH"; then
11108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11109$as_echo "$TOUCH" >&6; }
11110else
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11112$as_echo "no" >&6; }
11113fi
11114
11115
11116  test -n "$TOUCH" && break
11117done
11118
11119    else
11120      # If it succeeded, then it was overridden by the user. We will use it
11121      # for the tool.
11122
11123      # First remove it from the list of overridden variables, so we can test
11124      # for unknown variables in the end.
11125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11126
11127      # Check if we try to supply an empty value
11128      if test "x$TOUCH" = x; then
11129        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11130$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11132$as_echo_n "checking for TOUCH... " >&6; }
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11134$as_echo "disabled" >&6; }
11135      else
11136        # Check if the provided tool contains a complete path.
11137        tool_specified="$TOUCH"
11138        tool_basename="${tool_specified##*/}"
11139        if test "x$tool_basename" = "x$tool_specified"; then
11140          # A command without a complete path is provided, search $PATH.
11141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11142$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11143          # Extract the first word of "$tool_basename", so it can be a program name with args.
11144set dummy $tool_basename; ac_word=$2
11145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11146$as_echo_n "checking for $ac_word... " >&6; }
11147if ${ac_cv_path_TOUCH+:} false; then :
11148  $as_echo_n "(cached) " >&6
11149else
11150  case $TOUCH in
11151  [\\/]* | ?:[\\/]*)
11152  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11153  ;;
11154  *)
11155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11156for as_dir in $PATH
11157do
11158  IFS=$as_save_IFS
11159  test -z "$as_dir" && as_dir=.
11160    for ac_exec_ext in '' $ac_executable_extensions; do
11161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11162    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11164    break 2
11165  fi
11166done
11167  done
11168IFS=$as_save_IFS
11169
11170  ;;
11171esac
11172fi
11173TOUCH=$ac_cv_path_TOUCH
11174if test -n "$TOUCH"; then
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11176$as_echo "$TOUCH" >&6; }
11177else
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
11180fi
11181
11182
11183          if test "x$TOUCH" = x; then
11184            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11185          fi
11186        else
11187          # Otherwise we believe it is a complete path. Use it as it is.
11188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11189$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11190          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11191$as_echo_n "checking for TOUCH... " >&6; }
11192          if test ! -x "$tool_specified"; then
11193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11194$as_echo "not found" >&6; }
11195            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11196          fi
11197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11198$as_echo "$tool_specified" >&6; }
11199        fi
11200      fi
11201    fi
11202
11203  fi
11204
11205
11206
11207  if test "x$TOUCH" = x; then
11208    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11209  fi
11210
11211
11212
11213
11214
11215  # Publish this variable in the help.
11216
11217
11218  if [ -z "${TR+x}" ]; then
11219    # The variable is not set by user, try to locate tool using the code snippet
11220    for ac_prog in tr
11221do
11222  # Extract the first word of "$ac_prog", so it can be a program name with args.
11223set dummy $ac_prog; ac_word=$2
11224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11225$as_echo_n "checking for $ac_word... " >&6; }
11226if ${ac_cv_path_TR+:} false; then :
11227  $as_echo_n "(cached) " >&6
11228else
11229  case $TR in
11230  [\\/]* | ?:[\\/]*)
11231  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11232  ;;
11233  *)
11234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11235for as_dir in $PATH
11236do
11237  IFS=$as_save_IFS
11238  test -z "$as_dir" && as_dir=.
11239    for ac_exec_ext in '' $ac_executable_extensions; do
11240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11241    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11243    break 2
11244  fi
11245done
11246  done
11247IFS=$as_save_IFS
11248
11249  ;;
11250esac
11251fi
11252TR=$ac_cv_path_TR
11253if test -n "$TR"; then
11254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11255$as_echo "$TR" >&6; }
11256else
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
11259fi
11260
11261
11262  test -n "$TR" && break
11263done
11264
11265  else
11266    # The variable is set, but is it from the command line or the environment?
11267
11268    # Try to remove the string !TR! from our list.
11269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11271      # If it failed, the variable was not from the command line. Ignore it,
11272      # but warn the user (except for BASH, which is always set by the calling BASH).
11273      if test "xTR" != xBASH; then
11274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11275$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11276      fi
11277      # Try to locate tool using the code snippet
11278      for ac_prog in tr
11279do
11280  # Extract the first word of "$ac_prog", so it can be a program name with args.
11281set dummy $ac_prog; ac_word=$2
11282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11283$as_echo_n "checking for $ac_word... " >&6; }
11284if ${ac_cv_path_TR+:} false; then :
11285  $as_echo_n "(cached) " >&6
11286else
11287  case $TR in
11288  [\\/]* | ?:[\\/]*)
11289  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11290  ;;
11291  *)
11292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11293for as_dir in $PATH
11294do
11295  IFS=$as_save_IFS
11296  test -z "$as_dir" && as_dir=.
11297    for ac_exec_ext in '' $ac_executable_extensions; do
11298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11299    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11301    break 2
11302  fi
11303done
11304  done
11305IFS=$as_save_IFS
11306
11307  ;;
11308esac
11309fi
11310TR=$ac_cv_path_TR
11311if test -n "$TR"; then
11312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11313$as_echo "$TR" >&6; }
11314else
11315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
11317fi
11318
11319
11320  test -n "$TR" && break
11321done
11322
11323    else
11324      # If it succeeded, then it was overridden by the user. We will use it
11325      # for the tool.
11326
11327      # First remove it from the list of overridden variables, so we can test
11328      # for unknown variables in the end.
11329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11330
11331      # Check if we try to supply an empty value
11332      if test "x$TR" = x; then
11333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11334$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11336$as_echo_n "checking for TR... " >&6; }
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11338$as_echo "disabled" >&6; }
11339      else
11340        # Check if the provided tool contains a complete path.
11341        tool_specified="$TR"
11342        tool_basename="${tool_specified##*/}"
11343        if test "x$tool_basename" = "x$tool_specified"; then
11344          # A command without a complete path is provided, search $PATH.
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11346$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11347          # Extract the first word of "$tool_basename", so it can be a program name with args.
11348set dummy $tool_basename; ac_word=$2
11349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11350$as_echo_n "checking for $ac_word... " >&6; }
11351if ${ac_cv_path_TR+:} false; then :
11352  $as_echo_n "(cached) " >&6
11353else
11354  case $TR in
11355  [\\/]* | ?:[\\/]*)
11356  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11357  ;;
11358  *)
11359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11360for as_dir in $PATH
11361do
11362  IFS=$as_save_IFS
11363  test -z "$as_dir" && as_dir=.
11364    for ac_exec_ext in '' $ac_executable_extensions; do
11365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11366    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11368    break 2
11369  fi
11370done
11371  done
11372IFS=$as_save_IFS
11373
11374  ;;
11375esac
11376fi
11377TR=$ac_cv_path_TR
11378if test -n "$TR"; then
11379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11380$as_echo "$TR" >&6; }
11381else
11382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
11384fi
11385
11386
11387          if test "x$TR" = x; then
11388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11389          fi
11390        else
11391          # Otherwise we believe it is a complete path. Use it as it is.
11392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11393$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11395$as_echo_n "checking for TR... " >&6; }
11396          if test ! -x "$tool_specified"; then
11397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11398$as_echo "not found" >&6; }
11399            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11400          fi
11401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11402$as_echo "$tool_specified" >&6; }
11403        fi
11404      fi
11405    fi
11406
11407  fi
11408
11409
11410
11411  if test "x$TR" = x; then
11412    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11413  fi
11414
11415
11416
11417
11418
11419  # Publish this variable in the help.
11420
11421
11422  if [ -z "${UNAME+x}" ]; then
11423    # The variable is not set by user, try to locate tool using the code snippet
11424    for ac_prog in uname
11425do
11426  # Extract the first word of "$ac_prog", so it can be a program name with args.
11427set dummy $ac_prog; ac_word=$2
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11429$as_echo_n "checking for $ac_word... " >&6; }
11430if ${ac_cv_path_UNAME+:} false; then :
11431  $as_echo_n "(cached) " >&6
11432else
11433  case $UNAME in
11434  [\\/]* | ?:[\\/]*)
11435  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11436  ;;
11437  *)
11438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11439for as_dir in $PATH
11440do
11441  IFS=$as_save_IFS
11442  test -z "$as_dir" && as_dir=.
11443    for ac_exec_ext in '' $ac_executable_extensions; do
11444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11445    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11447    break 2
11448  fi
11449done
11450  done
11451IFS=$as_save_IFS
11452
11453  ;;
11454esac
11455fi
11456UNAME=$ac_cv_path_UNAME
11457if test -n "$UNAME"; then
11458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11459$as_echo "$UNAME" >&6; }
11460else
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11462$as_echo "no" >&6; }
11463fi
11464
11465
11466  test -n "$UNAME" && break
11467done
11468
11469  else
11470    # The variable is set, but is it from the command line or the environment?
11471
11472    # Try to remove the string !UNAME! from our list.
11473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11475      # If it failed, the variable was not from the command line. Ignore it,
11476      # but warn the user (except for BASH, which is always set by the calling BASH).
11477      if test "xUNAME" != xBASH; then
11478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11479$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11480      fi
11481      # Try to locate tool using the code snippet
11482      for ac_prog in uname
11483do
11484  # Extract the first word of "$ac_prog", so it can be a program name with args.
11485set dummy $ac_prog; ac_word=$2
11486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11487$as_echo_n "checking for $ac_word... " >&6; }
11488if ${ac_cv_path_UNAME+:} false; then :
11489  $as_echo_n "(cached) " >&6
11490else
11491  case $UNAME in
11492  [\\/]* | ?:[\\/]*)
11493  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11494  ;;
11495  *)
11496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11497for as_dir in $PATH
11498do
11499  IFS=$as_save_IFS
11500  test -z "$as_dir" && as_dir=.
11501    for ac_exec_ext in '' $ac_executable_extensions; do
11502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11503    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11505    break 2
11506  fi
11507done
11508  done
11509IFS=$as_save_IFS
11510
11511  ;;
11512esac
11513fi
11514UNAME=$ac_cv_path_UNAME
11515if test -n "$UNAME"; then
11516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11517$as_echo "$UNAME" >&6; }
11518else
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11520$as_echo "no" >&6; }
11521fi
11522
11523
11524  test -n "$UNAME" && break
11525done
11526
11527    else
11528      # If it succeeded, then it was overridden by the user. We will use it
11529      # for the tool.
11530
11531      # First remove it from the list of overridden variables, so we can test
11532      # for unknown variables in the end.
11533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11534
11535      # Check if we try to supply an empty value
11536      if test "x$UNAME" = x; then
11537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11538$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11540$as_echo_n "checking for UNAME... " >&6; }
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11542$as_echo "disabled" >&6; }
11543      else
11544        # Check if the provided tool contains a complete path.
11545        tool_specified="$UNAME"
11546        tool_basename="${tool_specified##*/}"
11547        if test "x$tool_basename" = "x$tool_specified"; then
11548          # A command without a complete path is provided, search $PATH.
11549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11550$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11551          # Extract the first word of "$tool_basename", so it can be a program name with args.
11552set dummy $tool_basename; ac_word=$2
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11554$as_echo_n "checking for $ac_word... " >&6; }
11555if ${ac_cv_path_UNAME+:} false; then :
11556  $as_echo_n "(cached) " >&6
11557else
11558  case $UNAME in
11559  [\\/]* | ?:[\\/]*)
11560  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11561  ;;
11562  *)
11563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11564for as_dir in $PATH
11565do
11566  IFS=$as_save_IFS
11567  test -z "$as_dir" && as_dir=.
11568    for ac_exec_ext in '' $ac_executable_extensions; do
11569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11570    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11572    break 2
11573  fi
11574done
11575  done
11576IFS=$as_save_IFS
11577
11578  ;;
11579esac
11580fi
11581UNAME=$ac_cv_path_UNAME
11582if test -n "$UNAME"; then
11583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11584$as_echo "$UNAME" >&6; }
11585else
11586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
11588fi
11589
11590
11591          if test "x$UNAME" = x; then
11592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11593          fi
11594        else
11595          # Otherwise we believe it is a complete path. Use it as it is.
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11597$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11599$as_echo_n "checking for UNAME... " >&6; }
11600          if test ! -x "$tool_specified"; then
11601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11602$as_echo "not found" >&6; }
11603            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11604          fi
11605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11606$as_echo "$tool_specified" >&6; }
11607        fi
11608      fi
11609    fi
11610
11611  fi
11612
11613
11614
11615  if test "x$UNAME" = x; then
11616    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11617  fi
11618
11619
11620
11621
11622
11623  # Publish this variable in the help.
11624
11625
11626  if [ -z "${UNIQ+x}" ]; then
11627    # The variable is not set by user, try to locate tool using the code snippet
11628    for ac_prog in uniq
11629do
11630  # Extract the first word of "$ac_prog", so it can be a program name with args.
11631set dummy $ac_prog; ac_word=$2
11632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11633$as_echo_n "checking for $ac_word... " >&6; }
11634if ${ac_cv_path_UNIQ+:} false; then :
11635  $as_echo_n "(cached) " >&6
11636else
11637  case $UNIQ in
11638  [\\/]* | ?:[\\/]*)
11639  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11640  ;;
11641  *)
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_exec_ext in '' $ac_executable_extensions; do
11648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11649    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11651    break 2
11652  fi
11653done
11654  done
11655IFS=$as_save_IFS
11656
11657  ;;
11658esac
11659fi
11660UNIQ=$ac_cv_path_UNIQ
11661if test -n "$UNIQ"; then
11662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11663$as_echo "$UNIQ" >&6; }
11664else
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11666$as_echo "no" >&6; }
11667fi
11668
11669
11670  test -n "$UNIQ" && break
11671done
11672
11673  else
11674    # The variable is set, but is it from the command line or the environment?
11675
11676    # Try to remove the string !UNIQ! from our list.
11677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11679      # If it failed, the variable was not from the command line. Ignore it,
11680      # but warn the user (except for BASH, which is always set by the calling BASH).
11681      if test "xUNIQ" != xBASH; then
11682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11683$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11684      fi
11685      # Try to locate tool using the code snippet
11686      for ac_prog in uniq
11687do
11688  # Extract the first word of "$ac_prog", so it can be a program name with args.
11689set dummy $ac_prog; ac_word=$2
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11691$as_echo_n "checking for $ac_word... " >&6; }
11692if ${ac_cv_path_UNIQ+:} false; then :
11693  $as_echo_n "(cached) " >&6
11694else
11695  case $UNIQ in
11696  [\\/]* | ?:[\\/]*)
11697  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11698  ;;
11699  *)
11700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11701for as_dir in $PATH
11702do
11703  IFS=$as_save_IFS
11704  test -z "$as_dir" && as_dir=.
11705    for ac_exec_ext in '' $ac_executable_extensions; do
11706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11707    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11709    break 2
11710  fi
11711done
11712  done
11713IFS=$as_save_IFS
11714
11715  ;;
11716esac
11717fi
11718UNIQ=$ac_cv_path_UNIQ
11719if test -n "$UNIQ"; then
11720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11721$as_echo "$UNIQ" >&6; }
11722else
11723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11724$as_echo "no" >&6; }
11725fi
11726
11727
11728  test -n "$UNIQ" && break
11729done
11730
11731    else
11732      # If it succeeded, then it was overridden by the user. We will use it
11733      # for the tool.
11734
11735      # First remove it from the list of overridden variables, so we can test
11736      # for unknown variables in the end.
11737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11738
11739      # Check if we try to supply an empty value
11740      if test "x$UNIQ" = x; then
11741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11742$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11744$as_echo_n "checking for UNIQ... " >&6; }
11745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11746$as_echo "disabled" >&6; }
11747      else
11748        # Check if the provided tool contains a complete path.
11749        tool_specified="$UNIQ"
11750        tool_basename="${tool_specified##*/}"
11751        if test "x$tool_basename" = "x$tool_specified"; then
11752          # A command without a complete path is provided, search $PATH.
11753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11754$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11755          # Extract the first word of "$tool_basename", so it can be a program name with args.
11756set dummy $tool_basename; ac_word=$2
11757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11758$as_echo_n "checking for $ac_word... " >&6; }
11759if ${ac_cv_path_UNIQ+:} false; then :
11760  $as_echo_n "(cached) " >&6
11761else
11762  case $UNIQ in
11763  [\\/]* | ?:[\\/]*)
11764  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11765  ;;
11766  *)
11767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11768for as_dir in $PATH
11769do
11770  IFS=$as_save_IFS
11771  test -z "$as_dir" && as_dir=.
11772    for ac_exec_ext in '' $ac_executable_extensions; do
11773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11774    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11776    break 2
11777  fi
11778done
11779  done
11780IFS=$as_save_IFS
11781
11782  ;;
11783esac
11784fi
11785UNIQ=$ac_cv_path_UNIQ
11786if test -n "$UNIQ"; then
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11788$as_echo "$UNIQ" >&6; }
11789else
11790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
11792fi
11793
11794
11795          if test "x$UNIQ" = x; then
11796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11797          fi
11798        else
11799          # Otherwise we believe it is a complete path. Use it as it is.
11800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11801$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11803$as_echo_n "checking for UNIQ... " >&6; }
11804          if test ! -x "$tool_specified"; then
11805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11806$as_echo "not found" >&6; }
11807            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11808          fi
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11810$as_echo "$tool_specified" >&6; }
11811        fi
11812      fi
11813    fi
11814
11815  fi
11816
11817
11818
11819  if test "x$UNIQ" = x; then
11820    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11821  fi
11822
11823
11824
11825
11826
11827  # Publish this variable in the help.
11828
11829
11830  if [ -z "${WC+x}" ]; then
11831    # The variable is not set by user, try to locate tool using the code snippet
11832    for ac_prog in wc
11833do
11834  # Extract the first word of "$ac_prog", so it can be a program name with args.
11835set dummy $ac_prog; ac_word=$2
11836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11837$as_echo_n "checking for $ac_word... " >&6; }
11838if ${ac_cv_path_WC+:} false; then :
11839  $as_echo_n "(cached) " >&6
11840else
11841  case $WC in
11842  [\\/]* | ?:[\\/]*)
11843  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11844  ;;
11845  *)
11846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11847for as_dir in $PATH
11848do
11849  IFS=$as_save_IFS
11850  test -z "$as_dir" && as_dir=.
11851    for ac_exec_ext in '' $ac_executable_extensions; do
11852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11853    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11855    break 2
11856  fi
11857done
11858  done
11859IFS=$as_save_IFS
11860
11861  ;;
11862esac
11863fi
11864WC=$ac_cv_path_WC
11865if test -n "$WC"; then
11866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11867$as_echo "$WC" >&6; }
11868else
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11870$as_echo "no" >&6; }
11871fi
11872
11873
11874  test -n "$WC" && break
11875done
11876
11877  else
11878    # The variable is set, but is it from the command line or the environment?
11879
11880    # Try to remove the string !WC! from our list.
11881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11883      # If it failed, the variable was not from the command line. Ignore it,
11884      # but warn the user (except for BASH, which is always set by the calling BASH).
11885      if test "xWC" != xBASH; then
11886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11887$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11888      fi
11889      # Try to locate tool using the code snippet
11890      for ac_prog in wc
11891do
11892  # Extract the first word of "$ac_prog", so it can be a program name with args.
11893set dummy $ac_prog; ac_word=$2
11894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11895$as_echo_n "checking for $ac_word... " >&6; }
11896if ${ac_cv_path_WC+:} false; then :
11897  $as_echo_n "(cached) " >&6
11898else
11899  case $WC in
11900  [\\/]* | ?:[\\/]*)
11901  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11902  ;;
11903  *)
11904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11905for as_dir in $PATH
11906do
11907  IFS=$as_save_IFS
11908  test -z "$as_dir" && as_dir=.
11909    for ac_exec_ext in '' $ac_executable_extensions; do
11910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11911    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11913    break 2
11914  fi
11915done
11916  done
11917IFS=$as_save_IFS
11918
11919  ;;
11920esac
11921fi
11922WC=$ac_cv_path_WC
11923if test -n "$WC"; then
11924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11925$as_echo "$WC" >&6; }
11926else
11927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11928$as_echo "no" >&6; }
11929fi
11930
11931
11932  test -n "$WC" && break
11933done
11934
11935    else
11936      # If it succeeded, then it was overridden by the user. We will use it
11937      # for the tool.
11938
11939      # First remove it from the list of overridden variables, so we can test
11940      # for unknown variables in the end.
11941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11942
11943      # Check if we try to supply an empty value
11944      if test "x$WC" = x; then
11945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11946$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11948$as_echo_n "checking for WC... " >&6; }
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11950$as_echo "disabled" >&6; }
11951      else
11952        # Check if the provided tool contains a complete path.
11953        tool_specified="$WC"
11954        tool_basename="${tool_specified##*/}"
11955        if test "x$tool_basename" = "x$tool_specified"; then
11956          # A command without a complete path is provided, search $PATH.
11957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11958$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11959          # Extract the first word of "$tool_basename", so it can be a program name with args.
11960set dummy $tool_basename; ac_word=$2
11961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11962$as_echo_n "checking for $ac_word... " >&6; }
11963if ${ac_cv_path_WC+:} false; then :
11964  $as_echo_n "(cached) " >&6
11965else
11966  case $WC in
11967  [\\/]* | ?:[\\/]*)
11968  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11969  ;;
11970  *)
11971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11972for as_dir in $PATH
11973do
11974  IFS=$as_save_IFS
11975  test -z "$as_dir" && as_dir=.
11976    for ac_exec_ext in '' $ac_executable_extensions; do
11977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11978    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11980    break 2
11981  fi
11982done
11983  done
11984IFS=$as_save_IFS
11985
11986  ;;
11987esac
11988fi
11989WC=$ac_cv_path_WC
11990if test -n "$WC"; then
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11992$as_echo "$WC" >&6; }
11993else
11994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11995$as_echo "no" >&6; }
11996fi
11997
11998
11999          if test "x$WC" = x; then
12000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12001          fi
12002        else
12003          # Otherwise we believe it is a complete path. Use it as it is.
12004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12005$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12007$as_echo_n "checking for WC... " >&6; }
12008          if test ! -x "$tool_specified"; then
12009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12010$as_echo "not found" >&6; }
12011            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12012          fi
12013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12014$as_echo "$tool_specified" >&6; }
12015        fi
12016      fi
12017    fi
12018
12019  fi
12020
12021
12022
12023  if test "x$WC" = x; then
12024    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12025  fi
12026
12027
12028
12029
12030
12031  # Publish this variable in the help.
12032
12033
12034  if [ -z "${WHICH+x}" ]; then
12035    # The variable is not set by user, try to locate tool using the code snippet
12036    for ac_prog in which
12037do
12038  # Extract the first word of "$ac_prog", so it can be a program name with args.
12039set dummy $ac_prog; ac_word=$2
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12041$as_echo_n "checking for $ac_word... " >&6; }
12042if ${ac_cv_path_WHICH+:} false; then :
12043  $as_echo_n "(cached) " >&6
12044else
12045  case $WHICH in
12046  [\\/]* | ?:[\\/]*)
12047  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12048  ;;
12049  *)
12050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12051for as_dir in $PATH
12052do
12053  IFS=$as_save_IFS
12054  test -z "$as_dir" && as_dir=.
12055    for ac_exec_ext in '' $ac_executable_extensions; do
12056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12057    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12059    break 2
12060  fi
12061done
12062  done
12063IFS=$as_save_IFS
12064
12065  ;;
12066esac
12067fi
12068WHICH=$ac_cv_path_WHICH
12069if test -n "$WHICH"; then
12070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12071$as_echo "$WHICH" >&6; }
12072else
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074$as_echo "no" >&6; }
12075fi
12076
12077
12078  test -n "$WHICH" && break
12079done
12080
12081  else
12082    # The variable is set, but is it from the command line or the environment?
12083
12084    # Try to remove the string !WHICH! from our list.
12085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12087      # If it failed, the variable was not from the command line. Ignore it,
12088      # but warn the user (except for BASH, which is always set by the calling BASH).
12089      if test "xWHICH" != xBASH; then
12090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12091$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12092      fi
12093      # Try to locate tool using the code snippet
12094      for ac_prog in which
12095do
12096  # Extract the first word of "$ac_prog", so it can be a program name with args.
12097set dummy $ac_prog; ac_word=$2
12098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12099$as_echo_n "checking for $ac_word... " >&6; }
12100if ${ac_cv_path_WHICH+:} false; then :
12101  $as_echo_n "(cached) " >&6
12102else
12103  case $WHICH in
12104  [\\/]* | ?:[\\/]*)
12105  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12106  ;;
12107  *)
12108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12109for as_dir in $PATH
12110do
12111  IFS=$as_save_IFS
12112  test -z "$as_dir" && as_dir=.
12113    for ac_exec_ext in '' $ac_executable_extensions; do
12114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12115    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12117    break 2
12118  fi
12119done
12120  done
12121IFS=$as_save_IFS
12122
12123  ;;
12124esac
12125fi
12126WHICH=$ac_cv_path_WHICH
12127if test -n "$WHICH"; then
12128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12129$as_echo "$WHICH" >&6; }
12130else
12131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
12133fi
12134
12135
12136  test -n "$WHICH" && break
12137done
12138
12139    else
12140      # If it succeeded, then it was overridden by the user. We will use it
12141      # for the tool.
12142
12143      # First remove it from the list of overridden variables, so we can test
12144      # for unknown variables in the end.
12145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12146
12147      # Check if we try to supply an empty value
12148      if test "x$WHICH" = x; then
12149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12150$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12152$as_echo_n "checking for WHICH... " >&6; }
12153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12154$as_echo "disabled" >&6; }
12155      else
12156        # Check if the provided tool contains a complete path.
12157        tool_specified="$WHICH"
12158        tool_basename="${tool_specified##*/}"
12159        if test "x$tool_basename" = "x$tool_specified"; then
12160          # A command without a complete path is provided, search $PATH.
12161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12162$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12163          # Extract the first word of "$tool_basename", so it can be a program name with args.
12164set dummy $tool_basename; ac_word=$2
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12166$as_echo_n "checking for $ac_word... " >&6; }
12167if ${ac_cv_path_WHICH+:} false; then :
12168  $as_echo_n "(cached) " >&6
12169else
12170  case $WHICH in
12171  [\\/]* | ?:[\\/]*)
12172  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12173  ;;
12174  *)
12175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12176for as_dir in $PATH
12177do
12178  IFS=$as_save_IFS
12179  test -z "$as_dir" && as_dir=.
12180    for ac_exec_ext in '' $ac_executable_extensions; do
12181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12182    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12184    break 2
12185  fi
12186done
12187  done
12188IFS=$as_save_IFS
12189
12190  ;;
12191esac
12192fi
12193WHICH=$ac_cv_path_WHICH
12194if test -n "$WHICH"; then
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12196$as_echo "$WHICH" >&6; }
12197else
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12199$as_echo "no" >&6; }
12200fi
12201
12202
12203          if test "x$WHICH" = x; then
12204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12205          fi
12206        else
12207          # Otherwise we believe it is a complete path. Use it as it is.
12208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12209$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12211$as_echo_n "checking for WHICH... " >&6; }
12212          if test ! -x "$tool_specified"; then
12213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12214$as_echo "not found" >&6; }
12215            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12216          fi
12217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12218$as_echo "$tool_specified" >&6; }
12219        fi
12220      fi
12221    fi
12222
12223  fi
12224
12225
12226
12227  if test "x$WHICH" = x; then
12228    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12229  fi
12230
12231
12232
12233
12234
12235  # Publish this variable in the help.
12236
12237
12238  if [ -z "${XARGS+x}" ]; then
12239    # The variable is not set by user, try to locate tool using the code snippet
12240    for ac_prog in xargs
12241do
12242  # Extract the first word of "$ac_prog", so it can be a program name with args.
12243set dummy $ac_prog; ac_word=$2
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12245$as_echo_n "checking for $ac_word... " >&6; }
12246if ${ac_cv_path_XARGS+:} false; then :
12247  $as_echo_n "(cached) " >&6
12248else
12249  case $XARGS in
12250  [\\/]* | ?:[\\/]*)
12251  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12252  ;;
12253  *)
12254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12255for as_dir in $PATH
12256do
12257  IFS=$as_save_IFS
12258  test -z "$as_dir" && as_dir=.
12259    for ac_exec_ext in '' $ac_executable_extensions; do
12260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12261    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12263    break 2
12264  fi
12265done
12266  done
12267IFS=$as_save_IFS
12268
12269  ;;
12270esac
12271fi
12272XARGS=$ac_cv_path_XARGS
12273if test -n "$XARGS"; then
12274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12275$as_echo "$XARGS" >&6; }
12276else
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12278$as_echo "no" >&6; }
12279fi
12280
12281
12282  test -n "$XARGS" && break
12283done
12284
12285  else
12286    # The variable is set, but is it from the command line or the environment?
12287
12288    # Try to remove the string !XARGS! from our list.
12289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12291      # If it failed, the variable was not from the command line. Ignore it,
12292      # but warn the user (except for BASH, which is always set by the calling BASH).
12293      if test "xXARGS" != xBASH; then
12294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12295$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12296      fi
12297      # Try to locate tool using the code snippet
12298      for ac_prog in xargs
12299do
12300  # Extract the first word of "$ac_prog", so it can be a program name with args.
12301set dummy $ac_prog; ac_word=$2
12302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12303$as_echo_n "checking for $ac_word... " >&6; }
12304if ${ac_cv_path_XARGS+:} false; then :
12305  $as_echo_n "(cached) " >&6
12306else
12307  case $XARGS in
12308  [\\/]* | ?:[\\/]*)
12309  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12310  ;;
12311  *)
12312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12313for as_dir in $PATH
12314do
12315  IFS=$as_save_IFS
12316  test -z "$as_dir" && as_dir=.
12317    for ac_exec_ext in '' $ac_executable_extensions; do
12318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12319    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12321    break 2
12322  fi
12323done
12324  done
12325IFS=$as_save_IFS
12326
12327  ;;
12328esac
12329fi
12330XARGS=$ac_cv_path_XARGS
12331if test -n "$XARGS"; then
12332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12333$as_echo "$XARGS" >&6; }
12334else
12335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
12337fi
12338
12339
12340  test -n "$XARGS" && break
12341done
12342
12343    else
12344      # If it succeeded, then it was overridden by the user. We will use it
12345      # for the tool.
12346
12347      # First remove it from the list of overridden variables, so we can test
12348      # for unknown variables in the end.
12349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12350
12351      # Check if we try to supply an empty value
12352      if test "x$XARGS" = x; then
12353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12354$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12356$as_echo_n "checking for XARGS... " >&6; }
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12358$as_echo "disabled" >&6; }
12359      else
12360        # Check if the provided tool contains a complete path.
12361        tool_specified="$XARGS"
12362        tool_basename="${tool_specified##*/}"
12363        if test "x$tool_basename" = "x$tool_specified"; then
12364          # A command without a complete path is provided, search $PATH.
12365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12366$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12367          # Extract the first word of "$tool_basename", so it can be a program name with args.
12368set dummy $tool_basename; ac_word=$2
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12370$as_echo_n "checking for $ac_word... " >&6; }
12371if ${ac_cv_path_XARGS+:} false; then :
12372  $as_echo_n "(cached) " >&6
12373else
12374  case $XARGS in
12375  [\\/]* | ?:[\\/]*)
12376  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12377  ;;
12378  *)
12379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12380for as_dir in $PATH
12381do
12382  IFS=$as_save_IFS
12383  test -z "$as_dir" && as_dir=.
12384    for ac_exec_ext in '' $ac_executable_extensions; do
12385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12386    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12388    break 2
12389  fi
12390done
12391  done
12392IFS=$as_save_IFS
12393
12394  ;;
12395esac
12396fi
12397XARGS=$ac_cv_path_XARGS
12398if test -n "$XARGS"; then
12399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12400$as_echo "$XARGS" >&6; }
12401else
12402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12403$as_echo "no" >&6; }
12404fi
12405
12406
12407          if test "x$XARGS" = x; then
12408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12409          fi
12410        else
12411          # Otherwise we believe it is a complete path. Use it as it is.
12412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12413$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12415$as_echo_n "checking for XARGS... " >&6; }
12416          if test ! -x "$tool_specified"; then
12417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12418$as_echo "not found" >&6; }
12419            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12420          fi
12421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12422$as_echo "$tool_specified" >&6; }
12423        fi
12424      fi
12425    fi
12426
12427  fi
12428
12429
12430
12431  if test "x$XARGS" = x; then
12432    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12433  fi
12434
12435
12436
12437  # Then required tools that require some special treatment.
12438
12439
12440  # Publish this variable in the help.
12441
12442
12443  if [ -z "${AWK+x}" ]; then
12444    # The variable is not set by user, try to locate tool using the code snippet
12445    for ac_prog in gawk mawk nawk awk
12446do
12447  # Extract the first word of "$ac_prog", so it can be a program name with args.
12448set dummy $ac_prog; ac_word=$2
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12450$as_echo_n "checking for $ac_word... " >&6; }
12451if ${ac_cv_prog_AWK+:} false; then :
12452  $as_echo_n "(cached) " >&6
12453else
12454  if test -n "$AWK"; then
12455  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12456else
12457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12458for as_dir in $PATH
12459do
12460  IFS=$as_save_IFS
12461  test -z "$as_dir" && as_dir=.
12462    for ac_exec_ext in '' $ac_executable_extensions; do
12463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12464    ac_cv_prog_AWK="$ac_prog"
12465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12466    break 2
12467  fi
12468done
12469  done
12470IFS=$as_save_IFS
12471
12472fi
12473fi
12474AWK=$ac_cv_prog_AWK
12475if test -n "$AWK"; then
12476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12477$as_echo "$AWK" >&6; }
12478else
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12480$as_echo "no" >&6; }
12481fi
12482
12483
12484  test -n "$AWK" && break
12485done
12486
12487  else
12488    # The variable is set, but is it from the command line or the environment?
12489
12490    # Try to remove the string !AWK! from our list.
12491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12493      # If it failed, the variable was not from the command line. Ignore it,
12494      # but warn the user (except for BASH, which is always set by the calling BASH).
12495      if test "xAWK" != xBASH; then
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12497$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12498      fi
12499      # Try to locate tool using the code snippet
12500      for ac_prog in gawk mawk nawk awk
12501do
12502  # Extract the first word of "$ac_prog", so it can be a program name with args.
12503set dummy $ac_prog; ac_word=$2
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12505$as_echo_n "checking for $ac_word... " >&6; }
12506if ${ac_cv_prog_AWK+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  if test -n "$AWK"; then
12510  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12511else
12512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12513for as_dir in $PATH
12514do
12515  IFS=$as_save_IFS
12516  test -z "$as_dir" && as_dir=.
12517    for ac_exec_ext in '' $ac_executable_extensions; do
12518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12519    ac_cv_prog_AWK="$ac_prog"
12520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12521    break 2
12522  fi
12523done
12524  done
12525IFS=$as_save_IFS
12526
12527fi
12528fi
12529AWK=$ac_cv_prog_AWK
12530if test -n "$AWK"; then
12531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12532$as_echo "$AWK" >&6; }
12533else
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12535$as_echo "no" >&6; }
12536fi
12537
12538
12539  test -n "$AWK" && break
12540done
12541
12542    else
12543      # If it succeeded, then it was overridden by the user. We will use it
12544      # for the tool.
12545
12546      # First remove it from the list of overridden variables, so we can test
12547      # for unknown variables in the end.
12548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12549
12550      # Check if we try to supply an empty value
12551      if test "x$AWK" = x; then
12552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12553$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12555$as_echo_n "checking for AWK... " >&6; }
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12557$as_echo "disabled" >&6; }
12558      else
12559        # Check if the provided tool contains a complete path.
12560        tool_specified="$AWK"
12561        tool_basename="${tool_specified##*/}"
12562        if test "x$tool_basename" = "x$tool_specified"; then
12563          # A command without a complete path is provided, search $PATH.
12564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12565$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12566          # Extract the first word of "$tool_basename", so it can be a program name with args.
12567set dummy $tool_basename; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_AWK+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $AWK in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596AWK=$ac_cv_path_AWK
12597if test -n "$AWK"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12599$as_echo "$AWK" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606          if test "x$AWK" = x; then
12607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12608          fi
12609        else
12610          # Otherwise we believe it is a complete path. Use it as it is.
12611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12612$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12614$as_echo_n "checking for AWK... " >&6; }
12615          if test ! -x "$tool_specified"; then
12616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12617$as_echo "not found" >&6; }
12618            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12619          fi
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12621$as_echo "$tool_specified" >&6; }
12622        fi
12623      fi
12624    fi
12625
12626  fi
12627
12628
12629  if test "x$AWK" = x; then
12630    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12631  fi
12632
12633
12634
12635
12636  # Publish this variable in the help.
12637
12638
12639  if [ -z "${GREP+x}" ]; then
12640    # The variable is not set by user, try to locate tool using the code snippet
12641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12642$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12643if ${ac_cv_path_GREP+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  if test -z "$GREP"; then
12647  ac_path_GREP_found=false
12648  # Loop through the user's path and test for each of PROGNAME-LIST
12649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12650for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12651do
12652  IFS=$as_save_IFS
12653  test -z "$as_dir" && as_dir=.
12654    for ac_prog in grep ggrep; do
12655    for ac_exec_ext in '' $ac_executable_extensions; do
12656      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12657      as_fn_executable_p "$ac_path_GREP" || continue
12658# Check for GNU ac_path_GREP and select it if it is found.
12659  # Check for GNU $ac_path_GREP
12660case `"$ac_path_GREP" --version 2>&1` in
12661*GNU*)
12662  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12663*)
12664  ac_count=0
12665  $as_echo_n 0123456789 >"conftest.in"
12666  while :
12667  do
12668    cat "conftest.in" "conftest.in" >"conftest.tmp"
12669    mv "conftest.tmp" "conftest.in"
12670    cp "conftest.in" "conftest.nl"
12671    $as_echo 'GREP' >> "conftest.nl"
12672    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12673    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12674    as_fn_arith $ac_count + 1 && ac_count=$as_val
12675    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12676      # Best one so far, save it but keep looking for a better one
12677      ac_cv_path_GREP="$ac_path_GREP"
12678      ac_path_GREP_max=$ac_count
12679    fi
12680    # 10*(2^10) chars as input seems more than enough
12681    test $ac_count -gt 10 && break
12682  done
12683  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12684esac
12685
12686      $ac_path_GREP_found && break 3
12687    done
12688  done
12689  done
12690IFS=$as_save_IFS
12691  if test -z "$ac_cv_path_GREP"; then
12692    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12693  fi
12694else
12695  ac_cv_path_GREP=$GREP
12696fi
12697
12698fi
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12700$as_echo "$ac_cv_path_GREP" >&6; }
12701 GREP="$ac_cv_path_GREP"
12702
12703
12704  else
12705    # The variable is set, but is it from the command line or the environment?
12706
12707    # Try to remove the string !GREP! from our list.
12708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12710      # If it failed, the variable was not from the command line. Ignore it,
12711      # but warn the user (except for BASH, which is always set by the calling BASH).
12712      if test "xGREP" != xBASH; then
12713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12714$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12715      fi
12716      # Try to locate tool using the code snippet
12717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12718$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12719if ${ac_cv_path_GREP+:} false; then :
12720  $as_echo_n "(cached) " >&6
12721else
12722  if test -z "$GREP"; then
12723  ac_path_GREP_found=false
12724  # Loop through the user's path and test for each of PROGNAME-LIST
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_prog in grep ggrep; do
12731    for ac_exec_ext in '' $ac_executable_extensions; do
12732      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12733      as_fn_executable_p "$ac_path_GREP" || continue
12734# Check for GNU ac_path_GREP and select it if it is found.
12735  # Check for GNU $ac_path_GREP
12736case `"$ac_path_GREP" --version 2>&1` in
12737*GNU*)
12738  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12739*)
12740  ac_count=0
12741  $as_echo_n 0123456789 >"conftest.in"
12742  while :
12743  do
12744    cat "conftest.in" "conftest.in" >"conftest.tmp"
12745    mv "conftest.tmp" "conftest.in"
12746    cp "conftest.in" "conftest.nl"
12747    $as_echo 'GREP' >> "conftest.nl"
12748    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12749    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12750    as_fn_arith $ac_count + 1 && ac_count=$as_val
12751    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12752      # Best one so far, save it but keep looking for a better one
12753      ac_cv_path_GREP="$ac_path_GREP"
12754      ac_path_GREP_max=$ac_count
12755    fi
12756    # 10*(2^10) chars as input seems more than enough
12757    test $ac_count -gt 10 && break
12758  done
12759  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12760esac
12761
12762      $ac_path_GREP_found && break 3
12763    done
12764  done
12765  done
12766IFS=$as_save_IFS
12767  if test -z "$ac_cv_path_GREP"; then
12768    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12769  fi
12770else
12771  ac_cv_path_GREP=$GREP
12772fi
12773
12774fi
12775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12776$as_echo "$ac_cv_path_GREP" >&6; }
12777 GREP="$ac_cv_path_GREP"
12778
12779
12780    else
12781      # If it succeeded, then it was overridden by the user. We will use it
12782      # for the tool.
12783
12784      # First remove it from the list of overridden variables, so we can test
12785      # for unknown variables in the end.
12786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12787
12788      # Check if we try to supply an empty value
12789      if test "x$GREP" = x; then
12790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12791$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12793$as_echo_n "checking for GREP... " >&6; }
12794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12795$as_echo "disabled" >&6; }
12796      else
12797        # Check if the provided tool contains a complete path.
12798        tool_specified="$GREP"
12799        tool_basename="${tool_specified##*/}"
12800        if test "x$tool_basename" = "x$tool_specified"; then
12801          # A command without a complete path is provided, search $PATH.
12802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12803$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12804          # Extract the first word of "$tool_basename", so it can be a program name with args.
12805set dummy $tool_basename; ac_word=$2
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12807$as_echo_n "checking for $ac_word... " >&6; }
12808if ${ac_cv_path_GREP+:} false; then :
12809  $as_echo_n "(cached) " >&6
12810else
12811  case $GREP in
12812  [\\/]* | ?:[\\/]*)
12813  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12814  ;;
12815  *)
12816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12817for as_dir in $PATH
12818do
12819  IFS=$as_save_IFS
12820  test -z "$as_dir" && as_dir=.
12821    for ac_exec_ext in '' $ac_executable_extensions; do
12822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12823    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12825    break 2
12826  fi
12827done
12828  done
12829IFS=$as_save_IFS
12830
12831  ;;
12832esac
12833fi
12834GREP=$ac_cv_path_GREP
12835if test -n "$GREP"; then
12836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12837$as_echo "$GREP" >&6; }
12838else
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12840$as_echo "no" >&6; }
12841fi
12842
12843
12844          if test "x$GREP" = x; then
12845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12846          fi
12847        else
12848          # Otherwise we believe it is a complete path. Use it as it is.
12849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12850$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12852$as_echo_n "checking for GREP... " >&6; }
12853          if test ! -x "$tool_specified"; then
12854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12855$as_echo "not found" >&6; }
12856            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12857          fi
12858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12859$as_echo "$tool_specified" >&6; }
12860        fi
12861      fi
12862    fi
12863
12864  fi
12865
12866
12867  if test "x$GREP" = x; then
12868    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12869  fi
12870
12871
12872
12873
12874  # Publish this variable in the help.
12875
12876
12877  if [ -z "${EGREP+x}" ]; then
12878    # The variable is not set by user, try to locate tool using the code snippet
12879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12880$as_echo_n "checking for egrep... " >&6; }
12881if ${ac_cv_path_EGREP+:} false; then :
12882  $as_echo_n "(cached) " >&6
12883else
12884  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12885   then ac_cv_path_EGREP="$GREP -E"
12886   else
12887     if test -z "$EGREP"; then
12888  ac_path_EGREP_found=false
12889  # Loop through the user's path and test for each of PROGNAME-LIST
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_prog in egrep; do
12896    for ac_exec_ext in '' $ac_executable_extensions; do
12897      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12898      as_fn_executable_p "$ac_path_EGREP" || continue
12899# Check for GNU ac_path_EGREP and select it if it is found.
12900  # Check for GNU $ac_path_EGREP
12901case `"$ac_path_EGREP" --version 2>&1` in
12902*GNU*)
12903  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12904*)
12905  ac_count=0
12906  $as_echo_n 0123456789 >"conftest.in"
12907  while :
12908  do
12909    cat "conftest.in" "conftest.in" >"conftest.tmp"
12910    mv "conftest.tmp" "conftest.in"
12911    cp "conftest.in" "conftest.nl"
12912    $as_echo 'EGREP' >> "conftest.nl"
12913    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12915    as_fn_arith $ac_count + 1 && ac_count=$as_val
12916    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12917      # Best one so far, save it but keep looking for a better one
12918      ac_cv_path_EGREP="$ac_path_EGREP"
12919      ac_path_EGREP_max=$ac_count
12920    fi
12921    # 10*(2^10) chars as input seems more than enough
12922    test $ac_count -gt 10 && break
12923  done
12924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12925esac
12926
12927      $ac_path_EGREP_found && break 3
12928    done
12929  done
12930  done
12931IFS=$as_save_IFS
12932  if test -z "$ac_cv_path_EGREP"; then
12933    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12934  fi
12935else
12936  ac_cv_path_EGREP=$EGREP
12937fi
12938
12939   fi
12940fi
12941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12942$as_echo "$ac_cv_path_EGREP" >&6; }
12943 EGREP="$ac_cv_path_EGREP"
12944
12945
12946  else
12947    # The variable is set, but is it from the command line or the environment?
12948
12949    # Try to remove the string !EGREP! from our list.
12950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12952      # If it failed, the variable was not from the command line. Ignore it,
12953      # but warn the user (except for BASH, which is always set by the calling BASH).
12954      if test "xEGREP" != xBASH; then
12955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12956$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12957      fi
12958      # Try to locate tool using the code snippet
12959      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12960$as_echo_n "checking for egrep... " >&6; }
12961if ${ac_cv_path_EGREP+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12965   then ac_cv_path_EGREP="$GREP -E"
12966   else
12967     if test -z "$EGREP"; then
12968  ac_path_EGREP_found=false
12969  # Loop through the user's path and test for each of PROGNAME-LIST
12970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12971for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12972do
12973  IFS=$as_save_IFS
12974  test -z "$as_dir" && as_dir=.
12975    for ac_prog in egrep; do
12976    for ac_exec_ext in '' $ac_executable_extensions; do
12977      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12978      as_fn_executable_p "$ac_path_EGREP" || continue
12979# Check for GNU ac_path_EGREP and select it if it is found.
12980  # Check for GNU $ac_path_EGREP
12981case `"$ac_path_EGREP" --version 2>&1` in
12982*GNU*)
12983  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12984*)
12985  ac_count=0
12986  $as_echo_n 0123456789 >"conftest.in"
12987  while :
12988  do
12989    cat "conftest.in" "conftest.in" >"conftest.tmp"
12990    mv "conftest.tmp" "conftest.in"
12991    cp "conftest.in" "conftest.nl"
12992    $as_echo 'EGREP' >> "conftest.nl"
12993    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12994    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12995    as_fn_arith $ac_count + 1 && ac_count=$as_val
12996    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12997      # Best one so far, save it but keep looking for a better one
12998      ac_cv_path_EGREP="$ac_path_EGREP"
12999      ac_path_EGREP_max=$ac_count
13000    fi
13001    # 10*(2^10) chars as input seems more than enough
13002    test $ac_count -gt 10 && break
13003  done
13004  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13005esac
13006
13007      $ac_path_EGREP_found && break 3
13008    done
13009  done
13010  done
13011IFS=$as_save_IFS
13012  if test -z "$ac_cv_path_EGREP"; then
13013    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13014  fi
13015else
13016  ac_cv_path_EGREP=$EGREP
13017fi
13018
13019   fi
13020fi
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13022$as_echo "$ac_cv_path_EGREP" >&6; }
13023 EGREP="$ac_cv_path_EGREP"
13024
13025
13026    else
13027      # If it succeeded, then it was overridden by the user. We will use it
13028      # for the tool.
13029
13030      # First remove it from the list of overridden variables, so we can test
13031      # for unknown variables in the end.
13032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13033
13034      # Check if we try to supply an empty value
13035      if test "x$EGREP" = x; then
13036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13037$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13039$as_echo_n "checking for EGREP... " >&6; }
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13041$as_echo "disabled" >&6; }
13042      else
13043        # Check if the provided tool contains a complete path.
13044        tool_specified="$EGREP"
13045        tool_basename="${tool_specified##*/}"
13046        if test "x$tool_basename" = "x$tool_specified"; then
13047          # A command without a complete path is provided, search $PATH.
13048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13049$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13050          # Extract the first word of "$tool_basename", so it can be a program name with args.
13051set dummy $tool_basename; ac_word=$2
13052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13053$as_echo_n "checking for $ac_word... " >&6; }
13054if ${ac_cv_path_EGREP+:} false; then :
13055  $as_echo_n "(cached) " >&6
13056else
13057  case $EGREP in
13058  [\\/]* | ?:[\\/]*)
13059  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13060  ;;
13061  *)
13062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13063for as_dir in $PATH
13064do
13065  IFS=$as_save_IFS
13066  test -z "$as_dir" && as_dir=.
13067    for ac_exec_ext in '' $ac_executable_extensions; do
13068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13069    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13071    break 2
13072  fi
13073done
13074  done
13075IFS=$as_save_IFS
13076
13077  ;;
13078esac
13079fi
13080EGREP=$ac_cv_path_EGREP
13081if test -n "$EGREP"; then
13082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13083$as_echo "$EGREP" >&6; }
13084else
13085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13086$as_echo "no" >&6; }
13087fi
13088
13089
13090          if test "x$EGREP" = x; then
13091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13092          fi
13093        else
13094          # Otherwise we believe it is a complete path. Use it as it is.
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13096$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13098$as_echo_n "checking for EGREP... " >&6; }
13099          if test ! -x "$tool_specified"; then
13100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13101$as_echo "not found" >&6; }
13102            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13103          fi
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13105$as_echo "$tool_specified" >&6; }
13106        fi
13107      fi
13108    fi
13109
13110  fi
13111
13112
13113  if test "x$EGREP" = x; then
13114    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13115  fi
13116
13117
13118
13119
13120  # Publish this variable in the help.
13121
13122
13123  if [ -z "${FGREP+x}" ]; then
13124    # The variable is not set by user, try to locate tool using the code snippet
13125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13126$as_echo_n "checking for fgrep... " >&6; }
13127if ${ac_cv_path_FGREP+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13131   then ac_cv_path_FGREP="$GREP -F"
13132   else
13133     if test -z "$FGREP"; then
13134  ac_path_FGREP_found=false
13135  # Loop through the user's path and test for each of PROGNAME-LIST
13136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13138do
13139  IFS=$as_save_IFS
13140  test -z "$as_dir" && as_dir=.
13141    for ac_prog in fgrep; do
13142    for ac_exec_ext in '' $ac_executable_extensions; do
13143      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13144      as_fn_executable_p "$ac_path_FGREP" || continue
13145# Check for GNU ac_path_FGREP and select it if it is found.
13146  # Check for GNU $ac_path_FGREP
13147case `"$ac_path_FGREP" --version 2>&1` in
13148*GNU*)
13149  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13150*)
13151  ac_count=0
13152  $as_echo_n 0123456789 >"conftest.in"
13153  while :
13154  do
13155    cat "conftest.in" "conftest.in" >"conftest.tmp"
13156    mv "conftest.tmp" "conftest.in"
13157    cp "conftest.in" "conftest.nl"
13158    $as_echo 'FGREP' >> "conftest.nl"
13159    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13161    as_fn_arith $ac_count + 1 && ac_count=$as_val
13162    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13163      # Best one so far, save it but keep looking for a better one
13164      ac_cv_path_FGREP="$ac_path_FGREP"
13165      ac_path_FGREP_max=$ac_count
13166    fi
13167    # 10*(2^10) chars as input seems more than enough
13168    test $ac_count -gt 10 && break
13169  done
13170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13171esac
13172
13173      $ac_path_FGREP_found && break 3
13174    done
13175  done
13176  done
13177IFS=$as_save_IFS
13178  if test -z "$ac_cv_path_FGREP"; then
13179    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13180  fi
13181else
13182  ac_cv_path_FGREP=$FGREP
13183fi
13184
13185   fi
13186fi
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13188$as_echo "$ac_cv_path_FGREP" >&6; }
13189 FGREP="$ac_cv_path_FGREP"
13190
13191
13192  else
13193    # The variable is set, but is it from the command line or the environment?
13194
13195    # Try to remove the string !FGREP! from our list.
13196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13198      # If it failed, the variable was not from the command line. Ignore it,
13199      # but warn the user (except for BASH, which is always set by the calling BASH).
13200      if test "xFGREP" != xBASH; then
13201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13202$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13203      fi
13204      # Try to locate tool using the code snippet
13205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13206$as_echo_n "checking for fgrep... " >&6; }
13207if ${ac_cv_path_FGREP+:} false; then :
13208  $as_echo_n "(cached) " >&6
13209else
13210  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13211   then ac_cv_path_FGREP="$GREP -F"
13212   else
13213     if test -z "$FGREP"; then
13214  ac_path_FGREP_found=false
13215  # Loop through the user's path and test for each of PROGNAME-LIST
13216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13218do
13219  IFS=$as_save_IFS
13220  test -z "$as_dir" && as_dir=.
13221    for ac_prog in fgrep; do
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13224      as_fn_executable_p "$ac_path_FGREP" || continue
13225# Check for GNU ac_path_FGREP and select it if it is found.
13226  # Check for GNU $ac_path_FGREP
13227case `"$ac_path_FGREP" --version 2>&1` in
13228*GNU*)
13229  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13230*)
13231  ac_count=0
13232  $as_echo_n 0123456789 >"conftest.in"
13233  while :
13234  do
13235    cat "conftest.in" "conftest.in" >"conftest.tmp"
13236    mv "conftest.tmp" "conftest.in"
13237    cp "conftest.in" "conftest.nl"
13238    $as_echo 'FGREP' >> "conftest.nl"
13239    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13240    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13241    as_fn_arith $ac_count + 1 && ac_count=$as_val
13242    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13243      # Best one so far, save it but keep looking for a better one
13244      ac_cv_path_FGREP="$ac_path_FGREP"
13245      ac_path_FGREP_max=$ac_count
13246    fi
13247    # 10*(2^10) chars as input seems more than enough
13248    test $ac_count -gt 10 && break
13249  done
13250  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13251esac
13252
13253      $ac_path_FGREP_found && break 3
13254    done
13255  done
13256  done
13257IFS=$as_save_IFS
13258  if test -z "$ac_cv_path_FGREP"; then
13259    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13260  fi
13261else
13262  ac_cv_path_FGREP=$FGREP
13263fi
13264
13265   fi
13266fi
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13268$as_echo "$ac_cv_path_FGREP" >&6; }
13269 FGREP="$ac_cv_path_FGREP"
13270
13271
13272    else
13273      # If it succeeded, then it was overridden by the user. We will use it
13274      # for the tool.
13275
13276      # First remove it from the list of overridden variables, so we can test
13277      # for unknown variables in the end.
13278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13279
13280      # Check if we try to supply an empty value
13281      if test "x$FGREP" = x; then
13282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13283$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13285$as_echo_n "checking for FGREP... " >&6; }
13286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13287$as_echo "disabled" >&6; }
13288      else
13289        # Check if the provided tool contains a complete path.
13290        tool_specified="$FGREP"
13291        tool_basename="${tool_specified##*/}"
13292        if test "x$tool_basename" = "x$tool_specified"; then
13293          # A command without a complete path is provided, search $PATH.
13294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13295$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13296          # Extract the first word of "$tool_basename", so it can be a program name with args.
13297set dummy $tool_basename; ac_word=$2
13298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13299$as_echo_n "checking for $ac_word... " >&6; }
13300if ${ac_cv_path_FGREP+:} false; then :
13301  $as_echo_n "(cached) " >&6
13302else
13303  case $FGREP in
13304  [\\/]* | ?:[\\/]*)
13305  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13306  ;;
13307  *)
13308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13309for as_dir in $PATH
13310do
13311  IFS=$as_save_IFS
13312  test -z "$as_dir" && as_dir=.
13313    for ac_exec_ext in '' $ac_executable_extensions; do
13314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13315    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13317    break 2
13318  fi
13319done
13320  done
13321IFS=$as_save_IFS
13322
13323  ;;
13324esac
13325fi
13326FGREP=$ac_cv_path_FGREP
13327if test -n "$FGREP"; then
13328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13329$as_echo "$FGREP" >&6; }
13330else
13331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13332$as_echo "no" >&6; }
13333fi
13334
13335
13336          if test "x$FGREP" = x; then
13337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13338          fi
13339        else
13340          # Otherwise we believe it is a complete path. Use it as it is.
13341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13342$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13344$as_echo_n "checking for FGREP... " >&6; }
13345          if test ! -x "$tool_specified"; then
13346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13347$as_echo "not found" >&6; }
13348            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13349          fi
13350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13351$as_echo "$tool_specified" >&6; }
13352        fi
13353      fi
13354    fi
13355
13356  fi
13357
13358
13359  if test "x$FGREP" = x; then
13360    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13361  fi
13362
13363
13364
13365
13366  # Publish this variable in the help.
13367
13368
13369  if [ -z "${SED+x}" ]; then
13370    # The variable is not set by user, try to locate tool using the code snippet
13371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13372$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13373if ${ac_cv_path_SED+:} false; then :
13374  $as_echo_n "(cached) " >&6
13375else
13376            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13377     for ac_i in 1 2 3 4 5 6 7; do
13378       ac_script="$ac_script$as_nl$ac_script"
13379     done
13380     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13381     { ac_script=; unset ac_script;}
13382     if test -z "$SED"; then
13383  ac_path_SED_found=false
13384  # Loop through the user's path and test for each of PROGNAME-LIST
13385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13386for as_dir in $PATH
13387do
13388  IFS=$as_save_IFS
13389  test -z "$as_dir" && as_dir=.
13390    for ac_prog in sed gsed; do
13391    for ac_exec_ext in '' $ac_executable_extensions; do
13392      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13393      as_fn_executable_p "$ac_path_SED" || continue
13394# Check for GNU ac_path_SED and select it if it is found.
13395  # Check for GNU $ac_path_SED
13396case `"$ac_path_SED" --version 2>&1` in
13397*GNU*)
13398  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13399*)
13400  ac_count=0
13401  $as_echo_n 0123456789 >"conftest.in"
13402  while :
13403  do
13404    cat "conftest.in" "conftest.in" >"conftest.tmp"
13405    mv "conftest.tmp" "conftest.in"
13406    cp "conftest.in" "conftest.nl"
13407    $as_echo '' >> "conftest.nl"
13408    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13409    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13410    as_fn_arith $ac_count + 1 && ac_count=$as_val
13411    if test $ac_count -gt ${ac_path_SED_max-0}; then
13412      # Best one so far, save it but keep looking for a better one
13413      ac_cv_path_SED="$ac_path_SED"
13414      ac_path_SED_max=$ac_count
13415    fi
13416    # 10*(2^10) chars as input seems more than enough
13417    test $ac_count -gt 10 && break
13418  done
13419  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13420esac
13421
13422      $ac_path_SED_found && break 3
13423    done
13424  done
13425  done
13426IFS=$as_save_IFS
13427  if test -z "$ac_cv_path_SED"; then
13428    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13429  fi
13430else
13431  ac_cv_path_SED=$SED
13432fi
13433
13434fi
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13436$as_echo "$ac_cv_path_SED" >&6; }
13437 SED="$ac_cv_path_SED"
13438  rm -f conftest.sed
13439
13440  else
13441    # The variable is set, but is it from the command line or the environment?
13442
13443    # Try to remove the string !SED! from our list.
13444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13446      # If it failed, the variable was not from the command line. Ignore it,
13447      # but warn the user (except for BASH, which is always set by the calling BASH).
13448      if test "xSED" != xBASH; then
13449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13450$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13451      fi
13452      # Try to locate tool using the code snippet
13453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13454$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13455if ${ac_cv_path_SED+:} false; then :
13456  $as_echo_n "(cached) " >&6
13457else
13458            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13459     for ac_i in 1 2 3 4 5 6 7; do
13460       ac_script="$ac_script$as_nl$ac_script"
13461     done
13462     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13463     { ac_script=; unset ac_script;}
13464     if test -z "$SED"; then
13465  ac_path_SED_found=false
13466  # Loop through the user's path and test for each of PROGNAME-LIST
13467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13468for as_dir in $PATH
13469do
13470  IFS=$as_save_IFS
13471  test -z "$as_dir" && as_dir=.
13472    for ac_prog in sed gsed; do
13473    for ac_exec_ext in '' $ac_executable_extensions; do
13474      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13475      as_fn_executable_p "$ac_path_SED" || continue
13476# Check for GNU ac_path_SED and select it if it is found.
13477  # Check for GNU $ac_path_SED
13478case `"$ac_path_SED" --version 2>&1` in
13479*GNU*)
13480  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13481*)
13482  ac_count=0
13483  $as_echo_n 0123456789 >"conftest.in"
13484  while :
13485  do
13486    cat "conftest.in" "conftest.in" >"conftest.tmp"
13487    mv "conftest.tmp" "conftest.in"
13488    cp "conftest.in" "conftest.nl"
13489    $as_echo '' >> "conftest.nl"
13490    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13491    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13492    as_fn_arith $ac_count + 1 && ac_count=$as_val
13493    if test $ac_count -gt ${ac_path_SED_max-0}; then
13494      # Best one so far, save it but keep looking for a better one
13495      ac_cv_path_SED="$ac_path_SED"
13496      ac_path_SED_max=$ac_count
13497    fi
13498    # 10*(2^10) chars as input seems more than enough
13499    test $ac_count -gt 10 && break
13500  done
13501  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13502esac
13503
13504      $ac_path_SED_found && break 3
13505    done
13506  done
13507  done
13508IFS=$as_save_IFS
13509  if test -z "$ac_cv_path_SED"; then
13510    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13511  fi
13512else
13513  ac_cv_path_SED=$SED
13514fi
13515
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13518$as_echo "$ac_cv_path_SED" >&6; }
13519 SED="$ac_cv_path_SED"
13520  rm -f conftest.sed
13521
13522    else
13523      # If it succeeded, then it was overridden by the user. We will use it
13524      # for the tool.
13525
13526      # First remove it from the list of overridden variables, so we can test
13527      # for unknown variables in the end.
13528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13529
13530      # Check if we try to supply an empty value
13531      if test "x$SED" = x; then
13532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13533$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13535$as_echo_n "checking for SED... " >&6; }
13536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13537$as_echo "disabled" >&6; }
13538      else
13539        # Check if the provided tool contains a complete path.
13540        tool_specified="$SED"
13541        tool_basename="${tool_specified##*/}"
13542        if test "x$tool_basename" = "x$tool_specified"; then
13543          # A command without a complete path is provided, search $PATH.
13544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13545$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13546          # Extract the first word of "$tool_basename", so it can be a program name with args.
13547set dummy $tool_basename; ac_word=$2
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13549$as_echo_n "checking for $ac_word... " >&6; }
13550if ${ac_cv_path_SED+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553  case $SED in
13554  [\\/]* | ?:[\\/]*)
13555  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13556  ;;
13557  *)
13558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13559for as_dir in $PATH
13560do
13561  IFS=$as_save_IFS
13562  test -z "$as_dir" && as_dir=.
13563    for ac_exec_ext in '' $ac_executable_extensions; do
13564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13565    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13567    break 2
13568  fi
13569done
13570  done
13571IFS=$as_save_IFS
13572
13573  ;;
13574esac
13575fi
13576SED=$ac_cv_path_SED
13577if test -n "$SED"; then
13578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13579$as_echo "$SED" >&6; }
13580else
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13582$as_echo "no" >&6; }
13583fi
13584
13585
13586          if test "x$SED" = x; then
13587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13588          fi
13589        else
13590          # Otherwise we believe it is a complete path. Use it as it is.
13591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13592$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13594$as_echo_n "checking for SED... " >&6; }
13595          if test ! -x "$tool_specified"; then
13596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13597$as_echo "not found" >&6; }
13598            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13599          fi
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13601$as_echo "$tool_specified" >&6; }
13602        fi
13603      fi
13604    fi
13605
13606  fi
13607
13608
13609  if test "x$SED" = x; then
13610    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13611  fi
13612
13613
13614
13615  # Always force rm.
13616  RM="$RM -f"
13617
13618  # pwd behaves differently on various platforms and some don't support the -L flag.
13619  # Always use the bash builtin pwd to get uniform behavior.
13620  THEPWDCMD=pwd
13621
13622  # These are not required on all platforms
13623
13624
13625  # Publish this variable in the help.
13626
13627
13628  if [ -z "${CYGPATH+x}" ]; then
13629    # The variable is not set by user, try to locate tool using the code snippet
13630    for ac_prog in cygpath
13631do
13632  # Extract the first word of "$ac_prog", so it can be a program name with args.
13633set dummy $ac_prog; ac_word=$2
13634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13635$as_echo_n "checking for $ac_word... " >&6; }
13636if ${ac_cv_path_CYGPATH+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  case $CYGPATH in
13640  [\\/]* | ?:[\\/]*)
13641  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13642  ;;
13643  *)
13644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH
13646do
13647  IFS=$as_save_IFS
13648  test -z "$as_dir" && as_dir=.
13649    for ac_exec_ext in '' $ac_executable_extensions; do
13650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13651    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13653    break 2
13654  fi
13655done
13656  done
13657IFS=$as_save_IFS
13658
13659  ;;
13660esac
13661fi
13662CYGPATH=$ac_cv_path_CYGPATH
13663if test -n "$CYGPATH"; then
13664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13665$as_echo "$CYGPATH" >&6; }
13666else
13667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13668$as_echo "no" >&6; }
13669fi
13670
13671
13672  test -n "$CYGPATH" && break
13673done
13674
13675  else
13676    # The variable is set, but is it from the command line or the environment?
13677
13678    # Try to remove the string !CYGPATH! from our list.
13679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13681      # If it failed, the variable was not from the command line. Ignore it,
13682      # but warn the user (except for BASH, which is always set by the calling BASH).
13683      if test "xCYGPATH" != xBASH; then
13684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13685$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13686      fi
13687      # Try to locate tool using the code snippet
13688      for ac_prog in cygpath
13689do
13690  # Extract the first word of "$ac_prog", so it can be a program name with args.
13691set dummy $ac_prog; ac_word=$2
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13693$as_echo_n "checking for $ac_word... " >&6; }
13694if ${ac_cv_path_CYGPATH+:} false; then :
13695  $as_echo_n "(cached) " >&6
13696else
13697  case $CYGPATH in
13698  [\\/]* | ?:[\\/]*)
13699  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13700  ;;
13701  *)
13702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13703for as_dir in $PATH
13704do
13705  IFS=$as_save_IFS
13706  test -z "$as_dir" && as_dir=.
13707    for ac_exec_ext in '' $ac_executable_extensions; do
13708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13709    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13711    break 2
13712  fi
13713done
13714  done
13715IFS=$as_save_IFS
13716
13717  ;;
13718esac
13719fi
13720CYGPATH=$ac_cv_path_CYGPATH
13721if test -n "$CYGPATH"; then
13722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13723$as_echo "$CYGPATH" >&6; }
13724else
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13726$as_echo "no" >&6; }
13727fi
13728
13729
13730  test -n "$CYGPATH" && break
13731done
13732
13733    else
13734      # If it succeeded, then it was overridden by the user. We will use it
13735      # for the tool.
13736
13737      # First remove it from the list of overridden variables, so we can test
13738      # for unknown variables in the end.
13739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13740
13741      # Check if we try to supply an empty value
13742      if test "x$CYGPATH" = x; then
13743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13744$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13746$as_echo_n "checking for CYGPATH... " >&6; }
13747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13748$as_echo "disabled" >&6; }
13749      else
13750        # Check if the provided tool contains a complete path.
13751        tool_specified="$CYGPATH"
13752        tool_basename="${tool_specified##*/}"
13753        if test "x$tool_basename" = "x$tool_specified"; then
13754          # A command without a complete path is provided, search $PATH.
13755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13756$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13757          # Extract the first word of "$tool_basename", so it can be a program name with args.
13758set dummy $tool_basename; ac_word=$2
13759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13760$as_echo_n "checking for $ac_word... " >&6; }
13761if ${ac_cv_path_CYGPATH+:} false; then :
13762  $as_echo_n "(cached) " >&6
13763else
13764  case $CYGPATH in
13765  [\\/]* | ?:[\\/]*)
13766  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13767  ;;
13768  *)
13769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13770for as_dir in $PATH
13771do
13772  IFS=$as_save_IFS
13773  test -z "$as_dir" && as_dir=.
13774    for ac_exec_ext in '' $ac_executable_extensions; do
13775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13776    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13778    break 2
13779  fi
13780done
13781  done
13782IFS=$as_save_IFS
13783
13784  ;;
13785esac
13786fi
13787CYGPATH=$ac_cv_path_CYGPATH
13788if test -n "$CYGPATH"; then
13789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13790$as_echo "$CYGPATH" >&6; }
13791else
13792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13793$as_echo "no" >&6; }
13794fi
13795
13796
13797          if test "x$CYGPATH" = x; then
13798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13799          fi
13800        else
13801          # Otherwise we believe it is a complete path. Use it as it is.
13802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13803$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13805$as_echo_n "checking for CYGPATH... " >&6; }
13806          if test ! -x "$tool_specified"; then
13807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13808$as_echo "not found" >&6; }
13809            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13810          fi
13811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13812$as_echo "$tool_specified" >&6; }
13813        fi
13814      fi
13815    fi
13816
13817  fi
13818
13819
13820
13821
13822  # Publish this variable in the help.
13823
13824
13825  if [ -z "${READLINK+x}" ]; then
13826    # The variable is not set by user, try to locate tool using the code snippet
13827    for ac_prog in greadlink readlink
13828do
13829  # Extract the first word of "$ac_prog", so it can be a program name with args.
13830set dummy $ac_prog; ac_word=$2
13831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13832$as_echo_n "checking for $ac_word... " >&6; }
13833if ${ac_cv_path_READLINK+:} false; then :
13834  $as_echo_n "(cached) " >&6
13835else
13836  case $READLINK in
13837  [\\/]* | ?:[\\/]*)
13838  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13839  ;;
13840  *)
13841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13842for as_dir in $PATH
13843do
13844  IFS=$as_save_IFS
13845  test -z "$as_dir" && as_dir=.
13846    for ac_exec_ext in '' $ac_executable_extensions; do
13847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13848    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13850    break 2
13851  fi
13852done
13853  done
13854IFS=$as_save_IFS
13855
13856  ;;
13857esac
13858fi
13859READLINK=$ac_cv_path_READLINK
13860if test -n "$READLINK"; then
13861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13862$as_echo "$READLINK" >&6; }
13863else
13864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13865$as_echo "no" >&6; }
13866fi
13867
13868
13869  test -n "$READLINK" && break
13870done
13871
13872  else
13873    # The variable is set, but is it from the command line or the environment?
13874
13875    # Try to remove the string !READLINK! from our list.
13876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13878      # If it failed, the variable was not from the command line. Ignore it,
13879      # but warn the user (except for BASH, which is always set by the calling BASH).
13880      if test "xREADLINK" != xBASH; then
13881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13882$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13883      fi
13884      # Try to locate tool using the code snippet
13885      for ac_prog in greadlink readlink
13886do
13887  # Extract the first word of "$ac_prog", so it can be a program name with args.
13888set dummy $ac_prog; ac_word=$2
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13890$as_echo_n "checking for $ac_word... " >&6; }
13891if ${ac_cv_path_READLINK+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  case $READLINK in
13895  [\\/]* | ?:[\\/]*)
13896  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13897  ;;
13898  *)
13899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13900for as_dir in $PATH
13901do
13902  IFS=$as_save_IFS
13903  test -z "$as_dir" && as_dir=.
13904    for ac_exec_ext in '' $ac_executable_extensions; do
13905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13906    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13908    break 2
13909  fi
13910done
13911  done
13912IFS=$as_save_IFS
13913
13914  ;;
13915esac
13916fi
13917READLINK=$ac_cv_path_READLINK
13918if test -n "$READLINK"; then
13919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13920$as_echo "$READLINK" >&6; }
13921else
13922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13923$as_echo "no" >&6; }
13924fi
13925
13926
13927  test -n "$READLINK" && break
13928done
13929
13930    else
13931      # If it succeeded, then it was overridden by the user. We will use it
13932      # for the tool.
13933
13934      # First remove it from the list of overridden variables, so we can test
13935      # for unknown variables in the end.
13936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13937
13938      # Check if we try to supply an empty value
13939      if test "x$READLINK" = x; then
13940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13941$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13943$as_echo_n "checking for READLINK... " >&6; }
13944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13945$as_echo "disabled" >&6; }
13946      else
13947        # Check if the provided tool contains a complete path.
13948        tool_specified="$READLINK"
13949        tool_basename="${tool_specified##*/}"
13950        if test "x$tool_basename" = "x$tool_specified"; then
13951          # A command without a complete path is provided, search $PATH.
13952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13953$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13954          # Extract the first word of "$tool_basename", so it can be a program name with args.
13955set dummy $tool_basename; ac_word=$2
13956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13957$as_echo_n "checking for $ac_word... " >&6; }
13958if ${ac_cv_path_READLINK+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  case $READLINK in
13962  [\\/]* | ?:[\\/]*)
13963  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13964  ;;
13965  *)
13966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13967for as_dir in $PATH
13968do
13969  IFS=$as_save_IFS
13970  test -z "$as_dir" && as_dir=.
13971    for ac_exec_ext in '' $ac_executable_extensions; do
13972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13973    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13975    break 2
13976  fi
13977done
13978  done
13979IFS=$as_save_IFS
13980
13981  ;;
13982esac
13983fi
13984READLINK=$ac_cv_path_READLINK
13985if test -n "$READLINK"; then
13986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13987$as_echo "$READLINK" >&6; }
13988else
13989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13990$as_echo "no" >&6; }
13991fi
13992
13993
13994          if test "x$READLINK" = x; then
13995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13996          fi
13997        else
13998          # Otherwise we believe it is a complete path. Use it as it is.
13999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14000$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14002$as_echo_n "checking for READLINK... " >&6; }
14003          if test ! -x "$tool_specified"; then
14004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14005$as_echo "not found" >&6; }
14006            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14007          fi
14008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14009$as_echo "$tool_specified" >&6; }
14010        fi
14011      fi
14012    fi
14013
14014  fi
14015
14016
14017
14018
14019  # Publish this variable in the help.
14020
14021
14022  if [ -z "${DF+x}" ]; then
14023    # The variable is not set by user, try to locate tool using the code snippet
14024    for ac_prog in df
14025do
14026  # Extract the first word of "$ac_prog", so it can be a program name with args.
14027set dummy $ac_prog; ac_word=$2
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14029$as_echo_n "checking for $ac_word... " >&6; }
14030if ${ac_cv_path_DF+:} false; then :
14031  $as_echo_n "(cached) " >&6
14032else
14033  case $DF in
14034  [\\/]* | ?:[\\/]*)
14035  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14036  ;;
14037  *)
14038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14039for as_dir in $PATH
14040do
14041  IFS=$as_save_IFS
14042  test -z "$as_dir" && as_dir=.
14043    for ac_exec_ext in '' $ac_executable_extensions; do
14044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14045    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14047    break 2
14048  fi
14049done
14050  done
14051IFS=$as_save_IFS
14052
14053  ;;
14054esac
14055fi
14056DF=$ac_cv_path_DF
14057if test -n "$DF"; then
14058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14059$as_echo "$DF" >&6; }
14060else
14061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14062$as_echo "no" >&6; }
14063fi
14064
14065
14066  test -n "$DF" && break
14067done
14068
14069  else
14070    # The variable is set, but is it from the command line or the environment?
14071
14072    # Try to remove the string !DF! from our list.
14073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14075      # If it failed, the variable was not from the command line. Ignore it,
14076      # but warn the user (except for BASH, which is always set by the calling BASH).
14077      if test "xDF" != xBASH; then
14078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14079$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14080      fi
14081      # Try to locate tool using the code snippet
14082      for ac_prog in df
14083do
14084  # Extract the first word of "$ac_prog", so it can be a program name with args.
14085set dummy $ac_prog; ac_word=$2
14086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14087$as_echo_n "checking for $ac_word... " >&6; }
14088if ${ac_cv_path_DF+:} false; then :
14089  $as_echo_n "(cached) " >&6
14090else
14091  case $DF in
14092  [\\/]* | ?:[\\/]*)
14093  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14094  ;;
14095  *)
14096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14097for as_dir in $PATH
14098do
14099  IFS=$as_save_IFS
14100  test -z "$as_dir" && as_dir=.
14101    for ac_exec_ext in '' $ac_executable_extensions; do
14102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14103    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14105    break 2
14106  fi
14107done
14108  done
14109IFS=$as_save_IFS
14110
14111  ;;
14112esac
14113fi
14114DF=$ac_cv_path_DF
14115if test -n "$DF"; then
14116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14117$as_echo "$DF" >&6; }
14118else
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14120$as_echo "no" >&6; }
14121fi
14122
14123
14124  test -n "$DF" && break
14125done
14126
14127    else
14128      # If it succeeded, then it was overridden by the user. We will use it
14129      # for the tool.
14130
14131      # First remove it from the list of overridden variables, so we can test
14132      # for unknown variables in the end.
14133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14134
14135      # Check if we try to supply an empty value
14136      if test "x$DF" = x; then
14137        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14138$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14140$as_echo_n "checking for DF... " >&6; }
14141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14142$as_echo "disabled" >&6; }
14143      else
14144        # Check if the provided tool contains a complete path.
14145        tool_specified="$DF"
14146        tool_basename="${tool_specified##*/}"
14147        if test "x$tool_basename" = "x$tool_specified"; then
14148          # A command without a complete path is provided, search $PATH.
14149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14150$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14151          # Extract the first word of "$tool_basename", so it can be a program name with args.
14152set dummy $tool_basename; ac_word=$2
14153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14154$as_echo_n "checking for $ac_word... " >&6; }
14155if ${ac_cv_path_DF+:} false; then :
14156  $as_echo_n "(cached) " >&6
14157else
14158  case $DF in
14159  [\\/]* | ?:[\\/]*)
14160  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14161  ;;
14162  *)
14163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14164for as_dir in $PATH
14165do
14166  IFS=$as_save_IFS
14167  test -z "$as_dir" && as_dir=.
14168    for ac_exec_ext in '' $ac_executable_extensions; do
14169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14170    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14172    break 2
14173  fi
14174done
14175  done
14176IFS=$as_save_IFS
14177
14178  ;;
14179esac
14180fi
14181DF=$ac_cv_path_DF
14182if test -n "$DF"; then
14183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14184$as_echo "$DF" >&6; }
14185else
14186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14187$as_echo "no" >&6; }
14188fi
14189
14190
14191          if test "x$DF" = x; then
14192            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14193          fi
14194        else
14195          # Otherwise we believe it is a complete path. Use it as it is.
14196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14197$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14198          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14199$as_echo_n "checking for DF... " >&6; }
14200          if test ! -x "$tool_specified"; then
14201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14202$as_echo "not found" >&6; }
14203            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14204          fi
14205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14206$as_echo "$tool_specified" >&6; }
14207        fi
14208      fi
14209    fi
14210
14211  fi
14212
14213
14214
14215
14216  # Publish this variable in the help.
14217
14218
14219  if [ -z "${CPIO+x}" ]; then
14220    # The variable is not set by user, try to locate tool using the code snippet
14221    for ac_prog in cpio bsdcpio
14222do
14223  # Extract the first word of "$ac_prog", so it can be a program name with args.
14224set dummy $ac_prog; ac_word=$2
14225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14226$as_echo_n "checking for $ac_word... " >&6; }
14227if ${ac_cv_path_CPIO+:} false; then :
14228  $as_echo_n "(cached) " >&6
14229else
14230  case $CPIO in
14231  [\\/]* | ?:[\\/]*)
14232  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14233  ;;
14234  *)
14235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14236for as_dir in $PATH
14237do
14238  IFS=$as_save_IFS
14239  test -z "$as_dir" && as_dir=.
14240    for ac_exec_ext in '' $ac_executable_extensions; do
14241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14242    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14244    break 2
14245  fi
14246done
14247  done
14248IFS=$as_save_IFS
14249
14250  ;;
14251esac
14252fi
14253CPIO=$ac_cv_path_CPIO
14254if test -n "$CPIO"; then
14255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14256$as_echo "$CPIO" >&6; }
14257else
14258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14259$as_echo "no" >&6; }
14260fi
14261
14262
14263  test -n "$CPIO" && break
14264done
14265
14266  else
14267    # The variable is set, but is it from the command line or the environment?
14268
14269    # Try to remove the string !CPIO! from our list.
14270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14272      # If it failed, the variable was not from the command line. Ignore it,
14273      # but warn the user (except for BASH, which is always set by the calling BASH).
14274      if test "xCPIO" != xBASH; then
14275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14276$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14277      fi
14278      # Try to locate tool using the code snippet
14279      for ac_prog in cpio bsdcpio
14280do
14281  # Extract the first word of "$ac_prog", so it can be a program name with args.
14282set dummy $ac_prog; ac_word=$2
14283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14284$as_echo_n "checking for $ac_word... " >&6; }
14285if ${ac_cv_path_CPIO+:} false; then :
14286  $as_echo_n "(cached) " >&6
14287else
14288  case $CPIO in
14289  [\\/]* | ?:[\\/]*)
14290  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14291  ;;
14292  *)
14293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14294for as_dir in $PATH
14295do
14296  IFS=$as_save_IFS
14297  test -z "$as_dir" && as_dir=.
14298    for ac_exec_ext in '' $ac_executable_extensions; do
14299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14300    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14302    break 2
14303  fi
14304done
14305  done
14306IFS=$as_save_IFS
14307
14308  ;;
14309esac
14310fi
14311CPIO=$ac_cv_path_CPIO
14312if test -n "$CPIO"; then
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14314$as_echo "$CPIO" >&6; }
14315else
14316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14317$as_echo "no" >&6; }
14318fi
14319
14320
14321  test -n "$CPIO" && break
14322done
14323
14324    else
14325      # If it succeeded, then it was overridden by the user. We will use it
14326      # for the tool.
14327
14328      # First remove it from the list of overridden variables, so we can test
14329      # for unknown variables in the end.
14330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14331
14332      # Check if we try to supply an empty value
14333      if test "x$CPIO" = x; then
14334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14335$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14337$as_echo_n "checking for CPIO... " >&6; }
14338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14339$as_echo "disabled" >&6; }
14340      else
14341        # Check if the provided tool contains a complete path.
14342        tool_specified="$CPIO"
14343        tool_basename="${tool_specified##*/}"
14344        if test "x$tool_basename" = "x$tool_specified"; then
14345          # A command without a complete path is provided, search $PATH.
14346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14347$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14348          # Extract the first word of "$tool_basename", so it can be a program name with args.
14349set dummy $tool_basename; ac_word=$2
14350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14351$as_echo_n "checking for $ac_word... " >&6; }
14352if ${ac_cv_path_CPIO+:} false; then :
14353  $as_echo_n "(cached) " >&6
14354else
14355  case $CPIO in
14356  [\\/]* | ?:[\\/]*)
14357  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14358  ;;
14359  *)
14360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14361for as_dir in $PATH
14362do
14363  IFS=$as_save_IFS
14364  test -z "$as_dir" && as_dir=.
14365    for ac_exec_ext in '' $ac_executable_extensions; do
14366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14367    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14369    break 2
14370  fi
14371done
14372  done
14373IFS=$as_save_IFS
14374
14375  ;;
14376esac
14377fi
14378CPIO=$ac_cv_path_CPIO
14379if test -n "$CPIO"; then
14380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14381$as_echo "$CPIO" >&6; }
14382else
14383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14384$as_echo "no" >&6; }
14385fi
14386
14387
14388          if test "x$CPIO" = x; then
14389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14390          fi
14391        else
14392          # Otherwise we believe it is a complete path. Use it as it is.
14393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14394$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14396$as_echo_n "checking for CPIO... " >&6; }
14397          if test ! -x "$tool_specified"; then
14398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14399$as_echo "not found" >&6; }
14400            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14401          fi
14402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14403$as_echo "$tool_specified" >&6; }
14404        fi
14405      fi
14406    fi
14407
14408  fi
14409
14410
14411
14412
14413  # Publish this variable in the help.
14414
14415
14416  if [ -z "${NICE+x}" ]; then
14417    # The variable is not set by user, try to locate tool using the code snippet
14418    for ac_prog in nice
14419do
14420  # Extract the first word of "$ac_prog", so it can be a program name with args.
14421set dummy $ac_prog; ac_word=$2
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14423$as_echo_n "checking for $ac_word... " >&6; }
14424if ${ac_cv_path_NICE+:} false; then :
14425  $as_echo_n "(cached) " >&6
14426else
14427  case $NICE in
14428  [\\/]* | ?:[\\/]*)
14429  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14430  ;;
14431  *)
14432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14433for as_dir in $PATH
14434do
14435  IFS=$as_save_IFS
14436  test -z "$as_dir" && as_dir=.
14437    for ac_exec_ext in '' $ac_executable_extensions; do
14438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14439    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14441    break 2
14442  fi
14443done
14444  done
14445IFS=$as_save_IFS
14446
14447  ;;
14448esac
14449fi
14450NICE=$ac_cv_path_NICE
14451if test -n "$NICE"; then
14452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14453$as_echo "$NICE" >&6; }
14454else
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456$as_echo "no" >&6; }
14457fi
14458
14459
14460  test -n "$NICE" && break
14461done
14462
14463  else
14464    # The variable is set, but is it from the command line or the environment?
14465
14466    # Try to remove the string !NICE! from our list.
14467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14469      # If it failed, the variable was not from the command line. Ignore it,
14470      # but warn the user (except for BASH, which is always set by the calling BASH).
14471      if test "xNICE" != xBASH; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14473$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14474      fi
14475      # Try to locate tool using the code snippet
14476      for ac_prog in nice
14477do
14478  # Extract the first word of "$ac_prog", so it can be a program name with args.
14479set dummy $ac_prog; ac_word=$2
14480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14481$as_echo_n "checking for $ac_word... " >&6; }
14482if ${ac_cv_path_NICE+:} false; then :
14483  $as_echo_n "(cached) " >&6
14484else
14485  case $NICE in
14486  [\\/]* | ?:[\\/]*)
14487  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14488  ;;
14489  *)
14490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14491for as_dir in $PATH
14492do
14493  IFS=$as_save_IFS
14494  test -z "$as_dir" && as_dir=.
14495    for ac_exec_ext in '' $ac_executable_extensions; do
14496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14497    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14499    break 2
14500  fi
14501done
14502  done
14503IFS=$as_save_IFS
14504
14505  ;;
14506esac
14507fi
14508NICE=$ac_cv_path_NICE
14509if test -n "$NICE"; then
14510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14511$as_echo "$NICE" >&6; }
14512else
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14514$as_echo "no" >&6; }
14515fi
14516
14517
14518  test -n "$NICE" && break
14519done
14520
14521    else
14522      # If it succeeded, then it was overridden by the user. We will use it
14523      # for the tool.
14524
14525      # First remove it from the list of overridden variables, so we can test
14526      # for unknown variables in the end.
14527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14528
14529      # Check if we try to supply an empty value
14530      if test "x$NICE" = x; then
14531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14532$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14534$as_echo_n "checking for NICE... " >&6; }
14535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14536$as_echo "disabled" >&6; }
14537      else
14538        # Check if the provided tool contains a complete path.
14539        tool_specified="$NICE"
14540        tool_basename="${tool_specified##*/}"
14541        if test "x$tool_basename" = "x$tool_specified"; then
14542          # A command without a complete path is provided, search $PATH.
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14544$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14545          # Extract the first word of "$tool_basename", so it can be a program name with args.
14546set dummy $tool_basename; ac_word=$2
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14548$as_echo_n "checking for $ac_word... " >&6; }
14549if ${ac_cv_path_NICE+:} false; then :
14550  $as_echo_n "(cached) " >&6
14551else
14552  case $NICE in
14553  [\\/]* | ?:[\\/]*)
14554  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14555  ;;
14556  *)
14557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14558for as_dir in $PATH
14559do
14560  IFS=$as_save_IFS
14561  test -z "$as_dir" && as_dir=.
14562    for ac_exec_ext in '' $ac_executable_extensions; do
14563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14564    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14566    break 2
14567  fi
14568done
14569  done
14570IFS=$as_save_IFS
14571
14572  ;;
14573esac
14574fi
14575NICE=$ac_cv_path_NICE
14576if test -n "$NICE"; then
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14578$as_echo "$NICE" >&6; }
14579else
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14581$as_echo "no" >&6; }
14582fi
14583
14584
14585          if test "x$NICE" = x; then
14586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14587          fi
14588        else
14589          # Otherwise we believe it is a complete path. Use it as it is.
14590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14591$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14593$as_echo_n "checking for NICE... " >&6; }
14594          if test ! -x "$tool_specified"; then
14595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14596$as_echo "not found" >&6; }
14597            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14598          fi
14599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14600$as_echo "$tool_specified" >&6; }
14601        fi
14602      fi
14603    fi
14604
14605  fi
14606
14607
14608
14609
14610# Now we can determine OpenJDK build and target platforms. This is required to
14611# have early on.
14612# Make sure we can run config.sub.
14613$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14614  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14615
14616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14617$as_echo_n "checking build system type... " >&6; }
14618if ${ac_cv_build+:} false; then :
14619  $as_echo_n "(cached) " >&6
14620else
14621  ac_build_alias=$build_alias
14622test "x$ac_build_alias" = x &&
14623  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14624test "x$ac_build_alias" = x &&
14625  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14626ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14627  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14628
14629fi
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14631$as_echo "$ac_cv_build" >&6; }
14632case $ac_cv_build in
14633*-*-*) ;;
14634*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14635esac
14636build=$ac_cv_build
14637ac_save_IFS=$IFS; IFS='-'
14638set x $ac_cv_build
14639shift
14640build_cpu=$1
14641build_vendor=$2
14642shift; shift
14643# Remember, the first character of IFS is used to create $*,
14644# except with old shells:
14645build_os=$*
14646IFS=$ac_save_IFS
14647case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14648
14649
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14651$as_echo_n "checking host system type... " >&6; }
14652if ${ac_cv_host+:} false; then :
14653  $as_echo_n "(cached) " >&6
14654else
14655  if test "x$host_alias" = x; then
14656  ac_cv_host=$ac_cv_build
14657else
14658  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14659    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14660fi
14661
14662fi
14663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14664$as_echo "$ac_cv_host" >&6; }
14665case $ac_cv_host in
14666*-*-*) ;;
14667*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14668esac
14669host=$ac_cv_host
14670ac_save_IFS=$IFS; IFS='-'
14671set x $ac_cv_host
14672shift
14673host_cpu=$1
14674host_vendor=$2
14675shift; shift
14676# Remember, the first character of IFS is used to create $*,
14677# except with old shells:
14678host_os=$*
14679IFS=$ac_save_IFS
14680case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14681
14682
14683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14684$as_echo_n "checking target system type... " >&6; }
14685if ${ac_cv_target+:} false; then :
14686  $as_echo_n "(cached) " >&6
14687else
14688  if test "x$target_alias" = x; then
14689  ac_cv_target=$ac_cv_host
14690else
14691  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14692    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14693fi
14694
14695fi
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14697$as_echo "$ac_cv_target" >&6; }
14698case $ac_cv_target in
14699*-*-*) ;;
14700*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14701esac
14702target=$ac_cv_target
14703ac_save_IFS=$IFS; IFS='-'
14704set x $ac_cv_target
14705shift
14706target_cpu=$1
14707target_vendor=$2
14708shift; shift
14709# Remember, the first character of IFS is used to create $*,
14710# except with old shells:
14711target_os=$*
14712IFS=$ac_save_IFS
14713case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14714
14715
14716# The aliases save the names the user supplied, while $host etc.
14717# will get canonicalized.
14718test -n "$target_alias" &&
14719  test "$program_prefix$program_suffix$program_transform_name" = \
14720    NONENONEs,x,x, &&
14721  program_prefix=${target_alias}-
14722
14723  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14724  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14725  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14726  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14727  # to use the configure naming style.
14728
14729
14730
14731
14732
14733  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14734  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14735  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14736  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14737  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14738  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14739
14740
14741
14742  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14743
14744  case "$build_os" in
14745    *linux*)
14746      VAR_OS=linux
14747      VAR_OS_TYPE=unix
14748      ;;
14749    *solaris*)
14750      VAR_OS=solaris
14751      VAR_OS_TYPE=unix
14752      ;;
14753    *darwin*)
14754      VAR_OS=macosx
14755      VAR_OS_TYPE=unix
14756      ;;
14757    *bsd*)
14758      VAR_OS=bsd
14759      VAR_OS_TYPE=unix
14760      ;;
14761    *cygwin*)
14762      VAR_OS=windows
14763      VAR_OS_ENV=windows.cygwin
14764      ;;
14765    *mingw*)
14766      VAR_OS=windows
14767      VAR_OS_ENV=windows.msys
14768      ;;
14769    *aix*)
14770      VAR_OS=aix
14771      VAR_OS_TYPE=unix
14772      ;;
14773    *)
14774      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14775      ;;
14776  esac
14777
14778
14779  # First argument is the cpu name from the trip/quad
14780  case "$build_cpu" in
14781    x86_64)
14782      VAR_CPU=x86_64
14783      VAR_CPU_ARCH=x86
14784      VAR_CPU_BITS=64
14785      VAR_CPU_ENDIAN=little
14786      ;;
14787    i?86)
14788      VAR_CPU=x86
14789      VAR_CPU_ARCH=x86
14790      VAR_CPU_BITS=32
14791      VAR_CPU_ENDIAN=little
14792      ;;
14793    arm*)
14794      VAR_CPU=arm
14795      VAR_CPU_ARCH=arm
14796      VAR_CPU_BITS=32
14797      VAR_CPU_ENDIAN=little
14798      ;;
14799    aarch64)
14800      VAR_CPU=aarch64
14801      VAR_CPU_ARCH=aarch64
14802      VAR_CPU_BITS=64
14803      VAR_CPU_ENDIAN=little
14804      ;;
14805    powerpc)
14806      VAR_CPU=ppc
14807      VAR_CPU_ARCH=ppc
14808      VAR_CPU_BITS=32
14809      VAR_CPU_ENDIAN=big
14810      ;;
14811    powerpc64)
14812      VAR_CPU=ppc64
14813      VAR_CPU_ARCH=ppc
14814      VAR_CPU_BITS=64
14815      VAR_CPU_ENDIAN=big
14816      ;;
14817    powerpc64le)
14818      VAR_CPU=ppc64le
14819      VAR_CPU_ARCH=ppc
14820      VAR_CPU_BITS=64
14821      VAR_CPU_ENDIAN=little
14822      ;;
14823    s390)
14824      VAR_CPU=s390
14825      VAR_CPU_ARCH=s390
14826      VAR_CPU_BITS=32
14827      VAR_CPU_ENDIAN=big
14828      ;;
14829    s390x)
14830      VAR_CPU=s390x
14831      VAR_CPU_ARCH=s390
14832      VAR_CPU_BITS=64
14833      VAR_CPU_ENDIAN=big
14834      ;;
14835    sparc)
14836      VAR_CPU=sparc
14837      VAR_CPU_ARCH=sparc
14838      VAR_CPU_BITS=32
14839      VAR_CPU_ENDIAN=big
14840      ;;
14841    sparcv9|sparc64)
14842      VAR_CPU=sparcv9
14843      VAR_CPU_ARCH=sparc
14844      VAR_CPU_BITS=64
14845      VAR_CPU_ENDIAN=big
14846      ;;
14847    *)
14848      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14849      ;;
14850  esac
14851
14852  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14853  OPENJDK_BUILD_OS="$VAR_OS"
14854  if test "x$VAR_OS_TYPE" != x; then
14855    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14856  else
14857    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14858  fi
14859  if test "x$VAR_OS_ENV" != x; then
14860    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14861  else
14862    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14863  fi
14864  OPENJDK_BUILD_CPU="$VAR_CPU"
14865  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14866  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14867  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14868
14869
14870
14871
14872
14873
14874
14875
14876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14877$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14879$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14880
14881  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14882
14883  case "$host_os" in
14884    *linux*)
14885      VAR_OS=linux
14886      VAR_OS_TYPE=unix
14887      ;;
14888    *solaris*)
14889      VAR_OS=solaris
14890      VAR_OS_TYPE=unix
14891      ;;
14892    *darwin*)
14893      VAR_OS=macosx
14894      VAR_OS_TYPE=unix
14895      ;;
14896    *bsd*)
14897      VAR_OS=bsd
14898      VAR_OS_TYPE=unix
14899      ;;
14900    *cygwin*)
14901      VAR_OS=windows
14902      VAR_OS_ENV=windows.cygwin
14903      ;;
14904    *mingw*)
14905      VAR_OS=windows
14906      VAR_OS_ENV=windows.msys
14907      ;;
14908    *aix*)
14909      VAR_OS=aix
14910      VAR_OS_TYPE=unix
14911      ;;
14912    *)
14913      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14914      ;;
14915  esac
14916
14917
14918  # First argument is the cpu name from the trip/quad
14919  case "$host_cpu" in
14920    x86_64)
14921      VAR_CPU=x86_64
14922      VAR_CPU_ARCH=x86
14923      VAR_CPU_BITS=64
14924      VAR_CPU_ENDIAN=little
14925      ;;
14926    i?86)
14927      VAR_CPU=x86
14928      VAR_CPU_ARCH=x86
14929      VAR_CPU_BITS=32
14930      VAR_CPU_ENDIAN=little
14931      ;;
14932    arm*)
14933      VAR_CPU=arm
14934      VAR_CPU_ARCH=arm
14935      VAR_CPU_BITS=32
14936      VAR_CPU_ENDIAN=little
14937      ;;
14938    aarch64)
14939      VAR_CPU=aarch64
14940      VAR_CPU_ARCH=aarch64
14941      VAR_CPU_BITS=64
14942      VAR_CPU_ENDIAN=little
14943      ;;
14944    powerpc)
14945      VAR_CPU=ppc
14946      VAR_CPU_ARCH=ppc
14947      VAR_CPU_BITS=32
14948      VAR_CPU_ENDIAN=big
14949      ;;
14950    powerpc64)
14951      VAR_CPU=ppc64
14952      VAR_CPU_ARCH=ppc
14953      VAR_CPU_BITS=64
14954      VAR_CPU_ENDIAN=big
14955      ;;
14956    powerpc64le)
14957      VAR_CPU=ppc64le
14958      VAR_CPU_ARCH=ppc
14959      VAR_CPU_BITS=64
14960      VAR_CPU_ENDIAN=little
14961      ;;
14962    s390)
14963      VAR_CPU=s390
14964      VAR_CPU_ARCH=s390
14965      VAR_CPU_BITS=32
14966      VAR_CPU_ENDIAN=big
14967      ;;
14968    s390x)
14969      VAR_CPU=s390x
14970      VAR_CPU_ARCH=s390
14971      VAR_CPU_BITS=64
14972      VAR_CPU_ENDIAN=big
14973      ;;
14974    sparc)
14975      VAR_CPU=sparc
14976      VAR_CPU_ARCH=sparc
14977      VAR_CPU_BITS=32
14978      VAR_CPU_ENDIAN=big
14979      ;;
14980    sparcv9|sparc64)
14981      VAR_CPU=sparcv9
14982      VAR_CPU_ARCH=sparc
14983      VAR_CPU_BITS=64
14984      VAR_CPU_ENDIAN=big
14985      ;;
14986    *)
14987      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14988      ;;
14989  esac
14990
14991  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14992  OPENJDK_TARGET_OS="$VAR_OS"
14993  if test "x$VAR_OS_TYPE" != x; then
14994    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14995  else
14996    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14997  fi
14998  if test "x$VAR_OS_ENV" != x; then
14999    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15000  else
15001    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15002  fi
15003  OPENJDK_TARGET_CPU="$VAR_CPU"
15004  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15005  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15006  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15007
15008
15009
15010
15011
15012
15013
15014
15015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15016$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15018$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15019
15020
15021
15022# Check whether --with-target-bits was given.
15023if test "${with_target_bits+set}" = set; then :
15024  withval=$with_target_bits;
15025fi
15026
15027
15028  # We have three types of compiles:
15029  # native  == normal compilation, target system == build system
15030  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15031  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15032  #
15033  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15034    # We're doing a proper cross-compilation
15035    COMPILE_TYPE="cross"
15036  else
15037    COMPILE_TYPE="native"
15038  fi
15039
15040  if test "x$with_target_bits" != x; then
15041    if test "x$COMPILE_TYPE" = "xcross"; then
15042      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15043    fi
15044
15045    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15046      # A reduced build is requested
15047      COMPILE_TYPE="reduced"
15048      OPENJDK_TARGET_CPU_BITS=32
15049      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15050        OPENJDK_TARGET_CPU=x86
15051      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15052        OPENJDK_TARGET_CPU=sparc
15053      else
15054        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15055      fi
15056    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15057      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
15058    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15059      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15060$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15061    else
15062      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15063    fi
15064  fi
15065
15066
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15068$as_echo_n "checking compilation type... " >&6; }
15069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15070$as_echo "$COMPILE_TYPE" >&6; }
15071
15072
15073  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15074    REQUIRED_OS_NAME=SunOS
15075    REQUIRED_OS_VERSION=5.10
15076  fi
15077  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15078    REQUIRED_OS_NAME=Linux
15079    REQUIRED_OS_VERSION=2.6
15080  fi
15081  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15082    REQUIRED_OS_NAME=Windows
15083    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15084      REQUIRED_OS_VERSION=5.2
15085    else
15086      REQUIRED_OS_VERSION=5.1
15087    fi
15088  fi
15089  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15090    REQUIRED_OS_NAME=Darwin
15091    REQUIRED_OS_VERSION=11.2
15092  fi
15093
15094
15095
15096
15097
15098  # Also store the legacy naming of the cpu.
15099  # Ie i586 and amd64 instead of x86 and x86_64
15100  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15101  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15102    OPENJDK_TARGET_CPU_LEGACY="i586"
15103  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15104    # On all platforms except MacOSX replace x86_64 with amd64.
15105    OPENJDK_TARGET_CPU_LEGACY="amd64"
15106  fi
15107
15108
15109  # And the second legacy naming of the cpu.
15110  # Ie i386 and amd64 instead of x86 and x86_64.
15111  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15112  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15113    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15114  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15115    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15116  fi
15117
15118
15119  # This is the name of the cpu (but using i386 and amd64 instead of
15120  # x86 and x86_64, respectively), preceeded by a /, to be used when
15121  # locating libraries. On macosx, it's empty, though.
15122  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15123  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15124    OPENJDK_TARGET_CPU_LIBDIR=""
15125  fi
15126
15127
15128  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15129  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15130  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15131  OPENJDK_TARGET_CPU_ISADIR=""
15132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15133    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15134      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15135    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15136      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15137    fi
15138  fi
15139
15140
15141  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15142  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15143  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15144    # On linux only, we replace x86 with i386.
15145    OPENJDK_TARGET_CPU_OSARCH="i386"
15146  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15147    # On all platforms except macosx, we replace x86_64 with amd64.
15148    OPENJDK_TARGET_CPU_OSARCH="amd64"
15149  fi
15150
15151
15152  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15153  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15154    OPENJDK_TARGET_CPU_JLI="i386"
15155  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15156    # On all platforms except macosx, we replace x86_64 with amd64.
15157    OPENJDK_TARGET_CPU_JLI="amd64"
15158  fi
15159  # Now setup the -D flags for building libjli.
15160  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15161  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15162    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15163      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15164    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15165      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15166    fi
15167  fi
15168
15169
15170  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15171      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15172  else
15173      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15174  fi
15175
15176
15177  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15178    A_LP64="LP64:="
15179    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15180    # unpack200.exe
15181    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15182      ADD_LP64="-D_LP64=1"
15183    fi
15184  fi
15185  LP64=$A_LP64
15186
15187
15188  if test "x$COMPILE_TYPE" = "xcross"; then
15189    # FIXME: ... or should this include reduced builds..?
15190    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15191  else
15192    DEFINE_CROSS_COMPILE_ARCH=""
15193  fi
15194
15195
15196  # ZERO_ARCHDEF is used to enable architecture-specific code
15197  case "${OPENJDK_TARGET_CPU}" in
15198    ppc)     ZERO_ARCHDEF=PPC32 ;;
15199    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15200    s390*)   ZERO_ARCHDEF=S390  ;;
15201    sparc*)  ZERO_ARCHDEF=SPARC ;;
15202    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15203    x86)     ZERO_ARCHDEF=IA32  ;;
15204    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15205  esac
15206
15207
15208
15209
15210# Continue setting up basic stuff. Most remaining code require fundamental tools.
15211
15212  # Save the current directory this script was started from
15213  CURDIR="$PWD"
15214
15215  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15216  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15217  # was not available at that time.
15218  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15219  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15220    ORIGINAL_PATH="$REWRITTEN_PATH"
15221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15222$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15223  fi
15224
15225  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15226    PATH_SEP=";"
15227
15228  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15229  if test $SRC_ROOT_LENGTH -gt 100; then
15230    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15231  fi
15232
15233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15235$as_echo_n "checking cygwin release... " >&6; }
15236    CYGWIN_VERSION=`$UNAME -r`
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15238$as_echo "$CYGWIN_VERSION" >&6; }
15239    WINDOWS_ENV_VENDOR='cygwin'
15240    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15241
15242    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15243    if test "x$CYGWIN_VERSION_OLD" != x; then
15244      { $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
15245$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;}
15246      as_fn_error $? "Cannot continue" "$LINENO" 5
15247    fi
15248    if test "x$CYGPATH" = x; then
15249      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15250    fi
15251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15252$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15253    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15254    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15255    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15256    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15258$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15259    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15260    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15261    if test "x$test_cygdrive_prefix" = x; then
15262      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15263    fi
15264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15266$as_echo_n "checking msys release... " >&6; }
15267    MSYS_VERSION=`$UNAME -r`
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15269$as_echo "$MSYS_VERSION" >&6; }
15270
15271    WINDOWS_ENV_VENDOR='msys'
15272    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15273
15274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15275$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15276    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15277    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15278
15279  windows_path="$MSYS_ROOT_PATH"
15280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15281    unix_path=`$CYGPATH -u "$windows_path"`
15282    MSYS_ROOT_PATH="$unix_path"
15283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15285    MSYS_ROOT_PATH="$unix_path"
15286  fi
15287
15288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15289$as_echo "$MSYS_ROOT_PATH" >&6; }
15290    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15291  else
15292    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15293  fi
15294
15295  # Test if windows or unix (cygwin/msys) find is first in path.
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15297$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15298  FIND_BINARY_OUTPUT=`find --version 2>&1`
15299  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15301$as_echo "unix style" >&6; }
15302  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15304$as_echo "Windows" >&6; }
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15306$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15307    { $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
15308$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15309    as_fn_error $? "Cannot continue" "$LINENO" 5
15310  else
15311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15312$as_echo "unknown" >&6; }
15313    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15314$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15315  fi
15316
15317  else
15318    PATH_SEP=":"
15319  fi
15320
15321
15322  # We get the top-level directory from the supporting wrappers.
15323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15324$as_echo_n "checking for top-level directory... " >&6; }
15325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15326$as_echo "$TOPDIR" >&6; }
15327
15328
15329  # Save the original version of TOPDIR for string comparisons
15330  ORIGINAL_TOPDIR="$TOPDIR"
15331
15332
15333  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15334
15335  # Only process if variable expands to non-empty
15336
15337  if test "x$CURDIR" != x; then
15338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15339
15340  # Input might be given as Windows format, start by converting to
15341  # unix format.
15342  path="$CURDIR"
15343  new_path=`$CYGPATH -u "$path"`
15344
15345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15348  # "foo.exe" is OK but "foo" is an error.
15349  #
15350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15351  # It is also a way to make sure we got the proper file name for the real test later on.
15352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15353  if test "x$test_shortpath" = x; then
15354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15355$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15356    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15357  fi
15358
15359  # Call helper function which possibly converts this using DOS-style short mode.
15360  # If so, the updated path is stored in $new_path.
15361
15362  input_path="$new_path"
15363  # Check if we need to convert this using DOS-style short mode. If the path
15364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15365  # take no chances and rewrite it.
15366  # Note: m4 eats our [], so we need to use [ and ] instead.
15367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15368  if test "x$has_forbidden_chars" != x; then
15369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15373      # Going to short mode and back again did indeed matter. Since short mode is
15374      # case insensitive, let's make it lowercase to improve readability.
15375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15376      # Now convert it back to Unix-style (cygpath)
15377      input_path=`$CYGPATH -u "$shortmode_path"`
15378      new_path="$input_path"
15379    fi
15380  fi
15381
15382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15383  if test "x$test_cygdrive_prefix" = x; then
15384    # As a simple fix, exclude /usr/bin since it's not a real path.
15385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15387      # a path prefixed by /cygdrive for fixpath to work.
15388      new_path="$CYGWIN_ROOT_PATH$input_path"
15389    fi
15390  fi
15391
15392
15393  if test "x$path" != "x$new_path"; then
15394    CURDIR="$new_path"
15395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15396$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15397  fi
15398
15399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15400
15401  path="$CURDIR"
15402  has_colon=`$ECHO $path | $GREP ^.:`
15403  new_path="$path"
15404  if test "x$has_colon" = x; then
15405    # Not in mixed or Windows style, start by that.
15406    new_path=`cmd //c echo $path`
15407  fi
15408
15409
15410  input_path="$new_path"
15411  # Check if we need to convert this using DOS-style short mode. If the path
15412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15413  # take no chances and rewrite it.
15414  # Note: m4 eats our [], so we need to use [ and ] instead.
15415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15416  if test "x$has_forbidden_chars" != x; then
15417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15419  fi
15420
15421
15422  windows_path="$new_path"
15423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15424    unix_path=`$CYGPATH -u "$windows_path"`
15425    new_path="$unix_path"
15426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15428    new_path="$unix_path"
15429  fi
15430
15431  if test "x$path" != "x$new_path"; then
15432    CURDIR="$new_path"
15433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15434$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15435  fi
15436
15437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15439
15440    else
15441      # We're on a unix platform. Hooray! :)
15442      path="$CURDIR"
15443      has_space=`$ECHO "$path" | $GREP " "`
15444      if test "x$has_space" != x; then
15445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15446$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15448      fi
15449
15450      # Use eval to expand a potential ~
15451      eval path="$path"
15452      if test ! -f "$path" && test ! -d "$path"; then
15453        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15454      fi
15455
15456      if test -d "$path"; then
15457        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15458      else
15459        dir="`$DIRNAME "$path"`"
15460        base="`$BASENAME "$path"`"
15461        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15462      fi
15463    fi
15464  fi
15465
15466
15467  # Only process if variable expands to non-empty
15468
15469  if test "x$TOPDIR" != x; then
15470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471
15472  # Input might be given as Windows format, start by converting to
15473  # unix format.
15474  path="$TOPDIR"
15475  new_path=`$CYGPATH -u "$path"`
15476
15477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15480  # "foo.exe" is OK but "foo" is an error.
15481  #
15482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15483  # It is also a way to make sure we got the proper file name for the real test later on.
15484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15485  if test "x$test_shortpath" = x; then
15486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15487$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15488    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15489  fi
15490
15491  # Call helper function which possibly converts this using DOS-style short mode.
15492  # If so, the updated path is stored in $new_path.
15493
15494  input_path="$new_path"
15495  # Check if we need to convert this using DOS-style short mode. If the path
15496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15497  # take no chances and rewrite it.
15498  # Note: m4 eats our [], so we need to use [ and ] instead.
15499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15500  if test "x$has_forbidden_chars" != x; then
15501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15505      # Going to short mode and back again did indeed matter. Since short mode is
15506      # case insensitive, let's make it lowercase to improve readability.
15507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15508      # Now convert it back to Unix-style (cygpath)
15509      input_path=`$CYGPATH -u "$shortmode_path"`
15510      new_path="$input_path"
15511    fi
15512  fi
15513
15514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15515  if test "x$test_cygdrive_prefix" = x; then
15516    # As a simple fix, exclude /usr/bin since it's not a real path.
15517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15519      # a path prefixed by /cygdrive for fixpath to work.
15520      new_path="$CYGWIN_ROOT_PATH$input_path"
15521    fi
15522  fi
15523
15524
15525  if test "x$path" != "x$new_path"; then
15526    TOPDIR="$new_path"
15527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15528$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15529  fi
15530
15531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15532
15533  path="$TOPDIR"
15534  has_colon=`$ECHO $path | $GREP ^.:`
15535  new_path="$path"
15536  if test "x$has_colon" = x; then
15537    # Not in mixed or Windows style, start by that.
15538    new_path=`cmd //c echo $path`
15539  fi
15540
15541
15542  input_path="$new_path"
15543  # Check if we need to convert this using DOS-style short mode. If the path
15544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15545  # take no chances and rewrite it.
15546  # Note: m4 eats our [], so we need to use [ and ] instead.
15547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15548  if test "x$has_forbidden_chars" != x; then
15549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15551  fi
15552
15553
15554  windows_path="$new_path"
15555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15556    unix_path=`$CYGPATH -u "$windows_path"`
15557    new_path="$unix_path"
15558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15560    new_path="$unix_path"
15561  fi
15562
15563  if test "x$path" != "x$new_path"; then
15564    TOPDIR="$new_path"
15565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15566$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15567  fi
15568
15569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15571
15572    else
15573      # We're on a unix platform. Hooray! :)
15574      path="$TOPDIR"
15575      has_space=`$ECHO "$path" | $GREP " "`
15576      if test "x$has_space" != x; then
15577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15578$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15580      fi
15581
15582      # Use eval to expand a potential ~
15583      eval path="$path"
15584      if test ! -f "$path" && test ! -d "$path"; then
15585        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15586      fi
15587
15588      if test -d "$path"; then
15589        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15590      else
15591        dir="`$DIRNAME "$path"`"
15592        base="`$BASENAME "$path"`"
15593        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15594      fi
15595    fi
15596  fi
15597
15598  # SRC_ROOT is a traditional alias for TOPDIR.
15599  SRC_ROOT=$TOPDIR
15600
15601  # Calculate a canonical version of TOPDIR for string comparisons
15602  CANONICAL_TOPDIR=$TOPDIR
15603
15604  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15605    # Follow a chain of symbolic links. Use readlink
15606    # where it exists, else fall back to horribly
15607    # complicated shell code.
15608    if test "x$READLINK_TESTED" != yes; then
15609      # On MacOSX there is a readlink tool with a different
15610      # purpose than the GNU readlink tool. Check the found readlink.
15611      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15612      if test "x$ISGNU" = x; then
15613        # A readlink that we do not know how to use.
15614        # Are there other non-GNU readlinks out there?
15615        READLINK_TESTED=yes
15616        READLINK=
15617      fi
15618    fi
15619
15620    if test "x$READLINK" != x; then
15621      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15622    else
15623      # Save the current directory for restoring afterwards
15624      STARTDIR=$PWD
15625      COUNTER=0
15626      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15627      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15628      cd $sym_link_dir
15629      # Use -P flag to resolve symlinks in directories.
15630      cd `$THEPWDCMD -P`
15631      sym_link_dir=`$THEPWDCMD -P`
15632      # Resolve file symlinks
15633      while test $COUNTER -lt 20; do
15634        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15635        if test "x$ISLINK" == x; then
15636          # This is not a symbolic link! We are done!
15637          break
15638        fi
15639        # Again resolve directory symlinks since the target of the just found
15640        # link could be in a different directory
15641        cd `$DIRNAME $ISLINK`
15642        sym_link_dir=`$THEPWDCMD -P`
15643        sym_link_file=`$BASENAME $ISLINK`
15644        let COUNTER=COUNTER+1
15645      done
15646      cd $STARTDIR
15647      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15648    fi
15649  fi
15650
15651
15652
15653  # Locate the directory of this script.
15654  AUTOCONF_DIR=$TOPDIR/common/autoconf
15655
15656  # Setup username (for use in adhoc version strings etc)
15657  # Outer [ ] to quote m4.
15658   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15659
15660
15661
15662# Check if it's a pure open build or if custom sources are to be used.
15663
15664  # Check whether --enable-openjdk-only was given.
15665if test "${enable_openjdk_only+set}" = set; then :
15666  enableval=$enable_openjdk_only;
15667else
15668  enable_openjdk_only="no"
15669fi
15670
15671
15672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15673$as_echo_n "checking for presence of closed sources... " >&6; }
15674  if test -d "$SRC_ROOT/jdk/src/closed"; then
15675    CLOSED_SOURCE_PRESENT=yes
15676  else
15677    CLOSED_SOURCE_PRESENT=no
15678  fi
15679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15680$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15681
15682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15683$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15684  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15686$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15687
15688  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15689    OPENJDK=true
15690    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15691      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15692$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15693    fi
15694  else
15695    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15696      OPENJDK=true
15697    else
15698      OPENJDK=false
15699    fi
15700  fi
15701
15702  if test "x$OPENJDK" = "xtrue"; then
15703    SET_OPENJDK="OPENJDK=true"
15704  fi
15705
15706
15707
15708  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15709  # the IncludeCustomExtension macro.
15710
15711
15712# Check whether --with-custom-make-dir was given.
15713if test "${with_custom_make_dir+set}" = set; then :
15714  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
15715$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15716fi
15717
15718
15719
15720
15721# These are needed to be able to create a configuration name (and thus the output directory)
15722
15723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15724$as_echo_n "checking which variant of the JDK to build... " >&6; }
15725
15726# Check whether --with-jdk-variant was given.
15727if test "${with_jdk_variant+set}" = set; then :
15728  withval=$with_jdk_variant;
15729fi
15730
15731
15732  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15733    JDK_VARIANT="normal"
15734  else
15735    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15736  fi
15737
15738
15739
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15741$as_echo "$JDK_VARIANT" >&6; }
15742
15743
15744
15745# Check whether --with-jvm-interpreter was given.
15746if test "${with_jvm_interpreter+set}" = set; then :
15747  withval=$with_jvm_interpreter;
15748fi
15749
15750
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15752$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15753  if test "x$with_jvm_interpreter" = x; then
15754    JVM_INTERPRETER="template"
15755  else
15756    JVM_INTERPRETER="$with_jvm_interpreter"
15757  fi
15758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15759$as_echo "$JVM_INTERPRETER" >&6; }
15760
15761  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15762    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15763  fi
15764
15765
15766
15767
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15769$as_echo_n "checking which variants of the JVM to build... " >&6; }
15770
15771# Check whether --with-jvm-variants was given.
15772if test "${with_jvm_variants+set}" = set; then :
15773  withval=$with_jvm_variants;
15774fi
15775
15776
15777  if test "x$with_jvm_variants" = x; then
15778    with_jvm_variants="server"
15779  fi
15780
15781  JVM_VARIANTS=",$with_jvm_variants,"
15782  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15783
15784  if test "x$TEST_VARIANTS" != "x,"; then
15785    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15786  fi
15787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15788$as_echo "$with_jvm_variants" >&6; }
15789
15790  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15791  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15792  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15793  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15794  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15795  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15796
15797  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15798    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15799      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15800    fi
15801  fi
15802  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15803    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15804      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15805    fi
15806  fi
15807
15808  # Replace the commas with AND for use in the build directory name.
15809  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15810  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/'`
15811  if test "x$COUNT_VARIANTS" != "x,1"; then
15812    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15813  else
15814    BUILDING_MULTIPLE_JVM_VARIANTS=no
15815  fi
15816
15817  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15818    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15819  fi
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829  INCLUDE_SA=true
15830  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15831    INCLUDE_SA=false
15832  fi
15833  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15834    INCLUDE_SA=false
15835  fi
15836  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15837    INCLUDE_SA=false
15838  fi
15839  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15840    INCLUDE_SA=false
15841  fi
15842
15843
15844  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15845    MACOSX_UNIVERSAL="true"
15846  fi
15847
15848
15849
15850
15851  DEBUG_LEVEL="release"
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15853$as_echo_n "checking which debug level to use... " >&6; }
15854  # Check whether --enable-debug was given.
15855if test "${enable_debug+set}" = set; then :
15856  enableval=$enable_debug;
15857        ENABLE_DEBUG="${enableval}"
15858        DEBUG_LEVEL="fastdebug"
15859
15860else
15861  ENABLE_DEBUG="no"
15862fi
15863
15864
15865
15866# Check whether --with-debug-level was given.
15867if test "${with_debug_level+set}" = set; then :
15868  withval=$with_debug_level;
15869        DEBUG_LEVEL="${withval}"
15870        if test "x$ENABLE_DEBUG" = xyes; then
15871          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15872        fi
15873
15874fi
15875
15876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15877$as_echo "$DEBUG_LEVEL" >&6; }
15878
15879  if test "x$DEBUG_LEVEL" != xrelease && \
15880      test "x$DEBUG_LEVEL" != xoptimized && \
15881      test "x$DEBUG_LEVEL" != xfastdebug && \
15882      test "x$DEBUG_LEVEL" != xslowdebug; then
15883    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15884  fi
15885
15886
15887  case $DEBUG_LEVEL in
15888    release )
15889      VARIANT="OPT"
15890      FASTDEBUG="false"
15891      DEBUG_CLASSFILES="false"
15892      BUILD_VARIANT_RELEASE=""
15893      HOTSPOT_DEBUG_LEVEL="product"
15894      HOTSPOT_EXPORT="product"
15895      ;;
15896    fastdebug )
15897      VARIANT="DBG"
15898      FASTDEBUG="true"
15899      DEBUG_CLASSFILES="true"
15900      BUILD_VARIANT_RELEASE="-fastdebug"
15901      HOTSPOT_DEBUG_LEVEL="fastdebug"
15902      HOTSPOT_EXPORT="fastdebug"
15903      ;;
15904    slowdebug )
15905      VARIANT="DBG"
15906      FASTDEBUG="false"
15907      DEBUG_CLASSFILES="true"
15908      BUILD_VARIANT_RELEASE="-debug"
15909      HOTSPOT_DEBUG_LEVEL="debug"
15910      HOTSPOT_EXPORT="debug"
15911      ;;
15912    optimized )
15913      VARIANT="OPT"
15914      FASTDEBUG="false"
15915      DEBUG_CLASSFILES="false"
15916      BUILD_VARIANT_RELEASE="-optimized"
15917      HOTSPOT_DEBUG_LEVEL="optimized"
15918      HOTSPOT_EXPORT="optimized"
15919      ;;
15920  esac
15921
15922  # The debug level 'optimized' is a little special because it is currently only
15923  # applicable to the HotSpot build where it means to build a completely
15924  # optimized version of the VM without any debugging code (like for the
15925  # 'release' debug level which is called 'product' in the HotSpot build) but
15926  # with the exception that it can contain additional code which is otherwise
15927  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15928  # test new and/or experimental features which are not intended for customer
15929  # shipment. Because these new features need to be tested and benchmarked in
15930  # real world scenarios, we want to build the containing JDK at the 'release'
15931  # debug level.
15932  if test "x$DEBUG_LEVEL" = xoptimized; then
15933    DEBUG_LEVEL="release"
15934  fi
15935
15936  #####
15937  # Generate the legacy makefile targets for hotspot.
15938  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15939  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15940  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15941  # But until then ...
15942  HOTSPOT_TARGET=""
15943
15944  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15945    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15946  fi
15947
15948  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15949    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15950  fi
15951
15952  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15953    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15954  fi
15955
15956  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15957    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15958  fi
15959
15960  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15961    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15962  fi
15963
15964  if test "x$JVM_VARIANT_CORE" = xtrue; then
15965    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15966  fi
15967
15968  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15969
15970  # On Macosx universal binaries are produced, but they only contain
15971  # 64 bit intel. This invalidates control of which jvms are built
15972  # from configure, but only server is valid anyway. Fix this
15973  # when hotspot makefiles are rewritten.
15974  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15975    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15976  fi
15977
15978  #####
15979
15980
15981
15982
15983
15984
15985
15986
15987# With basic setup done, call the custom early hook.
15988
15989
15990# Check if we have devkits, extra paths or sysroot set.
15991
15992
15993# Check whether --with-devkit was given.
15994if test "${with_devkit+set}" = set; then :
15995  withval=$with_devkit;
15996
15997  # Only process if variable expands to non-empty
15998
15999  if test "x$with_devkit" != x; then
16000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16001
16002  # Input might be given as Windows format, start by converting to
16003  # unix format.
16004  path="$with_devkit"
16005  new_path=`$CYGPATH -u "$path"`
16006
16007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16010  # "foo.exe" is OK but "foo" is an error.
16011  #
16012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16013  # It is also a way to make sure we got the proper file name for the real test later on.
16014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16015  if test "x$test_shortpath" = x; then
16016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16017$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16018    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16019  fi
16020
16021  # Call helper function which possibly converts this using DOS-style short mode.
16022  # If so, the updated path is stored in $new_path.
16023
16024  input_path="$new_path"
16025  # Check if we need to convert this using DOS-style short mode. If the path
16026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16027  # take no chances and rewrite it.
16028  # Note: m4 eats our [], so we need to use [ and ] instead.
16029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16030  if test "x$has_forbidden_chars" != x; then
16031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16035      # Going to short mode and back again did indeed matter. Since short mode is
16036      # case insensitive, let's make it lowercase to improve readability.
16037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16038      # Now convert it back to Unix-style (cygpath)
16039      input_path=`$CYGPATH -u "$shortmode_path"`
16040      new_path="$input_path"
16041    fi
16042  fi
16043
16044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16045  if test "x$test_cygdrive_prefix" = x; then
16046    # As a simple fix, exclude /usr/bin since it's not a real path.
16047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16049      # a path prefixed by /cygdrive for fixpath to work.
16050      new_path="$CYGWIN_ROOT_PATH$input_path"
16051    fi
16052  fi
16053
16054
16055  if test "x$path" != "x$new_path"; then
16056    with_devkit="$new_path"
16057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16058$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16059  fi
16060
16061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16062
16063  path="$with_devkit"
16064  has_colon=`$ECHO $path | $GREP ^.:`
16065  new_path="$path"
16066  if test "x$has_colon" = x; then
16067    # Not in mixed or Windows style, start by that.
16068    new_path=`cmd //c echo $path`
16069  fi
16070
16071
16072  input_path="$new_path"
16073  # Check if we need to convert this using DOS-style short mode. If the path
16074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16075  # take no chances and rewrite it.
16076  # Note: m4 eats our [], so we need to use [ and ] instead.
16077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16078  if test "x$has_forbidden_chars" != x; then
16079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16081  fi
16082
16083
16084  windows_path="$new_path"
16085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16086    unix_path=`$CYGPATH -u "$windows_path"`
16087    new_path="$unix_path"
16088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16090    new_path="$unix_path"
16091  fi
16092
16093  if test "x$path" != "x$new_path"; then
16094    with_devkit="$new_path"
16095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16096$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16097  fi
16098
16099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16101
16102    else
16103      # We're on a unix platform. Hooray! :)
16104      path="$with_devkit"
16105      has_space=`$ECHO "$path" | $GREP " "`
16106      if test "x$has_space" != x; then
16107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16108$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16110      fi
16111
16112      # Use eval to expand a potential ~
16113      eval path="$path"
16114      if test ! -f "$path" && test ! -d "$path"; then
16115        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16116      fi
16117
16118      if test -d "$path"; then
16119        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16120      else
16121        dir="`$DIRNAME "$path"`"
16122        base="`$BASENAME "$path"`"
16123        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16124      fi
16125    fi
16126  fi
16127
16128        DEVKIT_ROOT="$with_devkit"
16129        # Check for a meta data info file in the root of the devkit
16130        if test -f "$DEVKIT_ROOT/devkit.info"; then
16131          . $DEVKIT_ROOT/devkit.info
16132          # This potentially sets the following:
16133          # A descriptive name of the devkit
16134
16135  if test "x$DEVKIT_NAME" = x; then
16136    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16137  fi
16138
16139          # Corresponds to --with-extra-path
16140
16141  if test "x$DEVKIT_EXTRA_PATH" = x; then
16142    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16143  fi
16144
16145          # Corresponds to --with-toolchain-path
16146
16147  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16148    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16149  fi
16150
16151          # Corresponds to --with-sysroot
16152
16153  if test "x$DEVKIT_SYSROOT" = x; then
16154    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16155  fi
16156
16157
16158          # Identifies the Visual Studio version in the devkit
16159
16160  if test "x$DEVKIT_VS_VERSION" = x; then
16161    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16162  fi
16163
16164          # The Visual Studio include environment variable
16165
16166  if test "x$DEVKIT_VS_INCLUDE" = x; then
16167    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16168  fi
16169
16170          # The Visual Studio lib environment variable
16171
16172  if test "x$DEVKIT_VS_LIB" = x; then
16173    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16174  fi
16175
16176          # Corresponds to --with-msvcr-dll
16177
16178  if test "x$DEVKIT_MSVCR_DLL" = x; then
16179    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16180  fi
16181
16182          # Corresponds to --with-msvcp-dll
16183
16184  if test "x$DEVKIT_MSVCP_DLL" = x; then
16185    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16186  fi
16187
16188        fi
16189
16190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16191$as_echo_n "checking for devkit... " >&6; }
16192        if test "x$DEVKIT_NAME" != x; then
16193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16194$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16195        else
16196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16197$as_echo "$DEVKIT_ROOT" >&6; }
16198        fi
16199
16200
16201  if test "x$DEVKIT_EXTRA_PATH" != x; then
16202    if test "x$EXTRA_PATH" = x; then
16203      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16204    else
16205      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16206    fi
16207  fi
16208
16209
16210        # Fallback default of just /bin if DEVKIT_PATH is not defined
16211        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16212          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16213        fi
16214
16215  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16216    if test "x$TOOLCHAIN_PATH" = x; then
16217      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16218    else
16219      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16220    fi
16221  fi
16222
16223
16224        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16225        # places for backwards compatiblity.
16226        if test "x$DEVKIT_SYSROOT" != x; then
16227          SYSROOT="$DEVKIT_SYSROOT"
16228        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16229          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16230        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16231          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16232        fi
16233
16234
16235fi
16236
16237
16238  # You can force the sysroot if the sysroot encoded into the compiler tools
16239  # is not correct.
16240
16241# Check whether --with-sys-root was given.
16242if test "${with_sys_root+set}" = set; then :
16243  withval=$with_sys_root; SYSROOT=$with_sys_root
16244
16245fi
16246
16247
16248
16249# Check whether --with-sysroot was given.
16250if test "${with_sysroot+set}" = set; then :
16251  withval=$with_sysroot; SYSROOT=$with_sysroot
16252
16253fi
16254
16255
16256
16257# Check whether --with-tools-dir was given.
16258if test "${with_tools_dir+set}" = set; then :
16259  withval=$with_tools_dir;
16260  if test "x$with_tools_dir" != x; then
16261    if test "x$TOOLCHAIN_PATH" = x; then
16262      TOOLCHAIN_PATH="$with_tools_dir"
16263    else
16264      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16265    fi
16266  fi
16267
16268
16269fi
16270
16271
16272
16273# Check whether --with-toolchain-path was given.
16274if test "${with_toolchain_path+set}" = set; then :
16275  withval=$with_toolchain_path;
16276  if test "x$with_toolchain_path" != x; then
16277    if test "x$TOOLCHAIN_PATH" = x; then
16278      TOOLCHAIN_PATH="$with_toolchain_path"
16279    else
16280      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16281    fi
16282  fi
16283
16284
16285fi
16286
16287
16288
16289# Check whether --with-extra-path was given.
16290if test "${with_extra_path+set}" = set; then :
16291  withval=$with_extra_path;
16292  if test "x$with_extra_path" != x; then
16293    if test "x$EXTRA_PATH" = x; then
16294      EXTRA_PATH="$with_extra_path"
16295    else
16296      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16297    fi
16298  fi
16299
16300
16301fi
16302
16303
16304  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16305    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16306    # If not, detect if Xcode is installed by running xcodebuild -version
16307    # if no Xcode installed, xcodebuild exits with 1
16308    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16309    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16310      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16311      # fall back on the stub binary in /usr/bin/xcodebuild
16312      # Extract the first word of "xcodebuild", so it can be a program name with args.
16313set dummy xcodebuild; ac_word=$2
16314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16315$as_echo_n "checking for $ac_word... " >&6; }
16316if ${ac_cv_path_XCODEBUILD+:} false; then :
16317  $as_echo_n "(cached) " >&6
16318else
16319  case $XCODEBUILD in
16320  [\\/]* | ?:[\\/]*)
16321  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16322  ;;
16323  *)
16324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16325for as_dir in $TOOLCHAIN_PATH
16326do
16327  IFS=$as_save_IFS
16328  test -z "$as_dir" && as_dir=.
16329    for ac_exec_ext in '' $ac_executable_extensions; do
16330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16331    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16333    break 2
16334  fi
16335done
16336  done
16337IFS=$as_save_IFS
16338
16339  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16340  ;;
16341esac
16342fi
16343XCODEBUILD=$ac_cv_path_XCODEBUILD
16344if test -n "$XCODEBUILD"; then
16345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16346$as_echo "$XCODEBUILD" >&6; }
16347else
16348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16349$as_echo "no" >&6; }
16350fi
16351
16352
16353    else
16354      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16355      # when only the command line tools are installed there are no SDKs, so headers
16356      # are copied into the system frameworks
16357      XCODEBUILD=
16358
16359    fi
16360
16361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16362$as_echo_n "checking for sdk name... " >&6; }
16363
16364# Check whether --with-sdk-name was given.
16365if test "${with_sdk_name+set}" = set; then :
16366  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16367
16368fi
16369
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16371$as_echo "$SDKNAME" >&6; }
16372
16373    # if toolchain path is specified then don't rely on system headers, they may not compile
16374    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16375    test -z "$TOOLCHAIN_PATH" && \
16376      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16377
16378    if test -z "$SYSROOT"; then
16379      if test -n "$XCODEBUILD"; then
16380        # if we don't have system headers, use default SDK name (last resort)
16381        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16382          SDKNAME=${SDKNAME:-macosx}
16383        fi
16384
16385        if test -n "$SDKNAME"; then
16386          # Call xcodebuild to determine SYSROOT
16387          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16388        fi
16389      else
16390        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16391          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
16392        fi
16393      fi
16394    else
16395      # warn user if --with-sdk-name was also set
16396      if test -n "$with_sdk_name"; then
16397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16398$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16399      fi
16400    fi
16401
16402    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16403      # If no system framework headers, then SYSROOT must be set, or we won't build
16404      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
16405    fi
16406
16407    # Perform a basic sanity test
16408    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16409      if test -z "$SYSROOT"; then
16410        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
16411      else
16412        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16413      fi
16414    fi
16415
16416    # set SDKROOT too, Xcode tools will pick it up
16417    SDKROOT=$SYSROOT
16418
16419  fi
16420
16421  # Prepend the extra path to the global path
16422
16423  if test "x$EXTRA_PATH" != x; then
16424    if test "x$PATH" = x; then
16425      PATH="$EXTRA_PATH"
16426    else
16427      PATH="$EXTRA_PATH:$PATH"
16428    fi
16429  fi
16430
16431
16432  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16433    # Add extra search paths on solaris for utilities like ar and as etc...
16434    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16435  fi
16436
16437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16438$as_echo_n "checking for sysroot... " >&6; }
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16440$as_echo "$SYSROOT" >&6; }
16441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16442$as_echo_n "checking for toolchain path... " >&6; }
16443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16444$as_echo "$TOOLCHAIN_PATH" >&6; }
16445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16446$as_echo_n "checking for extra path... " >&6; }
16447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16448$as_echo "$EXTRA_PATH" >&6; }
16449
16450
16451# To properly create a configuration name, we need to have the OpenJDK target
16452# and options (variants and debug level) parsed.
16453
16454
16455
16456# Check whether --with-conf-name was given.
16457if test "${with_conf_name+set}" = set; then :
16458  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16459fi
16460
16461
16462  # Test from where we are running configure, in or outside of src root.
16463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16464$as_echo_n "checking where to store configuration... " >&6; }
16465  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16466      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16467      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16468    # We are running configure from the src root.
16469    # Create a default ./build/target-variant-debuglevel output root.
16470    if test "x${CONF_NAME}" = x; then
16471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16472$as_echo "in default location" >&6; }
16473      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16474    else
16475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16476$as_echo "in build directory with custom name" >&6; }
16477    fi
16478    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16479    $MKDIR -p "$OUTPUT_ROOT"
16480    if test ! -d "$OUTPUT_ROOT"; then
16481      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16482    fi
16483  else
16484    # We are running configure from outside of the src dir.
16485    # Then use the current directory as output dir!
16486    # If configuration is situated in normal build directory, just use the build
16487    # directory name as configuration name, otherwise use the complete path.
16488    if test "x${CONF_NAME}" = x; then
16489      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16490    fi
16491    OUTPUT_ROOT="$CURDIR"
16492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16493$as_echo "in current directory" >&6; }
16494
16495    # WARNING: This might be a bad thing to do. You need to be sure you want to
16496    # have a configuration in this directory. Do some sanity checks!
16497
16498    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16499      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16500      # other files
16501      files_present=`$LS $OUTPUT_ROOT`
16502      # Configure has already touched config.log and confdefs.h in the current dir when this check
16503      # is performed.
16504      filtered_files=`$ECHO "$files_present" \
16505          | $SED -e 's/config.log//g' \
16506              -e 's/configure.log//g' \
16507              -e 's/confdefs.h//g' \
16508              -e 's/ //g' \
16509          | $TR -d '\n'`
16510      if test "x$filtered_files" != x; then
16511        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16512$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16514$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16515        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16516$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16517        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16518$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16519        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16520$as_echo "$as_me: seriously mess up just about everything." >&6;}
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16522$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16523        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16524$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16525        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16526      fi
16527    fi
16528  fi
16529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16530$as_echo_n "checking what configuration name to use... " >&6; }
16531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16532$as_echo "$CONF_NAME" >&6; }
16533
16534
16535  # Only process if variable expands to non-empty
16536
16537  if test "x$OUTPUT_ROOT" != x; then
16538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16539
16540  # Input might be given as Windows format, start by converting to
16541  # unix format.
16542  path="$OUTPUT_ROOT"
16543  new_path=`$CYGPATH -u "$path"`
16544
16545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16548  # "foo.exe" is OK but "foo" is an error.
16549  #
16550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16551  # It is also a way to make sure we got the proper file name for the real test later on.
16552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16553  if test "x$test_shortpath" = x; then
16554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16555$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16556    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16557  fi
16558
16559  # Call helper function which possibly converts this using DOS-style short mode.
16560  # If so, the updated path is stored in $new_path.
16561
16562  input_path="$new_path"
16563  # Check if we need to convert this using DOS-style short mode. If the path
16564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16565  # take no chances and rewrite it.
16566  # Note: m4 eats our [], so we need to use [ and ] instead.
16567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16568  if test "x$has_forbidden_chars" != x; then
16569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16573      # Going to short mode and back again did indeed matter. Since short mode is
16574      # case insensitive, let's make it lowercase to improve readability.
16575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16576      # Now convert it back to Unix-style (cygpath)
16577      input_path=`$CYGPATH -u "$shortmode_path"`
16578      new_path="$input_path"
16579    fi
16580  fi
16581
16582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16583  if test "x$test_cygdrive_prefix" = x; then
16584    # As a simple fix, exclude /usr/bin since it's not a real path.
16585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16587      # a path prefixed by /cygdrive for fixpath to work.
16588      new_path="$CYGWIN_ROOT_PATH$input_path"
16589    fi
16590  fi
16591
16592
16593  if test "x$path" != "x$new_path"; then
16594    OUTPUT_ROOT="$new_path"
16595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16596$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16597  fi
16598
16599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16600
16601  path="$OUTPUT_ROOT"
16602  has_colon=`$ECHO $path | $GREP ^.:`
16603  new_path="$path"
16604  if test "x$has_colon" = x; then
16605    # Not in mixed or Windows style, start by that.
16606    new_path=`cmd //c echo $path`
16607  fi
16608
16609
16610  input_path="$new_path"
16611  # Check if we need to convert this using DOS-style short mode. If the path
16612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16613  # take no chances and rewrite it.
16614  # Note: m4 eats our [], so we need to use [ and ] instead.
16615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16616  if test "x$has_forbidden_chars" != x; then
16617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16619  fi
16620
16621
16622  windows_path="$new_path"
16623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16624    unix_path=`$CYGPATH -u "$windows_path"`
16625    new_path="$unix_path"
16626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16628    new_path="$unix_path"
16629  fi
16630
16631  if test "x$path" != "x$new_path"; then
16632    OUTPUT_ROOT="$new_path"
16633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16634$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16635  fi
16636
16637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16639
16640    else
16641      # We're on a unix platform. Hooray! :)
16642      path="$OUTPUT_ROOT"
16643      has_space=`$ECHO "$path" | $GREP " "`
16644      if test "x$has_space" != x; then
16645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16646$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16648      fi
16649
16650      # Use eval to expand a potential ~
16651      eval path="$path"
16652      if test ! -f "$path" && test ! -d "$path"; then
16653        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16654      fi
16655
16656      if test -d "$path"; then
16657        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16658      else
16659        dir="`$DIRNAME "$path"`"
16660        base="`$BASENAME "$path"`"
16661        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16662      fi
16663    fi
16664  fi
16665
16666
16667  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16668  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16669
16670  SPEC=$OUTPUT_ROOT/spec.gmk
16671
16672  CONF_NAME=$CONF_NAME
16673
16674  OUTPUT_ROOT=$OUTPUT_ROOT
16675
16676
16677
16678  # The spec.gmk file contains all variables for the make system.
16679  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16680
16681  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16682  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16683
16684  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16685  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16686
16687  # The compare.sh is used to compare the build output to other builds.
16688  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16689
16690  # The generated Makefile knows where the spec.gmk is and where the source is.
16691  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16692  # which will look for generated configurations
16693  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16694
16695
16696
16697# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16698
16699  for ac_prog in apt-get yum port pkgutil pkgadd
16700do
16701  # Extract the first word of "$ac_prog", so it can be a program name with args.
16702set dummy $ac_prog; ac_word=$2
16703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16704$as_echo_n "checking for $ac_word... " >&6; }
16705if ${ac_cv_prog_PKGHANDLER+:} false; then :
16706  $as_echo_n "(cached) " >&6
16707else
16708  if test -n "$PKGHANDLER"; then
16709  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16710else
16711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16712for as_dir in $PATH
16713do
16714  IFS=$as_save_IFS
16715  test -z "$as_dir" && as_dir=.
16716    for ac_exec_ext in '' $ac_executable_extensions; do
16717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16718    ac_cv_prog_PKGHANDLER="$ac_prog"
16719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16720    break 2
16721  fi
16722done
16723  done
16724IFS=$as_save_IFS
16725
16726fi
16727fi
16728PKGHANDLER=$ac_cv_prog_PKGHANDLER
16729if test -n "$PKGHANDLER"; then
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16731$as_echo "$PKGHANDLER" >&6; }
16732else
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734$as_echo "no" >&6; }
16735fi
16736
16737
16738  test -n "$PKGHANDLER" && break
16739done
16740
16741
16742
16743# Setup tools that requires more complex handling, or that is not needed by the configure script.
16744
16745
16746
16747  # Publish this variable in the help.
16748
16749
16750  if [ -z "${MAKE+x}" ]; then
16751    # The variable is not set by user, try to locate tool using the code snippet
16752
16753    # Try our hardest to locate a correct version of GNU make
16754    for ac_prog in gmake
16755do
16756  # Extract the first word of "$ac_prog", so it can be a program name with args.
16757set dummy $ac_prog; ac_word=$2
16758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16759$as_echo_n "checking for $ac_word... " >&6; }
16760if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16761  $as_echo_n "(cached) " >&6
16762else
16763  case $CHECK_GMAKE in
16764  [\\/]* | ?:[\\/]*)
16765  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16766  ;;
16767  *)
16768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16769for as_dir in $PATH
16770do
16771  IFS=$as_save_IFS
16772  test -z "$as_dir" && as_dir=.
16773    for ac_exec_ext in '' $ac_executable_extensions; do
16774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16775    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16777    break 2
16778  fi
16779done
16780  done
16781IFS=$as_save_IFS
16782
16783  ;;
16784esac
16785fi
16786CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16787if test -n "$CHECK_GMAKE"; then
16788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16789$as_echo "$CHECK_GMAKE" >&6; }
16790else
16791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16792$as_echo "no" >&6; }
16793fi
16794
16795
16796  test -n "$CHECK_GMAKE" && break
16797done
16798
16799
16800  MAKE_CANDIDATE=""$CHECK_GMAKE""
16801  DESCRIPTION="gmake in PATH"
16802
16803  # On Cygwin, we require a newer version of make than on other platforms
16804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16805    MAKE_VERSION_EXPR="-e 4\."
16806    MAKE_REQUIRED_VERSION="4.0"
16807   else
16808    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16809    MAKE_REQUIRED_VERSION="3.81"
16810  fi
16811
16812  if test "x$MAKE_CANDIDATE" != x; then
16813    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16814$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16815    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16816    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16817    if test "x$IS_GNU_MAKE" = x; then
16818      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16819$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16820    else
16821      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16822      if test "x$IS_MODERN_MAKE" = x; then
16823        { $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
16824$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;}
16825      else
16826        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16827          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16828            MAKE_EXPECTED_ENV='cygwin'
16829          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16830            MAKE_EXPECTED_ENV='msys'
16831          else
16832            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16833          fi
16834          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16835          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16836        else
16837          # Not relevant for non-Windows
16838          IS_MAKE_CORRECT_ENV=true
16839        fi
16840        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16841          { $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
16842$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;}
16843        else
16844          FOUND_MAKE=$MAKE_CANDIDATE
16845
16846  # Only process if variable expands to non-empty
16847
16848  if test "x$FOUND_MAKE" != x; then
16849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16850
16851  # First separate the path from the arguments. This will split at the first
16852  # space.
16853  complete="$FOUND_MAKE"
16854  path="${complete%% *}"
16855  tmp="$complete EOL"
16856  arguments="${tmp#* }"
16857
16858  # Input might be given as Windows format, start by converting to
16859  # unix format.
16860  new_path=`$CYGPATH -u "$path"`
16861
16862  # Now try to locate executable using which
16863  new_path=`$WHICH "$new_path" 2> /dev/null`
16864  # bat and cmd files are not always considered executable in cygwin causing which
16865  # to not find them
16866  if test "x$new_path" = x \
16867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16869    new_path=`$CYGPATH -u "$path"`
16870  fi
16871  if test "x$new_path" = x; then
16872    # Oops. Which didn't find the executable.
16873    # The splitting of arguments from the executable at a space might have been incorrect,
16874    # since paths with space are more likely in Windows. Give it another try with the whole
16875    # argument.
16876    path="$complete"
16877    arguments="EOL"
16878    new_path=`$CYGPATH -u "$path"`
16879    new_path=`$WHICH "$new_path" 2> /dev/null`
16880    # bat and cmd files are not always considered executable in cygwin causing which
16881    # to not find them
16882    if test "x$new_path" = x \
16883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16885      new_path=`$CYGPATH -u "$path"`
16886    fi
16887    if test "x$new_path" = x; then
16888      # It's still not found. Now this is an unrecoverable error.
16889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16891      has_space=`$ECHO "$complete" | $GREP " "`
16892      if test "x$has_space" != x; then
16893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16895      fi
16896      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16897    fi
16898  fi
16899
16900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16903  # "foo.exe" is OK but "foo" is an error.
16904  #
16905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16906  # It is also a way to make sure we got the proper file name for the real test later on.
16907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16908  if test "x$test_shortpath" = x; then
16909    # Short path failed, file does not exist as specified.
16910    # Try adding .exe or .cmd
16911    if test -f "${new_path}.exe"; then
16912      input_to_shortpath="${new_path}.exe"
16913    elif test -f "${new_path}.cmd"; then
16914      input_to_shortpath="${new_path}.cmd"
16915    else
16916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16917$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16921    fi
16922  else
16923    input_to_shortpath="$new_path"
16924  fi
16925
16926  # Call helper function which possibly converts this using DOS-style short mode.
16927  # If so, the updated path is stored in $new_path.
16928  new_path="$input_to_shortpath"
16929
16930  input_path="$input_to_shortpath"
16931  # Check if we need to convert this using DOS-style short mode. If the path
16932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16933  # take no chances and rewrite it.
16934  # Note: m4 eats our [], so we need to use [ and ] instead.
16935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16936  if test "x$has_forbidden_chars" != x; then
16937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16941      # Going to short mode and back again did indeed matter. Since short mode is
16942      # case insensitive, let's make it lowercase to improve readability.
16943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16944      # Now convert it back to Unix-style (cygpath)
16945      input_path=`$CYGPATH -u "$shortmode_path"`
16946      new_path="$input_path"
16947    fi
16948  fi
16949
16950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16951  if test "x$test_cygdrive_prefix" = x; then
16952    # As a simple fix, exclude /usr/bin since it's not a real path.
16953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16955      # a path prefixed by /cygdrive for fixpath to work.
16956      new_path="$CYGWIN_ROOT_PATH$input_path"
16957    fi
16958  fi
16959
16960  # remove trailing .exe if any
16961  new_path="${new_path/%.exe/}"
16962
16963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964
16965  # First separate the path from the arguments. This will split at the first
16966  # space.
16967  complete="$FOUND_MAKE"
16968  path="${complete%% *}"
16969  tmp="$complete EOL"
16970  arguments="${tmp#* }"
16971
16972  # Input might be given as Windows format, start by converting to
16973  # unix format.
16974  new_path="$path"
16975
16976  windows_path="$new_path"
16977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978    unix_path=`$CYGPATH -u "$windows_path"`
16979    new_path="$unix_path"
16980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16982    new_path="$unix_path"
16983  fi
16984
16985
16986  # Now try to locate executable using which
16987  new_path=`$WHICH "$new_path" 2> /dev/null`
16988
16989  if test "x$new_path" = x; then
16990    # Oops. Which didn't find the executable.
16991    # The splitting of arguments from the executable at a space might have been incorrect,
16992    # since paths with space are more likely in Windows. Give it another try with the whole
16993    # argument.
16994    path="$complete"
16995    arguments="EOL"
16996    new_path="$path"
16997
16998  windows_path="$new_path"
16999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17000    unix_path=`$CYGPATH -u "$windows_path"`
17001    new_path="$unix_path"
17002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17004    new_path="$unix_path"
17005  fi
17006
17007
17008    new_path=`$WHICH "$new_path" 2> /dev/null`
17009    # bat and cmd files are not always considered executable in MSYS causing which
17010    # to not find them
17011    if test "x$new_path" = x \
17012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17014      new_path="$path"
17015
17016  windows_path="$new_path"
17017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018    unix_path=`$CYGPATH -u "$windows_path"`
17019    new_path="$unix_path"
17020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17022    new_path="$unix_path"
17023  fi
17024
17025    fi
17026
17027    if test "x$new_path" = x; then
17028      # It's still not found. Now this is an unrecoverable error.
17029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17031      has_space=`$ECHO "$complete" | $GREP " "`
17032      if test "x$has_space" != x; then
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17035      fi
17036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17037    fi
17038  fi
17039
17040  # Now new_path has a complete unix path to the binary
17041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17042    # Keep paths in /bin as-is, but remove trailing .exe if any
17043    new_path="${new_path/%.exe/}"
17044    # Do not save /bin paths to all_fixpath_prefixes!
17045  else
17046    # Not in mixed or Windows style, start by that.
17047    new_path=`cmd //c echo $new_path`
17048
17049  input_path="$new_path"
17050  # Check if we need to convert this using DOS-style short mode. If the path
17051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17052  # take no chances and rewrite it.
17053  # Note: m4 eats our [], so we need to use [ and ] instead.
17054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17055  if test "x$has_forbidden_chars" != x; then
17056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17058  fi
17059
17060    # Output is in $new_path
17061
17062  windows_path="$new_path"
17063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064    unix_path=`$CYGPATH -u "$windows_path"`
17065    new_path="$unix_path"
17066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17068    new_path="$unix_path"
17069  fi
17070
17071    # remove trailing .exe if any
17072    new_path="${new_path/%.exe/}"
17073
17074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17076  fi
17077
17078    else
17079      # We're on a unix platform. Hooray! :)
17080      # First separate the path from the arguments. This will split at the first
17081      # space.
17082      complete="$FOUND_MAKE"
17083      path="${complete%% *}"
17084      tmp="$complete EOL"
17085      arguments="${tmp#* }"
17086
17087      # Cannot rely on the command "which" here since it doesn't always work.
17088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17089      if test -z "$is_absolute_path"; then
17090        # Path to executable is not absolute. Find it.
17091        IFS_save="$IFS"
17092        IFS=:
17093        for p in $PATH; do
17094          if test -f "$p/$path" && test -x "$p/$path"; then
17095            new_path="$p/$path"
17096            break
17097          fi
17098        done
17099        IFS="$IFS_save"
17100      else
17101        # This is an absolute path, we can use it without further modifications.
17102        new_path="$path"
17103      fi
17104
17105      if test "x$new_path" = x; then
17106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17108        has_space=`$ECHO "$complete" | $GREP " "`
17109        if test "x$has_space" != x; then
17110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17112        fi
17113        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17114      fi
17115    fi
17116
17117    # Now join together the path and the arguments once again
17118    if test "x$arguments" != xEOL; then
17119      new_complete="$new_path ${arguments% *}"
17120    else
17121      new_complete="$new_path"
17122    fi
17123
17124    if test "x$complete" != "x$new_complete"; then
17125      FOUND_MAKE="$new_complete"
17126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17127$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17128    fi
17129  fi
17130
17131        fi
17132      fi
17133    fi
17134  fi
17135
17136
17137    if test "x$FOUND_MAKE" = x; then
17138      for ac_prog in make
17139do
17140  # Extract the first word of "$ac_prog", so it can be a program name with args.
17141set dummy $ac_prog; ac_word=$2
17142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17143$as_echo_n "checking for $ac_word... " >&6; }
17144if ${ac_cv_path_CHECK_MAKE+:} false; then :
17145  $as_echo_n "(cached) " >&6
17146else
17147  case $CHECK_MAKE in
17148  [\\/]* | ?:[\\/]*)
17149  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17150  ;;
17151  *)
17152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17153for as_dir in $PATH
17154do
17155  IFS=$as_save_IFS
17156  test -z "$as_dir" && as_dir=.
17157    for ac_exec_ext in '' $ac_executable_extensions; do
17158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17159    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17161    break 2
17162  fi
17163done
17164  done
17165IFS=$as_save_IFS
17166
17167  ;;
17168esac
17169fi
17170CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17171if test -n "$CHECK_MAKE"; then
17172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17173$as_echo "$CHECK_MAKE" >&6; }
17174else
17175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17176$as_echo "no" >&6; }
17177fi
17178
17179
17180  test -n "$CHECK_MAKE" && break
17181done
17182
17183
17184  MAKE_CANDIDATE=""$CHECK_MAKE""
17185  DESCRIPTION="make in PATH"
17186
17187  # On Cygwin, we require a newer version of make than on other platforms
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    MAKE_VERSION_EXPR="-e 4\."
17190    MAKE_REQUIRED_VERSION="4.0"
17191   else
17192    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17193    MAKE_REQUIRED_VERSION="3.81"
17194  fi
17195
17196  if test "x$MAKE_CANDIDATE" != x; then
17197    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17198$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17199    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17200    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17201    if test "x$IS_GNU_MAKE" = x; then
17202      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17203$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17204    else
17205      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17206      if test "x$IS_MODERN_MAKE" = x; then
17207        { $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
17208$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;}
17209      else
17210        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17211          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17212            MAKE_EXPECTED_ENV='cygwin'
17213          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214            MAKE_EXPECTED_ENV='msys'
17215          else
17216            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17217          fi
17218          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17219          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17220        else
17221          # Not relevant for non-Windows
17222          IS_MAKE_CORRECT_ENV=true
17223        fi
17224        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17225          { $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
17226$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;}
17227        else
17228          FOUND_MAKE=$MAKE_CANDIDATE
17229
17230  # Only process if variable expands to non-empty
17231
17232  if test "x$FOUND_MAKE" != x; then
17233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234
17235  # First separate the path from the arguments. This will split at the first
17236  # space.
17237  complete="$FOUND_MAKE"
17238  path="${complete%% *}"
17239  tmp="$complete EOL"
17240  arguments="${tmp#* }"
17241
17242  # Input might be given as Windows format, start by converting to
17243  # unix format.
17244  new_path=`$CYGPATH -u "$path"`
17245
17246  # Now try to locate executable using which
17247  new_path=`$WHICH "$new_path" 2> /dev/null`
17248  # bat and cmd files are not always considered executable in cygwin causing which
17249  # to not find them
17250  if test "x$new_path" = x \
17251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17253    new_path=`$CYGPATH -u "$path"`
17254  fi
17255  if test "x$new_path" = x; then
17256    # Oops. Which didn't find the executable.
17257    # The splitting of arguments from the executable at a space might have been incorrect,
17258    # since paths with space are more likely in Windows. Give it another try with the whole
17259    # argument.
17260    path="$complete"
17261    arguments="EOL"
17262    new_path=`$CYGPATH -u "$path"`
17263    new_path=`$WHICH "$new_path" 2> /dev/null`
17264    # bat and cmd files are not always considered executable in cygwin causing which
17265    # to not find them
17266    if test "x$new_path" = x \
17267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17269      new_path=`$CYGPATH -u "$path"`
17270    fi
17271    if test "x$new_path" = x; then
17272      # It's still not found. Now this is an unrecoverable error.
17273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17275      has_space=`$ECHO "$complete" | $GREP " "`
17276      if test "x$has_space" != x; then
17277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17279      fi
17280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17281    fi
17282  fi
17283
17284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17287  # "foo.exe" is OK but "foo" is an error.
17288  #
17289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17290  # It is also a way to make sure we got the proper file name for the real test later on.
17291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17292  if test "x$test_shortpath" = x; then
17293    # Short path failed, file does not exist as specified.
17294    # Try adding .exe or .cmd
17295    if test -f "${new_path}.exe"; then
17296      input_to_shortpath="${new_path}.exe"
17297    elif test -f "${new_path}.cmd"; then
17298      input_to_shortpath="${new_path}.cmd"
17299    else
17300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17301$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17304      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17305    fi
17306  else
17307    input_to_shortpath="$new_path"
17308  fi
17309
17310  # Call helper function which possibly converts this using DOS-style short mode.
17311  # If so, the updated path is stored in $new_path.
17312  new_path="$input_to_shortpath"
17313
17314  input_path="$input_to_shortpath"
17315  # Check if we need to convert this using DOS-style short mode. If the path
17316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17317  # take no chances and rewrite it.
17318  # Note: m4 eats our [], so we need to use [ and ] instead.
17319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17320  if test "x$has_forbidden_chars" != x; then
17321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17325      # Going to short mode and back again did indeed matter. Since short mode is
17326      # case insensitive, let's make it lowercase to improve readability.
17327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17328      # Now convert it back to Unix-style (cygpath)
17329      input_path=`$CYGPATH -u "$shortmode_path"`
17330      new_path="$input_path"
17331    fi
17332  fi
17333
17334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17335  if test "x$test_cygdrive_prefix" = x; then
17336    # As a simple fix, exclude /usr/bin since it's not a real path.
17337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17339      # a path prefixed by /cygdrive for fixpath to work.
17340      new_path="$CYGWIN_ROOT_PATH$input_path"
17341    fi
17342  fi
17343
17344  # remove trailing .exe if any
17345  new_path="${new_path/%.exe/}"
17346
17347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17348
17349  # First separate the path from the arguments. This will split at the first
17350  # space.
17351  complete="$FOUND_MAKE"
17352  path="${complete%% *}"
17353  tmp="$complete EOL"
17354  arguments="${tmp#* }"
17355
17356  # Input might be given as Windows format, start by converting to
17357  # unix format.
17358  new_path="$path"
17359
17360  windows_path="$new_path"
17361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17362    unix_path=`$CYGPATH -u "$windows_path"`
17363    new_path="$unix_path"
17364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17366    new_path="$unix_path"
17367  fi
17368
17369
17370  # Now try to locate executable using which
17371  new_path=`$WHICH "$new_path" 2> /dev/null`
17372
17373  if test "x$new_path" = x; then
17374    # Oops. Which didn't find the executable.
17375    # The splitting of arguments from the executable at a space might have been incorrect,
17376    # since paths with space are more likely in Windows. Give it another try with the whole
17377    # argument.
17378    path="$complete"
17379    arguments="EOL"
17380    new_path="$path"
17381
17382  windows_path="$new_path"
17383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17384    unix_path=`$CYGPATH -u "$windows_path"`
17385    new_path="$unix_path"
17386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17388    new_path="$unix_path"
17389  fi
17390
17391
17392    new_path=`$WHICH "$new_path" 2> /dev/null`
17393    # bat and cmd files are not always considered executable in MSYS causing which
17394    # to not find them
17395    if test "x$new_path" = x \
17396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17398      new_path="$path"
17399
17400  windows_path="$new_path"
17401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17402    unix_path=`$CYGPATH -u "$windows_path"`
17403    new_path="$unix_path"
17404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17406    new_path="$unix_path"
17407  fi
17408
17409    fi
17410
17411    if test "x$new_path" = x; then
17412      # It's still not found. Now this is an unrecoverable error.
17413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17415      has_space=`$ECHO "$complete" | $GREP " "`
17416      if test "x$has_space" != x; then
17417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17419      fi
17420      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17421    fi
17422  fi
17423
17424  # Now new_path has a complete unix path to the binary
17425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17426    # Keep paths in /bin as-is, but remove trailing .exe if any
17427    new_path="${new_path/%.exe/}"
17428    # Do not save /bin paths to all_fixpath_prefixes!
17429  else
17430    # Not in mixed or Windows style, start by that.
17431    new_path=`cmd //c echo $new_path`
17432
17433  input_path="$new_path"
17434  # Check if we need to convert this using DOS-style short mode. If the path
17435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17436  # take no chances and rewrite it.
17437  # Note: m4 eats our [], so we need to use [ and ] instead.
17438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17439  if test "x$has_forbidden_chars" != x; then
17440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17442  fi
17443
17444    # Output is in $new_path
17445
17446  windows_path="$new_path"
17447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17448    unix_path=`$CYGPATH -u "$windows_path"`
17449    new_path="$unix_path"
17450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17452    new_path="$unix_path"
17453  fi
17454
17455    # remove trailing .exe if any
17456    new_path="${new_path/%.exe/}"
17457
17458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17460  fi
17461
17462    else
17463      # We're on a unix platform. Hooray! :)
17464      # First separate the path from the arguments. This will split at the first
17465      # space.
17466      complete="$FOUND_MAKE"
17467      path="${complete%% *}"
17468      tmp="$complete EOL"
17469      arguments="${tmp#* }"
17470
17471      # Cannot rely on the command "which" here since it doesn't always work.
17472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17473      if test -z "$is_absolute_path"; then
17474        # Path to executable is not absolute. Find it.
17475        IFS_save="$IFS"
17476        IFS=:
17477        for p in $PATH; do
17478          if test -f "$p/$path" && test -x "$p/$path"; then
17479            new_path="$p/$path"
17480            break
17481          fi
17482        done
17483        IFS="$IFS_save"
17484      else
17485        # This is an absolute path, we can use it without further modifications.
17486        new_path="$path"
17487      fi
17488
17489      if test "x$new_path" = x; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17492        has_space=`$ECHO "$complete" | $GREP " "`
17493        if test "x$has_space" != x; then
17494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17496        fi
17497        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17498      fi
17499    fi
17500
17501    # Now join together the path and the arguments once again
17502    if test "x$arguments" != xEOL; then
17503      new_complete="$new_path ${arguments% *}"
17504    else
17505      new_complete="$new_path"
17506    fi
17507
17508    if test "x$complete" != "x$new_complete"; then
17509      FOUND_MAKE="$new_complete"
17510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17511$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17512    fi
17513  fi
17514
17515        fi
17516      fi
17517    fi
17518  fi
17519
17520    fi
17521
17522    if test "x$FOUND_MAKE" = x; then
17523      if test "x$TOOLCHAIN_PATH" != x; then
17524        # We have a toolchain path, check that as well before giving up.
17525        OLD_PATH=$PATH
17526        PATH=$TOOLCHAIN_PATH:$PATH
17527        for ac_prog in gmake
17528do
17529  # Extract the first word of "$ac_prog", so it can be a program name with args.
17530set dummy $ac_prog; ac_word=$2
17531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17532$as_echo_n "checking for $ac_word... " >&6; }
17533if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17534  $as_echo_n "(cached) " >&6
17535else
17536  case $CHECK_TOOLSDIR_GMAKE in
17537  [\\/]* | ?:[\\/]*)
17538  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17539  ;;
17540  *)
17541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17542for as_dir in $PATH
17543do
17544  IFS=$as_save_IFS
17545  test -z "$as_dir" && as_dir=.
17546    for ac_exec_ext in '' $ac_executable_extensions; do
17547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17548    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17550    break 2
17551  fi
17552done
17553  done
17554IFS=$as_save_IFS
17555
17556  ;;
17557esac
17558fi
17559CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17560if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17562$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17563else
17564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17565$as_echo "no" >&6; }
17566fi
17567
17568
17569  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17570done
17571
17572
17573  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17574  DESCRIPTION="gmake in tools-dir"
17575
17576  # On Cygwin, we require a newer version of make than on other platforms
17577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17578    MAKE_VERSION_EXPR="-e 4\."
17579    MAKE_REQUIRED_VERSION="4.0"
17580   else
17581    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17582    MAKE_REQUIRED_VERSION="3.81"
17583  fi
17584
17585  if test "x$MAKE_CANDIDATE" != x; then
17586    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17587$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17588    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17589    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17590    if test "x$IS_GNU_MAKE" = x; then
17591      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17592$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17593    else
17594      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17595      if test "x$IS_MODERN_MAKE" = x; then
17596        { $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
17597$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;}
17598      else
17599        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17600          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17601            MAKE_EXPECTED_ENV='cygwin'
17602          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17603            MAKE_EXPECTED_ENV='msys'
17604          else
17605            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17606          fi
17607          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17608          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17609        else
17610          # Not relevant for non-Windows
17611          IS_MAKE_CORRECT_ENV=true
17612        fi
17613        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17614          { $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
17615$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;}
17616        else
17617          FOUND_MAKE=$MAKE_CANDIDATE
17618
17619  # Only process if variable expands to non-empty
17620
17621  if test "x$FOUND_MAKE" != x; then
17622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17623
17624  # First separate the path from the arguments. This will split at the first
17625  # space.
17626  complete="$FOUND_MAKE"
17627  path="${complete%% *}"
17628  tmp="$complete EOL"
17629  arguments="${tmp#* }"
17630
17631  # Input might be given as Windows format, start by converting to
17632  # unix format.
17633  new_path=`$CYGPATH -u "$path"`
17634
17635  # Now try to locate executable using which
17636  new_path=`$WHICH "$new_path" 2> /dev/null`
17637  # bat and cmd files are not always considered executable in cygwin causing which
17638  # to not find them
17639  if test "x$new_path" = x \
17640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17642    new_path=`$CYGPATH -u "$path"`
17643  fi
17644  if test "x$new_path" = x; then
17645    # Oops. Which didn't find the executable.
17646    # The splitting of arguments from the executable at a space might have been incorrect,
17647    # since paths with space are more likely in Windows. Give it another try with the whole
17648    # argument.
17649    path="$complete"
17650    arguments="EOL"
17651    new_path=`$CYGPATH -u "$path"`
17652    new_path=`$WHICH "$new_path" 2> /dev/null`
17653    # bat and cmd files are not always considered executable in cygwin causing which
17654    # to not find them
17655    if test "x$new_path" = x \
17656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17658      new_path=`$CYGPATH -u "$path"`
17659    fi
17660    if test "x$new_path" = x; then
17661      # It's still not found. Now this is an unrecoverable error.
17662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17664      has_space=`$ECHO "$complete" | $GREP " "`
17665      if test "x$has_space" != x; then
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17668      fi
17669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17670    fi
17671  fi
17672
17673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17676  # "foo.exe" is OK but "foo" is an error.
17677  #
17678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17679  # It is also a way to make sure we got the proper file name for the real test later on.
17680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17681  if test "x$test_shortpath" = x; then
17682    # Short path failed, file does not exist as specified.
17683    # Try adding .exe or .cmd
17684    if test -f "${new_path}.exe"; then
17685      input_to_shortpath="${new_path}.exe"
17686    elif test -f "${new_path}.cmd"; then
17687      input_to_shortpath="${new_path}.cmd"
17688    else
17689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17694    fi
17695  else
17696    input_to_shortpath="$new_path"
17697  fi
17698
17699  # Call helper function which possibly converts this using DOS-style short mode.
17700  # If so, the updated path is stored in $new_path.
17701  new_path="$input_to_shortpath"
17702
17703  input_path="$input_to_shortpath"
17704  # Check if we need to convert this using DOS-style short mode. If the path
17705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17706  # take no chances and rewrite it.
17707  # Note: m4 eats our [], so we need to use [ and ] instead.
17708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17709  if test "x$has_forbidden_chars" != x; then
17710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17714      # Going to short mode and back again did indeed matter. Since short mode is
17715      # case insensitive, let's make it lowercase to improve readability.
17716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17717      # Now convert it back to Unix-style (cygpath)
17718      input_path=`$CYGPATH -u "$shortmode_path"`
17719      new_path="$input_path"
17720    fi
17721  fi
17722
17723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17724  if test "x$test_cygdrive_prefix" = x; then
17725    # As a simple fix, exclude /usr/bin since it's not a real path.
17726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17728      # a path prefixed by /cygdrive for fixpath to work.
17729      new_path="$CYGWIN_ROOT_PATH$input_path"
17730    fi
17731  fi
17732
17733  # remove trailing .exe if any
17734  new_path="${new_path/%.exe/}"
17735
17736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17737
17738  # First separate the path from the arguments. This will split at the first
17739  # space.
17740  complete="$FOUND_MAKE"
17741  path="${complete%% *}"
17742  tmp="$complete EOL"
17743  arguments="${tmp#* }"
17744
17745  # Input might be given as Windows format, start by converting to
17746  # unix format.
17747  new_path="$path"
17748
17749  windows_path="$new_path"
17750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17751    unix_path=`$CYGPATH -u "$windows_path"`
17752    new_path="$unix_path"
17753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17755    new_path="$unix_path"
17756  fi
17757
17758
17759  # Now try to locate executable using which
17760  new_path=`$WHICH "$new_path" 2> /dev/null`
17761
17762  if test "x$new_path" = x; then
17763    # Oops. Which didn't find the executable.
17764    # The splitting of arguments from the executable at a space might have been incorrect,
17765    # since paths with space are more likely in Windows. Give it another try with the whole
17766    # argument.
17767    path="$complete"
17768    arguments="EOL"
17769    new_path="$path"
17770
17771  windows_path="$new_path"
17772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17773    unix_path=`$CYGPATH -u "$windows_path"`
17774    new_path="$unix_path"
17775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17777    new_path="$unix_path"
17778  fi
17779
17780
17781    new_path=`$WHICH "$new_path" 2> /dev/null`
17782    # bat and cmd files are not always considered executable in MSYS causing which
17783    # to not find them
17784    if test "x$new_path" = x \
17785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17787      new_path="$path"
17788
17789  windows_path="$new_path"
17790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17791    unix_path=`$CYGPATH -u "$windows_path"`
17792    new_path="$unix_path"
17793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17795    new_path="$unix_path"
17796  fi
17797
17798    fi
17799
17800    if test "x$new_path" = x; then
17801      # It's still not found. Now this is an unrecoverable error.
17802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17803$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17804      has_space=`$ECHO "$complete" | $GREP " "`
17805      if test "x$has_space" != x; then
17806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17808      fi
17809      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17810    fi
17811  fi
17812
17813  # Now new_path has a complete unix path to the binary
17814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17815    # Keep paths in /bin as-is, but remove trailing .exe if any
17816    new_path="${new_path/%.exe/}"
17817    # Do not save /bin paths to all_fixpath_prefixes!
17818  else
17819    # Not in mixed or Windows style, start by that.
17820    new_path=`cmd //c echo $new_path`
17821
17822  input_path="$new_path"
17823  # Check if we need to convert this using DOS-style short mode. If the path
17824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17825  # take no chances and rewrite it.
17826  # Note: m4 eats our [], so we need to use [ and ] instead.
17827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17828  if test "x$has_forbidden_chars" != x; then
17829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17831  fi
17832
17833    # Output is in $new_path
17834
17835  windows_path="$new_path"
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837    unix_path=`$CYGPATH -u "$windows_path"`
17838    new_path="$unix_path"
17839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17841    new_path="$unix_path"
17842  fi
17843
17844    # remove trailing .exe if any
17845    new_path="${new_path/%.exe/}"
17846
17847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17849  fi
17850
17851    else
17852      # We're on a unix platform. Hooray! :)
17853      # First separate the path from the arguments. This will split at the first
17854      # space.
17855      complete="$FOUND_MAKE"
17856      path="${complete%% *}"
17857      tmp="$complete EOL"
17858      arguments="${tmp#* }"
17859
17860      # Cannot rely on the command "which" here since it doesn't always work.
17861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17862      if test -z "$is_absolute_path"; then
17863        # Path to executable is not absolute. Find it.
17864        IFS_save="$IFS"
17865        IFS=:
17866        for p in $PATH; do
17867          if test -f "$p/$path" && test -x "$p/$path"; then
17868            new_path="$p/$path"
17869            break
17870          fi
17871        done
17872        IFS="$IFS_save"
17873      else
17874        # This is an absolute path, we can use it without further modifications.
17875        new_path="$path"
17876      fi
17877
17878      if test "x$new_path" = x; then
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17880$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17881        has_space=`$ECHO "$complete" | $GREP " "`
17882        if test "x$has_space" != x; then
17883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17885        fi
17886        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17887      fi
17888    fi
17889
17890    # Now join together the path and the arguments once again
17891    if test "x$arguments" != xEOL; then
17892      new_complete="$new_path ${arguments% *}"
17893    else
17894      new_complete="$new_path"
17895    fi
17896
17897    if test "x$complete" != "x$new_complete"; then
17898      FOUND_MAKE="$new_complete"
17899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17900$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17901    fi
17902  fi
17903
17904        fi
17905      fi
17906    fi
17907  fi
17908
17909        if test "x$FOUND_MAKE" = x; then
17910          for ac_prog in make
17911do
17912  # Extract the first word of "$ac_prog", so it can be a program name with args.
17913set dummy $ac_prog; ac_word=$2
17914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17915$as_echo_n "checking for $ac_word... " >&6; }
17916if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17917  $as_echo_n "(cached) " >&6
17918else
17919  case $CHECK_TOOLSDIR_MAKE in
17920  [\\/]* | ?:[\\/]*)
17921  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17922  ;;
17923  *)
17924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17925for as_dir in $PATH
17926do
17927  IFS=$as_save_IFS
17928  test -z "$as_dir" && as_dir=.
17929    for ac_exec_ext in '' $ac_executable_extensions; do
17930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17931    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17933    break 2
17934  fi
17935done
17936  done
17937IFS=$as_save_IFS
17938
17939  ;;
17940esac
17941fi
17942CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17943if test -n "$CHECK_TOOLSDIR_MAKE"; then
17944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17945$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17946else
17947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17948$as_echo "no" >&6; }
17949fi
17950
17951
17952  test -n "$CHECK_TOOLSDIR_MAKE" && break
17953done
17954
17955
17956  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17957  DESCRIPTION="make in tools-dir"
17958
17959  # On Cygwin, we require a newer version of make than on other platforms
17960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17961    MAKE_VERSION_EXPR="-e 4\."
17962    MAKE_REQUIRED_VERSION="4.0"
17963   else
17964    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17965    MAKE_REQUIRED_VERSION="3.81"
17966  fi
17967
17968  if test "x$MAKE_CANDIDATE" != x; then
17969    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17970$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17971    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17972    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17973    if test "x$IS_GNU_MAKE" = x; then
17974      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17975$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17976    else
17977      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17978      if test "x$IS_MODERN_MAKE" = x; then
17979        { $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
17980$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;}
17981      else
17982        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17983          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17984            MAKE_EXPECTED_ENV='cygwin'
17985          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17986            MAKE_EXPECTED_ENV='msys'
17987          else
17988            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17989          fi
17990          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17991          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17992        else
17993          # Not relevant for non-Windows
17994          IS_MAKE_CORRECT_ENV=true
17995        fi
17996        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17997          { $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
17998$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;}
17999        else
18000          FOUND_MAKE=$MAKE_CANDIDATE
18001
18002  # Only process if variable expands to non-empty
18003
18004  if test "x$FOUND_MAKE" != x; then
18005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18006
18007  # First separate the path from the arguments. This will split at the first
18008  # space.
18009  complete="$FOUND_MAKE"
18010  path="${complete%% *}"
18011  tmp="$complete EOL"
18012  arguments="${tmp#* }"
18013
18014  # Input might be given as Windows format, start by converting to
18015  # unix format.
18016  new_path=`$CYGPATH -u "$path"`
18017
18018  # Now try to locate executable using which
18019  new_path=`$WHICH "$new_path" 2> /dev/null`
18020  # bat and cmd files are not always considered executable in cygwin causing which
18021  # to not find them
18022  if test "x$new_path" = x \
18023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18025    new_path=`$CYGPATH -u "$path"`
18026  fi
18027  if test "x$new_path" = x; then
18028    # Oops. Which didn't find the executable.
18029    # The splitting of arguments from the executable at a space might have been incorrect,
18030    # since paths with space are more likely in Windows. Give it another try with the whole
18031    # argument.
18032    path="$complete"
18033    arguments="EOL"
18034    new_path=`$CYGPATH -u "$path"`
18035    new_path=`$WHICH "$new_path" 2> /dev/null`
18036    # bat and cmd files are not always considered executable in cygwin causing which
18037    # to not find them
18038    if test "x$new_path" = x \
18039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18041      new_path=`$CYGPATH -u "$path"`
18042    fi
18043    if test "x$new_path" = x; then
18044      # It's still not found. Now this is an unrecoverable error.
18045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18046$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18047      has_space=`$ECHO "$complete" | $GREP " "`
18048      if test "x$has_space" != x; then
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18051      fi
18052      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18053    fi
18054  fi
18055
18056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18059  # "foo.exe" is OK but "foo" is an error.
18060  #
18061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18062  # It is also a way to make sure we got the proper file name for the real test later on.
18063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18064  if test "x$test_shortpath" = x; then
18065    # Short path failed, file does not exist as specified.
18066    # Try adding .exe or .cmd
18067    if test -f "${new_path}.exe"; then
18068      input_to_shortpath="${new_path}.exe"
18069    elif test -f "${new_path}.cmd"; then
18070      input_to_shortpath="${new_path}.cmd"
18071    else
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18073$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18076      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18077    fi
18078  else
18079    input_to_shortpath="$new_path"
18080  fi
18081
18082  # Call helper function which possibly converts this using DOS-style short mode.
18083  # If so, the updated path is stored in $new_path.
18084  new_path="$input_to_shortpath"
18085
18086  input_path="$input_to_shortpath"
18087  # Check if we need to convert this using DOS-style short mode. If the path
18088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18089  # take no chances and rewrite it.
18090  # Note: m4 eats our [], so we need to use [ and ] instead.
18091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18092  if test "x$has_forbidden_chars" != x; then
18093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18097      # Going to short mode and back again did indeed matter. Since short mode is
18098      # case insensitive, let's make it lowercase to improve readability.
18099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18100      # Now convert it back to Unix-style (cygpath)
18101      input_path=`$CYGPATH -u "$shortmode_path"`
18102      new_path="$input_path"
18103    fi
18104  fi
18105
18106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18107  if test "x$test_cygdrive_prefix" = x; then
18108    # As a simple fix, exclude /usr/bin since it's not a real path.
18109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18111      # a path prefixed by /cygdrive for fixpath to work.
18112      new_path="$CYGWIN_ROOT_PATH$input_path"
18113    fi
18114  fi
18115
18116  # remove trailing .exe if any
18117  new_path="${new_path/%.exe/}"
18118
18119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120
18121  # First separate the path from the arguments. This will split at the first
18122  # space.
18123  complete="$FOUND_MAKE"
18124  path="${complete%% *}"
18125  tmp="$complete EOL"
18126  arguments="${tmp#* }"
18127
18128  # Input might be given as Windows format, start by converting to
18129  # unix format.
18130  new_path="$path"
18131
18132  windows_path="$new_path"
18133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18134    unix_path=`$CYGPATH -u "$windows_path"`
18135    new_path="$unix_path"
18136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18138    new_path="$unix_path"
18139  fi
18140
18141
18142  # Now try to locate executable using which
18143  new_path=`$WHICH "$new_path" 2> /dev/null`
18144
18145  if test "x$new_path" = x; then
18146    # Oops. Which didn't find the executable.
18147    # The splitting of arguments from the executable at a space might have been incorrect,
18148    # since paths with space are more likely in Windows. Give it another try with the whole
18149    # argument.
18150    path="$complete"
18151    arguments="EOL"
18152    new_path="$path"
18153
18154  windows_path="$new_path"
18155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18156    unix_path=`$CYGPATH -u "$windows_path"`
18157    new_path="$unix_path"
18158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18160    new_path="$unix_path"
18161  fi
18162
18163
18164    new_path=`$WHICH "$new_path" 2> /dev/null`
18165    # bat and cmd files are not always considered executable in MSYS causing which
18166    # to not find them
18167    if test "x$new_path" = x \
18168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18170      new_path="$path"
18171
18172  windows_path="$new_path"
18173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18174    unix_path=`$CYGPATH -u "$windows_path"`
18175    new_path="$unix_path"
18176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18178    new_path="$unix_path"
18179  fi
18180
18181    fi
18182
18183    if test "x$new_path" = x; then
18184      # It's still not found. Now this is an unrecoverable error.
18185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18186$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18187      has_space=`$ECHO "$complete" | $GREP " "`
18188      if test "x$has_space" != x; then
18189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18191      fi
18192      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18193    fi
18194  fi
18195
18196  # Now new_path has a complete unix path to the binary
18197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18198    # Keep paths in /bin as-is, but remove trailing .exe if any
18199    new_path="${new_path/%.exe/}"
18200    # Do not save /bin paths to all_fixpath_prefixes!
18201  else
18202    # Not in mixed or Windows style, start by that.
18203    new_path=`cmd //c echo $new_path`
18204
18205  input_path="$new_path"
18206  # Check if we need to convert this using DOS-style short mode. If the path
18207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18208  # take no chances and rewrite it.
18209  # Note: m4 eats our [], so we need to use [ and ] instead.
18210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18211  if test "x$has_forbidden_chars" != x; then
18212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18214  fi
18215
18216    # Output is in $new_path
18217
18218  windows_path="$new_path"
18219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18220    unix_path=`$CYGPATH -u "$windows_path"`
18221    new_path="$unix_path"
18222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18224    new_path="$unix_path"
18225  fi
18226
18227    # remove trailing .exe if any
18228    new_path="${new_path/%.exe/}"
18229
18230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18232  fi
18233
18234    else
18235      # We're on a unix platform. Hooray! :)
18236      # First separate the path from the arguments. This will split at the first
18237      # space.
18238      complete="$FOUND_MAKE"
18239      path="${complete%% *}"
18240      tmp="$complete EOL"
18241      arguments="${tmp#* }"
18242
18243      # Cannot rely on the command "which" here since it doesn't always work.
18244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18245      if test -z "$is_absolute_path"; then
18246        # Path to executable is not absolute. Find it.
18247        IFS_save="$IFS"
18248        IFS=:
18249        for p in $PATH; do
18250          if test -f "$p/$path" && test -x "$p/$path"; then
18251            new_path="$p/$path"
18252            break
18253          fi
18254        done
18255        IFS="$IFS_save"
18256      else
18257        # This is an absolute path, we can use it without further modifications.
18258        new_path="$path"
18259      fi
18260
18261      if test "x$new_path" = x; then
18262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18264        has_space=`$ECHO "$complete" | $GREP " "`
18265        if test "x$has_space" != x; then
18266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18268        fi
18269        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18270      fi
18271    fi
18272
18273    # Now join together the path and the arguments once again
18274    if test "x$arguments" != xEOL; then
18275      new_complete="$new_path ${arguments% *}"
18276    else
18277      new_complete="$new_path"
18278    fi
18279
18280    if test "x$complete" != "x$new_complete"; then
18281      FOUND_MAKE="$new_complete"
18282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18283$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18284    fi
18285  fi
18286
18287        fi
18288      fi
18289    fi
18290  fi
18291
18292        fi
18293        PATH=$OLD_PATH
18294      fi
18295    fi
18296
18297    if test "x$FOUND_MAKE" = x; then
18298      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
18299    fi
18300
18301  else
18302    # The variable is set, but is it from the command line or the environment?
18303
18304    # Try to remove the string !MAKE! from our list.
18305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18307      # If it failed, the variable was not from the command line. Ignore it,
18308      # but warn the user (except for BASH, which is always set by the calling BASH).
18309      if test "xMAKE" != xBASH; then
18310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18311$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18312      fi
18313      # Try to locate tool using the code snippet
18314
18315    # Try our hardest to locate a correct version of GNU make
18316    for ac_prog in gmake
18317do
18318  # Extract the first word of "$ac_prog", so it can be a program name with args.
18319set dummy $ac_prog; ac_word=$2
18320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18321$as_echo_n "checking for $ac_word... " >&6; }
18322if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18323  $as_echo_n "(cached) " >&6
18324else
18325  case $CHECK_GMAKE in
18326  [\\/]* | ?:[\\/]*)
18327  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18328  ;;
18329  *)
18330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18331for as_dir in $PATH
18332do
18333  IFS=$as_save_IFS
18334  test -z "$as_dir" && as_dir=.
18335    for ac_exec_ext in '' $ac_executable_extensions; do
18336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18337    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18339    break 2
18340  fi
18341done
18342  done
18343IFS=$as_save_IFS
18344
18345  ;;
18346esac
18347fi
18348CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18349if test -n "$CHECK_GMAKE"; then
18350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18351$as_echo "$CHECK_GMAKE" >&6; }
18352else
18353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18354$as_echo "no" >&6; }
18355fi
18356
18357
18358  test -n "$CHECK_GMAKE" && break
18359done
18360
18361
18362  MAKE_CANDIDATE=""$CHECK_GMAKE""
18363  DESCRIPTION="gmake in PATH"
18364
18365  # On Cygwin, we require a newer version of make than on other platforms
18366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18367    MAKE_VERSION_EXPR="-e 4\."
18368    MAKE_REQUIRED_VERSION="4.0"
18369   else
18370    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18371    MAKE_REQUIRED_VERSION="3.81"
18372  fi
18373
18374  if test "x$MAKE_CANDIDATE" != x; then
18375    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18376$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18377    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18378    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18379    if test "x$IS_GNU_MAKE" = x; then
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18381$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18382    else
18383      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18384      if test "x$IS_MODERN_MAKE" = x; then
18385        { $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
18386$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;}
18387      else
18388        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18389          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18390            MAKE_EXPECTED_ENV='cygwin'
18391          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18392            MAKE_EXPECTED_ENV='msys'
18393          else
18394            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18395          fi
18396          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18397          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18398        else
18399          # Not relevant for non-Windows
18400          IS_MAKE_CORRECT_ENV=true
18401        fi
18402        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18403          { $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
18404$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;}
18405        else
18406          FOUND_MAKE=$MAKE_CANDIDATE
18407
18408  # Only process if variable expands to non-empty
18409
18410  if test "x$FOUND_MAKE" != x; then
18411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18412
18413  # First separate the path from the arguments. This will split at the first
18414  # space.
18415  complete="$FOUND_MAKE"
18416  path="${complete%% *}"
18417  tmp="$complete EOL"
18418  arguments="${tmp#* }"
18419
18420  # Input might be given as Windows format, start by converting to
18421  # unix format.
18422  new_path=`$CYGPATH -u "$path"`
18423
18424  # Now try to locate executable using which
18425  new_path=`$WHICH "$new_path" 2> /dev/null`
18426  # bat and cmd files are not always considered executable in cygwin causing which
18427  # to not find them
18428  if test "x$new_path" = x \
18429      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18430      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18431    new_path=`$CYGPATH -u "$path"`
18432  fi
18433  if test "x$new_path" = x; then
18434    # Oops. Which didn't find the executable.
18435    # The splitting of arguments from the executable at a space might have been incorrect,
18436    # since paths with space are more likely in Windows. Give it another try with the whole
18437    # argument.
18438    path="$complete"
18439    arguments="EOL"
18440    new_path=`$CYGPATH -u "$path"`
18441    new_path=`$WHICH "$new_path" 2> /dev/null`
18442    # bat and cmd files are not always considered executable in cygwin causing which
18443    # to not find them
18444    if test "x$new_path" = x \
18445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18447      new_path=`$CYGPATH -u "$path"`
18448    fi
18449    if test "x$new_path" = x; then
18450      # It's still not found. Now this is an unrecoverable error.
18451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18453      has_space=`$ECHO "$complete" | $GREP " "`
18454      if test "x$has_space" != x; then
18455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18457      fi
18458      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18459    fi
18460  fi
18461
18462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18465  # "foo.exe" is OK but "foo" is an error.
18466  #
18467  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18468  # It is also a way to make sure we got the proper file name for the real test later on.
18469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18470  if test "x$test_shortpath" = x; then
18471    # Short path failed, file does not exist as specified.
18472    # Try adding .exe or .cmd
18473    if test -f "${new_path}.exe"; then
18474      input_to_shortpath="${new_path}.exe"
18475    elif test -f "${new_path}.cmd"; then
18476      input_to_shortpath="${new_path}.cmd"
18477    else
18478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18479$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18480      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18481$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18482      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18483    fi
18484  else
18485    input_to_shortpath="$new_path"
18486  fi
18487
18488  # Call helper function which possibly converts this using DOS-style short mode.
18489  # If so, the updated path is stored in $new_path.
18490  new_path="$input_to_shortpath"
18491
18492  input_path="$input_to_shortpath"
18493  # Check if we need to convert this using DOS-style short mode. If the path
18494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18495  # take no chances and rewrite it.
18496  # Note: m4 eats our [], so we need to use [ and ] instead.
18497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18498  if test "x$has_forbidden_chars" != x; then
18499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18503      # Going to short mode and back again did indeed matter. Since short mode is
18504      # case insensitive, let's make it lowercase to improve readability.
18505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18506      # Now convert it back to Unix-style (cygpath)
18507      input_path=`$CYGPATH -u "$shortmode_path"`
18508      new_path="$input_path"
18509    fi
18510  fi
18511
18512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18513  if test "x$test_cygdrive_prefix" = x; then
18514    # As a simple fix, exclude /usr/bin since it's not a real path.
18515    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18517      # a path prefixed by /cygdrive for fixpath to work.
18518      new_path="$CYGWIN_ROOT_PATH$input_path"
18519    fi
18520  fi
18521
18522  # remove trailing .exe if any
18523  new_path="${new_path/%.exe/}"
18524
18525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18526
18527  # First separate the path from the arguments. This will split at the first
18528  # space.
18529  complete="$FOUND_MAKE"
18530  path="${complete%% *}"
18531  tmp="$complete EOL"
18532  arguments="${tmp#* }"
18533
18534  # Input might be given as Windows format, start by converting to
18535  # unix format.
18536  new_path="$path"
18537
18538  windows_path="$new_path"
18539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18540    unix_path=`$CYGPATH -u "$windows_path"`
18541    new_path="$unix_path"
18542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18544    new_path="$unix_path"
18545  fi
18546
18547
18548  # Now try to locate executable using which
18549  new_path=`$WHICH "$new_path" 2> /dev/null`
18550
18551  if test "x$new_path" = x; then
18552    # Oops. Which didn't find the executable.
18553    # The splitting of arguments from the executable at a space might have been incorrect,
18554    # since paths with space are more likely in Windows. Give it another try with the whole
18555    # argument.
18556    path="$complete"
18557    arguments="EOL"
18558    new_path="$path"
18559
18560  windows_path="$new_path"
18561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18562    unix_path=`$CYGPATH -u "$windows_path"`
18563    new_path="$unix_path"
18564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18566    new_path="$unix_path"
18567  fi
18568
18569
18570    new_path=`$WHICH "$new_path" 2> /dev/null`
18571    # bat and cmd files are not always considered executable in MSYS causing which
18572    # to not find them
18573    if test "x$new_path" = x \
18574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18576      new_path="$path"
18577
18578  windows_path="$new_path"
18579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18580    unix_path=`$CYGPATH -u "$windows_path"`
18581    new_path="$unix_path"
18582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18584    new_path="$unix_path"
18585  fi
18586
18587    fi
18588
18589    if test "x$new_path" = x; then
18590      # It's still not found. Now this is an unrecoverable error.
18591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18593      has_space=`$ECHO "$complete" | $GREP " "`
18594      if test "x$has_space" != x; then
18595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18597      fi
18598      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18599    fi
18600  fi
18601
18602  # Now new_path has a complete unix path to the binary
18603  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18604    # Keep paths in /bin as-is, but remove trailing .exe if any
18605    new_path="${new_path/%.exe/}"
18606    # Do not save /bin paths to all_fixpath_prefixes!
18607  else
18608    # Not in mixed or Windows style, start by that.
18609    new_path=`cmd //c echo $new_path`
18610
18611  input_path="$new_path"
18612  # Check if we need to convert this using DOS-style short mode. If the path
18613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18614  # take no chances and rewrite it.
18615  # Note: m4 eats our [], so we need to use [ and ] instead.
18616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18617  if test "x$has_forbidden_chars" != x; then
18618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18620  fi
18621
18622    # Output is in $new_path
18623
18624  windows_path="$new_path"
18625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626    unix_path=`$CYGPATH -u "$windows_path"`
18627    new_path="$unix_path"
18628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18630    new_path="$unix_path"
18631  fi
18632
18633    # remove trailing .exe if any
18634    new_path="${new_path/%.exe/}"
18635
18636    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18637    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18638  fi
18639
18640    else
18641      # We're on a unix platform. Hooray! :)
18642      # First separate the path from the arguments. This will split at the first
18643      # space.
18644      complete="$FOUND_MAKE"
18645      path="${complete%% *}"
18646      tmp="$complete EOL"
18647      arguments="${tmp#* }"
18648
18649      # Cannot rely on the command "which" here since it doesn't always work.
18650      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18651      if test -z "$is_absolute_path"; then
18652        # Path to executable is not absolute. Find it.
18653        IFS_save="$IFS"
18654        IFS=:
18655        for p in $PATH; do
18656          if test -f "$p/$path" && test -x "$p/$path"; then
18657            new_path="$p/$path"
18658            break
18659          fi
18660        done
18661        IFS="$IFS_save"
18662      else
18663        # This is an absolute path, we can use it without further modifications.
18664        new_path="$path"
18665      fi
18666
18667      if test "x$new_path" = x; then
18668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18670        has_space=`$ECHO "$complete" | $GREP " "`
18671        if test "x$has_space" != x; then
18672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18674        fi
18675        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18676      fi
18677    fi
18678
18679    # Now join together the path and the arguments once again
18680    if test "x$arguments" != xEOL; then
18681      new_complete="$new_path ${arguments% *}"
18682    else
18683      new_complete="$new_path"
18684    fi
18685
18686    if test "x$complete" != "x$new_complete"; then
18687      FOUND_MAKE="$new_complete"
18688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18689$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18690    fi
18691  fi
18692
18693        fi
18694      fi
18695    fi
18696  fi
18697
18698
18699    if test "x$FOUND_MAKE" = x; then
18700      for ac_prog in make
18701do
18702  # Extract the first word of "$ac_prog", so it can be a program name with args.
18703set dummy $ac_prog; ac_word=$2
18704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18705$as_echo_n "checking for $ac_word... " >&6; }
18706if ${ac_cv_path_CHECK_MAKE+:} false; then :
18707  $as_echo_n "(cached) " >&6
18708else
18709  case $CHECK_MAKE in
18710  [\\/]* | ?:[\\/]*)
18711  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18712  ;;
18713  *)
18714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18715for as_dir in $PATH
18716do
18717  IFS=$as_save_IFS
18718  test -z "$as_dir" && as_dir=.
18719    for ac_exec_ext in '' $ac_executable_extensions; do
18720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18721    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18723    break 2
18724  fi
18725done
18726  done
18727IFS=$as_save_IFS
18728
18729  ;;
18730esac
18731fi
18732CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18733if test -n "$CHECK_MAKE"; then
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18735$as_echo "$CHECK_MAKE" >&6; }
18736else
18737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18738$as_echo "no" >&6; }
18739fi
18740
18741
18742  test -n "$CHECK_MAKE" && break
18743done
18744
18745
18746  MAKE_CANDIDATE=""$CHECK_MAKE""
18747  DESCRIPTION="make in PATH"
18748
18749  # On Cygwin, we require a newer version of make than on other platforms
18750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18751    MAKE_VERSION_EXPR="-e 4\."
18752    MAKE_REQUIRED_VERSION="4.0"
18753   else
18754    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18755    MAKE_REQUIRED_VERSION="3.81"
18756  fi
18757
18758  if test "x$MAKE_CANDIDATE" != x; then
18759    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18760$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18761    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18762    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18763    if test "x$IS_GNU_MAKE" = x; then
18764      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18765$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18766    else
18767      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18768      if test "x$IS_MODERN_MAKE" = x; then
18769        { $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
18770$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;}
18771      else
18772        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18773          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18774            MAKE_EXPECTED_ENV='cygwin'
18775          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18776            MAKE_EXPECTED_ENV='msys'
18777          else
18778            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18779          fi
18780          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18781          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18782        else
18783          # Not relevant for non-Windows
18784          IS_MAKE_CORRECT_ENV=true
18785        fi
18786        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18787          { $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
18788$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;}
18789        else
18790          FOUND_MAKE=$MAKE_CANDIDATE
18791
18792  # Only process if variable expands to non-empty
18793
18794  if test "x$FOUND_MAKE" != x; then
18795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18796
18797  # First separate the path from the arguments. This will split at the first
18798  # space.
18799  complete="$FOUND_MAKE"
18800  path="${complete%% *}"
18801  tmp="$complete EOL"
18802  arguments="${tmp#* }"
18803
18804  # Input might be given as Windows format, start by converting to
18805  # unix format.
18806  new_path=`$CYGPATH -u "$path"`
18807
18808  # Now try to locate executable using which
18809  new_path=`$WHICH "$new_path" 2> /dev/null`
18810  # bat and cmd files are not always considered executable in cygwin causing which
18811  # to not find them
18812  if test "x$new_path" = x \
18813      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18814      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18815    new_path=`$CYGPATH -u "$path"`
18816  fi
18817  if test "x$new_path" = x; then
18818    # Oops. Which didn't find the executable.
18819    # The splitting of arguments from the executable at a space might have been incorrect,
18820    # since paths with space are more likely in Windows. Give it another try with the whole
18821    # argument.
18822    path="$complete"
18823    arguments="EOL"
18824    new_path=`$CYGPATH -u "$path"`
18825    new_path=`$WHICH "$new_path" 2> /dev/null`
18826    # bat and cmd files are not always considered executable in cygwin causing which
18827    # to not find them
18828    if test "x$new_path" = x \
18829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18831      new_path=`$CYGPATH -u "$path"`
18832    fi
18833    if test "x$new_path" = x; then
18834      # It's still not found. Now this is an unrecoverable error.
18835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18836$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18837      has_space=`$ECHO "$complete" | $GREP " "`
18838      if test "x$has_space" != x; then
18839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18841      fi
18842      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18843    fi
18844  fi
18845
18846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18849  # "foo.exe" is OK but "foo" is an error.
18850  #
18851  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18852  # It is also a way to make sure we got the proper file name for the real test later on.
18853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18854  if test "x$test_shortpath" = x; then
18855    # Short path failed, file does not exist as specified.
18856    # Try adding .exe or .cmd
18857    if test -f "${new_path}.exe"; then
18858      input_to_shortpath="${new_path}.exe"
18859    elif test -f "${new_path}.cmd"; then
18860      input_to_shortpath="${new_path}.cmd"
18861    else
18862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18864      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18865$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18867    fi
18868  else
18869    input_to_shortpath="$new_path"
18870  fi
18871
18872  # Call helper function which possibly converts this using DOS-style short mode.
18873  # If so, the updated path is stored in $new_path.
18874  new_path="$input_to_shortpath"
18875
18876  input_path="$input_to_shortpath"
18877  # Check if we need to convert this using DOS-style short mode. If the path
18878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18879  # take no chances and rewrite it.
18880  # Note: m4 eats our [], so we need to use [ and ] instead.
18881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18882  if test "x$has_forbidden_chars" != x; then
18883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18887      # Going to short mode and back again did indeed matter. Since short mode is
18888      # case insensitive, let's make it lowercase to improve readability.
18889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18890      # Now convert it back to Unix-style (cygpath)
18891      input_path=`$CYGPATH -u "$shortmode_path"`
18892      new_path="$input_path"
18893    fi
18894  fi
18895
18896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18897  if test "x$test_cygdrive_prefix" = x; then
18898    # As a simple fix, exclude /usr/bin since it's not a real path.
18899    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18901      # a path prefixed by /cygdrive for fixpath to work.
18902      new_path="$CYGWIN_ROOT_PATH$input_path"
18903    fi
18904  fi
18905
18906  # remove trailing .exe if any
18907  new_path="${new_path/%.exe/}"
18908
18909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18910
18911  # First separate the path from the arguments. This will split at the first
18912  # space.
18913  complete="$FOUND_MAKE"
18914  path="${complete%% *}"
18915  tmp="$complete EOL"
18916  arguments="${tmp#* }"
18917
18918  # Input might be given as Windows format, start by converting to
18919  # unix format.
18920  new_path="$path"
18921
18922  windows_path="$new_path"
18923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18924    unix_path=`$CYGPATH -u "$windows_path"`
18925    new_path="$unix_path"
18926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18928    new_path="$unix_path"
18929  fi
18930
18931
18932  # Now try to locate executable using which
18933  new_path=`$WHICH "$new_path" 2> /dev/null`
18934
18935  if test "x$new_path" = x; then
18936    # Oops. Which didn't find the executable.
18937    # The splitting of arguments from the executable at a space might have been incorrect,
18938    # since paths with space are more likely in Windows. Give it another try with the whole
18939    # argument.
18940    path="$complete"
18941    arguments="EOL"
18942    new_path="$path"
18943
18944  windows_path="$new_path"
18945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18946    unix_path=`$CYGPATH -u "$windows_path"`
18947    new_path="$unix_path"
18948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18950    new_path="$unix_path"
18951  fi
18952
18953
18954    new_path=`$WHICH "$new_path" 2> /dev/null`
18955    # bat and cmd files are not always considered executable in MSYS causing which
18956    # to not find them
18957    if test "x$new_path" = x \
18958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18960      new_path="$path"
18961
18962  windows_path="$new_path"
18963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18964    unix_path=`$CYGPATH -u "$windows_path"`
18965    new_path="$unix_path"
18966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18968    new_path="$unix_path"
18969  fi
18970
18971    fi
18972
18973    if test "x$new_path" = x; then
18974      # It's still not found. Now this is an unrecoverable error.
18975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18977      has_space=`$ECHO "$complete" | $GREP " "`
18978      if test "x$has_space" != x; then
18979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18981      fi
18982      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18983    fi
18984  fi
18985
18986  # Now new_path has a complete unix path to the binary
18987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18988    # Keep paths in /bin as-is, but remove trailing .exe if any
18989    new_path="${new_path/%.exe/}"
18990    # Do not save /bin paths to all_fixpath_prefixes!
18991  else
18992    # Not in mixed or Windows style, start by that.
18993    new_path=`cmd //c echo $new_path`
18994
18995  input_path="$new_path"
18996  # Check if we need to convert this using DOS-style short mode. If the path
18997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18998  # take no chances and rewrite it.
18999  # Note: m4 eats our [], so we need to use [ and ] instead.
19000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19001  if test "x$has_forbidden_chars" != x; then
19002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19004  fi
19005
19006    # Output is in $new_path
19007
19008  windows_path="$new_path"
19009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19010    unix_path=`$CYGPATH -u "$windows_path"`
19011    new_path="$unix_path"
19012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19014    new_path="$unix_path"
19015  fi
19016
19017    # remove trailing .exe if any
19018    new_path="${new_path/%.exe/}"
19019
19020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19022  fi
19023
19024    else
19025      # We're on a unix platform. Hooray! :)
19026      # First separate the path from the arguments. This will split at the first
19027      # space.
19028      complete="$FOUND_MAKE"
19029      path="${complete%% *}"
19030      tmp="$complete EOL"
19031      arguments="${tmp#* }"
19032
19033      # Cannot rely on the command "which" here since it doesn't always work.
19034      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19035      if test -z "$is_absolute_path"; then
19036        # Path to executable is not absolute. Find it.
19037        IFS_save="$IFS"
19038        IFS=:
19039        for p in $PATH; do
19040          if test -f "$p/$path" && test -x "$p/$path"; then
19041            new_path="$p/$path"
19042            break
19043          fi
19044        done
19045        IFS="$IFS_save"
19046      else
19047        # This is an absolute path, we can use it without further modifications.
19048        new_path="$path"
19049      fi
19050
19051      if test "x$new_path" = x; then
19052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19054        has_space=`$ECHO "$complete" | $GREP " "`
19055        if test "x$has_space" != x; then
19056          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19058        fi
19059        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19060      fi
19061    fi
19062
19063    # Now join together the path and the arguments once again
19064    if test "x$arguments" != xEOL; then
19065      new_complete="$new_path ${arguments% *}"
19066    else
19067      new_complete="$new_path"
19068    fi
19069
19070    if test "x$complete" != "x$new_complete"; then
19071      FOUND_MAKE="$new_complete"
19072      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19073$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19074    fi
19075  fi
19076
19077        fi
19078      fi
19079    fi
19080  fi
19081
19082    fi
19083
19084    if test "x$FOUND_MAKE" = x; then
19085      if test "x$TOOLCHAIN_PATH" != x; then
19086        # We have a toolchain path, check that as well before giving up.
19087        OLD_PATH=$PATH
19088        PATH=$TOOLCHAIN_PATH:$PATH
19089        for ac_prog in gmake
19090do
19091  # Extract the first word of "$ac_prog", so it can be a program name with args.
19092set dummy $ac_prog; ac_word=$2
19093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19094$as_echo_n "checking for $ac_word... " >&6; }
19095if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19096  $as_echo_n "(cached) " >&6
19097else
19098  case $CHECK_TOOLSDIR_GMAKE in
19099  [\\/]* | ?:[\\/]*)
19100  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19101  ;;
19102  *)
19103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19104for as_dir in $PATH
19105do
19106  IFS=$as_save_IFS
19107  test -z "$as_dir" && as_dir=.
19108    for ac_exec_ext in '' $ac_executable_extensions; do
19109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19110    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19112    break 2
19113  fi
19114done
19115  done
19116IFS=$as_save_IFS
19117
19118  ;;
19119esac
19120fi
19121CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19122if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19124$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19125else
19126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19127$as_echo "no" >&6; }
19128fi
19129
19130
19131  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19132done
19133
19134
19135  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19136  DESCRIPTION="gmake in tools-dir"
19137
19138  # On Cygwin, we require a newer version of make than on other platforms
19139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19140    MAKE_VERSION_EXPR="-e 4\."
19141    MAKE_REQUIRED_VERSION="4.0"
19142   else
19143    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19144    MAKE_REQUIRED_VERSION="3.81"
19145  fi
19146
19147  if test "x$MAKE_CANDIDATE" != x; then
19148    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19149$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19150    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19151    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19152    if test "x$IS_GNU_MAKE" = x; then
19153      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19154$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19155    else
19156      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19157      if test "x$IS_MODERN_MAKE" = x; then
19158        { $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
19159$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;}
19160      else
19161        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19162          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19163            MAKE_EXPECTED_ENV='cygwin'
19164          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19165            MAKE_EXPECTED_ENV='msys'
19166          else
19167            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19168          fi
19169          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19170          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19171        else
19172          # Not relevant for non-Windows
19173          IS_MAKE_CORRECT_ENV=true
19174        fi
19175        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19176          { $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
19177$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;}
19178        else
19179          FOUND_MAKE=$MAKE_CANDIDATE
19180
19181  # Only process if variable expands to non-empty
19182
19183  if test "x$FOUND_MAKE" != x; then
19184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19185
19186  # First separate the path from the arguments. This will split at the first
19187  # space.
19188  complete="$FOUND_MAKE"
19189  path="${complete%% *}"
19190  tmp="$complete EOL"
19191  arguments="${tmp#* }"
19192
19193  # Input might be given as Windows format, start by converting to
19194  # unix format.
19195  new_path=`$CYGPATH -u "$path"`
19196
19197  # Now try to locate executable using which
19198  new_path=`$WHICH "$new_path" 2> /dev/null`
19199  # bat and cmd files are not always considered executable in cygwin causing which
19200  # to not find them
19201  if test "x$new_path" = x \
19202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19204    new_path=`$CYGPATH -u "$path"`
19205  fi
19206  if test "x$new_path" = x; then
19207    # Oops. Which didn't find the executable.
19208    # The splitting of arguments from the executable at a space might have been incorrect,
19209    # since paths with space are more likely in Windows. Give it another try with the whole
19210    # argument.
19211    path="$complete"
19212    arguments="EOL"
19213    new_path=`$CYGPATH -u "$path"`
19214    new_path=`$WHICH "$new_path" 2> /dev/null`
19215    # bat and cmd files are not always considered executable in cygwin causing which
19216    # to not find them
19217    if test "x$new_path" = x \
19218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19220      new_path=`$CYGPATH -u "$path"`
19221    fi
19222    if test "x$new_path" = x; then
19223      # It's still not found. Now this is an unrecoverable error.
19224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19226      has_space=`$ECHO "$complete" | $GREP " "`
19227      if test "x$has_space" != x; then
19228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19230      fi
19231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19232    fi
19233  fi
19234
19235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19238  # "foo.exe" is OK but "foo" is an error.
19239  #
19240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19241  # It is also a way to make sure we got the proper file name for the real test later on.
19242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19243  if test "x$test_shortpath" = x; then
19244    # Short path failed, file does not exist as specified.
19245    # Try adding .exe or .cmd
19246    if test -f "${new_path}.exe"; then
19247      input_to_shortpath="${new_path}.exe"
19248    elif test -f "${new_path}.cmd"; then
19249      input_to_shortpath="${new_path}.cmd"
19250    else
19251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19256    fi
19257  else
19258    input_to_shortpath="$new_path"
19259  fi
19260
19261  # Call helper function which possibly converts this using DOS-style short mode.
19262  # If so, the updated path is stored in $new_path.
19263  new_path="$input_to_shortpath"
19264
19265  input_path="$input_to_shortpath"
19266  # Check if we need to convert this using DOS-style short mode. If the path
19267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19268  # take no chances and rewrite it.
19269  # Note: m4 eats our [], so we need to use [ and ] instead.
19270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19271  if test "x$has_forbidden_chars" != x; then
19272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19276      # Going to short mode and back again did indeed matter. Since short mode is
19277      # case insensitive, let's make it lowercase to improve readability.
19278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19279      # Now convert it back to Unix-style (cygpath)
19280      input_path=`$CYGPATH -u "$shortmode_path"`
19281      new_path="$input_path"
19282    fi
19283  fi
19284
19285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19286  if test "x$test_cygdrive_prefix" = x; then
19287    # As a simple fix, exclude /usr/bin since it's not a real path.
19288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19290      # a path prefixed by /cygdrive for fixpath to work.
19291      new_path="$CYGWIN_ROOT_PATH$input_path"
19292    fi
19293  fi
19294
19295  # remove trailing .exe if any
19296  new_path="${new_path/%.exe/}"
19297
19298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19299
19300  # First separate the path from the arguments. This will split at the first
19301  # space.
19302  complete="$FOUND_MAKE"
19303  path="${complete%% *}"
19304  tmp="$complete EOL"
19305  arguments="${tmp#* }"
19306
19307  # Input might be given as Windows format, start by converting to
19308  # unix format.
19309  new_path="$path"
19310
19311  windows_path="$new_path"
19312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19313    unix_path=`$CYGPATH -u "$windows_path"`
19314    new_path="$unix_path"
19315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19317    new_path="$unix_path"
19318  fi
19319
19320
19321  # Now try to locate executable using which
19322  new_path=`$WHICH "$new_path" 2> /dev/null`
19323
19324  if test "x$new_path" = x; then
19325    # Oops. Which didn't find the executable.
19326    # The splitting of arguments from the executable at a space might have been incorrect,
19327    # since paths with space are more likely in Windows. Give it another try with the whole
19328    # argument.
19329    path="$complete"
19330    arguments="EOL"
19331    new_path="$path"
19332
19333  windows_path="$new_path"
19334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19335    unix_path=`$CYGPATH -u "$windows_path"`
19336    new_path="$unix_path"
19337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19339    new_path="$unix_path"
19340  fi
19341
19342
19343    new_path=`$WHICH "$new_path" 2> /dev/null`
19344    # bat and cmd files are not always considered executable in MSYS causing which
19345    # to not find them
19346    if test "x$new_path" = x \
19347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19349      new_path="$path"
19350
19351  windows_path="$new_path"
19352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19353    unix_path=`$CYGPATH -u "$windows_path"`
19354    new_path="$unix_path"
19355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19357    new_path="$unix_path"
19358  fi
19359
19360    fi
19361
19362    if test "x$new_path" = x; then
19363      # It's still not found. Now this is an unrecoverable error.
19364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19366      has_space=`$ECHO "$complete" | $GREP " "`
19367      if test "x$has_space" != x; then
19368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19370      fi
19371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19372    fi
19373  fi
19374
19375  # Now new_path has a complete unix path to the binary
19376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19377    # Keep paths in /bin as-is, but remove trailing .exe if any
19378    new_path="${new_path/%.exe/}"
19379    # Do not save /bin paths to all_fixpath_prefixes!
19380  else
19381    # Not in mixed or Windows style, start by that.
19382    new_path=`cmd //c echo $new_path`
19383
19384  input_path="$new_path"
19385  # Check if we need to convert this using DOS-style short mode. If the path
19386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19387  # take no chances and rewrite it.
19388  # Note: m4 eats our [], so we need to use [ and ] instead.
19389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19390  if test "x$has_forbidden_chars" != x; then
19391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19393  fi
19394
19395    # Output is in $new_path
19396
19397  windows_path="$new_path"
19398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399    unix_path=`$CYGPATH -u "$windows_path"`
19400    new_path="$unix_path"
19401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19403    new_path="$unix_path"
19404  fi
19405
19406    # remove trailing .exe if any
19407    new_path="${new_path/%.exe/}"
19408
19409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19411  fi
19412
19413    else
19414      # We're on a unix platform. Hooray! :)
19415      # First separate the path from the arguments. This will split at the first
19416      # space.
19417      complete="$FOUND_MAKE"
19418      path="${complete%% *}"
19419      tmp="$complete EOL"
19420      arguments="${tmp#* }"
19421
19422      # Cannot rely on the command "which" here since it doesn't always work.
19423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19424      if test -z "$is_absolute_path"; then
19425        # Path to executable is not absolute. Find it.
19426        IFS_save="$IFS"
19427        IFS=:
19428        for p in $PATH; do
19429          if test -f "$p/$path" && test -x "$p/$path"; then
19430            new_path="$p/$path"
19431            break
19432          fi
19433        done
19434        IFS="$IFS_save"
19435      else
19436        # This is an absolute path, we can use it without further modifications.
19437        new_path="$path"
19438      fi
19439
19440      if test "x$new_path" = x; then
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19443        has_space=`$ECHO "$complete" | $GREP " "`
19444        if test "x$has_space" != x; then
19445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19447        fi
19448        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19449      fi
19450    fi
19451
19452    # Now join together the path and the arguments once again
19453    if test "x$arguments" != xEOL; then
19454      new_complete="$new_path ${arguments% *}"
19455    else
19456      new_complete="$new_path"
19457    fi
19458
19459    if test "x$complete" != "x$new_complete"; then
19460      FOUND_MAKE="$new_complete"
19461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19462$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19463    fi
19464  fi
19465
19466        fi
19467      fi
19468    fi
19469  fi
19470
19471        if test "x$FOUND_MAKE" = x; then
19472          for ac_prog in make
19473do
19474  # Extract the first word of "$ac_prog", so it can be a program name with args.
19475set dummy $ac_prog; ac_word=$2
19476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19477$as_echo_n "checking for $ac_word... " >&6; }
19478if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19479  $as_echo_n "(cached) " >&6
19480else
19481  case $CHECK_TOOLSDIR_MAKE in
19482  [\\/]* | ?:[\\/]*)
19483  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19484  ;;
19485  *)
19486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19487for as_dir in $PATH
19488do
19489  IFS=$as_save_IFS
19490  test -z "$as_dir" && as_dir=.
19491    for ac_exec_ext in '' $ac_executable_extensions; do
19492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19493    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19495    break 2
19496  fi
19497done
19498  done
19499IFS=$as_save_IFS
19500
19501  ;;
19502esac
19503fi
19504CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19505if test -n "$CHECK_TOOLSDIR_MAKE"; then
19506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19507$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19508else
19509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19510$as_echo "no" >&6; }
19511fi
19512
19513
19514  test -n "$CHECK_TOOLSDIR_MAKE" && break
19515done
19516
19517
19518  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19519  DESCRIPTION="make in tools-dir"
19520
19521  # On Cygwin, we require a newer version of make than on other platforms
19522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19523    MAKE_VERSION_EXPR="-e 4\."
19524    MAKE_REQUIRED_VERSION="4.0"
19525   else
19526    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19527    MAKE_REQUIRED_VERSION="3.81"
19528  fi
19529
19530  if test "x$MAKE_CANDIDATE" != x; then
19531    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19532$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19533    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19534    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19535    if test "x$IS_GNU_MAKE" = x; then
19536      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19537$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19538    else
19539      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19540      if test "x$IS_MODERN_MAKE" = x; then
19541        { $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
19542$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;}
19543      else
19544        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19545          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19546            MAKE_EXPECTED_ENV='cygwin'
19547          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19548            MAKE_EXPECTED_ENV='msys'
19549          else
19550            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19551          fi
19552          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19553          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19554        else
19555          # Not relevant for non-Windows
19556          IS_MAKE_CORRECT_ENV=true
19557        fi
19558        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19559          { $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
19560$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;}
19561        else
19562          FOUND_MAKE=$MAKE_CANDIDATE
19563
19564  # Only process if variable expands to non-empty
19565
19566  if test "x$FOUND_MAKE" != x; then
19567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19568
19569  # First separate the path from the arguments. This will split at the first
19570  # space.
19571  complete="$FOUND_MAKE"
19572  path="${complete%% *}"
19573  tmp="$complete EOL"
19574  arguments="${tmp#* }"
19575
19576  # Input might be given as Windows format, start by converting to
19577  # unix format.
19578  new_path=`$CYGPATH -u "$path"`
19579
19580  # Now try to locate executable using which
19581  new_path=`$WHICH "$new_path" 2> /dev/null`
19582  # bat and cmd files are not always considered executable in cygwin causing which
19583  # to not find them
19584  if test "x$new_path" = x \
19585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19587    new_path=`$CYGPATH -u "$path"`
19588  fi
19589  if test "x$new_path" = x; then
19590    # Oops. Which didn't find the executable.
19591    # The splitting of arguments from the executable at a space might have been incorrect,
19592    # since paths with space are more likely in Windows. Give it another try with the whole
19593    # argument.
19594    path="$complete"
19595    arguments="EOL"
19596    new_path=`$CYGPATH -u "$path"`
19597    new_path=`$WHICH "$new_path" 2> /dev/null`
19598    # bat and cmd files are not always considered executable in cygwin causing which
19599    # to not find them
19600    if test "x$new_path" = x \
19601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19603      new_path=`$CYGPATH -u "$path"`
19604    fi
19605    if test "x$new_path" = x; then
19606      # It's still not found. Now this is an unrecoverable error.
19607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19608$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19609      has_space=`$ECHO "$complete" | $GREP " "`
19610      if test "x$has_space" != x; then
19611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19613      fi
19614      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19615    fi
19616  fi
19617
19618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19621  # "foo.exe" is OK but "foo" is an error.
19622  #
19623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19624  # It is also a way to make sure we got the proper file name for the real test later on.
19625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19626  if test "x$test_shortpath" = x; then
19627    # Short path failed, file does not exist as specified.
19628    # Try adding .exe or .cmd
19629    if test -f "${new_path}.exe"; then
19630      input_to_shortpath="${new_path}.exe"
19631    elif test -f "${new_path}.cmd"; then
19632      input_to_shortpath="${new_path}.cmd"
19633    else
19634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19635$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19638      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19639    fi
19640  else
19641    input_to_shortpath="$new_path"
19642  fi
19643
19644  # Call helper function which possibly converts this using DOS-style short mode.
19645  # If so, the updated path is stored in $new_path.
19646  new_path="$input_to_shortpath"
19647
19648  input_path="$input_to_shortpath"
19649  # Check if we need to convert this using DOS-style short mode. If the path
19650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19651  # take no chances and rewrite it.
19652  # Note: m4 eats our [], so we need to use [ and ] instead.
19653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19654  if test "x$has_forbidden_chars" != x; then
19655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19659      # Going to short mode and back again did indeed matter. Since short mode is
19660      # case insensitive, let's make it lowercase to improve readability.
19661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19662      # Now convert it back to Unix-style (cygpath)
19663      input_path=`$CYGPATH -u "$shortmode_path"`
19664      new_path="$input_path"
19665    fi
19666  fi
19667
19668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19669  if test "x$test_cygdrive_prefix" = x; then
19670    # As a simple fix, exclude /usr/bin since it's not a real path.
19671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19673      # a path prefixed by /cygdrive for fixpath to work.
19674      new_path="$CYGWIN_ROOT_PATH$input_path"
19675    fi
19676  fi
19677
19678  # remove trailing .exe if any
19679  new_path="${new_path/%.exe/}"
19680
19681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682
19683  # First separate the path from the arguments. This will split at the first
19684  # space.
19685  complete="$FOUND_MAKE"
19686  path="${complete%% *}"
19687  tmp="$complete EOL"
19688  arguments="${tmp#* }"
19689
19690  # Input might be given as Windows format, start by converting to
19691  # unix format.
19692  new_path="$path"
19693
19694  windows_path="$new_path"
19695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19696    unix_path=`$CYGPATH -u "$windows_path"`
19697    new_path="$unix_path"
19698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19700    new_path="$unix_path"
19701  fi
19702
19703
19704  # Now try to locate executable using which
19705  new_path=`$WHICH "$new_path" 2> /dev/null`
19706
19707  if test "x$new_path" = x; then
19708    # Oops. Which didn't find the executable.
19709    # The splitting of arguments from the executable at a space might have been incorrect,
19710    # since paths with space are more likely in Windows. Give it another try with the whole
19711    # argument.
19712    path="$complete"
19713    arguments="EOL"
19714    new_path="$path"
19715
19716  windows_path="$new_path"
19717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19718    unix_path=`$CYGPATH -u "$windows_path"`
19719    new_path="$unix_path"
19720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19722    new_path="$unix_path"
19723  fi
19724
19725
19726    new_path=`$WHICH "$new_path" 2> /dev/null`
19727    # bat and cmd files are not always considered executable in MSYS causing which
19728    # to not find them
19729    if test "x$new_path" = x \
19730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19732      new_path="$path"
19733
19734  windows_path="$new_path"
19735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19736    unix_path=`$CYGPATH -u "$windows_path"`
19737    new_path="$unix_path"
19738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19740    new_path="$unix_path"
19741  fi
19742
19743    fi
19744
19745    if test "x$new_path" = x; then
19746      # It's still not found. Now this is an unrecoverable error.
19747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19748$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19749      has_space=`$ECHO "$complete" | $GREP " "`
19750      if test "x$has_space" != x; then
19751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19753      fi
19754      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19755    fi
19756  fi
19757
19758  # Now new_path has a complete unix path to the binary
19759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19760    # Keep paths in /bin as-is, but remove trailing .exe if any
19761    new_path="${new_path/%.exe/}"
19762    # Do not save /bin paths to all_fixpath_prefixes!
19763  else
19764    # Not in mixed or Windows style, start by that.
19765    new_path=`cmd //c echo $new_path`
19766
19767  input_path="$new_path"
19768  # Check if we need to convert this using DOS-style short mode. If the path
19769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19770  # take no chances and rewrite it.
19771  # Note: m4 eats our [], so we need to use [ and ] instead.
19772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19773  if test "x$has_forbidden_chars" != x; then
19774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19776  fi
19777
19778    # Output is in $new_path
19779
19780  windows_path="$new_path"
19781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19782    unix_path=`$CYGPATH -u "$windows_path"`
19783    new_path="$unix_path"
19784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19786    new_path="$unix_path"
19787  fi
19788
19789    # remove trailing .exe if any
19790    new_path="${new_path/%.exe/}"
19791
19792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19794  fi
19795
19796    else
19797      # We're on a unix platform. Hooray! :)
19798      # First separate the path from the arguments. This will split at the first
19799      # space.
19800      complete="$FOUND_MAKE"
19801      path="${complete%% *}"
19802      tmp="$complete EOL"
19803      arguments="${tmp#* }"
19804
19805      # Cannot rely on the command "which" here since it doesn't always work.
19806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19807      if test -z "$is_absolute_path"; then
19808        # Path to executable is not absolute. Find it.
19809        IFS_save="$IFS"
19810        IFS=:
19811        for p in $PATH; do
19812          if test -f "$p/$path" && test -x "$p/$path"; then
19813            new_path="$p/$path"
19814            break
19815          fi
19816        done
19817        IFS="$IFS_save"
19818      else
19819        # This is an absolute path, we can use it without further modifications.
19820        new_path="$path"
19821      fi
19822
19823      if test "x$new_path" = x; then
19824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19825$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19826        has_space=`$ECHO "$complete" | $GREP " "`
19827        if test "x$has_space" != x; then
19828          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19830        fi
19831        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19832      fi
19833    fi
19834
19835    # Now join together the path and the arguments once again
19836    if test "x$arguments" != xEOL; then
19837      new_complete="$new_path ${arguments% *}"
19838    else
19839      new_complete="$new_path"
19840    fi
19841
19842    if test "x$complete" != "x$new_complete"; then
19843      FOUND_MAKE="$new_complete"
19844      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19845$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19846    fi
19847  fi
19848
19849        fi
19850      fi
19851    fi
19852  fi
19853
19854        fi
19855        PATH=$OLD_PATH
19856      fi
19857    fi
19858
19859    if test "x$FOUND_MAKE" = x; then
19860      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
19861    fi
19862
19863    else
19864      # If it succeeded, then it was overridden by the user. We will use it
19865      # for the tool.
19866
19867      # First remove it from the list of overridden variables, so we can test
19868      # for unknown variables in the end.
19869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19870
19871      # Check if we try to supply an empty value
19872      if test "x$MAKE" = x; then
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19874$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19876$as_echo_n "checking for MAKE... " >&6; }
19877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19878$as_echo "disabled" >&6; }
19879      else
19880        # Check if the provided tool contains a complete path.
19881        tool_specified="$MAKE"
19882        tool_basename="${tool_specified##*/}"
19883        if test "x$tool_basename" = "x$tool_specified"; then
19884          # A command without a complete path is provided, search $PATH.
19885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19886$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19887          # Extract the first word of "$tool_basename", so it can be a program name with args.
19888set dummy $tool_basename; ac_word=$2
19889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19890$as_echo_n "checking for $ac_word... " >&6; }
19891if ${ac_cv_path_MAKE+:} false; then :
19892  $as_echo_n "(cached) " >&6
19893else
19894  case $MAKE in
19895  [\\/]* | ?:[\\/]*)
19896  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19897  ;;
19898  *)
19899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19900for as_dir in $PATH
19901do
19902  IFS=$as_save_IFS
19903  test -z "$as_dir" && as_dir=.
19904    for ac_exec_ext in '' $ac_executable_extensions; do
19905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19906    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19908    break 2
19909  fi
19910done
19911  done
19912IFS=$as_save_IFS
19913
19914  ;;
19915esac
19916fi
19917MAKE=$ac_cv_path_MAKE
19918if test -n "$MAKE"; then
19919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19920$as_echo "$MAKE" >&6; }
19921else
19922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19923$as_echo "no" >&6; }
19924fi
19925
19926
19927          if test "x$MAKE" = x; then
19928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19929          fi
19930        else
19931          # Otherwise we believe it is a complete path. Use it as it is.
19932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19933$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19935$as_echo_n "checking for MAKE... " >&6; }
19936          if test ! -x "$tool_specified"; then
19937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19938$as_echo "not found" >&6; }
19939            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19940          fi
19941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19942$as_echo "$tool_specified" >&6; }
19943        fi
19944      fi
19945    fi
19946
19947    # If MAKE was set by user, verify the version
19948
19949  MAKE_CANDIDATE=""$MAKE""
19950  DESCRIPTION="user supplied MAKE=$MAKE"
19951
19952  # On Cygwin, we require a newer version of make than on other platforms
19953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19954    MAKE_VERSION_EXPR="-e 4\."
19955    MAKE_REQUIRED_VERSION="4.0"
19956   else
19957    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19958    MAKE_REQUIRED_VERSION="3.81"
19959  fi
19960
19961  if test "x$MAKE_CANDIDATE" != x; then
19962    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19963$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19964    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19965    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19966    if test "x$IS_GNU_MAKE" = x; then
19967      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19968$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19969    else
19970      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19971      if test "x$IS_MODERN_MAKE" = x; then
19972        { $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
19973$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;}
19974      else
19975        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19976          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19977            MAKE_EXPECTED_ENV='cygwin'
19978          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19979            MAKE_EXPECTED_ENV='msys'
19980          else
19981            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19982          fi
19983          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19984          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19985        else
19986          # Not relevant for non-Windows
19987          IS_MAKE_CORRECT_ENV=true
19988        fi
19989        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19990          { $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
19991$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;}
19992        else
19993          FOUND_MAKE=$MAKE_CANDIDATE
19994
19995  # Only process if variable expands to non-empty
19996
19997  if test "x$FOUND_MAKE" != x; then
19998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19999
20000  # First separate the path from the arguments. This will split at the first
20001  # space.
20002  complete="$FOUND_MAKE"
20003  path="${complete%% *}"
20004  tmp="$complete EOL"
20005  arguments="${tmp#* }"
20006
20007  # Input might be given as Windows format, start by converting to
20008  # unix format.
20009  new_path=`$CYGPATH -u "$path"`
20010
20011  # Now try to locate executable using which
20012  new_path=`$WHICH "$new_path" 2> /dev/null`
20013  # bat and cmd files are not always considered executable in cygwin causing which
20014  # to not find them
20015  if test "x$new_path" = x \
20016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20018    new_path=`$CYGPATH -u "$path"`
20019  fi
20020  if test "x$new_path" = x; then
20021    # Oops. Which didn't find the executable.
20022    # The splitting of arguments from the executable at a space might have been incorrect,
20023    # since paths with space are more likely in Windows. Give it another try with the whole
20024    # argument.
20025    path="$complete"
20026    arguments="EOL"
20027    new_path=`$CYGPATH -u "$path"`
20028    new_path=`$WHICH "$new_path" 2> /dev/null`
20029    # bat and cmd files are not always considered executable in cygwin causing which
20030    # to not find them
20031    if test "x$new_path" = x \
20032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20034      new_path=`$CYGPATH -u "$path"`
20035    fi
20036    if test "x$new_path" = x; then
20037      # It's still not found. Now this is an unrecoverable error.
20038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20040      has_space=`$ECHO "$complete" | $GREP " "`
20041      if test "x$has_space" != x; then
20042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20044      fi
20045      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20046    fi
20047  fi
20048
20049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20052  # "foo.exe" is OK but "foo" is an error.
20053  #
20054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20055  # It is also a way to make sure we got the proper file name for the real test later on.
20056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20057  if test "x$test_shortpath" = x; then
20058    # Short path failed, file does not exist as specified.
20059    # Try adding .exe or .cmd
20060    if test -f "${new_path}.exe"; then
20061      input_to_shortpath="${new_path}.exe"
20062    elif test -f "${new_path}.cmd"; then
20063      input_to_shortpath="${new_path}.cmd"
20064    else
20065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20066$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20069      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20070    fi
20071  else
20072    input_to_shortpath="$new_path"
20073  fi
20074
20075  # Call helper function which possibly converts this using DOS-style short mode.
20076  # If so, the updated path is stored in $new_path.
20077  new_path="$input_to_shortpath"
20078
20079  input_path="$input_to_shortpath"
20080  # Check if we need to convert this using DOS-style short mode. If the path
20081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20082  # take no chances and rewrite it.
20083  # Note: m4 eats our [], so we need to use [ and ] instead.
20084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20085  if test "x$has_forbidden_chars" != x; then
20086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20090      # Going to short mode and back again did indeed matter. Since short mode is
20091      # case insensitive, let's make it lowercase to improve readability.
20092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20093      # Now convert it back to Unix-style (cygpath)
20094      input_path=`$CYGPATH -u "$shortmode_path"`
20095      new_path="$input_path"
20096    fi
20097  fi
20098
20099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20100  if test "x$test_cygdrive_prefix" = x; then
20101    # As a simple fix, exclude /usr/bin since it's not a real path.
20102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20104      # a path prefixed by /cygdrive for fixpath to work.
20105      new_path="$CYGWIN_ROOT_PATH$input_path"
20106    fi
20107  fi
20108
20109  # remove trailing .exe if any
20110  new_path="${new_path/%.exe/}"
20111
20112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20113
20114  # First separate the path from the arguments. This will split at the first
20115  # space.
20116  complete="$FOUND_MAKE"
20117  path="${complete%% *}"
20118  tmp="$complete EOL"
20119  arguments="${tmp#* }"
20120
20121  # Input might be given as Windows format, start by converting to
20122  # unix format.
20123  new_path="$path"
20124
20125  windows_path="$new_path"
20126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20127    unix_path=`$CYGPATH -u "$windows_path"`
20128    new_path="$unix_path"
20129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20131    new_path="$unix_path"
20132  fi
20133
20134
20135  # Now try to locate executable using which
20136  new_path=`$WHICH "$new_path" 2> /dev/null`
20137
20138  if test "x$new_path" = x; then
20139    # Oops. Which didn't find the executable.
20140    # The splitting of arguments from the executable at a space might have been incorrect,
20141    # since paths with space are more likely in Windows. Give it another try with the whole
20142    # argument.
20143    path="$complete"
20144    arguments="EOL"
20145    new_path="$path"
20146
20147  windows_path="$new_path"
20148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20149    unix_path=`$CYGPATH -u "$windows_path"`
20150    new_path="$unix_path"
20151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20153    new_path="$unix_path"
20154  fi
20155
20156
20157    new_path=`$WHICH "$new_path" 2> /dev/null`
20158    # bat and cmd files are not always considered executable in MSYS causing which
20159    # to not find them
20160    if test "x$new_path" = x \
20161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20163      new_path="$path"
20164
20165  windows_path="$new_path"
20166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20167    unix_path=`$CYGPATH -u "$windows_path"`
20168    new_path="$unix_path"
20169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20171    new_path="$unix_path"
20172  fi
20173
20174    fi
20175
20176    if test "x$new_path" = x; then
20177      # It's still not found. Now this is an unrecoverable error.
20178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20179$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20180      has_space=`$ECHO "$complete" | $GREP " "`
20181      if test "x$has_space" != x; then
20182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20184      fi
20185      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20186    fi
20187  fi
20188
20189  # Now new_path has a complete unix path to the binary
20190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20191    # Keep paths in /bin as-is, but remove trailing .exe if any
20192    new_path="${new_path/%.exe/}"
20193    # Do not save /bin paths to all_fixpath_prefixes!
20194  else
20195    # Not in mixed or Windows style, start by that.
20196    new_path=`cmd //c echo $new_path`
20197
20198  input_path="$new_path"
20199  # Check if we need to convert this using DOS-style short mode. If the path
20200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20201  # take no chances and rewrite it.
20202  # Note: m4 eats our [], so we need to use [ and ] instead.
20203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20204  if test "x$has_forbidden_chars" != x; then
20205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20207  fi
20208
20209    # Output is in $new_path
20210
20211  windows_path="$new_path"
20212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20213    unix_path=`$CYGPATH -u "$windows_path"`
20214    new_path="$unix_path"
20215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20217    new_path="$unix_path"
20218  fi
20219
20220    # remove trailing .exe if any
20221    new_path="${new_path/%.exe/}"
20222
20223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20225  fi
20226
20227    else
20228      # We're on a unix platform. Hooray! :)
20229      # First separate the path from the arguments. This will split at the first
20230      # space.
20231      complete="$FOUND_MAKE"
20232      path="${complete%% *}"
20233      tmp="$complete EOL"
20234      arguments="${tmp#* }"
20235
20236      # Cannot rely on the command "which" here since it doesn't always work.
20237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20238      if test -z "$is_absolute_path"; then
20239        # Path to executable is not absolute. Find it.
20240        IFS_save="$IFS"
20241        IFS=:
20242        for p in $PATH; do
20243          if test -f "$p/$path" && test -x "$p/$path"; then
20244            new_path="$p/$path"
20245            break
20246          fi
20247        done
20248        IFS="$IFS_save"
20249      else
20250        # This is an absolute path, we can use it without further modifications.
20251        new_path="$path"
20252      fi
20253
20254      if test "x$new_path" = x; then
20255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20257        has_space=`$ECHO "$complete" | $GREP " "`
20258        if test "x$has_space" != x; then
20259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20261        fi
20262        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20263      fi
20264    fi
20265
20266    # Now join together the path and the arguments once again
20267    if test "x$arguments" != xEOL; then
20268      new_complete="$new_path ${arguments% *}"
20269    else
20270      new_complete="$new_path"
20271    fi
20272
20273    if test "x$complete" != "x$new_complete"; then
20274      FOUND_MAKE="$new_complete"
20275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20276$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20277    fi
20278  fi
20279
20280        fi
20281      fi
20282    fi
20283  fi
20284
20285    if test "x$FOUND_MAKE" = x; then
20286      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20287    fi
20288
20289  fi
20290
20291
20292  MAKE=$FOUND_MAKE
20293
20294  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20295$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20296
20297
20298  # Check if make supports the output sync option and if so, setup using it.
20299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20300$as_echo_n "checking if make --output-sync is supported... " >&6; }
20301  if $MAKE --version -O > /dev/null 2>&1; then
20302    OUTPUT_SYNC_SUPPORTED=true
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20304$as_echo "yes" >&6; }
20305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20306$as_echo_n "checking for output-sync value... " >&6; }
20307
20308# Check whether --with-output-sync was given.
20309if test "${with_output_sync+set}" = set; then :
20310  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20311fi
20312
20313    if test "x$OUTPUT_SYNC" = "x"; then
20314      OUTPUT_SYNC=none
20315    fi
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20317$as_echo "$OUTPUT_SYNC" >&6; }
20318    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20319      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20320    fi
20321  else
20322    OUTPUT_SYNC_SUPPORTED=false
20323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20324$as_echo "no" >&6; }
20325  fi
20326
20327
20328
20329
20330
20331
20332  # Test if find supports -delete
20333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20334$as_echo_n "checking if find supports -delete... " >&6; }
20335  FIND_DELETE="-delete"
20336
20337  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20338
20339  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20340
20341  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20342  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20343    # No, it does not.
20344    rm $DELETEDIR/TestIfFindSupportsDelete
20345    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20346      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20347      FIND_DELETE="-print | xargs rm"
20348    else
20349      FIND_DELETE="-exec rm \{\} \+"
20350    fi
20351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20352$as_echo "no" >&6; }
20353  else
20354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20355$as_echo "yes" >&6; }
20356  fi
20357  rmdir $DELETEDIR
20358
20359
20360
20361  # These tools might not be installed by default,
20362  # need hint on how to install them.
20363
20364
20365
20366  # Publish this variable in the help.
20367
20368
20369  if [ -z "${UNZIP+x}" ]; then
20370    # The variable is not set by user, try to locate tool using the code snippet
20371    for ac_prog in unzip
20372do
20373  # Extract the first word of "$ac_prog", so it can be a program name with args.
20374set dummy $ac_prog; ac_word=$2
20375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20376$as_echo_n "checking for $ac_word... " >&6; }
20377if ${ac_cv_path_UNZIP+:} false; then :
20378  $as_echo_n "(cached) " >&6
20379else
20380  case $UNZIP in
20381  [\\/]* | ?:[\\/]*)
20382  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20383  ;;
20384  *)
20385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20386for as_dir in $PATH
20387do
20388  IFS=$as_save_IFS
20389  test -z "$as_dir" && as_dir=.
20390    for ac_exec_ext in '' $ac_executable_extensions; do
20391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20392    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20394    break 2
20395  fi
20396done
20397  done
20398IFS=$as_save_IFS
20399
20400  ;;
20401esac
20402fi
20403UNZIP=$ac_cv_path_UNZIP
20404if test -n "$UNZIP"; then
20405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20406$as_echo "$UNZIP" >&6; }
20407else
20408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20409$as_echo "no" >&6; }
20410fi
20411
20412
20413  test -n "$UNZIP" && break
20414done
20415
20416  else
20417    # The variable is set, but is it from the command line or the environment?
20418
20419    # Try to remove the string !UNZIP! from our list.
20420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20422      # If it failed, the variable was not from the command line. Ignore it,
20423      # but warn the user (except for BASH, which is always set by the calling BASH).
20424      if test "xUNZIP" != xBASH; then
20425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20426$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20427      fi
20428      # Try to locate tool using the code snippet
20429      for ac_prog in unzip
20430do
20431  # Extract the first word of "$ac_prog", so it can be a program name with args.
20432set dummy $ac_prog; ac_word=$2
20433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20434$as_echo_n "checking for $ac_word... " >&6; }
20435if ${ac_cv_path_UNZIP+:} false; then :
20436  $as_echo_n "(cached) " >&6
20437else
20438  case $UNZIP in
20439  [\\/]* | ?:[\\/]*)
20440  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20441  ;;
20442  *)
20443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20444for as_dir in $PATH
20445do
20446  IFS=$as_save_IFS
20447  test -z "$as_dir" && as_dir=.
20448    for ac_exec_ext in '' $ac_executable_extensions; do
20449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20450    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20452    break 2
20453  fi
20454done
20455  done
20456IFS=$as_save_IFS
20457
20458  ;;
20459esac
20460fi
20461UNZIP=$ac_cv_path_UNZIP
20462if test -n "$UNZIP"; then
20463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20464$as_echo "$UNZIP" >&6; }
20465else
20466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20467$as_echo "no" >&6; }
20468fi
20469
20470
20471  test -n "$UNZIP" && break
20472done
20473
20474    else
20475      # If it succeeded, then it was overridden by the user. We will use it
20476      # for the tool.
20477
20478      # First remove it from the list of overridden variables, so we can test
20479      # for unknown variables in the end.
20480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20481
20482      # Check if we try to supply an empty value
20483      if test "x$UNZIP" = x; then
20484        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20485$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20487$as_echo_n "checking for UNZIP... " >&6; }
20488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20489$as_echo "disabled" >&6; }
20490      else
20491        # Check if the provided tool contains a complete path.
20492        tool_specified="$UNZIP"
20493        tool_basename="${tool_specified##*/}"
20494        if test "x$tool_basename" = "x$tool_specified"; then
20495          # A command without a complete path is provided, search $PATH.
20496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20497$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20498          # Extract the first word of "$tool_basename", so it can be a program name with args.
20499set dummy $tool_basename; ac_word=$2
20500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20501$as_echo_n "checking for $ac_word... " >&6; }
20502if ${ac_cv_path_UNZIP+:} false; then :
20503  $as_echo_n "(cached) " >&6
20504else
20505  case $UNZIP in
20506  [\\/]* | ?:[\\/]*)
20507  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20508  ;;
20509  *)
20510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20511for as_dir in $PATH
20512do
20513  IFS=$as_save_IFS
20514  test -z "$as_dir" && as_dir=.
20515    for ac_exec_ext in '' $ac_executable_extensions; do
20516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20517    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20519    break 2
20520  fi
20521done
20522  done
20523IFS=$as_save_IFS
20524
20525  ;;
20526esac
20527fi
20528UNZIP=$ac_cv_path_UNZIP
20529if test -n "$UNZIP"; then
20530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20531$as_echo "$UNZIP" >&6; }
20532else
20533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20534$as_echo "no" >&6; }
20535fi
20536
20537
20538          if test "x$UNZIP" = x; then
20539            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20540          fi
20541        else
20542          # Otherwise we believe it is a complete path. Use it as it is.
20543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20544$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20545          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20546$as_echo_n "checking for UNZIP... " >&6; }
20547          if test ! -x "$tool_specified"; then
20548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20549$as_echo "not found" >&6; }
20550            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20551          fi
20552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20553$as_echo "$tool_specified" >&6; }
20554        fi
20555      fi
20556    fi
20557
20558  fi
20559
20560
20561
20562  if test "x$UNZIP" = x; then
20563    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20564  fi
20565
20566
20567
20568
20569
20570  # Publish this variable in the help.
20571
20572
20573  if [ -z "${ZIP+x}" ]; then
20574    # The variable is not set by user, try to locate tool using the code snippet
20575    for ac_prog in zip
20576do
20577  # Extract the first word of "$ac_prog", so it can be a program name with args.
20578set dummy $ac_prog; ac_word=$2
20579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20580$as_echo_n "checking for $ac_word... " >&6; }
20581if ${ac_cv_path_ZIP+:} false; then :
20582  $as_echo_n "(cached) " >&6
20583else
20584  case $ZIP in
20585  [\\/]* | ?:[\\/]*)
20586  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20587  ;;
20588  *)
20589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20590for as_dir in $PATH
20591do
20592  IFS=$as_save_IFS
20593  test -z "$as_dir" && as_dir=.
20594    for ac_exec_ext in '' $ac_executable_extensions; do
20595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20596    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20598    break 2
20599  fi
20600done
20601  done
20602IFS=$as_save_IFS
20603
20604  ;;
20605esac
20606fi
20607ZIP=$ac_cv_path_ZIP
20608if test -n "$ZIP"; then
20609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20610$as_echo "$ZIP" >&6; }
20611else
20612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20613$as_echo "no" >&6; }
20614fi
20615
20616
20617  test -n "$ZIP" && break
20618done
20619
20620  else
20621    # The variable is set, but is it from the command line or the environment?
20622
20623    # Try to remove the string !ZIP! from our list.
20624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20626      # If it failed, the variable was not from the command line. Ignore it,
20627      # but warn the user (except for BASH, which is always set by the calling BASH).
20628      if test "xZIP" != xBASH; then
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20630$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20631      fi
20632      # Try to locate tool using the code snippet
20633      for ac_prog in zip
20634do
20635  # Extract the first word of "$ac_prog", so it can be a program name with args.
20636set dummy $ac_prog; ac_word=$2
20637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20638$as_echo_n "checking for $ac_word... " >&6; }
20639if ${ac_cv_path_ZIP+:} false; then :
20640  $as_echo_n "(cached) " >&6
20641else
20642  case $ZIP in
20643  [\\/]* | ?:[\\/]*)
20644  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20645  ;;
20646  *)
20647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20648for as_dir in $PATH
20649do
20650  IFS=$as_save_IFS
20651  test -z "$as_dir" && as_dir=.
20652    for ac_exec_ext in '' $ac_executable_extensions; do
20653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20654    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20656    break 2
20657  fi
20658done
20659  done
20660IFS=$as_save_IFS
20661
20662  ;;
20663esac
20664fi
20665ZIP=$ac_cv_path_ZIP
20666if test -n "$ZIP"; then
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20668$as_echo "$ZIP" >&6; }
20669else
20670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20671$as_echo "no" >&6; }
20672fi
20673
20674
20675  test -n "$ZIP" && break
20676done
20677
20678    else
20679      # If it succeeded, then it was overridden by the user. We will use it
20680      # for the tool.
20681
20682      # First remove it from the list of overridden variables, so we can test
20683      # for unknown variables in the end.
20684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20685
20686      # Check if we try to supply an empty value
20687      if test "x$ZIP" = x; then
20688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20689$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20691$as_echo_n "checking for ZIP... " >&6; }
20692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20693$as_echo "disabled" >&6; }
20694      else
20695        # Check if the provided tool contains a complete path.
20696        tool_specified="$ZIP"
20697        tool_basename="${tool_specified##*/}"
20698        if test "x$tool_basename" = "x$tool_specified"; then
20699          # A command without a complete path is provided, search $PATH.
20700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20701$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20702          # Extract the first word of "$tool_basename", so it can be a program name with args.
20703set dummy $tool_basename; ac_word=$2
20704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20705$as_echo_n "checking for $ac_word... " >&6; }
20706if ${ac_cv_path_ZIP+:} false; then :
20707  $as_echo_n "(cached) " >&6
20708else
20709  case $ZIP in
20710  [\\/]* | ?:[\\/]*)
20711  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20712  ;;
20713  *)
20714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20715for as_dir in $PATH
20716do
20717  IFS=$as_save_IFS
20718  test -z "$as_dir" && as_dir=.
20719    for ac_exec_ext in '' $ac_executable_extensions; do
20720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20721    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20723    break 2
20724  fi
20725done
20726  done
20727IFS=$as_save_IFS
20728
20729  ;;
20730esac
20731fi
20732ZIP=$ac_cv_path_ZIP
20733if test -n "$ZIP"; then
20734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20735$as_echo "$ZIP" >&6; }
20736else
20737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20738$as_echo "no" >&6; }
20739fi
20740
20741
20742          if test "x$ZIP" = x; then
20743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20744          fi
20745        else
20746          # Otherwise we believe it is a complete path. Use it as it is.
20747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20748$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20750$as_echo_n "checking for ZIP... " >&6; }
20751          if test ! -x "$tool_specified"; then
20752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20753$as_echo "not found" >&6; }
20754            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20755          fi
20756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20757$as_echo "$tool_specified" >&6; }
20758        fi
20759      fi
20760    fi
20761
20762  fi
20763
20764
20765
20766  if test "x$ZIP" = x; then
20767    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20768  fi
20769
20770
20771
20772  # Non-required basic tools
20773
20774
20775
20776  # Publish this variable in the help.
20777
20778
20779  if [ -z "${LDD+x}" ]; then
20780    # The variable is not set by user, try to locate tool using the code snippet
20781    for ac_prog in ldd
20782do
20783  # Extract the first word of "$ac_prog", so it can be a program name with args.
20784set dummy $ac_prog; ac_word=$2
20785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20786$as_echo_n "checking for $ac_word... " >&6; }
20787if ${ac_cv_path_LDD+:} false; then :
20788  $as_echo_n "(cached) " >&6
20789else
20790  case $LDD in
20791  [\\/]* | ?:[\\/]*)
20792  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20793  ;;
20794  *)
20795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20796for as_dir in $PATH
20797do
20798  IFS=$as_save_IFS
20799  test -z "$as_dir" && as_dir=.
20800    for ac_exec_ext in '' $ac_executable_extensions; do
20801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20802    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20804    break 2
20805  fi
20806done
20807  done
20808IFS=$as_save_IFS
20809
20810  ;;
20811esac
20812fi
20813LDD=$ac_cv_path_LDD
20814if test -n "$LDD"; then
20815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20816$as_echo "$LDD" >&6; }
20817else
20818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20819$as_echo "no" >&6; }
20820fi
20821
20822
20823  test -n "$LDD" && break
20824done
20825
20826  else
20827    # The variable is set, but is it from the command line or the environment?
20828
20829    # Try to remove the string !LDD! from our list.
20830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20832      # If it failed, the variable was not from the command line. Ignore it,
20833      # but warn the user (except for BASH, which is always set by the calling BASH).
20834      if test "xLDD" != xBASH; then
20835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20836$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20837      fi
20838      # Try to locate tool using the code snippet
20839      for ac_prog in ldd
20840do
20841  # Extract the first word of "$ac_prog", so it can be a program name with args.
20842set dummy $ac_prog; ac_word=$2
20843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20844$as_echo_n "checking for $ac_word... " >&6; }
20845if ${ac_cv_path_LDD+:} false; then :
20846  $as_echo_n "(cached) " >&6
20847else
20848  case $LDD in
20849  [\\/]* | ?:[\\/]*)
20850  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20851  ;;
20852  *)
20853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20854for as_dir in $PATH
20855do
20856  IFS=$as_save_IFS
20857  test -z "$as_dir" && as_dir=.
20858    for ac_exec_ext in '' $ac_executable_extensions; do
20859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20860    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20862    break 2
20863  fi
20864done
20865  done
20866IFS=$as_save_IFS
20867
20868  ;;
20869esac
20870fi
20871LDD=$ac_cv_path_LDD
20872if test -n "$LDD"; then
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20874$as_echo "$LDD" >&6; }
20875else
20876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20877$as_echo "no" >&6; }
20878fi
20879
20880
20881  test -n "$LDD" && break
20882done
20883
20884    else
20885      # If it succeeded, then it was overridden by the user. We will use it
20886      # for the tool.
20887
20888      # First remove it from the list of overridden variables, so we can test
20889      # for unknown variables in the end.
20890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20891
20892      # Check if we try to supply an empty value
20893      if test "x$LDD" = x; then
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20895$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20897$as_echo_n "checking for LDD... " >&6; }
20898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20899$as_echo "disabled" >&6; }
20900      else
20901        # Check if the provided tool contains a complete path.
20902        tool_specified="$LDD"
20903        tool_basename="${tool_specified##*/}"
20904        if test "x$tool_basename" = "x$tool_specified"; then
20905          # A command without a complete path is provided, search $PATH.
20906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20907$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20908          # Extract the first word of "$tool_basename", so it can be a program name with args.
20909set dummy $tool_basename; ac_word=$2
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20911$as_echo_n "checking for $ac_word... " >&6; }
20912if ${ac_cv_path_LDD+:} false; then :
20913  $as_echo_n "(cached) " >&6
20914else
20915  case $LDD in
20916  [\\/]* | ?:[\\/]*)
20917  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20918  ;;
20919  *)
20920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20921for as_dir in $PATH
20922do
20923  IFS=$as_save_IFS
20924  test -z "$as_dir" && as_dir=.
20925    for ac_exec_ext in '' $ac_executable_extensions; do
20926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20927    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20929    break 2
20930  fi
20931done
20932  done
20933IFS=$as_save_IFS
20934
20935  ;;
20936esac
20937fi
20938LDD=$ac_cv_path_LDD
20939if test -n "$LDD"; then
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20941$as_echo "$LDD" >&6; }
20942else
20943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20944$as_echo "no" >&6; }
20945fi
20946
20947
20948          if test "x$LDD" = x; then
20949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20950          fi
20951        else
20952          # Otherwise we believe it is a complete path. Use it as it is.
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20954$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20956$as_echo_n "checking for LDD... " >&6; }
20957          if test ! -x "$tool_specified"; then
20958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20959$as_echo "not found" >&6; }
20960            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20961          fi
20962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20963$as_echo "$tool_specified" >&6; }
20964        fi
20965      fi
20966    fi
20967
20968  fi
20969
20970
20971  if test "x$LDD" = "x"; then
20972    # List shared lib dependencies is used for
20973    # debug output and checking for forbidden dependencies.
20974    # We can build without it.
20975    LDD="true"
20976  fi
20977
20978
20979  # Publish this variable in the help.
20980
20981
20982  if [ -z "${OTOOL+x}" ]; then
20983    # The variable is not set by user, try to locate tool using the code snippet
20984    for ac_prog in otool
20985do
20986  # Extract the first word of "$ac_prog", so it can be a program name with args.
20987set dummy $ac_prog; ac_word=$2
20988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20989$as_echo_n "checking for $ac_word... " >&6; }
20990if ${ac_cv_path_OTOOL+:} false; then :
20991  $as_echo_n "(cached) " >&6
20992else
20993  case $OTOOL in
20994  [\\/]* | ?:[\\/]*)
20995  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20996  ;;
20997  *)
20998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20999for as_dir in $PATH
21000do
21001  IFS=$as_save_IFS
21002  test -z "$as_dir" && as_dir=.
21003    for ac_exec_ext in '' $ac_executable_extensions; do
21004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21005    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21007    break 2
21008  fi
21009done
21010  done
21011IFS=$as_save_IFS
21012
21013  ;;
21014esac
21015fi
21016OTOOL=$ac_cv_path_OTOOL
21017if test -n "$OTOOL"; then
21018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21019$as_echo "$OTOOL" >&6; }
21020else
21021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21022$as_echo "no" >&6; }
21023fi
21024
21025
21026  test -n "$OTOOL" && break
21027done
21028
21029  else
21030    # The variable is set, but is it from the command line or the environment?
21031
21032    # Try to remove the string !OTOOL! from our list.
21033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21035      # If it failed, the variable was not from the command line. Ignore it,
21036      # but warn the user (except for BASH, which is always set by the calling BASH).
21037      if test "xOTOOL" != xBASH; then
21038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21039$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21040      fi
21041      # Try to locate tool using the code snippet
21042      for ac_prog in otool
21043do
21044  # Extract the first word of "$ac_prog", so it can be a program name with args.
21045set dummy $ac_prog; ac_word=$2
21046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21047$as_echo_n "checking for $ac_word... " >&6; }
21048if ${ac_cv_path_OTOOL+:} false; then :
21049  $as_echo_n "(cached) " >&6
21050else
21051  case $OTOOL in
21052  [\\/]* | ?:[\\/]*)
21053  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21054  ;;
21055  *)
21056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21057for as_dir in $PATH
21058do
21059  IFS=$as_save_IFS
21060  test -z "$as_dir" && as_dir=.
21061    for ac_exec_ext in '' $ac_executable_extensions; do
21062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21063    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21065    break 2
21066  fi
21067done
21068  done
21069IFS=$as_save_IFS
21070
21071  ;;
21072esac
21073fi
21074OTOOL=$ac_cv_path_OTOOL
21075if test -n "$OTOOL"; then
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21077$as_echo "$OTOOL" >&6; }
21078else
21079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21080$as_echo "no" >&6; }
21081fi
21082
21083
21084  test -n "$OTOOL" && break
21085done
21086
21087    else
21088      # If it succeeded, then it was overridden by the user. We will use it
21089      # for the tool.
21090
21091      # First remove it from the list of overridden variables, so we can test
21092      # for unknown variables in the end.
21093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21094
21095      # Check if we try to supply an empty value
21096      if test "x$OTOOL" = x; then
21097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21098$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21100$as_echo_n "checking for OTOOL... " >&6; }
21101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21102$as_echo "disabled" >&6; }
21103      else
21104        # Check if the provided tool contains a complete path.
21105        tool_specified="$OTOOL"
21106        tool_basename="${tool_specified##*/}"
21107        if test "x$tool_basename" = "x$tool_specified"; then
21108          # A command without a complete path is provided, search $PATH.
21109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21110$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21111          # Extract the first word of "$tool_basename", so it can be a program name with args.
21112set dummy $tool_basename; ac_word=$2
21113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21114$as_echo_n "checking for $ac_word... " >&6; }
21115if ${ac_cv_path_OTOOL+:} false; then :
21116  $as_echo_n "(cached) " >&6
21117else
21118  case $OTOOL in
21119  [\\/]* | ?:[\\/]*)
21120  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21121  ;;
21122  *)
21123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21124for as_dir in $PATH
21125do
21126  IFS=$as_save_IFS
21127  test -z "$as_dir" && as_dir=.
21128    for ac_exec_ext in '' $ac_executable_extensions; do
21129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21130    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21132    break 2
21133  fi
21134done
21135  done
21136IFS=$as_save_IFS
21137
21138  ;;
21139esac
21140fi
21141OTOOL=$ac_cv_path_OTOOL
21142if test -n "$OTOOL"; then
21143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21144$as_echo "$OTOOL" >&6; }
21145else
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21147$as_echo "no" >&6; }
21148fi
21149
21150
21151          if test "x$OTOOL" = x; then
21152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21153          fi
21154        else
21155          # Otherwise we believe it is a complete path. Use it as it is.
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21157$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21159$as_echo_n "checking for OTOOL... " >&6; }
21160          if test ! -x "$tool_specified"; then
21161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21162$as_echo "not found" >&6; }
21163            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21164          fi
21165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21166$as_echo "$tool_specified" >&6; }
21167        fi
21168      fi
21169    fi
21170
21171  fi
21172
21173
21174  if test "x$OTOOL" = "x"; then
21175    OTOOL="true"
21176  fi
21177
21178
21179  # Publish this variable in the help.
21180
21181
21182  if [ -z "${READELF+x}" ]; then
21183    # The variable is not set by user, try to locate tool using the code snippet
21184    for ac_prog in greadelf readelf
21185do
21186  # Extract the first word of "$ac_prog", so it can be a program name with args.
21187set dummy $ac_prog; ac_word=$2
21188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21189$as_echo_n "checking for $ac_word... " >&6; }
21190if ${ac_cv_path_READELF+:} false; then :
21191  $as_echo_n "(cached) " >&6
21192else
21193  case $READELF in
21194  [\\/]* | ?:[\\/]*)
21195  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21196  ;;
21197  *)
21198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21199for as_dir in $PATH
21200do
21201  IFS=$as_save_IFS
21202  test -z "$as_dir" && as_dir=.
21203    for ac_exec_ext in '' $ac_executable_extensions; do
21204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21205    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21207    break 2
21208  fi
21209done
21210  done
21211IFS=$as_save_IFS
21212
21213  ;;
21214esac
21215fi
21216READELF=$ac_cv_path_READELF
21217if test -n "$READELF"; then
21218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21219$as_echo "$READELF" >&6; }
21220else
21221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21222$as_echo "no" >&6; }
21223fi
21224
21225
21226  test -n "$READELF" && break
21227done
21228
21229  else
21230    # The variable is set, but is it from the command line or the environment?
21231
21232    # Try to remove the string !READELF! from our list.
21233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21235      # If it failed, the variable was not from the command line. Ignore it,
21236      # but warn the user (except for BASH, which is always set by the calling BASH).
21237      if test "xREADELF" != xBASH; then
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21239$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21240      fi
21241      # Try to locate tool using the code snippet
21242      for ac_prog in greadelf readelf
21243do
21244  # Extract the first word of "$ac_prog", so it can be a program name with args.
21245set dummy $ac_prog; ac_word=$2
21246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21247$as_echo_n "checking for $ac_word... " >&6; }
21248if ${ac_cv_path_READELF+:} false; then :
21249  $as_echo_n "(cached) " >&6
21250else
21251  case $READELF in
21252  [\\/]* | ?:[\\/]*)
21253  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21254  ;;
21255  *)
21256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21257for as_dir in $PATH
21258do
21259  IFS=$as_save_IFS
21260  test -z "$as_dir" && as_dir=.
21261    for ac_exec_ext in '' $ac_executable_extensions; do
21262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21263    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21265    break 2
21266  fi
21267done
21268  done
21269IFS=$as_save_IFS
21270
21271  ;;
21272esac
21273fi
21274READELF=$ac_cv_path_READELF
21275if test -n "$READELF"; then
21276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21277$as_echo "$READELF" >&6; }
21278else
21279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21280$as_echo "no" >&6; }
21281fi
21282
21283
21284  test -n "$READELF" && break
21285done
21286
21287    else
21288      # If it succeeded, then it was overridden by the user. We will use it
21289      # for the tool.
21290
21291      # First remove it from the list of overridden variables, so we can test
21292      # for unknown variables in the end.
21293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21294
21295      # Check if we try to supply an empty value
21296      if test "x$READELF" = x; then
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21298$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21300$as_echo_n "checking for READELF... " >&6; }
21301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21302$as_echo "disabled" >&6; }
21303      else
21304        # Check if the provided tool contains a complete path.
21305        tool_specified="$READELF"
21306        tool_basename="${tool_specified##*/}"
21307        if test "x$tool_basename" = "x$tool_specified"; then
21308          # A command without a complete path is provided, search $PATH.
21309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21310$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21311          # Extract the first word of "$tool_basename", so it can be a program name with args.
21312set dummy $tool_basename; ac_word=$2
21313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21314$as_echo_n "checking for $ac_word... " >&6; }
21315if ${ac_cv_path_READELF+:} false; then :
21316  $as_echo_n "(cached) " >&6
21317else
21318  case $READELF in
21319  [\\/]* | ?:[\\/]*)
21320  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21321  ;;
21322  *)
21323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21324for as_dir in $PATH
21325do
21326  IFS=$as_save_IFS
21327  test -z "$as_dir" && as_dir=.
21328    for ac_exec_ext in '' $ac_executable_extensions; do
21329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21330    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21332    break 2
21333  fi
21334done
21335  done
21336IFS=$as_save_IFS
21337
21338  ;;
21339esac
21340fi
21341READELF=$ac_cv_path_READELF
21342if test -n "$READELF"; then
21343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21344$as_echo "$READELF" >&6; }
21345else
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21347$as_echo "no" >&6; }
21348fi
21349
21350
21351          if test "x$READELF" = x; then
21352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21353          fi
21354        else
21355          # Otherwise we believe it is a complete path. Use it as it is.
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21357$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21359$as_echo_n "checking for READELF... " >&6; }
21360          if test ! -x "$tool_specified"; then
21361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21362$as_echo "not found" >&6; }
21363            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21364          fi
21365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21366$as_echo "$tool_specified" >&6; }
21367        fi
21368      fi
21369    fi
21370
21371  fi
21372
21373
21374
21375
21376  # Publish this variable in the help.
21377
21378
21379  if [ -z "${HG+x}" ]; then
21380    # The variable is not set by user, try to locate tool using the code snippet
21381    for ac_prog in hg
21382do
21383  # Extract the first word of "$ac_prog", so it can be a program name with args.
21384set dummy $ac_prog; ac_word=$2
21385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21386$as_echo_n "checking for $ac_word... " >&6; }
21387if ${ac_cv_path_HG+:} false; then :
21388  $as_echo_n "(cached) " >&6
21389else
21390  case $HG in
21391  [\\/]* | ?:[\\/]*)
21392  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21393  ;;
21394  *)
21395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21396for as_dir in $PATH
21397do
21398  IFS=$as_save_IFS
21399  test -z "$as_dir" && as_dir=.
21400    for ac_exec_ext in '' $ac_executable_extensions; do
21401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21402    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21404    break 2
21405  fi
21406done
21407  done
21408IFS=$as_save_IFS
21409
21410  ;;
21411esac
21412fi
21413HG=$ac_cv_path_HG
21414if test -n "$HG"; then
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21416$as_echo "$HG" >&6; }
21417else
21418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21419$as_echo "no" >&6; }
21420fi
21421
21422
21423  test -n "$HG" && break
21424done
21425
21426  else
21427    # The variable is set, but is it from the command line or the environment?
21428
21429    # Try to remove the string !HG! from our list.
21430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21432      # If it failed, the variable was not from the command line. Ignore it,
21433      # but warn the user (except for BASH, which is always set by the calling BASH).
21434      if test "xHG" != xBASH; then
21435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21436$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21437      fi
21438      # Try to locate tool using the code snippet
21439      for ac_prog in hg
21440do
21441  # Extract the first word of "$ac_prog", so it can be a program name with args.
21442set dummy $ac_prog; ac_word=$2
21443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21444$as_echo_n "checking for $ac_word... " >&6; }
21445if ${ac_cv_path_HG+:} false; then :
21446  $as_echo_n "(cached) " >&6
21447else
21448  case $HG in
21449  [\\/]* | ?:[\\/]*)
21450  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21451  ;;
21452  *)
21453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21454for as_dir in $PATH
21455do
21456  IFS=$as_save_IFS
21457  test -z "$as_dir" && as_dir=.
21458    for ac_exec_ext in '' $ac_executable_extensions; do
21459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21460    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21462    break 2
21463  fi
21464done
21465  done
21466IFS=$as_save_IFS
21467
21468  ;;
21469esac
21470fi
21471HG=$ac_cv_path_HG
21472if test -n "$HG"; then
21473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21474$as_echo "$HG" >&6; }
21475else
21476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21477$as_echo "no" >&6; }
21478fi
21479
21480
21481  test -n "$HG" && break
21482done
21483
21484    else
21485      # If it succeeded, then it was overridden by the user. We will use it
21486      # for the tool.
21487
21488      # First remove it from the list of overridden variables, so we can test
21489      # for unknown variables in the end.
21490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21491
21492      # Check if we try to supply an empty value
21493      if test "x$HG" = x; then
21494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21495$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21497$as_echo_n "checking for HG... " >&6; }
21498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21499$as_echo "disabled" >&6; }
21500      else
21501        # Check if the provided tool contains a complete path.
21502        tool_specified="$HG"
21503        tool_basename="${tool_specified##*/}"
21504        if test "x$tool_basename" = "x$tool_specified"; then
21505          # A command without a complete path is provided, search $PATH.
21506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21507$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21508          # Extract the first word of "$tool_basename", so it can be a program name with args.
21509set dummy $tool_basename; ac_word=$2
21510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21511$as_echo_n "checking for $ac_word... " >&6; }
21512if ${ac_cv_path_HG+:} false; then :
21513  $as_echo_n "(cached) " >&6
21514else
21515  case $HG in
21516  [\\/]* | ?:[\\/]*)
21517  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21518  ;;
21519  *)
21520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21521for as_dir in $PATH
21522do
21523  IFS=$as_save_IFS
21524  test -z "$as_dir" && as_dir=.
21525    for ac_exec_ext in '' $ac_executable_extensions; do
21526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21527    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21529    break 2
21530  fi
21531done
21532  done
21533IFS=$as_save_IFS
21534
21535  ;;
21536esac
21537fi
21538HG=$ac_cv_path_HG
21539if test -n "$HG"; then
21540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21541$as_echo "$HG" >&6; }
21542else
21543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21544$as_echo "no" >&6; }
21545fi
21546
21547
21548          if test "x$HG" = x; then
21549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21550          fi
21551        else
21552          # Otherwise we believe it is a complete path. Use it as it is.
21553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21554$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21556$as_echo_n "checking for HG... " >&6; }
21557          if test ! -x "$tool_specified"; then
21558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21559$as_echo "not found" >&6; }
21560            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21561          fi
21562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21563$as_echo "$tool_specified" >&6; }
21564        fi
21565      fi
21566    fi
21567
21568  fi
21569
21570
21571
21572
21573  # Publish this variable in the help.
21574
21575
21576  if [ -z "${STAT+x}" ]; then
21577    # The variable is not set by user, try to locate tool using the code snippet
21578    for ac_prog in stat
21579do
21580  # Extract the first word of "$ac_prog", so it can be a program name with args.
21581set dummy $ac_prog; ac_word=$2
21582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21583$as_echo_n "checking for $ac_word... " >&6; }
21584if ${ac_cv_path_STAT+:} false; then :
21585  $as_echo_n "(cached) " >&6
21586else
21587  case $STAT in
21588  [\\/]* | ?:[\\/]*)
21589  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21590  ;;
21591  *)
21592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21593for as_dir in $PATH
21594do
21595  IFS=$as_save_IFS
21596  test -z "$as_dir" && as_dir=.
21597    for ac_exec_ext in '' $ac_executable_extensions; do
21598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21599    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21601    break 2
21602  fi
21603done
21604  done
21605IFS=$as_save_IFS
21606
21607  ;;
21608esac
21609fi
21610STAT=$ac_cv_path_STAT
21611if test -n "$STAT"; then
21612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21613$as_echo "$STAT" >&6; }
21614else
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21616$as_echo "no" >&6; }
21617fi
21618
21619
21620  test -n "$STAT" && break
21621done
21622
21623  else
21624    # The variable is set, but is it from the command line or the environment?
21625
21626    # Try to remove the string !STAT! from our list.
21627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21629      # If it failed, the variable was not from the command line. Ignore it,
21630      # but warn the user (except for BASH, which is always set by the calling BASH).
21631      if test "xSTAT" != xBASH; then
21632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21633$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21634      fi
21635      # Try to locate tool using the code snippet
21636      for ac_prog in stat
21637do
21638  # Extract the first word of "$ac_prog", so it can be a program name with args.
21639set dummy $ac_prog; ac_word=$2
21640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21641$as_echo_n "checking for $ac_word... " >&6; }
21642if ${ac_cv_path_STAT+:} false; then :
21643  $as_echo_n "(cached) " >&6
21644else
21645  case $STAT in
21646  [\\/]* | ?:[\\/]*)
21647  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21648  ;;
21649  *)
21650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21651for as_dir in $PATH
21652do
21653  IFS=$as_save_IFS
21654  test -z "$as_dir" && as_dir=.
21655    for ac_exec_ext in '' $ac_executable_extensions; do
21656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21657    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21659    break 2
21660  fi
21661done
21662  done
21663IFS=$as_save_IFS
21664
21665  ;;
21666esac
21667fi
21668STAT=$ac_cv_path_STAT
21669if test -n "$STAT"; then
21670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21671$as_echo "$STAT" >&6; }
21672else
21673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21674$as_echo "no" >&6; }
21675fi
21676
21677
21678  test -n "$STAT" && break
21679done
21680
21681    else
21682      # If it succeeded, then it was overridden by the user. We will use it
21683      # for the tool.
21684
21685      # First remove it from the list of overridden variables, so we can test
21686      # for unknown variables in the end.
21687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21688
21689      # Check if we try to supply an empty value
21690      if test "x$STAT" = x; then
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21692$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21694$as_echo_n "checking for STAT... " >&6; }
21695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21696$as_echo "disabled" >&6; }
21697      else
21698        # Check if the provided tool contains a complete path.
21699        tool_specified="$STAT"
21700        tool_basename="${tool_specified##*/}"
21701        if test "x$tool_basename" = "x$tool_specified"; then
21702          # A command without a complete path is provided, search $PATH.
21703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21704$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21705          # Extract the first word of "$tool_basename", so it can be a program name with args.
21706set dummy $tool_basename; ac_word=$2
21707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21708$as_echo_n "checking for $ac_word... " >&6; }
21709if ${ac_cv_path_STAT+:} false; then :
21710  $as_echo_n "(cached) " >&6
21711else
21712  case $STAT in
21713  [\\/]* | ?:[\\/]*)
21714  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21715  ;;
21716  *)
21717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21718for as_dir in $PATH
21719do
21720  IFS=$as_save_IFS
21721  test -z "$as_dir" && as_dir=.
21722    for ac_exec_ext in '' $ac_executable_extensions; do
21723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21724    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21726    break 2
21727  fi
21728done
21729  done
21730IFS=$as_save_IFS
21731
21732  ;;
21733esac
21734fi
21735STAT=$ac_cv_path_STAT
21736if test -n "$STAT"; then
21737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21738$as_echo "$STAT" >&6; }
21739else
21740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21741$as_echo "no" >&6; }
21742fi
21743
21744
21745          if test "x$STAT" = x; then
21746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21747          fi
21748        else
21749          # Otherwise we believe it is a complete path. Use it as it is.
21750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21751$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21753$as_echo_n "checking for STAT... " >&6; }
21754          if test ! -x "$tool_specified"; then
21755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21756$as_echo "not found" >&6; }
21757            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21758          fi
21759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21760$as_echo "$tool_specified" >&6; }
21761        fi
21762      fi
21763    fi
21764
21765  fi
21766
21767
21768
21769
21770  # Publish this variable in the help.
21771
21772
21773  if [ -z "${TIME+x}" ]; then
21774    # The variable is not set by user, try to locate tool using the code snippet
21775    for ac_prog in time
21776do
21777  # Extract the first word of "$ac_prog", so it can be a program name with args.
21778set dummy $ac_prog; ac_word=$2
21779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21780$as_echo_n "checking for $ac_word... " >&6; }
21781if ${ac_cv_path_TIME+:} false; then :
21782  $as_echo_n "(cached) " >&6
21783else
21784  case $TIME in
21785  [\\/]* | ?:[\\/]*)
21786  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21787  ;;
21788  *)
21789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21790for as_dir in $PATH
21791do
21792  IFS=$as_save_IFS
21793  test -z "$as_dir" && as_dir=.
21794    for ac_exec_ext in '' $ac_executable_extensions; do
21795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21796    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21798    break 2
21799  fi
21800done
21801  done
21802IFS=$as_save_IFS
21803
21804  ;;
21805esac
21806fi
21807TIME=$ac_cv_path_TIME
21808if test -n "$TIME"; then
21809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21810$as_echo "$TIME" >&6; }
21811else
21812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21813$as_echo "no" >&6; }
21814fi
21815
21816
21817  test -n "$TIME" && break
21818done
21819
21820  else
21821    # The variable is set, but is it from the command line or the environment?
21822
21823    # Try to remove the string !TIME! from our list.
21824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21826      # If it failed, the variable was not from the command line. Ignore it,
21827      # but warn the user (except for BASH, which is always set by the calling BASH).
21828      if test "xTIME" != xBASH; then
21829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21830$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21831      fi
21832      # Try to locate tool using the code snippet
21833      for ac_prog in time
21834do
21835  # Extract the first word of "$ac_prog", so it can be a program name with args.
21836set dummy $ac_prog; ac_word=$2
21837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21838$as_echo_n "checking for $ac_word... " >&6; }
21839if ${ac_cv_path_TIME+:} false; then :
21840  $as_echo_n "(cached) " >&6
21841else
21842  case $TIME in
21843  [\\/]* | ?:[\\/]*)
21844  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21845  ;;
21846  *)
21847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21848for as_dir in $PATH
21849do
21850  IFS=$as_save_IFS
21851  test -z "$as_dir" && as_dir=.
21852    for ac_exec_ext in '' $ac_executable_extensions; do
21853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21854    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21856    break 2
21857  fi
21858done
21859  done
21860IFS=$as_save_IFS
21861
21862  ;;
21863esac
21864fi
21865TIME=$ac_cv_path_TIME
21866if test -n "$TIME"; then
21867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21868$as_echo "$TIME" >&6; }
21869else
21870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21871$as_echo "no" >&6; }
21872fi
21873
21874
21875  test -n "$TIME" && break
21876done
21877
21878    else
21879      # If it succeeded, then it was overridden by the user. We will use it
21880      # for the tool.
21881
21882      # First remove it from the list of overridden variables, so we can test
21883      # for unknown variables in the end.
21884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21885
21886      # Check if we try to supply an empty value
21887      if test "x$TIME" = x; then
21888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21889$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21891$as_echo_n "checking for TIME... " >&6; }
21892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21893$as_echo "disabled" >&6; }
21894      else
21895        # Check if the provided tool contains a complete path.
21896        tool_specified="$TIME"
21897        tool_basename="${tool_specified##*/}"
21898        if test "x$tool_basename" = "x$tool_specified"; then
21899          # A command without a complete path is provided, search $PATH.
21900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21901$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21902          # Extract the first word of "$tool_basename", so it can be a program name with args.
21903set dummy $tool_basename; ac_word=$2
21904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21905$as_echo_n "checking for $ac_word... " >&6; }
21906if ${ac_cv_path_TIME+:} false; then :
21907  $as_echo_n "(cached) " >&6
21908else
21909  case $TIME in
21910  [\\/]* | ?:[\\/]*)
21911  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21912  ;;
21913  *)
21914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21915for as_dir in $PATH
21916do
21917  IFS=$as_save_IFS
21918  test -z "$as_dir" && as_dir=.
21919    for ac_exec_ext in '' $ac_executable_extensions; do
21920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21921    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21923    break 2
21924  fi
21925done
21926  done
21927IFS=$as_save_IFS
21928
21929  ;;
21930esac
21931fi
21932TIME=$ac_cv_path_TIME
21933if test -n "$TIME"; then
21934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21935$as_echo "$TIME" >&6; }
21936else
21937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21938$as_echo "no" >&6; }
21939fi
21940
21941
21942          if test "x$TIME" = x; then
21943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21944          fi
21945        else
21946          # Otherwise we believe it is a complete path. Use it as it is.
21947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21948$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21950$as_echo_n "checking for TIME... " >&6; }
21951          if test ! -x "$tool_specified"; then
21952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21953$as_echo "not found" >&6; }
21954            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21955          fi
21956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21957$as_echo "$tool_specified" >&6; }
21958        fi
21959      fi
21960    fi
21961
21962  fi
21963
21964
21965
21966
21967  # Publish this variable in the help.
21968
21969
21970  if [ -z "${PATCH+x}" ]; then
21971    # The variable is not set by user, try to locate tool using the code snippet
21972    for ac_prog in gpatch patch
21973do
21974  # Extract the first word of "$ac_prog", so it can be a program name with args.
21975set dummy $ac_prog; ac_word=$2
21976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21977$as_echo_n "checking for $ac_word... " >&6; }
21978if ${ac_cv_path_PATCH+:} false; then :
21979  $as_echo_n "(cached) " >&6
21980else
21981  case $PATCH in
21982  [\\/]* | ?:[\\/]*)
21983  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21984  ;;
21985  *)
21986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21987for as_dir in $PATH
21988do
21989  IFS=$as_save_IFS
21990  test -z "$as_dir" && as_dir=.
21991    for ac_exec_ext in '' $ac_executable_extensions; do
21992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21993    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21995    break 2
21996  fi
21997done
21998  done
21999IFS=$as_save_IFS
22000
22001  ;;
22002esac
22003fi
22004PATCH=$ac_cv_path_PATCH
22005if test -n "$PATCH"; then
22006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22007$as_echo "$PATCH" >&6; }
22008else
22009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22010$as_echo "no" >&6; }
22011fi
22012
22013
22014  test -n "$PATCH" && break
22015done
22016
22017  else
22018    # The variable is set, but is it from the command line or the environment?
22019
22020    # Try to remove the string !PATCH! from our list.
22021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22023      # If it failed, the variable was not from the command line. Ignore it,
22024      # but warn the user (except for BASH, which is always set by the calling BASH).
22025      if test "xPATCH" != xBASH; then
22026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22027$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22028      fi
22029      # Try to locate tool using the code snippet
22030      for ac_prog in gpatch patch
22031do
22032  # Extract the first word of "$ac_prog", so it can be a program name with args.
22033set dummy $ac_prog; ac_word=$2
22034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22035$as_echo_n "checking for $ac_word... " >&6; }
22036if ${ac_cv_path_PATCH+:} false; then :
22037  $as_echo_n "(cached) " >&6
22038else
22039  case $PATCH in
22040  [\\/]* | ?:[\\/]*)
22041  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22042  ;;
22043  *)
22044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22045for as_dir in $PATH
22046do
22047  IFS=$as_save_IFS
22048  test -z "$as_dir" && as_dir=.
22049    for ac_exec_ext in '' $ac_executable_extensions; do
22050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22051    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22053    break 2
22054  fi
22055done
22056  done
22057IFS=$as_save_IFS
22058
22059  ;;
22060esac
22061fi
22062PATCH=$ac_cv_path_PATCH
22063if test -n "$PATCH"; then
22064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22065$as_echo "$PATCH" >&6; }
22066else
22067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22068$as_echo "no" >&6; }
22069fi
22070
22071
22072  test -n "$PATCH" && break
22073done
22074
22075    else
22076      # If it succeeded, then it was overridden by the user. We will use it
22077      # for the tool.
22078
22079      # First remove it from the list of overridden variables, so we can test
22080      # for unknown variables in the end.
22081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22082
22083      # Check if we try to supply an empty value
22084      if test "x$PATCH" = x; then
22085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22086$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22088$as_echo_n "checking for PATCH... " >&6; }
22089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22090$as_echo "disabled" >&6; }
22091      else
22092        # Check if the provided tool contains a complete path.
22093        tool_specified="$PATCH"
22094        tool_basename="${tool_specified##*/}"
22095        if test "x$tool_basename" = "x$tool_specified"; then
22096          # A command without a complete path is provided, search $PATH.
22097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22098$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22099          # Extract the first word of "$tool_basename", so it can be a program name with args.
22100set dummy $tool_basename; ac_word=$2
22101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22102$as_echo_n "checking for $ac_word... " >&6; }
22103if ${ac_cv_path_PATCH+:} false; then :
22104  $as_echo_n "(cached) " >&6
22105else
22106  case $PATCH in
22107  [\\/]* | ?:[\\/]*)
22108  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22109  ;;
22110  *)
22111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22112for as_dir in $PATH
22113do
22114  IFS=$as_save_IFS
22115  test -z "$as_dir" && as_dir=.
22116    for ac_exec_ext in '' $ac_executable_extensions; do
22117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22118    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22120    break 2
22121  fi
22122done
22123  done
22124IFS=$as_save_IFS
22125
22126  ;;
22127esac
22128fi
22129PATCH=$ac_cv_path_PATCH
22130if test -n "$PATCH"; then
22131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22132$as_echo "$PATCH" >&6; }
22133else
22134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22135$as_echo "no" >&6; }
22136fi
22137
22138
22139          if test "x$PATCH" = x; then
22140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22141          fi
22142        else
22143          # Otherwise we believe it is a complete path. Use it as it is.
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22145$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22147$as_echo_n "checking for PATCH... " >&6; }
22148          if test ! -x "$tool_specified"; then
22149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22150$as_echo "not found" >&6; }
22151            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22152          fi
22153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22154$as_echo "$tool_specified" >&6; }
22155        fi
22156      fi
22157    fi
22158
22159  fi
22160
22161
22162  # Check if it's GNU time
22163  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22164  if test "x$IS_GNU_TIME" != x; then
22165    IS_GNU_TIME=yes
22166  else
22167    IS_GNU_TIME=no
22168  fi
22169
22170
22171  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22172
22173
22174
22175  # Publish this variable in the help.
22176
22177
22178  if [ -z "${DSYMUTIL+x}" ]; then
22179    # The variable is not set by user, try to locate tool using the code snippet
22180    for ac_prog in dsymutil
22181do
22182  # Extract the first word of "$ac_prog", so it can be a program name with args.
22183set dummy $ac_prog; ac_word=$2
22184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22185$as_echo_n "checking for $ac_word... " >&6; }
22186if ${ac_cv_path_DSYMUTIL+:} false; then :
22187  $as_echo_n "(cached) " >&6
22188else
22189  case $DSYMUTIL in
22190  [\\/]* | ?:[\\/]*)
22191  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22192  ;;
22193  *)
22194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22195for as_dir in $PATH
22196do
22197  IFS=$as_save_IFS
22198  test -z "$as_dir" && as_dir=.
22199    for ac_exec_ext in '' $ac_executable_extensions; do
22200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22201    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22203    break 2
22204  fi
22205done
22206  done
22207IFS=$as_save_IFS
22208
22209  ;;
22210esac
22211fi
22212DSYMUTIL=$ac_cv_path_DSYMUTIL
22213if test -n "$DSYMUTIL"; then
22214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22215$as_echo "$DSYMUTIL" >&6; }
22216else
22217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22218$as_echo "no" >&6; }
22219fi
22220
22221
22222  test -n "$DSYMUTIL" && break
22223done
22224
22225  else
22226    # The variable is set, but is it from the command line or the environment?
22227
22228    # Try to remove the string !DSYMUTIL! from our list.
22229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22231      # If it failed, the variable was not from the command line. Ignore it,
22232      # but warn the user (except for BASH, which is always set by the calling BASH).
22233      if test "xDSYMUTIL" != xBASH; then
22234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22235$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22236      fi
22237      # Try to locate tool using the code snippet
22238      for ac_prog in dsymutil
22239do
22240  # Extract the first word of "$ac_prog", so it can be a program name with args.
22241set dummy $ac_prog; ac_word=$2
22242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22243$as_echo_n "checking for $ac_word... " >&6; }
22244if ${ac_cv_path_DSYMUTIL+:} false; then :
22245  $as_echo_n "(cached) " >&6
22246else
22247  case $DSYMUTIL in
22248  [\\/]* | ?:[\\/]*)
22249  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22250  ;;
22251  *)
22252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22253for as_dir in $PATH
22254do
22255  IFS=$as_save_IFS
22256  test -z "$as_dir" && as_dir=.
22257    for ac_exec_ext in '' $ac_executable_extensions; do
22258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22259    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22261    break 2
22262  fi
22263done
22264  done
22265IFS=$as_save_IFS
22266
22267  ;;
22268esac
22269fi
22270DSYMUTIL=$ac_cv_path_DSYMUTIL
22271if test -n "$DSYMUTIL"; then
22272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22273$as_echo "$DSYMUTIL" >&6; }
22274else
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22276$as_echo "no" >&6; }
22277fi
22278
22279
22280  test -n "$DSYMUTIL" && break
22281done
22282
22283    else
22284      # If it succeeded, then it was overridden by the user. We will use it
22285      # for the tool.
22286
22287      # First remove it from the list of overridden variables, so we can test
22288      # for unknown variables in the end.
22289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22290
22291      # Check if we try to supply an empty value
22292      if test "x$DSYMUTIL" = x; then
22293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22294$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22296$as_echo_n "checking for DSYMUTIL... " >&6; }
22297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22298$as_echo "disabled" >&6; }
22299      else
22300        # Check if the provided tool contains a complete path.
22301        tool_specified="$DSYMUTIL"
22302        tool_basename="${tool_specified##*/}"
22303        if test "x$tool_basename" = "x$tool_specified"; then
22304          # A command without a complete path is provided, search $PATH.
22305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22306$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22307          # Extract the first word of "$tool_basename", so it can be a program name with args.
22308set dummy $tool_basename; ac_word=$2
22309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22310$as_echo_n "checking for $ac_word... " >&6; }
22311if ${ac_cv_path_DSYMUTIL+:} false; then :
22312  $as_echo_n "(cached) " >&6
22313else
22314  case $DSYMUTIL in
22315  [\\/]* | ?:[\\/]*)
22316  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22317  ;;
22318  *)
22319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22320for as_dir in $PATH
22321do
22322  IFS=$as_save_IFS
22323  test -z "$as_dir" && as_dir=.
22324    for ac_exec_ext in '' $ac_executable_extensions; do
22325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22326    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22328    break 2
22329  fi
22330done
22331  done
22332IFS=$as_save_IFS
22333
22334  ;;
22335esac
22336fi
22337DSYMUTIL=$ac_cv_path_DSYMUTIL
22338if test -n "$DSYMUTIL"; then
22339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22340$as_echo "$DSYMUTIL" >&6; }
22341else
22342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343$as_echo "no" >&6; }
22344fi
22345
22346
22347          if test "x$DSYMUTIL" = x; then
22348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22349          fi
22350        else
22351          # Otherwise we believe it is a complete path. Use it as it is.
22352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22353$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22355$as_echo_n "checking for DSYMUTIL... " >&6; }
22356          if test ! -x "$tool_specified"; then
22357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22358$as_echo "not found" >&6; }
22359            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22360          fi
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22362$as_echo "$tool_specified" >&6; }
22363        fi
22364      fi
22365    fi
22366
22367  fi
22368
22369
22370
22371  if test "x$DSYMUTIL" = x; then
22372    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22373  fi
22374
22375
22376
22377
22378
22379  # Publish this variable in the help.
22380
22381
22382  if [ -z "${XATTR+x}" ]; then
22383    # The variable is not set by user, try to locate tool using the code snippet
22384    for ac_prog in xattr
22385do
22386  # Extract the first word of "$ac_prog", so it can be a program name with args.
22387set dummy $ac_prog; ac_word=$2
22388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22389$as_echo_n "checking for $ac_word... " >&6; }
22390if ${ac_cv_path_XATTR+:} false; then :
22391  $as_echo_n "(cached) " >&6
22392else
22393  case $XATTR in
22394  [\\/]* | ?:[\\/]*)
22395  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22396  ;;
22397  *)
22398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22399for as_dir in $PATH
22400do
22401  IFS=$as_save_IFS
22402  test -z "$as_dir" && as_dir=.
22403    for ac_exec_ext in '' $ac_executable_extensions; do
22404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22405    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22407    break 2
22408  fi
22409done
22410  done
22411IFS=$as_save_IFS
22412
22413  ;;
22414esac
22415fi
22416XATTR=$ac_cv_path_XATTR
22417if test -n "$XATTR"; then
22418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22419$as_echo "$XATTR" >&6; }
22420else
22421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22422$as_echo "no" >&6; }
22423fi
22424
22425
22426  test -n "$XATTR" && break
22427done
22428
22429  else
22430    # The variable is set, but is it from the command line or the environment?
22431
22432    # Try to remove the string !XATTR! from our list.
22433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22435      # If it failed, the variable was not from the command line. Ignore it,
22436      # but warn the user (except for BASH, which is always set by the calling BASH).
22437      if test "xXATTR" != xBASH; then
22438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22439$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22440      fi
22441      # Try to locate tool using the code snippet
22442      for ac_prog in xattr
22443do
22444  # Extract the first word of "$ac_prog", so it can be a program name with args.
22445set dummy $ac_prog; ac_word=$2
22446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22447$as_echo_n "checking for $ac_word... " >&6; }
22448if ${ac_cv_path_XATTR+:} false; then :
22449  $as_echo_n "(cached) " >&6
22450else
22451  case $XATTR in
22452  [\\/]* | ?:[\\/]*)
22453  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22454  ;;
22455  *)
22456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22457for as_dir in $PATH
22458do
22459  IFS=$as_save_IFS
22460  test -z "$as_dir" && as_dir=.
22461    for ac_exec_ext in '' $ac_executable_extensions; do
22462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22463    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22465    break 2
22466  fi
22467done
22468  done
22469IFS=$as_save_IFS
22470
22471  ;;
22472esac
22473fi
22474XATTR=$ac_cv_path_XATTR
22475if test -n "$XATTR"; then
22476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22477$as_echo "$XATTR" >&6; }
22478else
22479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22480$as_echo "no" >&6; }
22481fi
22482
22483
22484  test -n "$XATTR" && break
22485done
22486
22487    else
22488      # If it succeeded, then it was overridden by the user. We will use it
22489      # for the tool.
22490
22491      # First remove it from the list of overridden variables, so we can test
22492      # for unknown variables in the end.
22493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22494
22495      # Check if we try to supply an empty value
22496      if test "x$XATTR" = x; then
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22498$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22500$as_echo_n "checking for XATTR... " >&6; }
22501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22502$as_echo "disabled" >&6; }
22503      else
22504        # Check if the provided tool contains a complete path.
22505        tool_specified="$XATTR"
22506        tool_basename="${tool_specified##*/}"
22507        if test "x$tool_basename" = "x$tool_specified"; then
22508          # A command without a complete path is provided, search $PATH.
22509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22510$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22511          # Extract the first word of "$tool_basename", so it can be a program name with args.
22512set dummy $tool_basename; ac_word=$2
22513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22514$as_echo_n "checking for $ac_word... " >&6; }
22515if ${ac_cv_path_XATTR+:} false; then :
22516  $as_echo_n "(cached) " >&6
22517else
22518  case $XATTR in
22519  [\\/]* | ?:[\\/]*)
22520  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22521  ;;
22522  *)
22523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22524for as_dir in $PATH
22525do
22526  IFS=$as_save_IFS
22527  test -z "$as_dir" && as_dir=.
22528    for ac_exec_ext in '' $ac_executable_extensions; do
22529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22530    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22532    break 2
22533  fi
22534done
22535  done
22536IFS=$as_save_IFS
22537
22538  ;;
22539esac
22540fi
22541XATTR=$ac_cv_path_XATTR
22542if test -n "$XATTR"; then
22543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22544$as_echo "$XATTR" >&6; }
22545else
22546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22547$as_echo "no" >&6; }
22548fi
22549
22550
22551          if test "x$XATTR" = x; then
22552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22553          fi
22554        else
22555          # Otherwise we believe it is a complete path. Use it as it is.
22556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22557$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22559$as_echo_n "checking for XATTR... " >&6; }
22560          if test ! -x "$tool_specified"; then
22561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22562$as_echo "not found" >&6; }
22563            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22564          fi
22565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22566$as_echo "$tool_specified" >&6; }
22567        fi
22568      fi
22569    fi
22570
22571  fi
22572
22573
22574
22575  if test "x$XATTR" = x; then
22576    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22577  fi
22578
22579
22580
22581
22582  # Publish this variable in the help.
22583
22584
22585  if [ -z "${CODESIGN+x}" ]; then
22586    # The variable is not set by user, try to locate tool using the code snippet
22587    for ac_prog in codesign
22588do
22589  # Extract the first word of "$ac_prog", so it can be a program name with args.
22590set dummy $ac_prog; ac_word=$2
22591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22592$as_echo_n "checking for $ac_word... " >&6; }
22593if ${ac_cv_path_CODESIGN+:} false; then :
22594  $as_echo_n "(cached) " >&6
22595else
22596  case $CODESIGN in
22597  [\\/]* | ?:[\\/]*)
22598  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22599  ;;
22600  *)
22601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22602for as_dir in $PATH
22603do
22604  IFS=$as_save_IFS
22605  test -z "$as_dir" && as_dir=.
22606    for ac_exec_ext in '' $ac_executable_extensions; do
22607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22608    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22610    break 2
22611  fi
22612done
22613  done
22614IFS=$as_save_IFS
22615
22616  ;;
22617esac
22618fi
22619CODESIGN=$ac_cv_path_CODESIGN
22620if test -n "$CODESIGN"; then
22621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22622$as_echo "$CODESIGN" >&6; }
22623else
22624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22625$as_echo "no" >&6; }
22626fi
22627
22628
22629  test -n "$CODESIGN" && break
22630done
22631
22632  else
22633    # The variable is set, but is it from the command line or the environment?
22634
22635    # Try to remove the string !CODESIGN! from our list.
22636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22638      # If it failed, the variable was not from the command line. Ignore it,
22639      # but warn the user (except for BASH, which is always set by the calling BASH).
22640      if test "xCODESIGN" != xBASH; then
22641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22642$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22643      fi
22644      # Try to locate tool using the code snippet
22645      for ac_prog in codesign
22646do
22647  # Extract the first word of "$ac_prog", so it can be a program name with args.
22648set dummy $ac_prog; ac_word=$2
22649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22650$as_echo_n "checking for $ac_word... " >&6; }
22651if ${ac_cv_path_CODESIGN+:} false; then :
22652  $as_echo_n "(cached) " >&6
22653else
22654  case $CODESIGN in
22655  [\\/]* | ?:[\\/]*)
22656  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22657  ;;
22658  *)
22659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22660for as_dir in $PATH
22661do
22662  IFS=$as_save_IFS
22663  test -z "$as_dir" && as_dir=.
22664    for ac_exec_ext in '' $ac_executable_extensions; do
22665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22666    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22668    break 2
22669  fi
22670done
22671  done
22672IFS=$as_save_IFS
22673
22674  ;;
22675esac
22676fi
22677CODESIGN=$ac_cv_path_CODESIGN
22678if test -n "$CODESIGN"; then
22679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22680$as_echo "$CODESIGN" >&6; }
22681else
22682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22683$as_echo "no" >&6; }
22684fi
22685
22686
22687  test -n "$CODESIGN" && break
22688done
22689
22690    else
22691      # If it succeeded, then it was overridden by the user. We will use it
22692      # for the tool.
22693
22694      # First remove it from the list of overridden variables, so we can test
22695      # for unknown variables in the end.
22696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22697
22698      # Check if we try to supply an empty value
22699      if test "x$CODESIGN" = x; then
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22701$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22703$as_echo_n "checking for CODESIGN... " >&6; }
22704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22705$as_echo "disabled" >&6; }
22706      else
22707        # Check if the provided tool contains a complete path.
22708        tool_specified="$CODESIGN"
22709        tool_basename="${tool_specified##*/}"
22710        if test "x$tool_basename" = "x$tool_specified"; then
22711          # A command without a complete path is provided, search $PATH.
22712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22713$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22714          # Extract the first word of "$tool_basename", so it can be a program name with args.
22715set dummy $tool_basename; ac_word=$2
22716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22717$as_echo_n "checking for $ac_word... " >&6; }
22718if ${ac_cv_path_CODESIGN+:} false; then :
22719  $as_echo_n "(cached) " >&6
22720else
22721  case $CODESIGN in
22722  [\\/]* | ?:[\\/]*)
22723  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22724  ;;
22725  *)
22726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22727for as_dir in $PATH
22728do
22729  IFS=$as_save_IFS
22730  test -z "$as_dir" && as_dir=.
22731    for ac_exec_ext in '' $ac_executable_extensions; do
22732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22733    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22735    break 2
22736  fi
22737done
22738  done
22739IFS=$as_save_IFS
22740
22741  ;;
22742esac
22743fi
22744CODESIGN=$ac_cv_path_CODESIGN
22745if test -n "$CODESIGN"; then
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22747$as_echo "$CODESIGN" >&6; }
22748else
22749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22750$as_echo "no" >&6; }
22751fi
22752
22753
22754          if test "x$CODESIGN" = x; then
22755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22756          fi
22757        else
22758          # Otherwise we believe it is a complete path. Use it as it is.
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22760$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22762$as_echo_n "checking for CODESIGN... " >&6; }
22763          if test ! -x "$tool_specified"; then
22764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22765$as_echo "not found" >&6; }
22766            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22767          fi
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22769$as_echo "$tool_specified" >&6; }
22770        fi
22771      fi
22772    fi
22773
22774  fi
22775
22776
22777    if test "x$CODESIGN" != "x"; then
22778      # Verify that the openjdk_codesign certificate is present
22779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22780$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22781      rm -f codesign-testfile
22782      touch codesign-testfile
22783      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22784      rm -f codesign-testfile
22785      if test "x$CODESIGN" = x; then
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22787$as_echo "no" >&6; }
22788      else
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22790$as_echo "yes" >&6; }
22791      fi
22792    fi
22793
22794
22795
22796  # Publish this variable in the help.
22797
22798
22799  if [ -z "${SETFILE+x}" ]; then
22800    # The variable is not set by user, try to locate tool using the code snippet
22801    for ac_prog in SetFile
22802do
22803  # Extract the first word of "$ac_prog", so it can be a program name with args.
22804set dummy $ac_prog; ac_word=$2
22805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22806$as_echo_n "checking for $ac_word... " >&6; }
22807if ${ac_cv_path_SETFILE+:} false; then :
22808  $as_echo_n "(cached) " >&6
22809else
22810  case $SETFILE in
22811  [\\/]* | ?:[\\/]*)
22812  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22813  ;;
22814  *)
22815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22816for as_dir in $PATH
22817do
22818  IFS=$as_save_IFS
22819  test -z "$as_dir" && as_dir=.
22820    for ac_exec_ext in '' $ac_executable_extensions; do
22821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22822    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22824    break 2
22825  fi
22826done
22827  done
22828IFS=$as_save_IFS
22829
22830  ;;
22831esac
22832fi
22833SETFILE=$ac_cv_path_SETFILE
22834if test -n "$SETFILE"; then
22835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22836$as_echo "$SETFILE" >&6; }
22837else
22838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22839$as_echo "no" >&6; }
22840fi
22841
22842
22843  test -n "$SETFILE" && break
22844done
22845
22846  else
22847    # The variable is set, but is it from the command line or the environment?
22848
22849    # Try to remove the string !SETFILE! from our list.
22850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22852      # If it failed, the variable was not from the command line. Ignore it,
22853      # but warn the user (except for BASH, which is always set by the calling BASH).
22854      if test "xSETFILE" != xBASH; then
22855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22856$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22857      fi
22858      # Try to locate tool using the code snippet
22859      for ac_prog in SetFile
22860do
22861  # Extract the first word of "$ac_prog", so it can be a program name with args.
22862set dummy $ac_prog; ac_word=$2
22863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22864$as_echo_n "checking for $ac_word... " >&6; }
22865if ${ac_cv_path_SETFILE+:} false; then :
22866  $as_echo_n "(cached) " >&6
22867else
22868  case $SETFILE in
22869  [\\/]* | ?:[\\/]*)
22870  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22871  ;;
22872  *)
22873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22874for as_dir in $PATH
22875do
22876  IFS=$as_save_IFS
22877  test -z "$as_dir" && as_dir=.
22878    for ac_exec_ext in '' $ac_executable_extensions; do
22879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22880    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22882    break 2
22883  fi
22884done
22885  done
22886IFS=$as_save_IFS
22887
22888  ;;
22889esac
22890fi
22891SETFILE=$ac_cv_path_SETFILE
22892if test -n "$SETFILE"; then
22893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22894$as_echo "$SETFILE" >&6; }
22895else
22896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22897$as_echo "no" >&6; }
22898fi
22899
22900
22901  test -n "$SETFILE" && break
22902done
22903
22904    else
22905      # If it succeeded, then it was overridden by the user. We will use it
22906      # for the tool.
22907
22908      # First remove it from the list of overridden variables, so we can test
22909      # for unknown variables in the end.
22910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22911
22912      # Check if we try to supply an empty value
22913      if test "x$SETFILE" = x; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22915$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22917$as_echo_n "checking for SETFILE... " >&6; }
22918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22919$as_echo "disabled" >&6; }
22920      else
22921        # Check if the provided tool contains a complete path.
22922        tool_specified="$SETFILE"
22923        tool_basename="${tool_specified##*/}"
22924        if test "x$tool_basename" = "x$tool_specified"; then
22925          # A command without a complete path is provided, search $PATH.
22926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22927$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22928          # Extract the first word of "$tool_basename", so it can be a program name with args.
22929set dummy $tool_basename; ac_word=$2
22930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22931$as_echo_n "checking for $ac_word... " >&6; }
22932if ${ac_cv_path_SETFILE+:} false; then :
22933  $as_echo_n "(cached) " >&6
22934else
22935  case $SETFILE in
22936  [\\/]* | ?:[\\/]*)
22937  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22938  ;;
22939  *)
22940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22941for as_dir in $PATH
22942do
22943  IFS=$as_save_IFS
22944  test -z "$as_dir" && as_dir=.
22945    for ac_exec_ext in '' $ac_executable_extensions; do
22946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22947    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22949    break 2
22950  fi
22951done
22952  done
22953IFS=$as_save_IFS
22954
22955  ;;
22956esac
22957fi
22958SETFILE=$ac_cv_path_SETFILE
22959if test -n "$SETFILE"; then
22960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22961$as_echo "$SETFILE" >&6; }
22962else
22963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22964$as_echo "no" >&6; }
22965fi
22966
22967
22968          if test "x$SETFILE" = x; then
22969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22970          fi
22971        else
22972          # Otherwise we believe it is a complete path. Use it as it is.
22973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22974$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22976$as_echo_n "checking for SETFILE... " >&6; }
22977          if test ! -x "$tool_specified"; then
22978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22979$as_echo "not found" >&6; }
22980            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22981          fi
22982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22983$as_echo "$tool_specified" >&6; }
22984        fi
22985      fi
22986    fi
22987
22988  fi
22989
22990
22991
22992  if test "x$SETFILE" = x; then
22993    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22994  fi
22995
22996
22997  fi
22998
22999
23000  # Test if bash supports pipefail.
23001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23002$as_echo_n "checking if bash supports pipefail... " >&6; }
23003  if ${BASH} -c 'set -o pipefail'; then
23004    BASH_ARGS="$BASH_ARGS -o pipefail"
23005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23006$as_echo "yes" >&6; }
23007  else
23008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23009$as_echo "no" >&6; }
23010  fi
23011
23012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23013$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23014  if ${BASH} -e -c 'true'; then
23015    BASH_ARGS="$BASH_ARGS -e"
23016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23017$as_echo "yes" >&6; }
23018  else
23019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020$as_echo "no" >&6; }
23021  fi
23022
23023
23024
23025
23026# Check if pkg-config is available.
23027
23028
23029if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23030	if test -n "$ac_tool_prefix"; then
23031  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23032set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23034$as_echo_n "checking for $ac_word... " >&6; }
23035if ${ac_cv_path_PKG_CONFIG+:} false; then :
23036  $as_echo_n "(cached) " >&6
23037else
23038  case $PKG_CONFIG in
23039  [\\/]* | ?:[\\/]*)
23040  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23041  ;;
23042  *)
23043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23044for as_dir in $PATH
23045do
23046  IFS=$as_save_IFS
23047  test -z "$as_dir" && as_dir=.
23048    for ac_exec_ext in '' $ac_executable_extensions; do
23049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23050    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23052    break 2
23053  fi
23054done
23055  done
23056IFS=$as_save_IFS
23057
23058  ;;
23059esac
23060fi
23061PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23062if test -n "$PKG_CONFIG"; then
23063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23064$as_echo "$PKG_CONFIG" >&6; }
23065else
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067$as_echo "no" >&6; }
23068fi
23069
23070
23071fi
23072if test -z "$ac_cv_path_PKG_CONFIG"; then
23073  ac_pt_PKG_CONFIG=$PKG_CONFIG
23074  # Extract the first word of "pkg-config", so it can be a program name with args.
23075set dummy pkg-config; ac_word=$2
23076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23077$as_echo_n "checking for $ac_word... " >&6; }
23078if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23079  $as_echo_n "(cached) " >&6
23080else
23081  case $ac_pt_PKG_CONFIG in
23082  [\\/]* | ?:[\\/]*)
23083  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23084  ;;
23085  *)
23086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23087for as_dir in $PATH
23088do
23089  IFS=$as_save_IFS
23090  test -z "$as_dir" && as_dir=.
23091    for ac_exec_ext in '' $ac_executable_extensions; do
23092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23093    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23095    break 2
23096  fi
23097done
23098  done
23099IFS=$as_save_IFS
23100
23101  ;;
23102esac
23103fi
23104ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23105if test -n "$ac_pt_PKG_CONFIG"; then
23106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23107$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23108else
23109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23110$as_echo "no" >&6; }
23111fi
23112
23113  if test "x$ac_pt_PKG_CONFIG" = x; then
23114    PKG_CONFIG=""
23115  else
23116    case $cross_compiling:$ac_tool_warned in
23117yes:)
23118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23120ac_tool_warned=yes ;;
23121esac
23122    PKG_CONFIG=$ac_pt_PKG_CONFIG
23123  fi
23124else
23125  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23126fi
23127
23128fi
23129if test -n "$PKG_CONFIG"; then
23130	_pkg_min_version=0.9.0
23131	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23132$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23133	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23134		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23135$as_echo "yes" >&6; }
23136	else
23137		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23138$as_echo "no" >&6; }
23139		PKG_CONFIG=""
23140	fi
23141
23142fi
23143
23144# After basic tools have been setup, we can check build os specific details.
23145
23146  ###############################################################################
23147
23148  # Note that this is the build platform OS version!
23149
23150  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23151  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23152  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23153  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23154
23155
23156
23157
23158
23159# Misc basic settings
23160
23161
23162# Check whether --with-default-make-target was given.
23163if test "${with_default_make_target+set}" = set; then :
23164  withval=$with_default_make_target;
23165fi
23166
23167  if test "x$with_default_make_target" = "x" \
23168      || test "x$with_default_make_target" = "xyes"; then
23169    DEFAULT_MAKE_TARGET="exploded-image"
23170  elif test "x$with_default_make_target" = "xno"; then
23171    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23172  else
23173    DEFAULT_MAKE_TARGET="$with_default_make_target"
23174  fi
23175
23176
23177
23178
23179###############################################################################
23180#
23181# Determine OpenJDK variants, options and version numbers.
23182#
23183###############################################################################
23184
23185# We need build & target for this.
23186
23187  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23188  # We always build headless support.
23189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23190$as_echo_n "checking headful support... " >&6; }
23191  # Check whether --enable-headful was given.
23192if test "${enable_headful+set}" = set; then :
23193  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23194else
23195  SUPPORT_HEADFUL=yes
23196fi
23197
23198
23199  SUPPORT_HEADLESS=yes
23200  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23201
23202  if test "x$SUPPORT_HEADFUL" = xyes; then
23203    # We are building both headful and headless.
23204    headful_msg="include support for both headful and headless"
23205  fi
23206
23207  if test "x$SUPPORT_HEADFUL" = xno; then
23208    # Thus we are building headless only.
23209    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23210    headful_msg="headless only"
23211  fi
23212
23213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23214$as_echo "$headful_msg" >&6; }
23215
23216
23217
23218
23219
23220  # Choose cacerts source file
23221
23222# Check whether --with-cacerts-file was given.
23223if test "${with_cacerts_file+set}" = set; then :
23224  withval=$with_cacerts_file;
23225fi
23226
23227  if test "x$with_cacerts_file" != x; then
23228    CACERTS_FILE=$with_cacerts_file
23229  fi
23230
23231
23232  # Enable or disable unlimited crypto
23233  # Check whether --enable-unlimited-crypto was given.
23234if test "${enable_unlimited_crypto+set}" = set; then :
23235  enableval=$enable_unlimited_crypto;
23236else
23237  enable_unlimited_crypto=no
23238fi
23239
23240  if test "x$enable_unlimited_crypto" = "xyes"; then
23241    UNLIMITED_CRYPTO=true
23242  else
23243    UNLIMITED_CRYPTO=false
23244  fi
23245
23246
23247  # Compress jars
23248  COMPRESS_JARS=false
23249
23250
23251
23252  # Setup default copyright year. Mostly overridden when building close to a new year.
23253
23254# Check whether --with-copyright-year was given.
23255if test "${with_copyright_year+set}" = set; then :
23256  withval=$with_copyright_year;
23257fi
23258
23259  if test "x$with_copyright_year" = xyes; then
23260    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23261  elif test "x$with_copyright_year" != x; then
23262    COPYRIGHT_YEAR="$with_copyright_year"
23263  else
23264    COPYRIGHT_YEAR=`date +'%Y'`
23265  fi
23266
23267
23268
23269  # Control wether Hotspot runs Queens test after build.
23270  # Check whether --enable-hotspot-test-in-build was given.
23271if test "${enable_hotspot_test_in_build+set}" = set; then :
23272  enableval=$enable_hotspot_test_in_build;
23273else
23274  enable_hotspot_test_in_build=no
23275fi
23276
23277  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23278    TEST_IN_BUILD=true
23279  else
23280    TEST_IN_BUILD=false
23281  fi
23282
23283
23284
23285  # Warn user that old version arguments are deprecated.
23286
23287
23288# Check whether --with-milestone was given.
23289if test "${with_milestone+set}" = set; then :
23290  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23291$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23292fi
23293
23294
23295
23296
23297# Check whether --with-update-version was given.
23298if test "${with_update_version+set}" = set; then :
23299  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23300$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23301fi
23302
23303
23304
23305
23306# Check whether --with-user-release-suffix was given.
23307if test "${with_user_release_suffix+set}" = set; then :
23308  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
23309$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23310fi
23311
23312
23313
23314
23315# Check whether --with-build-number was given.
23316if test "${with_build_number+set}" = set; then :
23317  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23318$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23319fi
23320
23321
23322
23323  # Source the version numbers file
23324  . $AUTOCONF_DIR/version-numbers
23325
23326  # Some non-version number information is set in that file
23327
23328
23329
23330
23331
23332
23333
23334
23335  # Override version from arguments
23336
23337  # If --with-version-string is set, process it first. It is possible to
23338  # override parts with more specific flags, since these are processed later.
23339
23340# Check whether --with-version-string was given.
23341if test "${with_version_string+set}" = set; then :
23342  withval=$with_version_string;
23343fi
23344
23345  if test "x$with_version_string" = xyes; then
23346    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23347  elif test "x$with_version_string" != x; then
23348    # Additional [] needed to keep m4 from mangling shell constructs.
23349    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23350      VERSION_MAJOR=${BASH_REMATCH[1]}
23351      VERSION_MINOR=${BASH_REMATCH[3]}
23352      VERSION_SECURITY=${BASH_REMATCH[5]}
23353      VERSION_PATCH=${BASH_REMATCH[7]}
23354      VERSION_PRE=${BASH_REMATCH[9]}
23355      version_plus_separator=${BASH_REMATCH[11]}
23356      VERSION_BUILD=${BASH_REMATCH[12]}
23357      VERSION_OPT=${BASH_REMATCH[14]}
23358      # Unspecified numerical fields are interpreted as 0.
23359      if test "x$VERSION_MINOR" = x; then
23360        VERSION_MINOR=0
23361      fi
23362      if test "x$VERSION_SECURITY" = x; then
23363        VERSION_SECURITY=0
23364      fi
23365      if test "x$VERSION_PATCH" = x; then
23366        VERSION_PATCH=0
23367      fi
23368      if test "x$version_plus_separator" != x \
23369          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23370        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23371      fi
23372      # Stop the version part process from setting default values.
23373      # We still allow them to explicitely override though.
23374      NO_DEFAULT_VERSION_PARTS=true
23375    else
23376      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23377    fi
23378  fi
23379
23380
23381# Check whether --with-version-pre was given.
23382if test "${with_version_pre+set}" = set; then :
23383  withval=$with_version_pre; with_version_pre_present=true
23384else
23385  with_version_pre_present=false
23386fi
23387
23388
23389  if test "x$with_version_pre_present" = xtrue; then
23390    if test "x$with_version_pre" = xyes; then
23391      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23392    elif test "x$with_version_pre" = xno; then
23393      # Interpret --without-* as empty string instead of the literal "no"
23394      VERSION_PRE=
23395    else
23396      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23397       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23398      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23400$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23401      fi
23402    fi
23403  else
23404    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23405      # Default is to use "internal" as pre
23406      VERSION_PRE="internal"
23407    fi
23408  fi
23409
23410
23411# Check whether --with-version-opt was given.
23412if test "${with_version_opt+set}" = set; then :
23413  withval=$with_version_opt; with_version_opt_present=true
23414else
23415  with_version_opt_present=false
23416fi
23417
23418
23419  if test "x$with_version_opt_present" = xtrue; then
23420    if test "x$with_version_opt" = xyes; then
23421      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23422    elif test "x$with_version_opt" = xno; then
23423      # Interpret --without-* as empty string instead of the literal "no"
23424      VERSION_OPT=
23425    else
23426      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23427       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23428      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23430$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23431      fi
23432    fi
23433  else
23434    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23435      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23436      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23437      # Outer [ ] to quote m4.
23438       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23439      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23440    fi
23441  fi
23442
23443
23444# Check whether --with-version-build was given.
23445if test "${with_version_build+set}" = set; then :
23446  withval=$with_version_build; with_version_build_present=true
23447else
23448  with_version_build_present=false
23449fi
23450
23451
23452  if test "x$with_version_build_present" = xtrue; then
23453    if test "x$with_version_build" = xyes; then
23454      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23455    elif test "x$with_version_build" = xno; then
23456      # Interpret --without-* as empty string instead of the literal "no"
23457      VERSION_BUILD=
23458    elif test "x$with_version_build" = x; then
23459      VERSION_BUILD=
23460    else
23461
23462  # Additional [] needed to keep m4 from mangling shell constructs.
23463  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23464    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23465  fi
23466  # Extract the version number without leading zeros.
23467  cleaned_value=${BASH_REMATCH[1]}
23468  if test "x$cleaned_value" = x; then
23469    # Special case for zero
23470    cleaned_value=${BASH_REMATCH[2]}
23471  fi
23472
23473  if test $cleaned_value -gt 255; then
23474    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23475  fi
23476  if test "x$cleaned_value" != "x$with_version_build"; then
23477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23478$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23479  fi
23480  VERSION_BUILD=$cleaned_value
23481
23482    fi
23483  else
23484    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23485      # Default is to not have a build number.
23486      VERSION_BUILD=""
23487      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23488      VERSION_BUILD=0
23489    fi
23490  fi
23491
23492
23493# Check whether --with-version-major was given.
23494if test "${with_version_major+set}" = set; then :
23495  withval=$with_version_major; with_version_major_present=true
23496else
23497  with_version_major_present=false
23498fi
23499
23500
23501  if test "x$with_version_major_present" = xtrue; then
23502    if test "x$with_version_major" = xyes; then
23503      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23504    else
23505
23506  # Additional [] needed to keep m4 from mangling shell constructs.
23507  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23508    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23509  fi
23510  # Extract the version number without leading zeros.
23511  cleaned_value=${BASH_REMATCH[1]}
23512  if test "x$cleaned_value" = x; then
23513    # Special case for zero
23514    cleaned_value=${BASH_REMATCH[2]}
23515  fi
23516
23517  if test $cleaned_value -gt 255; then
23518    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23519  fi
23520  if test "x$cleaned_value" != "x$with_version_major"; then
23521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23522$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23523  fi
23524  VERSION_MAJOR=$cleaned_value
23525
23526    fi
23527  else
23528    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23529      # Default is to get value from version-numbers
23530      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23531    fi
23532  fi
23533
23534
23535# Check whether --with-version-minor was given.
23536if test "${with_version_minor+set}" = set; then :
23537  withval=$with_version_minor; with_version_minor_present=true
23538else
23539  with_version_minor_present=false
23540fi
23541
23542
23543  if test "x$with_version_minor_present" = xtrue; then
23544    if test "x$with_version_minor" = xyes; then
23545      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23546    elif test "x$with_version_minor" = xno; then
23547      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23548      VERSION_MINOR=0
23549    elif test "x$with_version_minor" = x; then
23550      VERSION_MINOR=0
23551    else
23552
23553  # Additional [] needed to keep m4 from mangling shell constructs.
23554  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23555    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23556  fi
23557  # Extract the version number without leading zeros.
23558  cleaned_value=${BASH_REMATCH[1]}
23559  if test "x$cleaned_value" = x; then
23560    # Special case for zero
23561    cleaned_value=${BASH_REMATCH[2]}
23562  fi
23563
23564  if test $cleaned_value -gt 255; then
23565    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23566  fi
23567  if test "x$cleaned_value" != "x$with_version_minor"; then
23568    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23569$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23570  fi
23571  VERSION_MINOR=$cleaned_value
23572
23573    fi
23574  else
23575    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23576      # Default is 0, if unspecified
23577      VERSION_MINOR=0
23578    fi
23579  fi
23580
23581
23582# Check whether --with-version-security was given.
23583if test "${with_version_security+set}" = set; then :
23584  withval=$with_version_security; with_version_security_present=true
23585else
23586  with_version_security_present=false
23587fi
23588
23589
23590  if test "x$with_version_security_present" = xtrue; then
23591    if test "x$with_version_security" = xyes; then
23592      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23593    elif test "x$with_version_security" = xno; then
23594      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23595      VERSION_SECURITY=0
23596    elif test "x$with_version_security" = x; then
23597      VERSION_SECURITY=0
23598    else
23599
23600  # Additional [] needed to keep m4 from mangling shell constructs.
23601  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23602    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23603  fi
23604  # Extract the version number without leading zeros.
23605  cleaned_value=${BASH_REMATCH[1]}
23606  if test "x$cleaned_value" = x; then
23607    # Special case for zero
23608    cleaned_value=${BASH_REMATCH[2]}
23609  fi
23610
23611  if test $cleaned_value -gt 255; then
23612    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23613  fi
23614  if test "x$cleaned_value" != "x$with_version_security"; then
23615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23616$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23617  fi
23618  VERSION_SECURITY=$cleaned_value
23619
23620    fi
23621  else
23622    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23623      # Default is 0, if unspecified
23624      VERSION_SECURITY=0
23625    fi
23626  fi
23627
23628
23629# Check whether --with-version-patch was given.
23630if test "${with_version_patch+set}" = set; then :
23631  withval=$with_version_patch; with_version_patch_present=true
23632else
23633  with_version_patch_present=false
23634fi
23635
23636
23637  if test "x$with_version_patch_present" = xtrue; then
23638    if test "x$with_version_patch" = xyes; then
23639      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23640    elif test "x$with_version_patch" = xno; then
23641      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23642      VERSION_PATCH=0
23643    elif test "x$with_version_patch" = x; then
23644      VERSION_PATCH=0
23645    else
23646
23647  # Additional [] needed to keep m4 from mangling shell constructs.
23648  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23649    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23650  fi
23651  # Extract the version number without leading zeros.
23652  cleaned_value=${BASH_REMATCH[1]}
23653  if test "x$cleaned_value" = x; then
23654    # Special case for zero
23655    cleaned_value=${BASH_REMATCH[2]}
23656  fi
23657
23658  if test $cleaned_value -gt 255; then
23659    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23660  fi
23661  if test "x$cleaned_value" != "x$with_version_patch"; then
23662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23663$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23664  fi
23665  VERSION_PATCH=$cleaned_value
23666
23667    fi
23668  else
23669    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23670      # Default is 0, if unspecified
23671      VERSION_PATCH=0
23672    fi
23673  fi
23674
23675  # Calculate derived version properties
23676
23677  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23678  if test "x$VERSION_PRE" = x; then
23679    VERSION_IS_GA=true
23680  else
23681    VERSION_IS_GA=false
23682  fi
23683
23684  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23685  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23686
23687  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23688  # Strip trailing zeroes from stripped_version_number
23689  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23690  VERSION_NUMBER=$stripped_version_number
23691
23692  # The complete version string, with additional build information
23693  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23694    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23695  else
23696    # If either build or opt is set, we need a + separator
23697    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23698  fi
23699
23700  # The short version string, just VERSION_NUMBER and PRE, if present.
23701  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23702
23703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23704$as_echo_n "checking for version string... " >&6; }
23705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23706$as_echo "$VERSION_STRING" >&6; }
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722###############################################################################
23723#
23724# Setup BootJDK, used to bootstrap the build.
23725#
23726###############################################################################
23727
23728
23729  BOOT_JDK_FOUND=no
23730
23731# Check whether --with-boot-jdk was given.
23732if test "${with_boot_jdk+set}" = set; then :
23733  withval=$with_boot_jdk;
23734fi
23735
23736
23737  # We look for the Boot JDK through various means, going from more certain to
23738  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23739  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23740  # must check if this is indeed valid; otherwise we'll continue looking.
23741
23742  # Test: Is bootjdk explicitely set by command line arguments?
23743
23744  if test "x$BOOT_JDK_FOUND" = xno; then
23745    # Now execute the test
23746
23747  if test "x$with_boot_jdk" != x; then
23748    BOOT_JDK=$with_boot_jdk
23749    BOOT_JDK_FOUND=maybe
23750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23751$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23752  fi
23753
23754
23755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23757      # Do we have a bin/java?
23758      if test ! -x "$BOOT_JDK/bin/java"; then
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23761        BOOT_JDK_FOUND=no
23762      else
23763        # Do we have a bin/javac?
23764        if test ! -x "$BOOT_JDK/bin/javac"; then
23765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23769          BOOT_JDK_FOUND=no
23770        else
23771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23773
23774          # Extra M4 quote needed to protect [] in grep expression.
23775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23776          if test "x$FOUND_CORRECT_VERSION" = x; then
23777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23781            BOOT_JDK_FOUND=no
23782          else
23783            # We're done! :-)
23784            BOOT_JDK_FOUND=yes
23785
23786  # Only process if variable expands to non-empty
23787
23788  if test "x$BOOT_JDK" != x; then
23789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23790
23791  # Input might be given as Windows format, start by converting to
23792  # unix format.
23793  path="$BOOT_JDK"
23794  new_path=`$CYGPATH -u "$path"`
23795
23796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23799  # "foo.exe" is OK but "foo" is an error.
23800  #
23801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23802  # It is also a way to make sure we got the proper file name for the real test later on.
23803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23804  if test "x$test_shortpath" = x; then
23805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23808  fi
23809
23810  # Call helper function which possibly converts this using DOS-style short mode.
23811  # If so, the updated path is stored in $new_path.
23812
23813  input_path="$new_path"
23814  # Check if we need to convert this using DOS-style short mode. If the path
23815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23816  # take no chances and rewrite it.
23817  # Note: m4 eats our [], so we need to use [ and ] instead.
23818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23819  if test "x$has_forbidden_chars" != x; then
23820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23824      # Going to short mode and back again did indeed matter. Since short mode is
23825      # case insensitive, let's make it lowercase to improve readability.
23826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23827      # Now convert it back to Unix-style (cygpath)
23828      input_path=`$CYGPATH -u "$shortmode_path"`
23829      new_path="$input_path"
23830    fi
23831  fi
23832
23833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23834  if test "x$test_cygdrive_prefix" = x; then
23835    # As a simple fix, exclude /usr/bin since it's not a real path.
23836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23838      # a path prefixed by /cygdrive for fixpath to work.
23839      new_path="$CYGWIN_ROOT_PATH$input_path"
23840    fi
23841  fi
23842
23843
23844  if test "x$path" != "x$new_path"; then
23845    BOOT_JDK="$new_path"
23846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23848  fi
23849
23850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23851
23852  path="$BOOT_JDK"
23853  has_colon=`$ECHO $path | $GREP ^.:`
23854  new_path="$path"
23855  if test "x$has_colon" = x; then
23856    # Not in mixed or Windows style, start by that.
23857    new_path=`cmd //c echo $path`
23858  fi
23859
23860
23861  input_path="$new_path"
23862  # Check if we need to convert this using DOS-style short mode. If the path
23863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23864  # take no chances and rewrite it.
23865  # Note: m4 eats our [], so we need to use [ and ] instead.
23866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23867  if test "x$has_forbidden_chars" != x; then
23868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23870  fi
23871
23872
23873  windows_path="$new_path"
23874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23875    unix_path=`$CYGPATH -u "$windows_path"`
23876    new_path="$unix_path"
23877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23879    new_path="$unix_path"
23880  fi
23881
23882  if test "x$path" != "x$new_path"; then
23883    BOOT_JDK="$new_path"
23884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23886  fi
23887
23888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23890
23891    else
23892      # We're on a unix platform. Hooray! :)
23893      path="$BOOT_JDK"
23894      has_space=`$ECHO "$path" | $GREP " "`
23895      if test "x$has_space" != x; then
23896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23899      fi
23900
23901      # Use eval to expand a potential ~
23902      eval path="$path"
23903      if test ! -f "$path" && test ! -d "$path"; then
23904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23905      fi
23906
23907      if test -d "$path"; then
23908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23909      else
23910        dir="`$DIRNAME "$path"`"
23911        base="`$BASENAME "$path"`"
23912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23913      fi
23914    fi
23915  fi
23916
23917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23918$as_echo_n "checking for Boot JDK... " >&6; }
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23920$as_echo "$BOOT_JDK" >&6; }
23921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23922$as_echo_n "checking Boot JDK version... " >&6; }
23923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23925$as_echo "$BOOT_JDK_VERSION" >&6; }
23926          fi # end check jdk version
23927        fi # end check javac
23928      fi # end check java
23929    fi # end check boot jdk found
23930  fi
23931
23932  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23933    # Having specified an argument which is incorrect will produce an instant failure;
23934    # we should not go on looking
23935    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23936  fi
23937
23938  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23939
23940  if test "x$BOOT_JDK_FOUND" = xno; then
23941    # Now execute the test
23942
23943  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23944    # First check at user selected default
23945
23946  if test "x$BOOT_JDK_FOUND" = xno; then
23947    # Now execute the test
23948
23949  if test -x /usr/libexec/java_home; then
23950    BOOT_JDK=`/usr/libexec/java_home `
23951    BOOT_JDK_FOUND=maybe
23952    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23953$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23954  fi
23955
23956
23957    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23958    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23959      # Do we have a bin/java?
23960      if test ! -x "$BOOT_JDK/bin/java"; then
23961        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23963        BOOT_JDK_FOUND=no
23964      else
23965        # Do we have a bin/javac?
23966        if test ! -x "$BOOT_JDK/bin/javac"; then
23967          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23969          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23970$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23971          BOOT_JDK_FOUND=no
23972        else
23973          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23974          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23975
23976          # Extra M4 quote needed to protect [] in grep expression.
23977          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23978          if test "x$FOUND_CORRECT_VERSION" = x; then
23979            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23981            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23982$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23983            BOOT_JDK_FOUND=no
23984          else
23985            # We're done! :-)
23986            BOOT_JDK_FOUND=yes
23987
23988  # Only process if variable expands to non-empty
23989
23990  if test "x$BOOT_JDK" != x; then
23991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992
23993  # Input might be given as Windows format, start by converting to
23994  # unix format.
23995  path="$BOOT_JDK"
23996  new_path=`$CYGPATH -u "$path"`
23997
23998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24001  # "foo.exe" is OK but "foo" is an error.
24002  #
24003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24004  # It is also a way to make sure we got the proper file name for the real test later on.
24005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24006  if test "x$test_shortpath" = x; then
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24009    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24010  fi
24011
24012  # Call helper function which possibly converts this using DOS-style short mode.
24013  # If so, the updated path is stored in $new_path.
24014
24015  input_path="$new_path"
24016  # Check if we need to convert this using DOS-style short mode. If the path
24017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24018  # take no chances and rewrite it.
24019  # Note: m4 eats our [], so we need to use [ and ] instead.
24020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24021  if test "x$has_forbidden_chars" != x; then
24022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24026      # Going to short mode and back again did indeed matter. Since short mode is
24027      # case insensitive, let's make it lowercase to improve readability.
24028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029      # Now convert it back to Unix-style (cygpath)
24030      input_path=`$CYGPATH -u "$shortmode_path"`
24031      new_path="$input_path"
24032    fi
24033  fi
24034
24035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24036  if test "x$test_cygdrive_prefix" = x; then
24037    # As a simple fix, exclude /usr/bin since it's not a real path.
24038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24040      # a path prefixed by /cygdrive for fixpath to work.
24041      new_path="$CYGWIN_ROOT_PATH$input_path"
24042    fi
24043  fi
24044
24045
24046  if test "x$path" != "x$new_path"; then
24047    BOOT_JDK="$new_path"
24048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24050  fi
24051
24052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053
24054  path="$BOOT_JDK"
24055  has_colon=`$ECHO $path | $GREP ^.:`
24056  new_path="$path"
24057  if test "x$has_colon" = x; then
24058    # Not in mixed or Windows style, start by that.
24059    new_path=`cmd //c echo $path`
24060  fi
24061
24062
24063  input_path="$new_path"
24064  # Check if we need to convert this using DOS-style short mode. If the path
24065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066  # take no chances and rewrite it.
24067  # Note: m4 eats our [], so we need to use [ and ] instead.
24068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24069  if test "x$has_forbidden_chars" != x; then
24070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24072  fi
24073
24074
24075  windows_path="$new_path"
24076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077    unix_path=`$CYGPATH -u "$windows_path"`
24078    new_path="$unix_path"
24079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24081    new_path="$unix_path"
24082  fi
24083
24084  if test "x$path" != "x$new_path"; then
24085    BOOT_JDK="$new_path"
24086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24088  fi
24089
24090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24092
24093    else
24094      # We're on a unix platform. Hooray! :)
24095      path="$BOOT_JDK"
24096      has_space=`$ECHO "$path" | $GREP " "`
24097      if test "x$has_space" != x; then
24098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24101      fi
24102
24103      # Use eval to expand a potential ~
24104      eval path="$path"
24105      if test ! -f "$path" && test ! -d "$path"; then
24106        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24107      fi
24108
24109      if test -d "$path"; then
24110        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24111      else
24112        dir="`$DIRNAME "$path"`"
24113        base="`$BASENAME "$path"`"
24114        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24115      fi
24116    fi
24117  fi
24118
24119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24120$as_echo_n "checking for Boot JDK... " >&6; }
24121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24122$as_echo "$BOOT_JDK" >&6; }
24123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24124$as_echo_n "checking Boot JDK version... " >&6; }
24125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24127$as_echo "$BOOT_JDK_VERSION" >&6; }
24128          fi # end check jdk version
24129        fi # end check javac
24130      fi # end check java
24131    fi # end check boot jdk found
24132  fi
24133
24134    # If that did not work out (e.g. too old), try explicit versions instead
24135
24136  if test "x$BOOT_JDK_FOUND" = xno; then
24137    # Now execute the test
24138
24139  if test -x /usr/libexec/java_home; then
24140    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24141    BOOT_JDK_FOUND=maybe
24142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24143$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24144  fi
24145
24146
24147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24149      # Do we have a bin/java?
24150      if test ! -x "$BOOT_JDK/bin/java"; then
24151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24153        BOOT_JDK_FOUND=no
24154      else
24155        # Do we have a bin/javac?
24156        if test ! -x "$BOOT_JDK/bin/javac"; then
24157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24161          BOOT_JDK_FOUND=no
24162        else
24163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24165
24166          # Extra M4 quote needed to protect [] in grep expression.
24167          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24168          if test "x$FOUND_CORRECT_VERSION" = x; then
24169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24173            BOOT_JDK_FOUND=no
24174          else
24175            # We're done! :-)
24176            BOOT_JDK_FOUND=yes
24177
24178  # Only process if variable expands to non-empty
24179
24180  if test "x$BOOT_JDK" != x; then
24181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182
24183  # Input might be given as Windows format, start by converting to
24184  # unix format.
24185  path="$BOOT_JDK"
24186  new_path=`$CYGPATH -u "$path"`
24187
24188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24191  # "foo.exe" is OK but "foo" is an error.
24192  #
24193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24194  # It is also a way to make sure we got the proper file name for the real test later on.
24195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24196  if test "x$test_shortpath" = x; then
24197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24200  fi
24201
24202  # Call helper function which possibly converts this using DOS-style short mode.
24203  # If so, the updated path is stored in $new_path.
24204
24205  input_path="$new_path"
24206  # Check if we need to convert this using DOS-style short mode. If the path
24207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24208  # take no chances and rewrite it.
24209  # Note: m4 eats our [], so we need to use [ and ] instead.
24210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24211  if test "x$has_forbidden_chars" != x; then
24212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24216      # Going to short mode and back again did indeed matter. Since short mode is
24217      # case insensitive, let's make it lowercase to improve readability.
24218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24219      # Now convert it back to Unix-style (cygpath)
24220      input_path=`$CYGPATH -u "$shortmode_path"`
24221      new_path="$input_path"
24222    fi
24223  fi
24224
24225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24226  if test "x$test_cygdrive_prefix" = x; then
24227    # As a simple fix, exclude /usr/bin since it's not a real path.
24228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24230      # a path prefixed by /cygdrive for fixpath to work.
24231      new_path="$CYGWIN_ROOT_PATH$input_path"
24232    fi
24233  fi
24234
24235
24236  if test "x$path" != "x$new_path"; then
24237    BOOT_JDK="$new_path"
24238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24240  fi
24241
24242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24243
24244  path="$BOOT_JDK"
24245  has_colon=`$ECHO $path | $GREP ^.:`
24246  new_path="$path"
24247  if test "x$has_colon" = x; then
24248    # Not in mixed or Windows style, start by that.
24249    new_path=`cmd //c echo $path`
24250  fi
24251
24252
24253  input_path="$new_path"
24254  # Check if we need to convert this using DOS-style short mode. If the path
24255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24256  # take no chances and rewrite it.
24257  # Note: m4 eats our [], so we need to use [ and ] instead.
24258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24259  if test "x$has_forbidden_chars" != x; then
24260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24262  fi
24263
24264
24265  windows_path="$new_path"
24266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24267    unix_path=`$CYGPATH -u "$windows_path"`
24268    new_path="$unix_path"
24269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24271    new_path="$unix_path"
24272  fi
24273
24274  if test "x$path" != "x$new_path"; then
24275    BOOT_JDK="$new_path"
24276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24278  fi
24279
24280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24282
24283    else
24284      # We're on a unix platform. Hooray! :)
24285      path="$BOOT_JDK"
24286      has_space=`$ECHO "$path" | $GREP " "`
24287      if test "x$has_space" != x; then
24288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24291      fi
24292
24293      # Use eval to expand a potential ~
24294      eval path="$path"
24295      if test ! -f "$path" && test ! -d "$path"; then
24296        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24297      fi
24298
24299      if test -d "$path"; then
24300        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24301      else
24302        dir="`$DIRNAME "$path"`"
24303        base="`$BASENAME "$path"`"
24304        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24305      fi
24306    fi
24307  fi
24308
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24310$as_echo_n "checking for Boot JDK... " >&6; }
24311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24312$as_echo "$BOOT_JDK" >&6; }
24313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24314$as_echo_n "checking Boot JDK version... " >&6; }
24315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24317$as_echo "$BOOT_JDK_VERSION" >&6; }
24318          fi # end check jdk version
24319        fi # end check javac
24320      fi # end check java
24321    fi # end check boot jdk found
24322  fi
24323
24324
24325  if test "x$BOOT_JDK_FOUND" = xno; then
24326    # Now execute the test
24327
24328  if test -x /usr/libexec/java_home; then
24329    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24330    BOOT_JDK_FOUND=maybe
24331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24332$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24333  fi
24334
24335
24336    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24337    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24338      # Do we have a bin/java?
24339      if test ! -x "$BOOT_JDK/bin/java"; then
24340        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24342        BOOT_JDK_FOUND=no
24343      else
24344        # Do we have a bin/javac?
24345        if test ! -x "$BOOT_JDK/bin/javac"; then
24346          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24348          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24349$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24350          BOOT_JDK_FOUND=no
24351        else
24352          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24353          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24354
24355          # Extra M4 quote needed to protect [] in grep expression.
24356          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24357          if test "x$FOUND_CORRECT_VERSION" = x; then
24358            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24360            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24361$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24362            BOOT_JDK_FOUND=no
24363          else
24364            # We're done! :-)
24365            BOOT_JDK_FOUND=yes
24366
24367  # Only process if variable expands to non-empty
24368
24369  if test "x$BOOT_JDK" != x; then
24370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24371
24372  # Input might be given as Windows format, start by converting to
24373  # unix format.
24374  path="$BOOT_JDK"
24375  new_path=`$CYGPATH -u "$path"`
24376
24377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24380  # "foo.exe" is OK but "foo" is an error.
24381  #
24382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24383  # It is also a way to make sure we got the proper file name for the real test later on.
24384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24385  if test "x$test_shortpath" = x; then
24386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24389  fi
24390
24391  # Call helper function which possibly converts this using DOS-style short mode.
24392  # If so, the updated path is stored in $new_path.
24393
24394  input_path="$new_path"
24395  # Check if we need to convert this using DOS-style short mode. If the path
24396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24397  # take no chances and rewrite it.
24398  # Note: m4 eats our [], so we need to use [ and ] instead.
24399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24400  if test "x$has_forbidden_chars" != x; then
24401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24405      # Going to short mode and back again did indeed matter. Since short mode is
24406      # case insensitive, let's make it lowercase to improve readability.
24407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24408      # Now convert it back to Unix-style (cygpath)
24409      input_path=`$CYGPATH -u "$shortmode_path"`
24410      new_path="$input_path"
24411    fi
24412  fi
24413
24414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24415  if test "x$test_cygdrive_prefix" = x; then
24416    # As a simple fix, exclude /usr/bin since it's not a real path.
24417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24419      # a path prefixed by /cygdrive for fixpath to work.
24420      new_path="$CYGWIN_ROOT_PATH$input_path"
24421    fi
24422  fi
24423
24424
24425  if test "x$path" != "x$new_path"; then
24426    BOOT_JDK="$new_path"
24427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24429  fi
24430
24431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24432
24433  path="$BOOT_JDK"
24434  has_colon=`$ECHO $path | $GREP ^.:`
24435  new_path="$path"
24436  if test "x$has_colon" = x; then
24437    # Not in mixed or Windows style, start by that.
24438    new_path=`cmd //c echo $path`
24439  fi
24440
24441
24442  input_path="$new_path"
24443  # Check if we need to convert this using DOS-style short mode. If the path
24444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24445  # take no chances and rewrite it.
24446  # Note: m4 eats our [], so we need to use [ and ] instead.
24447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24448  if test "x$has_forbidden_chars" != x; then
24449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24451  fi
24452
24453
24454  windows_path="$new_path"
24455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24456    unix_path=`$CYGPATH -u "$windows_path"`
24457    new_path="$unix_path"
24458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24460    new_path="$unix_path"
24461  fi
24462
24463  if test "x$path" != "x$new_path"; then
24464    BOOT_JDK="$new_path"
24465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24467  fi
24468
24469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24471
24472    else
24473      # We're on a unix platform. Hooray! :)
24474      path="$BOOT_JDK"
24475      has_space=`$ECHO "$path" | $GREP " "`
24476      if test "x$has_space" != x; then
24477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24480      fi
24481
24482      # Use eval to expand a potential ~
24483      eval path="$path"
24484      if test ! -f "$path" && test ! -d "$path"; then
24485        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24486      fi
24487
24488      if test -d "$path"; then
24489        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24490      else
24491        dir="`$DIRNAME "$path"`"
24492        base="`$BASENAME "$path"`"
24493        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24494      fi
24495    fi
24496  fi
24497
24498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24499$as_echo_n "checking for Boot JDK... " >&6; }
24500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24501$as_echo "$BOOT_JDK" >&6; }
24502            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24503$as_echo_n "checking Boot JDK version... " >&6; }
24504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24506$as_echo "$BOOT_JDK_VERSION" >&6; }
24507          fi # end check jdk version
24508        fi # end check javac
24509      fi # end check java
24510    fi # end check boot jdk found
24511  fi
24512
24513
24514  if test "x$BOOT_JDK_FOUND" = xno; then
24515    # Now execute the test
24516
24517  if test -x /usr/libexec/java_home; then
24518    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24519    BOOT_JDK_FOUND=maybe
24520    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24521$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24522  fi
24523
24524
24525    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24526    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24527      # Do we have a bin/java?
24528      if test ! -x "$BOOT_JDK/bin/java"; then
24529        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24531        BOOT_JDK_FOUND=no
24532      else
24533        # Do we have a bin/javac?
24534        if test ! -x "$BOOT_JDK/bin/javac"; then
24535          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24537          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24538$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24539          BOOT_JDK_FOUND=no
24540        else
24541          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24542          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24543
24544          # Extra M4 quote needed to protect [] in grep expression.
24545          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24546          if test "x$FOUND_CORRECT_VERSION" = x; then
24547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24549            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24550$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24551            BOOT_JDK_FOUND=no
24552          else
24553            # We're done! :-)
24554            BOOT_JDK_FOUND=yes
24555
24556  # Only process if variable expands to non-empty
24557
24558  if test "x$BOOT_JDK" != x; then
24559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24560
24561  # Input might be given as Windows format, start by converting to
24562  # unix format.
24563  path="$BOOT_JDK"
24564  new_path=`$CYGPATH -u "$path"`
24565
24566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24569  # "foo.exe" is OK but "foo" is an error.
24570  #
24571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24572  # It is also a way to make sure we got the proper file name for the real test later on.
24573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24574  if test "x$test_shortpath" = x; then
24575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24578  fi
24579
24580  # Call helper function which possibly converts this using DOS-style short mode.
24581  # If so, the updated path is stored in $new_path.
24582
24583  input_path="$new_path"
24584  # Check if we need to convert this using DOS-style short mode. If the path
24585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24586  # take no chances and rewrite it.
24587  # Note: m4 eats our [], so we need to use [ and ] instead.
24588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24589  if test "x$has_forbidden_chars" != x; then
24590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24594      # Going to short mode and back again did indeed matter. Since short mode is
24595      # case insensitive, let's make it lowercase to improve readability.
24596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24597      # Now convert it back to Unix-style (cygpath)
24598      input_path=`$CYGPATH -u "$shortmode_path"`
24599      new_path="$input_path"
24600    fi
24601  fi
24602
24603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24604  if test "x$test_cygdrive_prefix" = x; then
24605    # As a simple fix, exclude /usr/bin since it's not a real path.
24606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24608      # a path prefixed by /cygdrive for fixpath to work.
24609      new_path="$CYGWIN_ROOT_PATH$input_path"
24610    fi
24611  fi
24612
24613
24614  if test "x$path" != "x$new_path"; then
24615    BOOT_JDK="$new_path"
24616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24618  fi
24619
24620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24621
24622  path="$BOOT_JDK"
24623  has_colon=`$ECHO $path | $GREP ^.:`
24624  new_path="$path"
24625  if test "x$has_colon" = x; then
24626    # Not in mixed or Windows style, start by that.
24627    new_path=`cmd //c echo $path`
24628  fi
24629
24630
24631  input_path="$new_path"
24632  # Check if we need to convert this using DOS-style short mode. If the path
24633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24634  # take no chances and rewrite it.
24635  # Note: m4 eats our [], so we need to use [ and ] instead.
24636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24637  if test "x$has_forbidden_chars" != x; then
24638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24640  fi
24641
24642
24643  windows_path="$new_path"
24644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24645    unix_path=`$CYGPATH -u "$windows_path"`
24646    new_path="$unix_path"
24647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24649    new_path="$unix_path"
24650  fi
24651
24652  if test "x$path" != "x$new_path"; then
24653    BOOT_JDK="$new_path"
24654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24656  fi
24657
24658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24660
24661    else
24662      # We're on a unix platform. Hooray! :)
24663      path="$BOOT_JDK"
24664      has_space=`$ECHO "$path" | $GREP " "`
24665      if test "x$has_space" != x; then
24666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24668        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24669      fi
24670
24671      # Use eval to expand a potential ~
24672      eval path="$path"
24673      if test ! -f "$path" && test ! -d "$path"; then
24674        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24675      fi
24676
24677      if test -d "$path"; then
24678        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24679      else
24680        dir="`$DIRNAME "$path"`"
24681        base="`$BASENAME "$path"`"
24682        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24683      fi
24684    fi
24685  fi
24686
24687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24688$as_echo_n "checking for Boot JDK... " >&6; }
24689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24690$as_echo "$BOOT_JDK" >&6; }
24691            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24692$as_echo_n "checking Boot JDK version... " >&6; }
24693            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24695$as_echo "$BOOT_JDK_VERSION" >&6; }
24696          fi # end check jdk version
24697        fi # end check javac
24698      fi # end check java
24699    fi # end check boot jdk found
24700  fi
24701
24702  fi
24703
24704
24705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24707      # Do we have a bin/java?
24708      if test ! -x "$BOOT_JDK/bin/java"; then
24709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24711        BOOT_JDK_FOUND=no
24712      else
24713        # Do we have a bin/javac?
24714        if test ! -x "$BOOT_JDK/bin/javac"; then
24715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24719          BOOT_JDK_FOUND=no
24720        else
24721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24723
24724          # Extra M4 quote needed to protect [] in grep expression.
24725          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24726          if test "x$FOUND_CORRECT_VERSION" = x; then
24727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24731            BOOT_JDK_FOUND=no
24732          else
24733            # We're done! :-)
24734            BOOT_JDK_FOUND=yes
24735
24736  # Only process if variable expands to non-empty
24737
24738  if test "x$BOOT_JDK" != x; then
24739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24740
24741  # Input might be given as Windows format, start by converting to
24742  # unix format.
24743  path="$BOOT_JDK"
24744  new_path=`$CYGPATH -u "$path"`
24745
24746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24749  # "foo.exe" is OK but "foo" is an error.
24750  #
24751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24752  # It is also a way to make sure we got the proper file name for the real test later on.
24753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24754  if test "x$test_shortpath" = x; then
24755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24757    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24758  fi
24759
24760  # Call helper function which possibly converts this using DOS-style short mode.
24761  # If so, the updated path is stored in $new_path.
24762
24763  input_path="$new_path"
24764  # Check if we need to convert this using DOS-style short mode. If the path
24765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24766  # take no chances and rewrite it.
24767  # Note: m4 eats our [], so we need to use [ and ] instead.
24768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24769  if test "x$has_forbidden_chars" != x; then
24770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24774      # Going to short mode and back again did indeed matter. Since short mode is
24775      # case insensitive, let's make it lowercase to improve readability.
24776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24777      # Now convert it back to Unix-style (cygpath)
24778      input_path=`$CYGPATH -u "$shortmode_path"`
24779      new_path="$input_path"
24780    fi
24781  fi
24782
24783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24784  if test "x$test_cygdrive_prefix" = x; then
24785    # As a simple fix, exclude /usr/bin since it's not a real path.
24786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24788      # a path prefixed by /cygdrive for fixpath to work.
24789      new_path="$CYGWIN_ROOT_PATH$input_path"
24790    fi
24791  fi
24792
24793
24794  if test "x$path" != "x$new_path"; then
24795    BOOT_JDK="$new_path"
24796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24798  fi
24799
24800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24801
24802  path="$BOOT_JDK"
24803  has_colon=`$ECHO $path | $GREP ^.:`
24804  new_path="$path"
24805  if test "x$has_colon" = x; then
24806    # Not in mixed or Windows style, start by that.
24807    new_path=`cmd //c echo $path`
24808  fi
24809
24810
24811  input_path="$new_path"
24812  # Check if we need to convert this using DOS-style short mode. If the path
24813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24814  # take no chances and rewrite it.
24815  # Note: m4 eats our [], so we need to use [ and ] instead.
24816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24817  if test "x$has_forbidden_chars" != x; then
24818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24820  fi
24821
24822
24823  windows_path="$new_path"
24824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24825    unix_path=`$CYGPATH -u "$windows_path"`
24826    new_path="$unix_path"
24827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24829    new_path="$unix_path"
24830  fi
24831
24832  if test "x$path" != "x$new_path"; then
24833    BOOT_JDK="$new_path"
24834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24836  fi
24837
24838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24840
24841    else
24842      # We're on a unix platform. Hooray! :)
24843      path="$BOOT_JDK"
24844      has_space=`$ECHO "$path" | $GREP " "`
24845      if test "x$has_space" != x; then
24846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24849      fi
24850
24851      # Use eval to expand a potential ~
24852      eval path="$path"
24853      if test ! -f "$path" && test ! -d "$path"; then
24854        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24855      fi
24856
24857      if test -d "$path"; then
24858        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24859      else
24860        dir="`$DIRNAME "$path"`"
24861        base="`$BASENAME "$path"`"
24862        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24863      fi
24864    fi
24865  fi
24866
24867            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24868$as_echo_n "checking for Boot JDK... " >&6; }
24869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24870$as_echo "$BOOT_JDK" >&6; }
24871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24872$as_echo_n "checking Boot JDK version... " >&6; }
24873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24875$as_echo "$BOOT_JDK_VERSION" >&6; }
24876          fi # end check jdk version
24877        fi # end check javac
24878      fi # end check java
24879    fi # end check boot jdk found
24880  fi
24881
24882
24883  # Test: Is $JAVA_HOME set?
24884
24885  if test "x$BOOT_JDK_FOUND" = xno; then
24886    # Now execute the test
24887
24888  if test "x$JAVA_HOME" != x; then
24889    JAVA_HOME_PROCESSED="$JAVA_HOME"
24890
24891  # Only process if variable expands to non-empty
24892
24893  if test "x$JAVA_HOME_PROCESSED" != x; then
24894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24895
24896  # Input might be given as Windows format, start by converting to
24897  # unix format.
24898  path="$JAVA_HOME_PROCESSED"
24899  new_path=`$CYGPATH -u "$path"`
24900
24901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24904  # "foo.exe" is OK but "foo" is an error.
24905  #
24906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24907  # It is also a way to make sure we got the proper file name for the real test later on.
24908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24909  if test "x$test_shortpath" = x; then
24910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24911$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24912    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24913  fi
24914
24915  # Call helper function which possibly converts this using DOS-style short mode.
24916  # If so, the updated path is stored in $new_path.
24917
24918  input_path="$new_path"
24919  # Check if we need to convert this using DOS-style short mode. If the path
24920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24921  # take no chances and rewrite it.
24922  # Note: m4 eats our [], so we need to use [ and ] instead.
24923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24924  if test "x$has_forbidden_chars" != x; then
24925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24929      # Going to short mode and back again did indeed matter. Since short mode is
24930      # case insensitive, let's make it lowercase to improve readability.
24931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24932      # Now convert it back to Unix-style (cygpath)
24933      input_path=`$CYGPATH -u "$shortmode_path"`
24934      new_path="$input_path"
24935    fi
24936  fi
24937
24938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24939  if test "x$test_cygdrive_prefix" = x; then
24940    # As a simple fix, exclude /usr/bin since it's not a real path.
24941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24943      # a path prefixed by /cygdrive for fixpath to work.
24944      new_path="$CYGWIN_ROOT_PATH$input_path"
24945    fi
24946  fi
24947
24948
24949  if test "x$path" != "x$new_path"; then
24950    JAVA_HOME_PROCESSED="$new_path"
24951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24952$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24953  fi
24954
24955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24956
24957  path="$JAVA_HOME_PROCESSED"
24958  has_colon=`$ECHO $path | $GREP ^.:`
24959  new_path="$path"
24960  if test "x$has_colon" = x; then
24961    # Not in mixed or Windows style, start by that.
24962    new_path=`cmd //c echo $path`
24963  fi
24964
24965
24966  input_path="$new_path"
24967  # Check if we need to convert this using DOS-style short mode. If the path
24968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24969  # take no chances and rewrite it.
24970  # Note: m4 eats our [], so we need to use [ and ] instead.
24971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24972  if test "x$has_forbidden_chars" != x; then
24973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24975  fi
24976
24977
24978  windows_path="$new_path"
24979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24980    unix_path=`$CYGPATH -u "$windows_path"`
24981    new_path="$unix_path"
24982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24984    new_path="$unix_path"
24985  fi
24986
24987  if test "x$path" != "x$new_path"; then
24988    JAVA_HOME_PROCESSED="$new_path"
24989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24990$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24991  fi
24992
24993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24995
24996    else
24997      # We're on a unix platform. Hooray! :)
24998      path="$JAVA_HOME_PROCESSED"
24999      has_space=`$ECHO "$path" | $GREP " "`
25000      if test "x$has_space" != x; then
25001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25002$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25004      fi
25005
25006      # Use eval to expand a potential ~
25007      eval path="$path"
25008      if test ! -f "$path" && test ! -d "$path"; then
25009        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25010      fi
25011
25012      if test -d "$path"; then
25013        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25014      else
25015        dir="`$DIRNAME "$path"`"
25016        base="`$BASENAME "$path"`"
25017        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25018      fi
25019    fi
25020  fi
25021
25022    if test ! -d "$JAVA_HOME_PROCESSED"; then
25023      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25024$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25025    else
25026      # Aha, the user has set a JAVA_HOME
25027      # let us use that as the Boot JDK.
25028      BOOT_JDK="$JAVA_HOME_PROCESSED"
25029      BOOT_JDK_FOUND=maybe
25030      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25031$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25032    fi
25033  fi
25034
25035
25036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25038      # Do we have a bin/java?
25039      if test ! -x "$BOOT_JDK/bin/java"; then
25040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25042        BOOT_JDK_FOUND=no
25043      else
25044        # Do we have a bin/javac?
25045        if test ! -x "$BOOT_JDK/bin/javac"; then
25046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25050          BOOT_JDK_FOUND=no
25051        else
25052          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25053          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25054
25055          # Extra M4 quote needed to protect [] in grep expression.
25056          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25057          if test "x$FOUND_CORRECT_VERSION" = x; then
25058            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25060            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25061$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25062            BOOT_JDK_FOUND=no
25063          else
25064            # We're done! :-)
25065            BOOT_JDK_FOUND=yes
25066
25067  # Only process if variable expands to non-empty
25068
25069  if test "x$BOOT_JDK" != x; then
25070    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25071
25072  # Input might be given as Windows format, start by converting to
25073  # unix format.
25074  path="$BOOT_JDK"
25075  new_path=`$CYGPATH -u "$path"`
25076
25077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25080  # "foo.exe" is OK but "foo" is an error.
25081  #
25082  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25083  # It is also a way to make sure we got the proper file name for the real test later on.
25084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25085  if test "x$test_shortpath" = x; then
25086    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25088    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25089  fi
25090
25091  # Call helper function which possibly converts this using DOS-style short mode.
25092  # If so, the updated path is stored in $new_path.
25093
25094  input_path="$new_path"
25095  # Check if we need to convert this using DOS-style short mode. If the path
25096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25097  # take no chances and rewrite it.
25098  # Note: m4 eats our [], so we need to use [ and ] instead.
25099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25100  if test "x$has_forbidden_chars" != x; then
25101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25105      # Going to short mode and back again did indeed matter. Since short mode is
25106      # case insensitive, let's make it lowercase to improve readability.
25107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25108      # Now convert it back to Unix-style (cygpath)
25109      input_path=`$CYGPATH -u "$shortmode_path"`
25110      new_path="$input_path"
25111    fi
25112  fi
25113
25114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25115  if test "x$test_cygdrive_prefix" = x; then
25116    # As a simple fix, exclude /usr/bin since it's not a real path.
25117    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25119      # a path prefixed by /cygdrive for fixpath to work.
25120      new_path="$CYGWIN_ROOT_PATH$input_path"
25121    fi
25122  fi
25123
25124
25125  if test "x$path" != "x$new_path"; then
25126    BOOT_JDK="$new_path"
25127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25129  fi
25130
25131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25132
25133  path="$BOOT_JDK"
25134  has_colon=`$ECHO $path | $GREP ^.:`
25135  new_path="$path"
25136  if test "x$has_colon" = x; then
25137    # Not in mixed or Windows style, start by that.
25138    new_path=`cmd //c echo $path`
25139  fi
25140
25141
25142  input_path="$new_path"
25143  # Check if we need to convert this using DOS-style short mode. If the path
25144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25145  # take no chances and rewrite it.
25146  # Note: m4 eats our [], so we need to use [ and ] instead.
25147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25148  if test "x$has_forbidden_chars" != x; then
25149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25151  fi
25152
25153
25154  windows_path="$new_path"
25155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25156    unix_path=`$CYGPATH -u "$windows_path"`
25157    new_path="$unix_path"
25158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25160    new_path="$unix_path"
25161  fi
25162
25163  if test "x$path" != "x$new_path"; then
25164    BOOT_JDK="$new_path"
25165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25167  fi
25168
25169  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25170  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25171
25172    else
25173      # We're on a unix platform. Hooray! :)
25174      path="$BOOT_JDK"
25175      has_space=`$ECHO "$path" | $GREP " "`
25176      if test "x$has_space" != x; then
25177        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25179        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25180      fi
25181
25182      # Use eval to expand a potential ~
25183      eval path="$path"
25184      if test ! -f "$path" && test ! -d "$path"; then
25185        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25186      fi
25187
25188      if test -d "$path"; then
25189        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25190      else
25191        dir="`$DIRNAME "$path"`"
25192        base="`$BASENAME "$path"`"
25193        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25194      fi
25195    fi
25196  fi
25197
25198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25199$as_echo_n "checking for Boot JDK... " >&6; }
25200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25201$as_echo "$BOOT_JDK" >&6; }
25202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25203$as_echo_n "checking Boot JDK version... " >&6; }
25204            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25206$as_echo "$BOOT_JDK_VERSION" >&6; }
25207          fi # end check jdk version
25208        fi # end check javac
25209      fi # end check java
25210    fi # end check boot jdk found
25211  fi
25212
25213
25214  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25215
25216  if test "x$BOOT_JDK_FOUND" = xno; then
25217    # Now execute the test
25218
25219  # Extract the first word of "javac", so it can be a program name with args.
25220set dummy javac; ac_word=$2
25221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25222$as_echo_n "checking for $ac_word... " >&6; }
25223if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25224  $as_echo_n "(cached) " >&6
25225else
25226  case $JAVAC_CHECK in
25227  [\\/]* | ?:[\\/]*)
25228  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25229  ;;
25230  *)
25231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25232for as_dir in $PATH
25233do
25234  IFS=$as_save_IFS
25235  test -z "$as_dir" && as_dir=.
25236    for ac_exec_ext in '' $ac_executable_extensions; do
25237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25238    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25240    break 2
25241  fi
25242done
25243  done
25244IFS=$as_save_IFS
25245
25246  ;;
25247esac
25248fi
25249JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25250if test -n "$JAVAC_CHECK"; then
25251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25252$as_echo "$JAVAC_CHECK" >&6; }
25253else
25254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25255$as_echo "no" >&6; }
25256fi
25257
25258
25259  # Extract the first word of "java", so it can be a program name with args.
25260set dummy java; ac_word=$2
25261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25262$as_echo_n "checking for $ac_word... " >&6; }
25263if ${ac_cv_path_JAVA_CHECK+:} false; then :
25264  $as_echo_n "(cached) " >&6
25265else
25266  case $JAVA_CHECK in
25267  [\\/]* | ?:[\\/]*)
25268  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25269  ;;
25270  *)
25271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25272for as_dir in $PATH
25273do
25274  IFS=$as_save_IFS
25275  test -z "$as_dir" && as_dir=.
25276    for ac_exec_ext in '' $ac_executable_extensions; do
25277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25278    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25280    break 2
25281  fi
25282done
25283  done
25284IFS=$as_save_IFS
25285
25286  ;;
25287esac
25288fi
25289JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25290if test -n "$JAVA_CHECK"; then
25291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25292$as_echo "$JAVA_CHECK" >&6; }
25293else
25294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25295$as_echo "no" >&6; }
25296fi
25297
25298
25299  BINARY="$JAVAC_CHECK"
25300  if test "x$JAVAC_CHECK" = x; then
25301    BINARY="$JAVA_CHECK"
25302  fi
25303  if test "x$BINARY" != x; then
25304    # So there is a java(c) binary, it might be part of a JDK.
25305    # Lets find the JDK/JRE directory by following symbolic links.
25306    # Linux/GNU systems often have links from /usr/bin/java to
25307    # /etc/alternatives/java to the real JDK binary.
25308
25309  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25310    # Follow a chain of symbolic links. Use readlink
25311    # where it exists, else fall back to horribly
25312    # complicated shell code.
25313    if test "x$READLINK_TESTED" != yes; then
25314      # On MacOSX there is a readlink tool with a different
25315      # purpose than the GNU readlink tool. Check the found readlink.
25316      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25317      if test "x$ISGNU" = x; then
25318        # A readlink that we do not know how to use.
25319        # Are there other non-GNU readlinks out there?
25320        READLINK_TESTED=yes
25321        READLINK=
25322      fi
25323    fi
25324
25325    if test "x$READLINK" != x; then
25326      BINARY=`$READLINK -f $BINARY`
25327    else
25328      # Save the current directory for restoring afterwards
25329      STARTDIR=$PWD
25330      COUNTER=0
25331      sym_link_dir=`$DIRNAME $BINARY`
25332      sym_link_file=`$BASENAME $BINARY`
25333      cd $sym_link_dir
25334      # Use -P flag to resolve symlinks in directories.
25335      cd `$THEPWDCMD -P`
25336      sym_link_dir=`$THEPWDCMD -P`
25337      # Resolve file symlinks
25338      while test $COUNTER -lt 20; do
25339        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25340        if test "x$ISLINK" == x; then
25341          # This is not a symbolic link! We are done!
25342          break
25343        fi
25344        # Again resolve directory symlinks since the target of the just found
25345        # link could be in a different directory
25346        cd `$DIRNAME $ISLINK`
25347        sym_link_dir=`$THEPWDCMD -P`
25348        sym_link_file=`$BASENAME $ISLINK`
25349        let COUNTER=COUNTER+1
25350      done
25351      cd $STARTDIR
25352      BINARY=$sym_link_dir/$sym_link_file
25353    fi
25354  fi
25355
25356    BOOT_JDK=`dirname "$BINARY"`
25357    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25358    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25359      # Looks like we found ourselves an JDK
25360      BOOT_JDK_FOUND=maybe
25361      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25362$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25363    fi
25364  fi
25365
25366
25367    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25368    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25369      # Do we have a bin/java?
25370      if test ! -x "$BOOT_JDK/bin/java"; then
25371        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25373        BOOT_JDK_FOUND=no
25374      else
25375        # Do we have a bin/javac?
25376        if test ! -x "$BOOT_JDK/bin/javac"; then
25377          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25379          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25380$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25381          BOOT_JDK_FOUND=no
25382        else
25383          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25384          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25385
25386          # Extra M4 quote needed to protect [] in grep expression.
25387          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25388          if test "x$FOUND_CORRECT_VERSION" = x; then
25389            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25392$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25393            BOOT_JDK_FOUND=no
25394          else
25395            # We're done! :-)
25396            BOOT_JDK_FOUND=yes
25397
25398  # Only process if variable expands to non-empty
25399
25400  if test "x$BOOT_JDK" != x; then
25401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25402
25403  # Input might be given as Windows format, start by converting to
25404  # unix format.
25405  path="$BOOT_JDK"
25406  new_path=`$CYGPATH -u "$path"`
25407
25408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25411  # "foo.exe" is OK but "foo" is an error.
25412  #
25413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25414  # It is also a way to make sure we got the proper file name for the real test later on.
25415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25416  if test "x$test_shortpath" = x; then
25417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25420  fi
25421
25422  # Call helper function which possibly converts this using DOS-style short mode.
25423  # If so, the updated path is stored in $new_path.
25424
25425  input_path="$new_path"
25426  # Check if we need to convert this using DOS-style short mode. If the path
25427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25428  # take no chances and rewrite it.
25429  # Note: m4 eats our [], so we need to use [ and ] instead.
25430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25431  if test "x$has_forbidden_chars" != x; then
25432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25436      # Going to short mode and back again did indeed matter. Since short mode is
25437      # case insensitive, let's make it lowercase to improve readability.
25438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25439      # Now convert it back to Unix-style (cygpath)
25440      input_path=`$CYGPATH -u "$shortmode_path"`
25441      new_path="$input_path"
25442    fi
25443  fi
25444
25445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25446  if test "x$test_cygdrive_prefix" = x; then
25447    # As a simple fix, exclude /usr/bin since it's not a real path.
25448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25450      # a path prefixed by /cygdrive for fixpath to work.
25451      new_path="$CYGWIN_ROOT_PATH$input_path"
25452    fi
25453  fi
25454
25455
25456  if test "x$path" != "x$new_path"; then
25457    BOOT_JDK="$new_path"
25458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25460  fi
25461
25462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463
25464  path="$BOOT_JDK"
25465  has_colon=`$ECHO $path | $GREP ^.:`
25466  new_path="$path"
25467  if test "x$has_colon" = x; then
25468    # Not in mixed or Windows style, start by that.
25469    new_path=`cmd //c echo $path`
25470  fi
25471
25472
25473  input_path="$new_path"
25474  # Check if we need to convert this using DOS-style short mode. If the path
25475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25476  # take no chances and rewrite it.
25477  # Note: m4 eats our [], so we need to use [ and ] instead.
25478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25479  if test "x$has_forbidden_chars" != x; then
25480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25482  fi
25483
25484
25485  windows_path="$new_path"
25486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487    unix_path=`$CYGPATH -u "$windows_path"`
25488    new_path="$unix_path"
25489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491    new_path="$unix_path"
25492  fi
25493
25494  if test "x$path" != "x$new_path"; then
25495    BOOT_JDK="$new_path"
25496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25498  fi
25499
25500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25502
25503    else
25504      # We're on a unix platform. Hooray! :)
25505      path="$BOOT_JDK"
25506      has_space=`$ECHO "$path" | $GREP " "`
25507      if test "x$has_space" != x; then
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25511      fi
25512
25513      # Use eval to expand a potential ~
25514      eval path="$path"
25515      if test ! -f "$path" && test ! -d "$path"; then
25516        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25517      fi
25518
25519      if test -d "$path"; then
25520        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25521      else
25522        dir="`$DIRNAME "$path"`"
25523        base="`$BASENAME "$path"`"
25524        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25525      fi
25526    fi
25527  fi
25528
25529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25530$as_echo_n "checking for Boot JDK... " >&6; }
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25532$as_echo "$BOOT_JDK" >&6; }
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25534$as_echo_n "checking Boot JDK version... " >&6; }
25535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25537$as_echo "$BOOT_JDK_VERSION" >&6; }
25538          fi # end check jdk version
25539        fi # end check javac
25540      fi # end check java
25541    fi # end check boot jdk found
25542  fi
25543
25544
25545  # Test: Is there a JDK installed in default, well-known locations?
25546
25547  if test "x$BOOT_JDK_FOUND" = xno; then
25548    # Now execute the test
25549
25550  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25551
25552  if test "x$BOOT_JDK_FOUND" = xno; then
25553    # Now execute the test
25554
25555  if test "x$ProgramW6432" != x; then
25556    VIRTUAL_DIR="$ProgramW6432/Java"
25557
25558  windows_path="$VIRTUAL_DIR"
25559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25560    unix_path=`$CYGPATH -u "$windows_path"`
25561    VIRTUAL_DIR="$unix_path"
25562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25564    VIRTUAL_DIR="$unix_path"
25565  fi
25566
25567
25568  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25569  BOOT_JDK_SUFFIX=""
25570  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25571  if test "x$ALL_JDKS_FOUND" != x; then
25572    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25573
25574  if test "x$BOOT_JDK_FOUND" = xno; then
25575    # Now execute the test
25576
25577        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25578        if test -d "$BOOT_JDK"; then
25579          BOOT_JDK_FOUND=maybe
25580          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25581$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25582        fi
25583
25584
25585    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25586    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25587      # Do we have a bin/java?
25588      if test ! -x "$BOOT_JDK/bin/java"; then
25589        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25591        BOOT_JDK_FOUND=no
25592      else
25593        # Do we have a bin/javac?
25594        if test ! -x "$BOOT_JDK/bin/javac"; then
25595          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25597          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25598$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25599          BOOT_JDK_FOUND=no
25600        else
25601          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25602          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25603
25604          # Extra M4 quote needed to protect [] in grep expression.
25605          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25606          if test "x$FOUND_CORRECT_VERSION" = x; then
25607            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25609            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25610$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25611            BOOT_JDK_FOUND=no
25612          else
25613            # We're done! :-)
25614            BOOT_JDK_FOUND=yes
25615
25616  # Only process if variable expands to non-empty
25617
25618  if test "x$BOOT_JDK" != x; then
25619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25620
25621  # Input might be given as Windows format, start by converting to
25622  # unix format.
25623  path="$BOOT_JDK"
25624  new_path=`$CYGPATH -u "$path"`
25625
25626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25629  # "foo.exe" is OK but "foo" is an error.
25630  #
25631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25632  # It is also a way to make sure we got the proper file name for the real test later on.
25633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25634  if test "x$test_shortpath" = x; then
25635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25637    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25638  fi
25639
25640  # Call helper function which possibly converts this using DOS-style short mode.
25641  # If so, the updated path is stored in $new_path.
25642
25643  input_path="$new_path"
25644  # Check if we need to convert this using DOS-style short mode. If the path
25645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25646  # take no chances and rewrite it.
25647  # Note: m4 eats our [], so we need to use [ and ] instead.
25648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25649  if test "x$has_forbidden_chars" != x; then
25650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25654      # Going to short mode and back again did indeed matter. Since short mode is
25655      # case insensitive, let's make it lowercase to improve readability.
25656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25657      # Now convert it back to Unix-style (cygpath)
25658      input_path=`$CYGPATH -u "$shortmode_path"`
25659      new_path="$input_path"
25660    fi
25661  fi
25662
25663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25664  if test "x$test_cygdrive_prefix" = x; then
25665    # As a simple fix, exclude /usr/bin since it's not a real path.
25666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25668      # a path prefixed by /cygdrive for fixpath to work.
25669      new_path="$CYGWIN_ROOT_PATH$input_path"
25670    fi
25671  fi
25672
25673
25674  if test "x$path" != "x$new_path"; then
25675    BOOT_JDK="$new_path"
25676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25678  fi
25679
25680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25681
25682  path="$BOOT_JDK"
25683  has_colon=`$ECHO $path | $GREP ^.:`
25684  new_path="$path"
25685  if test "x$has_colon" = x; then
25686    # Not in mixed or Windows style, start by that.
25687    new_path=`cmd //c echo $path`
25688  fi
25689
25690
25691  input_path="$new_path"
25692  # Check if we need to convert this using DOS-style short mode. If the path
25693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25694  # take no chances and rewrite it.
25695  # Note: m4 eats our [], so we need to use [ and ] instead.
25696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25697  if test "x$has_forbidden_chars" != x; then
25698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25700  fi
25701
25702
25703  windows_path="$new_path"
25704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25705    unix_path=`$CYGPATH -u "$windows_path"`
25706    new_path="$unix_path"
25707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25709    new_path="$unix_path"
25710  fi
25711
25712  if test "x$path" != "x$new_path"; then
25713    BOOT_JDK="$new_path"
25714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25716  fi
25717
25718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25720
25721    else
25722      # We're on a unix platform. Hooray! :)
25723      path="$BOOT_JDK"
25724      has_space=`$ECHO "$path" | $GREP " "`
25725      if test "x$has_space" != x; then
25726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25729      fi
25730
25731      # Use eval to expand a potential ~
25732      eval path="$path"
25733      if test ! -f "$path" && test ! -d "$path"; then
25734        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25735      fi
25736
25737      if test -d "$path"; then
25738        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25739      else
25740        dir="`$DIRNAME "$path"`"
25741        base="`$BASENAME "$path"`"
25742        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25743      fi
25744    fi
25745  fi
25746
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25748$as_echo_n "checking for Boot JDK... " >&6; }
25749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25750$as_echo "$BOOT_JDK" >&6; }
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25752$as_echo_n "checking Boot JDK version... " >&6; }
25753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25755$as_echo "$BOOT_JDK_VERSION" >&6; }
25756          fi # end check jdk version
25757        fi # end check javac
25758      fi # end check java
25759    fi # end check boot jdk found
25760  fi
25761
25762    done
25763  fi
25764
25765  fi
25766
25767
25768    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25769    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25770      # Do we have a bin/java?
25771      if test ! -x "$BOOT_JDK/bin/java"; then
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25774        BOOT_JDK_FOUND=no
25775      else
25776        # Do we have a bin/javac?
25777        if test ! -x "$BOOT_JDK/bin/javac"; then
25778          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25780          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25781$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25782          BOOT_JDK_FOUND=no
25783        else
25784          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25785          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25786
25787          # Extra M4 quote needed to protect [] in grep expression.
25788          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25789          if test "x$FOUND_CORRECT_VERSION" = x; then
25790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25792            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25793$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25794            BOOT_JDK_FOUND=no
25795          else
25796            # We're done! :-)
25797            BOOT_JDK_FOUND=yes
25798
25799  # Only process if variable expands to non-empty
25800
25801  if test "x$BOOT_JDK" != x; then
25802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25803
25804  # Input might be given as Windows format, start by converting to
25805  # unix format.
25806  path="$BOOT_JDK"
25807  new_path=`$CYGPATH -u "$path"`
25808
25809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25812  # "foo.exe" is OK but "foo" is an error.
25813  #
25814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25815  # It is also a way to make sure we got the proper file name for the real test later on.
25816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25817  if test "x$test_shortpath" = x; then
25818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25821  fi
25822
25823  # Call helper function which possibly converts this using DOS-style short mode.
25824  # If so, the updated path is stored in $new_path.
25825
25826  input_path="$new_path"
25827  # Check if we need to convert this using DOS-style short mode. If the path
25828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25829  # take no chances and rewrite it.
25830  # Note: m4 eats our [], so we need to use [ and ] instead.
25831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25832  if test "x$has_forbidden_chars" != x; then
25833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25837      # Going to short mode and back again did indeed matter. Since short mode is
25838      # case insensitive, let's make it lowercase to improve readability.
25839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25840      # Now convert it back to Unix-style (cygpath)
25841      input_path=`$CYGPATH -u "$shortmode_path"`
25842      new_path="$input_path"
25843    fi
25844  fi
25845
25846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25847  if test "x$test_cygdrive_prefix" = x; then
25848    # As a simple fix, exclude /usr/bin since it's not a real path.
25849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25851      # a path prefixed by /cygdrive for fixpath to work.
25852      new_path="$CYGWIN_ROOT_PATH$input_path"
25853    fi
25854  fi
25855
25856
25857  if test "x$path" != "x$new_path"; then
25858    BOOT_JDK="$new_path"
25859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25861  fi
25862
25863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25864
25865  path="$BOOT_JDK"
25866  has_colon=`$ECHO $path | $GREP ^.:`
25867  new_path="$path"
25868  if test "x$has_colon" = x; then
25869    # Not in mixed or Windows style, start by that.
25870    new_path=`cmd //c echo $path`
25871  fi
25872
25873
25874  input_path="$new_path"
25875  # Check if we need to convert this using DOS-style short mode. If the path
25876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25877  # take no chances and rewrite it.
25878  # Note: m4 eats our [], so we need to use [ and ] instead.
25879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25880  if test "x$has_forbidden_chars" != x; then
25881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25883  fi
25884
25885
25886  windows_path="$new_path"
25887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25888    unix_path=`$CYGPATH -u "$windows_path"`
25889    new_path="$unix_path"
25890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25892    new_path="$unix_path"
25893  fi
25894
25895  if test "x$path" != "x$new_path"; then
25896    BOOT_JDK="$new_path"
25897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25899  fi
25900
25901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25903
25904    else
25905      # We're on a unix platform. Hooray! :)
25906      path="$BOOT_JDK"
25907      has_space=`$ECHO "$path" | $GREP " "`
25908      if test "x$has_space" != x; then
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25912      fi
25913
25914      # Use eval to expand a potential ~
25915      eval path="$path"
25916      if test ! -f "$path" && test ! -d "$path"; then
25917        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25918      fi
25919
25920      if test -d "$path"; then
25921        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25922      else
25923        dir="`$DIRNAME "$path"`"
25924        base="`$BASENAME "$path"`"
25925        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25926      fi
25927    fi
25928  fi
25929
25930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25931$as_echo_n "checking for Boot JDK... " >&6; }
25932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25933$as_echo "$BOOT_JDK" >&6; }
25934            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25935$as_echo_n "checking Boot JDK version... " >&6; }
25936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25938$as_echo "$BOOT_JDK_VERSION" >&6; }
25939          fi # end check jdk version
25940        fi # end check javac
25941      fi # end check java
25942    fi # end check boot jdk found
25943  fi
25944
25945
25946  if test "x$BOOT_JDK_FOUND" = xno; then
25947    # Now execute the test
25948
25949  if test "x$PROGRAMW6432" != x; then
25950    VIRTUAL_DIR="$PROGRAMW6432/Java"
25951
25952  windows_path="$VIRTUAL_DIR"
25953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25954    unix_path=`$CYGPATH -u "$windows_path"`
25955    VIRTUAL_DIR="$unix_path"
25956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25958    VIRTUAL_DIR="$unix_path"
25959  fi
25960
25961
25962  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25963  BOOT_JDK_SUFFIX=""
25964  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25965  if test "x$ALL_JDKS_FOUND" != x; then
25966    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25967
25968  if test "x$BOOT_JDK_FOUND" = xno; then
25969    # Now execute the test
25970
25971        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25972        if test -d "$BOOT_JDK"; then
25973          BOOT_JDK_FOUND=maybe
25974          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25975$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25976        fi
25977
25978
25979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25981      # Do we have a bin/java?
25982      if test ! -x "$BOOT_JDK/bin/java"; then
25983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25985        BOOT_JDK_FOUND=no
25986      else
25987        # Do we have a bin/javac?
25988        if test ! -x "$BOOT_JDK/bin/javac"; then
25989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25993          BOOT_JDK_FOUND=no
25994        else
25995          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25996          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25997
25998          # Extra M4 quote needed to protect [] in grep expression.
25999          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26000          if test "x$FOUND_CORRECT_VERSION" = x; then
26001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26003            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26005            BOOT_JDK_FOUND=no
26006          else
26007            # We're done! :-)
26008            BOOT_JDK_FOUND=yes
26009
26010  # Only process if variable expands to non-empty
26011
26012  if test "x$BOOT_JDK" != x; then
26013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26014
26015  # Input might be given as Windows format, start by converting to
26016  # unix format.
26017  path="$BOOT_JDK"
26018  new_path=`$CYGPATH -u "$path"`
26019
26020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26023  # "foo.exe" is OK but "foo" is an error.
26024  #
26025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26026  # It is also a way to make sure we got the proper file name for the real test later on.
26027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26028  if test "x$test_shortpath" = x; then
26029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26032  fi
26033
26034  # Call helper function which possibly converts this using DOS-style short mode.
26035  # If so, the updated path is stored in $new_path.
26036
26037  input_path="$new_path"
26038  # Check if we need to convert this using DOS-style short mode. If the path
26039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26040  # take no chances and rewrite it.
26041  # Note: m4 eats our [], so we need to use [ and ] instead.
26042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26043  if test "x$has_forbidden_chars" != x; then
26044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26048      # Going to short mode and back again did indeed matter. Since short mode is
26049      # case insensitive, let's make it lowercase to improve readability.
26050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26051      # Now convert it back to Unix-style (cygpath)
26052      input_path=`$CYGPATH -u "$shortmode_path"`
26053      new_path="$input_path"
26054    fi
26055  fi
26056
26057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26058  if test "x$test_cygdrive_prefix" = x; then
26059    # As a simple fix, exclude /usr/bin since it's not a real path.
26060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26062      # a path prefixed by /cygdrive for fixpath to work.
26063      new_path="$CYGWIN_ROOT_PATH$input_path"
26064    fi
26065  fi
26066
26067
26068  if test "x$path" != "x$new_path"; then
26069    BOOT_JDK="$new_path"
26070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26072  fi
26073
26074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26075
26076  path="$BOOT_JDK"
26077  has_colon=`$ECHO $path | $GREP ^.:`
26078  new_path="$path"
26079  if test "x$has_colon" = x; then
26080    # Not in mixed or Windows style, start by that.
26081    new_path=`cmd //c echo $path`
26082  fi
26083
26084
26085  input_path="$new_path"
26086  # Check if we need to convert this using DOS-style short mode. If the path
26087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26088  # take no chances and rewrite it.
26089  # Note: m4 eats our [], so we need to use [ and ] instead.
26090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26091  if test "x$has_forbidden_chars" != x; then
26092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26094  fi
26095
26096
26097  windows_path="$new_path"
26098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26099    unix_path=`$CYGPATH -u "$windows_path"`
26100    new_path="$unix_path"
26101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26103    new_path="$unix_path"
26104  fi
26105
26106  if test "x$path" != "x$new_path"; then
26107    BOOT_JDK="$new_path"
26108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26110  fi
26111
26112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26114
26115    else
26116      # We're on a unix platform. Hooray! :)
26117      path="$BOOT_JDK"
26118      has_space=`$ECHO "$path" | $GREP " "`
26119      if test "x$has_space" != x; then
26120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26123      fi
26124
26125      # Use eval to expand a potential ~
26126      eval path="$path"
26127      if test ! -f "$path" && test ! -d "$path"; then
26128        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26129      fi
26130
26131      if test -d "$path"; then
26132        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26133      else
26134        dir="`$DIRNAME "$path"`"
26135        base="`$BASENAME "$path"`"
26136        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26137      fi
26138    fi
26139  fi
26140
26141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26142$as_echo_n "checking for Boot JDK... " >&6; }
26143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26144$as_echo "$BOOT_JDK" >&6; }
26145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26146$as_echo_n "checking Boot JDK version... " >&6; }
26147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26149$as_echo "$BOOT_JDK_VERSION" >&6; }
26150          fi # end check jdk version
26151        fi # end check javac
26152      fi # end check java
26153    fi # end check boot jdk found
26154  fi
26155
26156    done
26157  fi
26158
26159  fi
26160
26161
26162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26164      # Do we have a bin/java?
26165      if test ! -x "$BOOT_JDK/bin/java"; then
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26168        BOOT_JDK_FOUND=no
26169      else
26170        # Do we have a bin/javac?
26171        if test ! -x "$BOOT_JDK/bin/javac"; then
26172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26176          BOOT_JDK_FOUND=no
26177        else
26178          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26179          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26180
26181          # Extra M4 quote needed to protect [] in grep expression.
26182          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26183          if test "x$FOUND_CORRECT_VERSION" = x; then
26184            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26187$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26188            BOOT_JDK_FOUND=no
26189          else
26190            # We're done! :-)
26191            BOOT_JDK_FOUND=yes
26192
26193  # Only process if variable expands to non-empty
26194
26195  if test "x$BOOT_JDK" != x; then
26196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197
26198  # Input might be given as Windows format, start by converting to
26199  # unix format.
26200  path="$BOOT_JDK"
26201  new_path=`$CYGPATH -u "$path"`
26202
26203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26206  # "foo.exe" is OK but "foo" is an error.
26207  #
26208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26209  # It is also a way to make sure we got the proper file name for the real test later on.
26210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26211  if test "x$test_shortpath" = x; then
26212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26215  fi
26216
26217  # Call helper function which possibly converts this using DOS-style short mode.
26218  # If so, the updated path is stored in $new_path.
26219
26220  input_path="$new_path"
26221  # Check if we need to convert this using DOS-style short mode. If the path
26222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26223  # take no chances and rewrite it.
26224  # Note: m4 eats our [], so we need to use [ and ] instead.
26225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26226  if test "x$has_forbidden_chars" != x; then
26227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26231      # Going to short mode and back again did indeed matter. Since short mode is
26232      # case insensitive, let's make it lowercase to improve readability.
26233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26234      # Now convert it back to Unix-style (cygpath)
26235      input_path=`$CYGPATH -u "$shortmode_path"`
26236      new_path="$input_path"
26237    fi
26238  fi
26239
26240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26241  if test "x$test_cygdrive_prefix" = x; then
26242    # As a simple fix, exclude /usr/bin since it's not a real path.
26243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26245      # a path prefixed by /cygdrive for fixpath to work.
26246      new_path="$CYGWIN_ROOT_PATH$input_path"
26247    fi
26248  fi
26249
26250
26251  if test "x$path" != "x$new_path"; then
26252    BOOT_JDK="$new_path"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255  fi
26256
26257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258
26259  path="$BOOT_JDK"
26260  has_colon=`$ECHO $path | $GREP ^.:`
26261  new_path="$path"
26262  if test "x$has_colon" = x; then
26263    # Not in mixed or Windows style, start by that.
26264    new_path=`cmd //c echo $path`
26265  fi
26266
26267
26268  input_path="$new_path"
26269  # Check if we need to convert this using DOS-style short mode. If the path
26270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271  # take no chances and rewrite it.
26272  # Note: m4 eats our [], so we need to use [ and ] instead.
26273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26274  if test "x$has_forbidden_chars" != x; then
26275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26277  fi
26278
26279
26280  windows_path="$new_path"
26281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26282    unix_path=`$CYGPATH -u "$windows_path"`
26283    new_path="$unix_path"
26284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26286    new_path="$unix_path"
26287  fi
26288
26289  if test "x$path" != "x$new_path"; then
26290    BOOT_JDK="$new_path"
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26293  fi
26294
26295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26297
26298    else
26299      # We're on a unix platform. Hooray! :)
26300      path="$BOOT_JDK"
26301      has_space=`$ECHO "$path" | $GREP " "`
26302      if test "x$has_space" != x; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26306      fi
26307
26308      # Use eval to expand a potential ~
26309      eval path="$path"
26310      if test ! -f "$path" && test ! -d "$path"; then
26311        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26312      fi
26313
26314      if test -d "$path"; then
26315        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26316      else
26317        dir="`$DIRNAME "$path"`"
26318        base="`$BASENAME "$path"`"
26319        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26320      fi
26321    fi
26322  fi
26323
26324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26325$as_echo_n "checking for Boot JDK... " >&6; }
26326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26327$as_echo "$BOOT_JDK" >&6; }
26328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26329$as_echo_n "checking Boot JDK version... " >&6; }
26330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26332$as_echo "$BOOT_JDK_VERSION" >&6; }
26333          fi # end check jdk version
26334        fi # end check javac
26335      fi # end check java
26336    fi # end check boot jdk found
26337  fi
26338
26339
26340  if test "x$BOOT_JDK_FOUND" = xno; then
26341    # Now execute the test
26342
26343  if test "x$PROGRAMFILES" != x; then
26344    VIRTUAL_DIR="$PROGRAMFILES/Java"
26345
26346  windows_path="$VIRTUAL_DIR"
26347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26348    unix_path=`$CYGPATH -u "$windows_path"`
26349    VIRTUAL_DIR="$unix_path"
26350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26352    VIRTUAL_DIR="$unix_path"
26353  fi
26354
26355
26356  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26357  BOOT_JDK_SUFFIX=""
26358  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26359  if test "x$ALL_JDKS_FOUND" != x; then
26360    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26361
26362  if test "x$BOOT_JDK_FOUND" = xno; then
26363    # Now execute the test
26364
26365        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26366        if test -d "$BOOT_JDK"; then
26367          BOOT_JDK_FOUND=maybe
26368          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26369$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26370        fi
26371
26372
26373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26375      # Do we have a bin/java?
26376      if test ! -x "$BOOT_JDK/bin/java"; then
26377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26379        BOOT_JDK_FOUND=no
26380      else
26381        # Do we have a bin/javac?
26382        if test ! -x "$BOOT_JDK/bin/javac"; then
26383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26387          BOOT_JDK_FOUND=no
26388        else
26389          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26390          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26391
26392          # Extra M4 quote needed to protect [] in grep expression.
26393          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26394          if test "x$FOUND_CORRECT_VERSION" = x; then
26395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26397            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26398$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26399            BOOT_JDK_FOUND=no
26400          else
26401            # We're done! :-)
26402            BOOT_JDK_FOUND=yes
26403
26404  # Only process if variable expands to non-empty
26405
26406  if test "x$BOOT_JDK" != x; then
26407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26408
26409  # Input might be given as Windows format, start by converting to
26410  # unix format.
26411  path="$BOOT_JDK"
26412  new_path=`$CYGPATH -u "$path"`
26413
26414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26417  # "foo.exe" is OK but "foo" is an error.
26418  #
26419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26420  # It is also a way to make sure we got the proper file name for the real test later on.
26421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26422  if test "x$test_shortpath" = x; then
26423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26426  fi
26427
26428  # Call helper function which possibly converts this using DOS-style short mode.
26429  # If so, the updated path is stored in $new_path.
26430
26431  input_path="$new_path"
26432  # Check if we need to convert this using DOS-style short mode. If the path
26433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26434  # take no chances and rewrite it.
26435  # Note: m4 eats our [], so we need to use [ and ] instead.
26436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26437  if test "x$has_forbidden_chars" != x; then
26438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26442      # Going to short mode and back again did indeed matter. Since short mode is
26443      # case insensitive, let's make it lowercase to improve readability.
26444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26445      # Now convert it back to Unix-style (cygpath)
26446      input_path=`$CYGPATH -u "$shortmode_path"`
26447      new_path="$input_path"
26448    fi
26449  fi
26450
26451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26452  if test "x$test_cygdrive_prefix" = x; then
26453    # As a simple fix, exclude /usr/bin since it's not a real path.
26454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26456      # a path prefixed by /cygdrive for fixpath to work.
26457      new_path="$CYGWIN_ROOT_PATH$input_path"
26458    fi
26459  fi
26460
26461
26462  if test "x$path" != "x$new_path"; then
26463    BOOT_JDK="$new_path"
26464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26466  fi
26467
26468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26469
26470  path="$BOOT_JDK"
26471  has_colon=`$ECHO $path | $GREP ^.:`
26472  new_path="$path"
26473  if test "x$has_colon" = x; then
26474    # Not in mixed or Windows style, start by that.
26475    new_path=`cmd //c echo $path`
26476  fi
26477
26478
26479  input_path="$new_path"
26480  # Check if we need to convert this using DOS-style short mode. If the path
26481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26482  # take no chances and rewrite it.
26483  # Note: m4 eats our [], so we need to use [ and ] instead.
26484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26485  if test "x$has_forbidden_chars" != x; then
26486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26488  fi
26489
26490
26491  windows_path="$new_path"
26492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26493    unix_path=`$CYGPATH -u "$windows_path"`
26494    new_path="$unix_path"
26495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26497    new_path="$unix_path"
26498  fi
26499
26500  if test "x$path" != "x$new_path"; then
26501    BOOT_JDK="$new_path"
26502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26504  fi
26505
26506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26508
26509    else
26510      # We're on a unix platform. Hooray! :)
26511      path="$BOOT_JDK"
26512      has_space=`$ECHO "$path" | $GREP " "`
26513      if test "x$has_space" != x; then
26514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26517      fi
26518
26519      # Use eval to expand a potential ~
26520      eval path="$path"
26521      if test ! -f "$path" && test ! -d "$path"; then
26522        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26523      fi
26524
26525      if test -d "$path"; then
26526        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26527      else
26528        dir="`$DIRNAME "$path"`"
26529        base="`$BASENAME "$path"`"
26530        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26531      fi
26532    fi
26533  fi
26534
26535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26536$as_echo_n "checking for Boot JDK... " >&6; }
26537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26538$as_echo "$BOOT_JDK" >&6; }
26539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26540$as_echo_n "checking Boot JDK version... " >&6; }
26541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26543$as_echo "$BOOT_JDK_VERSION" >&6; }
26544          fi # end check jdk version
26545        fi # end check javac
26546      fi # end check java
26547    fi # end check boot jdk found
26548  fi
26549
26550    done
26551  fi
26552
26553  fi
26554
26555
26556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26558      # Do we have a bin/java?
26559      if test ! -x "$BOOT_JDK/bin/java"; then
26560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26562        BOOT_JDK_FOUND=no
26563      else
26564        # Do we have a bin/javac?
26565        if test ! -x "$BOOT_JDK/bin/javac"; then
26566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26570          BOOT_JDK_FOUND=no
26571        else
26572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26574
26575          # Extra M4 quote needed to protect [] in grep expression.
26576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26577          if test "x$FOUND_CORRECT_VERSION" = x; then
26578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26582            BOOT_JDK_FOUND=no
26583          else
26584            # We're done! :-)
26585            BOOT_JDK_FOUND=yes
26586
26587  # Only process if variable expands to non-empty
26588
26589  if test "x$BOOT_JDK" != x; then
26590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26591
26592  # Input might be given as Windows format, start by converting to
26593  # unix format.
26594  path="$BOOT_JDK"
26595  new_path=`$CYGPATH -u "$path"`
26596
26597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26600  # "foo.exe" is OK but "foo" is an error.
26601  #
26602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26603  # It is also a way to make sure we got the proper file name for the real test later on.
26604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26605  if test "x$test_shortpath" = x; then
26606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26609  fi
26610
26611  # Call helper function which possibly converts this using DOS-style short mode.
26612  # If so, the updated path is stored in $new_path.
26613
26614  input_path="$new_path"
26615  # Check if we need to convert this using DOS-style short mode. If the path
26616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26617  # take no chances and rewrite it.
26618  # Note: m4 eats our [], so we need to use [ and ] instead.
26619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26620  if test "x$has_forbidden_chars" != x; then
26621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26625      # Going to short mode and back again did indeed matter. Since short mode is
26626      # case insensitive, let's make it lowercase to improve readability.
26627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26628      # Now convert it back to Unix-style (cygpath)
26629      input_path=`$CYGPATH -u "$shortmode_path"`
26630      new_path="$input_path"
26631    fi
26632  fi
26633
26634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26635  if test "x$test_cygdrive_prefix" = x; then
26636    # As a simple fix, exclude /usr/bin since it's not a real path.
26637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26639      # a path prefixed by /cygdrive for fixpath to work.
26640      new_path="$CYGWIN_ROOT_PATH$input_path"
26641    fi
26642  fi
26643
26644
26645  if test "x$path" != "x$new_path"; then
26646    BOOT_JDK="$new_path"
26647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26649  fi
26650
26651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652
26653  path="$BOOT_JDK"
26654  has_colon=`$ECHO $path | $GREP ^.:`
26655  new_path="$path"
26656  if test "x$has_colon" = x; then
26657    # Not in mixed or Windows style, start by that.
26658    new_path=`cmd //c echo $path`
26659  fi
26660
26661
26662  input_path="$new_path"
26663  # Check if we need to convert this using DOS-style short mode. If the path
26664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26665  # take no chances and rewrite it.
26666  # Note: m4 eats our [], so we need to use [ and ] instead.
26667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26668  if test "x$has_forbidden_chars" != x; then
26669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26671  fi
26672
26673
26674  windows_path="$new_path"
26675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26676    unix_path=`$CYGPATH -u "$windows_path"`
26677    new_path="$unix_path"
26678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26680    new_path="$unix_path"
26681  fi
26682
26683  if test "x$path" != "x$new_path"; then
26684    BOOT_JDK="$new_path"
26685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26687  fi
26688
26689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26691
26692    else
26693      # We're on a unix platform. Hooray! :)
26694      path="$BOOT_JDK"
26695      has_space=`$ECHO "$path" | $GREP " "`
26696      if test "x$has_space" != x; then
26697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26700      fi
26701
26702      # Use eval to expand a potential ~
26703      eval path="$path"
26704      if test ! -f "$path" && test ! -d "$path"; then
26705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26706      fi
26707
26708      if test -d "$path"; then
26709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26710      else
26711        dir="`$DIRNAME "$path"`"
26712        base="`$BASENAME "$path"`"
26713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26714      fi
26715    fi
26716  fi
26717
26718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26719$as_echo_n "checking for Boot JDK... " >&6; }
26720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26721$as_echo "$BOOT_JDK" >&6; }
26722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26723$as_echo_n "checking Boot JDK version... " >&6; }
26724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26726$as_echo "$BOOT_JDK_VERSION" >&6; }
26727          fi # end check jdk version
26728        fi # end check javac
26729      fi # end check java
26730    fi # end check boot jdk found
26731  fi
26732
26733
26734  if test "x$BOOT_JDK_FOUND" = xno; then
26735    # Now execute the test
26736
26737  if test "x$ProgramFiles" != x; then
26738    VIRTUAL_DIR="$ProgramFiles/Java"
26739
26740  windows_path="$VIRTUAL_DIR"
26741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742    unix_path=`$CYGPATH -u "$windows_path"`
26743    VIRTUAL_DIR="$unix_path"
26744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26746    VIRTUAL_DIR="$unix_path"
26747  fi
26748
26749
26750  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26751  BOOT_JDK_SUFFIX=""
26752  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26753  if test "x$ALL_JDKS_FOUND" != x; then
26754    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26755
26756  if test "x$BOOT_JDK_FOUND" = xno; then
26757    # Now execute the test
26758
26759        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26760        if test -d "$BOOT_JDK"; then
26761          BOOT_JDK_FOUND=maybe
26762          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26763$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26764        fi
26765
26766
26767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26769      # Do we have a bin/java?
26770      if test ! -x "$BOOT_JDK/bin/java"; then
26771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26773        BOOT_JDK_FOUND=no
26774      else
26775        # Do we have a bin/javac?
26776        if test ! -x "$BOOT_JDK/bin/javac"; then
26777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26781          BOOT_JDK_FOUND=no
26782        else
26783          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26784          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26785
26786          # Extra M4 quote needed to protect [] in grep expression.
26787          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26788          if test "x$FOUND_CORRECT_VERSION" = x; then
26789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26792$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26793            BOOT_JDK_FOUND=no
26794          else
26795            # We're done! :-)
26796            BOOT_JDK_FOUND=yes
26797
26798  # Only process if variable expands to non-empty
26799
26800  if test "x$BOOT_JDK" != x; then
26801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26802
26803  # Input might be given as Windows format, start by converting to
26804  # unix format.
26805  path="$BOOT_JDK"
26806  new_path=`$CYGPATH -u "$path"`
26807
26808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26811  # "foo.exe" is OK but "foo" is an error.
26812  #
26813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26814  # It is also a way to make sure we got the proper file name for the real test later on.
26815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26816  if test "x$test_shortpath" = x; then
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26819    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26820  fi
26821
26822  # Call helper function which possibly converts this using DOS-style short mode.
26823  # If so, the updated path is stored in $new_path.
26824
26825  input_path="$new_path"
26826  # Check if we need to convert this using DOS-style short mode. If the path
26827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26828  # take no chances and rewrite it.
26829  # Note: m4 eats our [], so we need to use [ and ] instead.
26830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26831  if test "x$has_forbidden_chars" != x; then
26832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26836      # Going to short mode and back again did indeed matter. Since short mode is
26837      # case insensitive, let's make it lowercase to improve readability.
26838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26839      # Now convert it back to Unix-style (cygpath)
26840      input_path=`$CYGPATH -u "$shortmode_path"`
26841      new_path="$input_path"
26842    fi
26843  fi
26844
26845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26846  if test "x$test_cygdrive_prefix" = x; then
26847    # As a simple fix, exclude /usr/bin since it's not a real path.
26848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26850      # a path prefixed by /cygdrive for fixpath to work.
26851      new_path="$CYGWIN_ROOT_PATH$input_path"
26852    fi
26853  fi
26854
26855
26856  if test "x$path" != "x$new_path"; then
26857    BOOT_JDK="$new_path"
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26860  fi
26861
26862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26863
26864  path="$BOOT_JDK"
26865  has_colon=`$ECHO $path | $GREP ^.:`
26866  new_path="$path"
26867  if test "x$has_colon" = x; then
26868    # Not in mixed or Windows style, start by that.
26869    new_path=`cmd //c echo $path`
26870  fi
26871
26872
26873  input_path="$new_path"
26874  # Check if we need to convert this using DOS-style short mode. If the path
26875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26876  # take no chances and rewrite it.
26877  # Note: m4 eats our [], so we need to use [ and ] instead.
26878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26879  if test "x$has_forbidden_chars" != x; then
26880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26882  fi
26883
26884
26885  windows_path="$new_path"
26886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26887    unix_path=`$CYGPATH -u "$windows_path"`
26888    new_path="$unix_path"
26889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26891    new_path="$unix_path"
26892  fi
26893
26894  if test "x$path" != "x$new_path"; then
26895    BOOT_JDK="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26898  fi
26899
26900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26902
26903    else
26904      # We're on a unix platform. Hooray! :)
26905      path="$BOOT_JDK"
26906      has_space=`$ECHO "$path" | $GREP " "`
26907      if test "x$has_space" != x; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26911      fi
26912
26913      # Use eval to expand a potential ~
26914      eval path="$path"
26915      if test ! -f "$path" && test ! -d "$path"; then
26916        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26917      fi
26918
26919      if test -d "$path"; then
26920        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26921      else
26922        dir="`$DIRNAME "$path"`"
26923        base="`$BASENAME "$path"`"
26924        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26925      fi
26926    fi
26927  fi
26928
26929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26930$as_echo_n "checking for Boot JDK... " >&6; }
26931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26932$as_echo "$BOOT_JDK" >&6; }
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26934$as_echo_n "checking Boot JDK version... " >&6; }
26935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26937$as_echo "$BOOT_JDK_VERSION" >&6; }
26938          fi # end check jdk version
26939        fi # end check javac
26940      fi # end check java
26941    fi # end check boot jdk found
26942  fi
26943
26944    done
26945  fi
26946
26947  fi
26948
26949
26950    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26951    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26952      # Do we have a bin/java?
26953      if test ! -x "$BOOT_JDK/bin/java"; then
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26956        BOOT_JDK_FOUND=no
26957      else
26958        # Do we have a bin/javac?
26959        if test ! -x "$BOOT_JDK/bin/javac"; then
26960          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26962          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26963$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26964          BOOT_JDK_FOUND=no
26965        else
26966          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26967          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26968
26969          # Extra M4 quote needed to protect [] in grep expression.
26970          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26971          if test "x$FOUND_CORRECT_VERSION" = x; then
26972            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26974            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26975$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26976            BOOT_JDK_FOUND=no
26977          else
26978            # We're done! :-)
26979            BOOT_JDK_FOUND=yes
26980
26981  # Only process if variable expands to non-empty
26982
26983  if test "x$BOOT_JDK" != x; then
26984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26985
26986  # Input might be given as Windows format, start by converting to
26987  # unix format.
26988  path="$BOOT_JDK"
26989  new_path=`$CYGPATH -u "$path"`
26990
26991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26994  # "foo.exe" is OK but "foo" is an error.
26995  #
26996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26997  # It is also a way to make sure we got the proper file name for the real test later on.
26998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26999  if test "x$test_shortpath" = x; then
27000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27003  fi
27004
27005  # Call helper function which possibly converts this using DOS-style short mode.
27006  # If so, the updated path is stored in $new_path.
27007
27008  input_path="$new_path"
27009  # Check if we need to convert this using DOS-style short mode. If the path
27010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27011  # take no chances and rewrite it.
27012  # Note: m4 eats our [], so we need to use [ and ] instead.
27013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27014  if test "x$has_forbidden_chars" != x; then
27015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27019      # Going to short mode and back again did indeed matter. Since short mode is
27020      # case insensitive, let's make it lowercase to improve readability.
27021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27022      # Now convert it back to Unix-style (cygpath)
27023      input_path=`$CYGPATH -u "$shortmode_path"`
27024      new_path="$input_path"
27025    fi
27026  fi
27027
27028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27029  if test "x$test_cygdrive_prefix" = x; then
27030    # As a simple fix, exclude /usr/bin since it's not a real path.
27031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27033      # a path prefixed by /cygdrive for fixpath to work.
27034      new_path="$CYGWIN_ROOT_PATH$input_path"
27035    fi
27036  fi
27037
27038
27039  if test "x$path" != "x$new_path"; then
27040    BOOT_JDK="$new_path"
27041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27043  fi
27044
27045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27046
27047  path="$BOOT_JDK"
27048  has_colon=`$ECHO $path | $GREP ^.:`
27049  new_path="$path"
27050  if test "x$has_colon" = x; then
27051    # Not in mixed or Windows style, start by that.
27052    new_path=`cmd //c echo $path`
27053  fi
27054
27055
27056  input_path="$new_path"
27057  # Check if we need to convert this using DOS-style short mode. If the path
27058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27059  # take no chances and rewrite it.
27060  # Note: m4 eats our [], so we need to use [ and ] instead.
27061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27062  if test "x$has_forbidden_chars" != x; then
27063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27065  fi
27066
27067
27068  windows_path="$new_path"
27069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27070    unix_path=`$CYGPATH -u "$windows_path"`
27071    new_path="$unix_path"
27072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27074    new_path="$unix_path"
27075  fi
27076
27077  if test "x$path" != "x$new_path"; then
27078    BOOT_JDK="$new_path"
27079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27081  fi
27082
27083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27085
27086    else
27087      # We're on a unix platform. Hooray! :)
27088      path="$BOOT_JDK"
27089      has_space=`$ECHO "$path" | $GREP " "`
27090      if test "x$has_space" != x; then
27091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27093        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27094      fi
27095
27096      # Use eval to expand a potential ~
27097      eval path="$path"
27098      if test ! -f "$path" && test ! -d "$path"; then
27099        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27100      fi
27101
27102      if test -d "$path"; then
27103        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27104      else
27105        dir="`$DIRNAME "$path"`"
27106        base="`$BASENAME "$path"`"
27107        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27108      fi
27109    fi
27110  fi
27111
27112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27113$as_echo_n "checking for Boot JDK... " >&6; }
27114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27115$as_echo "$BOOT_JDK" >&6; }
27116            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27117$as_echo_n "checking Boot JDK version... " >&6; }
27118            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27120$as_echo "$BOOT_JDK_VERSION" >&6; }
27121          fi # end check jdk version
27122        fi # end check javac
27123      fi # end check java
27124    fi # end check boot jdk found
27125  fi
27126
27127
27128  if test "x$BOOT_JDK_FOUND" = xno; then
27129    # Now execute the test
27130
27131  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27132  BOOT_JDK_SUFFIX=""
27133  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27134  if test "x$ALL_JDKS_FOUND" != x; then
27135    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27136
27137  if test "x$BOOT_JDK_FOUND" = xno; then
27138    # Now execute the test
27139
27140        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27141        if test -d "$BOOT_JDK"; then
27142          BOOT_JDK_FOUND=maybe
27143          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27144$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27145        fi
27146
27147
27148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27150      # Do we have a bin/java?
27151      if test ! -x "$BOOT_JDK/bin/java"; then
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27154        BOOT_JDK_FOUND=no
27155      else
27156        # Do we have a bin/javac?
27157        if test ! -x "$BOOT_JDK/bin/javac"; then
27158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27162          BOOT_JDK_FOUND=no
27163        else
27164          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27165          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27166
27167          # Extra M4 quote needed to protect [] in grep expression.
27168          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27169          if test "x$FOUND_CORRECT_VERSION" = x; then
27170            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27172            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27173$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27174            BOOT_JDK_FOUND=no
27175          else
27176            # We're done! :-)
27177            BOOT_JDK_FOUND=yes
27178
27179  # Only process if variable expands to non-empty
27180
27181  if test "x$BOOT_JDK" != x; then
27182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27183
27184  # Input might be given as Windows format, start by converting to
27185  # unix format.
27186  path="$BOOT_JDK"
27187  new_path=`$CYGPATH -u "$path"`
27188
27189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27192  # "foo.exe" is OK but "foo" is an error.
27193  #
27194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27195  # It is also a way to make sure we got the proper file name for the real test later on.
27196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27197  if test "x$test_shortpath" = x; then
27198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27201  fi
27202
27203  # Call helper function which possibly converts this using DOS-style short mode.
27204  # If so, the updated path is stored in $new_path.
27205
27206  input_path="$new_path"
27207  # Check if we need to convert this using DOS-style short mode. If the path
27208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27209  # take no chances and rewrite it.
27210  # Note: m4 eats our [], so we need to use [ and ] instead.
27211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27212  if test "x$has_forbidden_chars" != x; then
27213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27217      # Going to short mode and back again did indeed matter. Since short mode is
27218      # case insensitive, let's make it lowercase to improve readability.
27219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27220      # Now convert it back to Unix-style (cygpath)
27221      input_path=`$CYGPATH -u "$shortmode_path"`
27222      new_path="$input_path"
27223    fi
27224  fi
27225
27226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27227  if test "x$test_cygdrive_prefix" = x; then
27228    # As a simple fix, exclude /usr/bin since it's not a real path.
27229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27231      # a path prefixed by /cygdrive for fixpath to work.
27232      new_path="$CYGWIN_ROOT_PATH$input_path"
27233    fi
27234  fi
27235
27236
27237  if test "x$path" != "x$new_path"; then
27238    BOOT_JDK="$new_path"
27239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27241  fi
27242
27243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27244
27245  path="$BOOT_JDK"
27246  has_colon=`$ECHO $path | $GREP ^.:`
27247  new_path="$path"
27248  if test "x$has_colon" = x; then
27249    # Not in mixed or Windows style, start by that.
27250    new_path=`cmd //c echo $path`
27251  fi
27252
27253
27254  input_path="$new_path"
27255  # Check if we need to convert this using DOS-style short mode. If the path
27256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27257  # take no chances and rewrite it.
27258  # Note: m4 eats our [], so we need to use [ and ] instead.
27259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27260  if test "x$has_forbidden_chars" != x; then
27261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27263  fi
27264
27265
27266  windows_path="$new_path"
27267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27268    unix_path=`$CYGPATH -u "$windows_path"`
27269    new_path="$unix_path"
27270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27272    new_path="$unix_path"
27273  fi
27274
27275  if test "x$path" != "x$new_path"; then
27276    BOOT_JDK="$new_path"
27277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27279  fi
27280
27281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27283
27284    else
27285      # We're on a unix platform. Hooray! :)
27286      path="$BOOT_JDK"
27287      has_space=`$ECHO "$path" | $GREP " "`
27288      if test "x$has_space" != x; then
27289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27292      fi
27293
27294      # Use eval to expand a potential ~
27295      eval path="$path"
27296      if test ! -f "$path" && test ! -d "$path"; then
27297        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27298      fi
27299
27300      if test -d "$path"; then
27301        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27302      else
27303        dir="`$DIRNAME "$path"`"
27304        base="`$BASENAME "$path"`"
27305        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27306      fi
27307    fi
27308  fi
27309
27310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27311$as_echo_n "checking for Boot JDK... " >&6; }
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27313$as_echo "$BOOT_JDK" >&6; }
27314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27315$as_echo_n "checking Boot JDK version... " >&6; }
27316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27318$as_echo "$BOOT_JDK_VERSION" >&6; }
27319          fi # end check jdk version
27320        fi # end check javac
27321      fi # end check java
27322    fi # end check boot jdk found
27323  fi
27324
27325    done
27326  fi
27327
27328
27329    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27330    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27331      # Do we have a bin/java?
27332      if test ! -x "$BOOT_JDK/bin/java"; then
27333        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27335        BOOT_JDK_FOUND=no
27336      else
27337        # Do we have a bin/javac?
27338        if test ! -x "$BOOT_JDK/bin/javac"; then
27339          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27341          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27342$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27343          BOOT_JDK_FOUND=no
27344        else
27345          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27346          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27347
27348          # Extra M4 quote needed to protect [] in grep expression.
27349          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27350          if test "x$FOUND_CORRECT_VERSION" = x; then
27351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27353            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27354$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27355            BOOT_JDK_FOUND=no
27356          else
27357            # We're done! :-)
27358            BOOT_JDK_FOUND=yes
27359
27360  # Only process if variable expands to non-empty
27361
27362  if test "x$BOOT_JDK" != x; then
27363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27364
27365  # Input might be given as Windows format, start by converting to
27366  # unix format.
27367  path="$BOOT_JDK"
27368  new_path=`$CYGPATH -u "$path"`
27369
27370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27373  # "foo.exe" is OK but "foo" is an error.
27374  #
27375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27376  # It is also a way to make sure we got the proper file name for the real test later on.
27377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27378  if test "x$test_shortpath" = x; then
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27381    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27382  fi
27383
27384  # Call helper function which possibly converts this using DOS-style short mode.
27385  # If so, the updated path is stored in $new_path.
27386
27387  input_path="$new_path"
27388  # Check if we need to convert this using DOS-style short mode. If the path
27389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27390  # take no chances and rewrite it.
27391  # Note: m4 eats our [], so we need to use [ and ] instead.
27392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27393  if test "x$has_forbidden_chars" != x; then
27394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27398      # Going to short mode and back again did indeed matter. Since short mode is
27399      # case insensitive, let's make it lowercase to improve readability.
27400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27401      # Now convert it back to Unix-style (cygpath)
27402      input_path=`$CYGPATH -u "$shortmode_path"`
27403      new_path="$input_path"
27404    fi
27405  fi
27406
27407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27408  if test "x$test_cygdrive_prefix" = x; then
27409    # As a simple fix, exclude /usr/bin since it's not a real path.
27410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27412      # a path prefixed by /cygdrive for fixpath to work.
27413      new_path="$CYGWIN_ROOT_PATH$input_path"
27414    fi
27415  fi
27416
27417
27418  if test "x$path" != "x$new_path"; then
27419    BOOT_JDK="$new_path"
27420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27421$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27422  fi
27423
27424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27425
27426  path="$BOOT_JDK"
27427  has_colon=`$ECHO $path | $GREP ^.:`
27428  new_path="$path"
27429  if test "x$has_colon" = x; then
27430    # Not in mixed or Windows style, start by that.
27431    new_path=`cmd //c echo $path`
27432  fi
27433
27434
27435  input_path="$new_path"
27436  # Check if we need to convert this using DOS-style short mode. If the path
27437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27438  # take no chances and rewrite it.
27439  # Note: m4 eats our [], so we need to use [ and ] instead.
27440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27441  if test "x$has_forbidden_chars" != x; then
27442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27444  fi
27445
27446
27447  windows_path="$new_path"
27448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27449    unix_path=`$CYGPATH -u "$windows_path"`
27450    new_path="$unix_path"
27451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27453    new_path="$unix_path"
27454  fi
27455
27456  if test "x$path" != "x$new_path"; then
27457    BOOT_JDK="$new_path"
27458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27460  fi
27461
27462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27464
27465    else
27466      # We're on a unix platform. Hooray! :)
27467      path="$BOOT_JDK"
27468      has_space=`$ECHO "$path" | $GREP " "`
27469      if test "x$has_space" != x; then
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27473      fi
27474
27475      # Use eval to expand a potential ~
27476      eval path="$path"
27477      if test ! -f "$path" && test ! -d "$path"; then
27478        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27479      fi
27480
27481      if test -d "$path"; then
27482        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27483      else
27484        dir="`$DIRNAME "$path"`"
27485        base="`$BASENAME "$path"`"
27486        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27487      fi
27488    fi
27489  fi
27490
27491            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27492$as_echo_n "checking for Boot JDK... " >&6; }
27493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27494$as_echo "$BOOT_JDK" >&6; }
27495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27496$as_echo_n "checking Boot JDK version... " >&6; }
27497            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27499$as_echo "$BOOT_JDK_VERSION" >&6; }
27500          fi # end check jdk version
27501        fi # end check javac
27502      fi # end check java
27503    fi # end check boot jdk found
27504  fi
27505
27506  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27507
27508  if test "x$BOOT_JDK_FOUND" = xno; then
27509    # Now execute the test
27510
27511  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27512  BOOT_JDK_SUFFIX="/Contents/Home"
27513  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27514  if test "x$ALL_JDKS_FOUND" != x; then
27515    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27516
27517  if test "x$BOOT_JDK_FOUND" = xno; then
27518    # Now execute the test
27519
27520        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27521        if test -d "$BOOT_JDK"; then
27522          BOOT_JDK_FOUND=maybe
27523          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27524$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27525        fi
27526
27527
27528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27530      # Do we have a bin/java?
27531      if test ! -x "$BOOT_JDK/bin/java"; then
27532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27534        BOOT_JDK_FOUND=no
27535      else
27536        # Do we have a bin/javac?
27537        if test ! -x "$BOOT_JDK/bin/javac"; then
27538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27542          BOOT_JDK_FOUND=no
27543        else
27544          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27545          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27546
27547          # Extra M4 quote needed to protect [] in grep expression.
27548          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27549          if test "x$FOUND_CORRECT_VERSION" = x; then
27550            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27553$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27554            BOOT_JDK_FOUND=no
27555          else
27556            # We're done! :-)
27557            BOOT_JDK_FOUND=yes
27558
27559  # Only process if variable expands to non-empty
27560
27561  if test "x$BOOT_JDK" != x; then
27562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27563
27564  # Input might be given as Windows format, start by converting to
27565  # unix format.
27566  path="$BOOT_JDK"
27567  new_path=`$CYGPATH -u "$path"`
27568
27569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27572  # "foo.exe" is OK but "foo" is an error.
27573  #
27574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27575  # It is also a way to make sure we got the proper file name for the real test later on.
27576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27577  if test "x$test_shortpath" = x; then
27578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27580    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27581  fi
27582
27583  # Call helper function which possibly converts this using DOS-style short mode.
27584  # If so, the updated path is stored in $new_path.
27585
27586  input_path="$new_path"
27587  # Check if we need to convert this using DOS-style short mode. If the path
27588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27589  # take no chances and rewrite it.
27590  # Note: m4 eats our [], so we need to use [ and ] instead.
27591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27592  if test "x$has_forbidden_chars" != x; then
27593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27597      # Going to short mode and back again did indeed matter. Since short mode is
27598      # case insensitive, let's make it lowercase to improve readability.
27599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27600      # Now convert it back to Unix-style (cygpath)
27601      input_path=`$CYGPATH -u "$shortmode_path"`
27602      new_path="$input_path"
27603    fi
27604  fi
27605
27606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27607  if test "x$test_cygdrive_prefix" = x; then
27608    # As a simple fix, exclude /usr/bin since it's not a real path.
27609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27611      # a path prefixed by /cygdrive for fixpath to work.
27612      new_path="$CYGWIN_ROOT_PATH$input_path"
27613    fi
27614  fi
27615
27616
27617  if test "x$path" != "x$new_path"; then
27618    BOOT_JDK="$new_path"
27619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27621  fi
27622
27623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27624
27625  path="$BOOT_JDK"
27626  has_colon=`$ECHO $path | $GREP ^.:`
27627  new_path="$path"
27628  if test "x$has_colon" = x; then
27629    # Not in mixed or Windows style, start by that.
27630    new_path=`cmd //c echo $path`
27631  fi
27632
27633
27634  input_path="$new_path"
27635  # Check if we need to convert this using DOS-style short mode. If the path
27636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27637  # take no chances and rewrite it.
27638  # Note: m4 eats our [], so we need to use [ and ] instead.
27639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27640  if test "x$has_forbidden_chars" != x; then
27641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27643  fi
27644
27645
27646  windows_path="$new_path"
27647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27648    unix_path=`$CYGPATH -u "$windows_path"`
27649    new_path="$unix_path"
27650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27652    new_path="$unix_path"
27653  fi
27654
27655  if test "x$path" != "x$new_path"; then
27656    BOOT_JDK="$new_path"
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27659  fi
27660
27661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27663
27664    else
27665      # We're on a unix platform. Hooray! :)
27666      path="$BOOT_JDK"
27667      has_space=`$ECHO "$path" | $GREP " "`
27668      if test "x$has_space" != x; then
27669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27672      fi
27673
27674      # Use eval to expand a potential ~
27675      eval path="$path"
27676      if test ! -f "$path" && test ! -d "$path"; then
27677        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27678      fi
27679
27680      if test -d "$path"; then
27681        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27682      else
27683        dir="`$DIRNAME "$path"`"
27684        base="`$BASENAME "$path"`"
27685        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27686      fi
27687    fi
27688  fi
27689
27690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27691$as_echo_n "checking for Boot JDK... " >&6; }
27692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27693$as_echo "$BOOT_JDK" >&6; }
27694            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27695$as_echo_n "checking Boot JDK version... " >&6; }
27696            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27698$as_echo "$BOOT_JDK_VERSION" >&6; }
27699          fi # end check jdk version
27700        fi # end check javac
27701      fi # end check java
27702    fi # end check boot jdk found
27703  fi
27704
27705    done
27706  fi
27707
27708
27709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27711      # Do we have a bin/java?
27712      if test ! -x "$BOOT_JDK/bin/java"; then
27713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27715        BOOT_JDK_FOUND=no
27716      else
27717        # Do we have a bin/javac?
27718        if test ! -x "$BOOT_JDK/bin/javac"; then
27719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27723          BOOT_JDK_FOUND=no
27724        else
27725          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27726          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27727
27728          # Extra M4 quote needed to protect [] in grep expression.
27729          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27730          if test "x$FOUND_CORRECT_VERSION" = x; then
27731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27733            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27734$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27735            BOOT_JDK_FOUND=no
27736          else
27737            # We're done! :-)
27738            BOOT_JDK_FOUND=yes
27739
27740  # Only process if variable expands to non-empty
27741
27742  if test "x$BOOT_JDK" != x; then
27743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27744
27745  # Input might be given as Windows format, start by converting to
27746  # unix format.
27747  path="$BOOT_JDK"
27748  new_path=`$CYGPATH -u "$path"`
27749
27750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27753  # "foo.exe" is OK but "foo" is an error.
27754  #
27755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27756  # It is also a way to make sure we got the proper file name for the real test later on.
27757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27758  if test "x$test_shortpath" = x; then
27759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27762  fi
27763
27764  # Call helper function which possibly converts this using DOS-style short mode.
27765  # If so, the updated path is stored in $new_path.
27766
27767  input_path="$new_path"
27768  # Check if we need to convert this using DOS-style short mode. If the path
27769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27770  # take no chances and rewrite it.
27771  # Note: m4 eats our [], so we need to use [ and ] instead.
27772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27773  if test "x$has_forbidden_chars" != x; then
27774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27778      # Going to short mode and back again did indeed matter. Since short mode is
27779      # case insensitive, let's make it lowercase to improve readability.
27780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27781      # Now convert it back to Unix-style (cygpath)
27782      input_path=`$CYGPATH -u "$shortmode_path"`
27783      new_path="$input_path"
27784    fi
27785  fi
27786
27787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27788  if test "x$test_cygdrive_prefix" = x; then
27789    # As a simple fix, exclude /usr/bin since it's not a real path.
27790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27792      # a path prefixed by /cygdrive for fixpath to work.
27793      new_path="$CYGWIN_ROOT_PATH$input_path"
27794    fi
27795  fi
27796
27797
27798  if test "x$path" != "x$new_path"; then
27799    BOOT_JDK="$new_path"
27800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27802  fi
27803
27804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27805
27806  path="$BOOT_JDK"
27807  has_colon=`$ECHO $path | $GREP ^.:`
27808  new_path="$path"
27809  if test "x$has_colon" = x; then
27810    # Not in mixed or Windows style, start by that.
27811    new_path=`cmd //c echo $path`
27812  fi
27813
27814
27815  input_path="$new_path"
27816  # Check if we need to convert this using DOS-style short mode. If the path
27817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27818  # take no chances and rewrite it.
27819  # Note: m4 eats our [], so we need to use [ and ] instead.
27820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27821  if test "x$has_forbidden_chars" != x; then
27822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27824  fi
27825
27826
27827  windows_path="$new_path"
27828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27829    unix_path=`$CYGPATH -u "$windows_path"`
27830    new_path="$unix_path"
27831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27833    new_path="$unix_path"
27834  fi
27835
27836  if test "x$path" != "x$new_path"; then
27837    BOOT_JDK="$new_path"
27838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27840  fi
27841
27842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27844
27845    else
27846      # We're on a unix platform. Hooray! :)
27847      path="$BOOT_JDK"
27848      has_space=`$ECHO "$path" | $GREP " "`
27849      if test "x$has_space" != x; then
27850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27853      fi
27854
27855      # Use eval to expand a potential ~
27856      eval path="$path"
27857      if test ! -f "$path" && test ! -d "$path"; then
27858        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27859      fi
27860
27861      if test -d "$path"; then
27862        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27863      else
27864        dir="`$DIRNAME "$path"`"
27865        base="`$BASENAME "$path"`"
27866        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27867      fi
27868    fi
27869  fi
27870
27871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27872$as_echo_n "checking for Boot JDK... " >&6; }
27873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27874$as_echo "$BOOT_JDK" >&6; }
27875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27876$as_echo_n "checking Boot JDK version... " >&6; }
27877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27879$as_echo "$BOOT_JDK_VERSION" >&6; }
27880          fi # end check jdk version
27881        fi # end check javac
27882      fi # end check java
27883    fi # end check boot jdk found
27884  fi
27885
27886
27887  if test "x$BOOT_JDK_FOUND" = xno; then
27888    # Now execute the test
27889
27890  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27891  BOOT_JDK_SUFFIX="/Contents/Home"
27892  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27893  if test "x$ALL_JDKS_FOUND" != x; then
27894    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27895
27896  if test "x$BOOT_JDK_FOUND" = xno; then
27897    # Now execute the test
27898
27899        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27900        if test -d "$BOOT_JDK"; then
27901          BOOT_JDK_FOUND=maybe
27902          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27903$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27904        fi
27905
27906
27907    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27908    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27909      # Do we have a bin/java?
27910      if test ! -x "$BOOT_JDK/bin/java"; then
27911        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27913        BOOT_JDK_FOUND=no
27914      else
27915        # Do we have a bin/javac?
27916        if test ! -x "$BOOT_JDK/bin/javac"; then
27917          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27919          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27920$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27921          BOOT_JDK_FOUND=no
27922        else
27923          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27924          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27925
27926          # Extra M4 quote needed to protect [] in grep expression.
27927          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27928          if test "x$FOUND_CORRECT_VERSION" = x; then
27929            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27931            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27932$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27933            BOOT_JDK_FOUND=no
27934          else
27935            # We're done! :-)
27936            BOOT_JDK_FOUND=yes
27937
27938  # Only process if variable expands to non-empty
27939
27940  if test "x$BOOT_JDK" != x; then
27941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27942
27943  # Input might be given as Windows format, start by converting to
27944  # unix format.
27945  path="$BOOT_JDK"
27946  new_path=`$CYGPATH -u "$path"`
27947
27948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27951  # "foo.exe" is OK but "foo" is an error.
27952  #
27953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27954  # It is also a way to make sure we got the proper file name for the real test later on.
27955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27956  if test "x$test_shortpath" = x; then
27957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27958$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27959    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27960  fi
27961
27962  # Call helper function which possibly converts this using DOS-style short mode.
27963  # If so, the updated path is stored in $new_path.
27964
27965  input_path="$new_path"
27966  # Check if we need to convert this using DOS-style short mode. If the path
27967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27968  # take no chances and rewrite it.
27969  # Note: m4 eats our [], so we need to use [ and ] instead.
27970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27971  if test "x$has_forbidden_chars" != x; then
27972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27976      # Going to short mode and back again did indeed matter. Since short mode is
27977      # case insensitive, let's make it lowercase to improve readability.
27978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27979      # Now convert it back to Unix-style (cygpath)
27980      input_path=`$CYGPATH -u "$shortmode_path"`
27981      new_path="$input_path"
27982    fi
27983  fi
27984
27985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27986  if test "x$test_cygdrive_prefix" = x; then
27987    # As a simple fix, exclude /usr/bin since it's not a real path.
27988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27990      # a path prefixed by /cygdrive for fixpath to work.
27991      new_path="$CYGWIN_ROOT_PATH$input_path"
27992    fi
27993  fi
27994
27995
27996  if test "x$path" != "x$new_path"; then
27997    BOOT_JDK="$new_path"
27998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28000  fi
28001
28002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28003
28004  path="$BOOT_JDK"
28005  has_colon=`$ECHO $path | $GREP ^.:`
28006  new_path="$path"
28007  if test "x$has_colon" = x; then
28008    # Not in mixed or Windows style, start by that.
28009    new_path=`cmd //c echo $path`
28010  fi
28011
28012
28013  input_path="$new_path"
28014  # Check if we need to convert this using DOS-style short mode. If the path
28015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28016  # take no chances and rewrite it.
28017  # Note: m4 eats our [], so we need to use [ and ] instead.
28018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28019  if test "x$has_forbidden_chars" != x; then
28020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28022  fi
28023
28024
28025  windows_path="$new_path"
28026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28027    unix_path=`$CYGPATH -u "$windows_path"`
28028    new_path="$unix_path"
28029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28031    new_path="$unix_path"
28032  fi
28033
28034  if test "x$path" != "x$new_path"; then
28035    BOOT_JDK="$new_path"
28036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28038  fi
28039
28040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28042
28043    else
28044      # We're on a unix platform. Hooray! :)
28045      path="$BOOT_JDK"
28046      has_space=`$ECHO "$path" | $GREP " "`
28047      if test "x$has_space" != x; then
28048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28050        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28051      fi
28052
28053      # Use eval to expand a potential ~
28054      eval path="$path"
28055      if test ! -f "$path" && test ! -d "$path"; then
28056        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28057      fi
28058
28059      if test -d "$path"; then
28060        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28061      else
28062        dir="`$DIRNAME "$path"`"
28063        base="`$BASENAME "$path"`"
28064        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28065      fi
28066    fi
28067  fi
28068
28069            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28070$as_echo_n "checking for Boot JDK... " >&6; }
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28072$as_echo "$BOOT_JDK" >&6; }
28073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28074$as_echo_n "checking Boot JDK version... " >&6; }
28075            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28077$as_echo "$BOOT_JDK_VERSION" >&6; }
28078          fi # end check jdk version
28079        fi # end check javac
28080      fi # end check java
28081    fi # end check boot jdk found
28082  fi
28083
28084    done
28085  fi
28086
28087
28088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28090      # Do we have a bin/java?
28091      if test ! -x "$BOOT_JDK/bin/java"; then
28092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28094        BOOT_JDK_FOUND=no
28095      else
28096        # Do we have a bin/javac?
28097        if test ! -x "$BOOT_JDK/bin/javac"; then
28098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28102          BOOT_JDK_FOUND=no
28103        else
28104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28106
28107          # Extra M4 quote needed to protect [] in grep expression.
28108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28109          if test "x$FOUND_CORRECT_VERSION" = x; then
28110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28114            BOOT_JDK_FOUND=no
28115          else
28116            # We're done! :-)
28117            BOOT_JDK_FOUND=yes
28118
28119  # Only process if variable expands to non-empty
28120
28121  if test "x$BOOT_JDK" != x; then
28122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28123
28124  # Input might be given as Windows format, start by converting to
28125  # unix format.
28126  path="$BOOT_JDK"
28127  new_path=`$CYGPATH -u "$path"`
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28141  fi
28142
28143  # Call helper function which possibly converts this using DOS-style short mode.
28144  # If so, the updated path is stored in $new_path.
28145
28146  input_path="$new_path"
28147  # Check if we need to convert this using DOS-style short mode. If the path
28148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28149  # take no chances and rewrite it.
28150  # Note: m4 eats our [], so we need to use [ and ] instead.
28151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28152  if test "x$has_forbidden_chars" != x; then
28153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28157      # Going to short mode and back again did indeed matter. Since short mode is
28158      # case insensitive, let's make it lowercase to improve readability.
28159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28160      # Now convert it back to Unix-style (cygpath)
28161      input_path=`$CYGPATH -u "$shortmode_path"`
28162      new_path="$input_path"
28163    fi
28164  fi
28165
28166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28167  if test "x$test_cygdrive_prefix" = x; then
28168    # As a simple fix, exclude /usr/bin since it's not a real path.
28169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28171      # a path prefixed by /cygdrive for fixpath to work.
28172      new_path="$CYGWIN_ROOT_PATH$input_path"
28173    fi
28174  fi
28175
28176
28177  if test "x$path" != "x$new_path"; then
28178    BOOT_JDK="$new_path"
28179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28181  fi
28182
28183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184
28185  path="$BOOT_JDK"
28186  has_colon=`$ECHO $path | $GREP ^.:`
28187  new_path="$path"
28188  if test "x$has_colon" = x; then
28189    # Not in mixed or Windows style, start by that.
28190    new_path=`cmd //c echo $path`
28191  fi
28192
28193
28194  input_path="$new_path"
28195  # Check if we need to convert this using DOS-style short mode. If the path
28196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28197  # take no chances and rewrite it.
28198  # Note: m4 eats our [], so we need to use [ and ] instead.
28199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28200  if test "x$has_forbidden_chars" != x; then
28201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28203  fi
28204
28205
28206  windows_path="$new_path"
28207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28208    unix_path=`$CYGPATH -u "$windows_path"`
28209    new_path="$unix_path"
28210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28212    new_path="$unix_path"
28213  fi
28214
28215  if test "x$path" != "x$new_path"; then
28216    BOOT_JDK="$new_path"
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28219  fi
28220
28221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28223
28224    else
28225      # We're on a unix platform. Hooray! :)
28226      path="$BOOT_JDK"
28227      has_space=`$ECHO "$path" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28232      fi
28233
28234      # Use eval to expand a potential ~
28235      eval path="$path"
28236      if test ! -f "$path" && test ! -d "$path"; then
28237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28238      fi
28239
28240      if test -d "$path"; then
28241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28242      else
28243        dir="`$DIRNAME "$path"`"
28244        base="`$BASENAME "$path"`"
28245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28246      fi
28247    fi
28248  fi
28249
28250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28251$as_echo_n "checking for Boot JDK... " >&6; }
28252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28253$as_echo "$BOOT_JDK" >&6; }
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28255$as_echo_n "checking Boot JDK version... " >&6; }
28256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28258$as_echo "$BOOT_JDK_VERSION" >&6; }
28259          fi # end check jdk version
28260        fi # end check javac
28261      fi # end check java
28262    fi # end check boot jdk found
28263  fi
28264
28265  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28266
28267  if test "x$BOOT_JDK_FOUND" = xno; then
28268    # Now execute the test
28269
28270  BOOT_JDK_PREFIX="/usr/lib/jvm"
28271  BOOT_JDK_SUFFIX=""
28272  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28273  if test "x$ALL_JDKS_FOUND" != x; then
28274    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28275
28276  if test "x$BOOT_JDK_FOUND" = xno; then
28277    # Now execute the test
28278
28279        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28280        if test -d "$BOOT_JDK"; then
28281          BOOT_JDK_FOUND=maybe
28282          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28283$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28284        fi
28285
28286
28287    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28288    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28289      # Do we have a bin/java?
28290      if test ! -x "$BOOT_JDK/bin/java"; then
28291        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28293        BOOT_JDK_FOUND=no
28294      else
28295        # Do we have a bin/javac?
28296        if test ! -x "$BOOT_JDK/bin/javac"; then
28297          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28299          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28300$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28301          BOOT_JDK_FOUND=no
28302        else
28303          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28304          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28305
28306          # Extra M4 quote needed to protect [] in grep expression.
28307          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28308          if test "x$FOUND_CORRECT_VERSION" = x; then
28309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28311            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28312$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28313            BOOT_JDK_FOUND=no
28314          else
28315            # We're done! :-)
28316            BOOT_JDK_FOUND=yes
28317
28318  # Only process if variable expands to non-empty
28319
28320  if test "x$BOOT_JDK" != x; then
28321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28322
28323  # Input might be given as Windows format, start by converting to
28324  # unix format.
28325  path="$BOOT_JDK"
28326  new_path=`$CYGPATH -u "$path"`
28327
28328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28331  # "foo.exe" is OK but "foo" is an error.
28332  #
28333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28334  # It is also a way to make sure we got the proper file name for the real test later on.
28335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28336  if test "x$test_shortpath" = x; then
28337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28340  fi
28341
28342  # Call helper function which possibly converts this using DOS-style short mode.
28343  # If so, the updated path is stored in $new_path.
28344
28345  input_path="$new_path"
28346  # Check if we need to convert this using DOS-style short mode. If the path
28347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28348  # take no chances and rewrite it.
28349  # Note: m4 eats our [], so we need to use [ and ] instead.
28350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28351  if test "x$has_forbidden_chars" != x; then
28352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28356      # Going to short mode and back again did indeed matter. Since short mode is
28357      # case insensitive, let's make it lowercase to improve readability.
28358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28359      # Now convert it back to Unix-style (cygpath)
28360      input_path=`$CYGPATH -u "$shortmode_path"`
28361      new_path="$input_path"
28362    fi
28363  fi
28364
28365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28366  if test "x$test_cygdrive_prefix" = x; then
28367    # As a simple fix, exclude /usr/bin since it's not a real path.
28368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28370      # a path prefixed by /cygdrive for fixpath to work.
28371      new_path="$CYGWIN_ROOT_PATH$input_path"
28372    fi
28373  fi
28374
28375
28376  if test "x$path" != "x$new_path"; then
28377    BOOT_JDK="$new_path"
28378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28380  fi
28381
28382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28383
28384  path="$BOOT_JDK"
28385  has_colon=`$ECHO $path | $GREP ^.:`
28386  new_path="$path"
28387  if test "x$has_colon" = x; then
28388    # Not in mixed or Windows style, start by that.
28389    new_path=`cmd //c echo $path`
28390  fi
28391
28392
28393  input_path="$new_path"
28394  # Check if we need to convert this using DOS-style short mode. If the path
28395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28396  # take no chances and rewrite it.
28397  # Note: m4 eats our [], so we need to use [ and ] instead.
28398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28399  if test "x$has_forbidden_chars" != x; then
28400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28402  fi
28403
28404
28405  windows_path="$new_path"
28406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28407    unix_path=`$CYGPATH -u "$windows_path"`
28408    new_path="$unix_path"
28409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28411    new_path="$unix_path"
28412  fi
28413
28414  if test "x$path" != "x$new_path"; then
28415    BOOT_JDK="$new_path"
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28418  fi
28419
28420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28422
28423    else
28424      # We're on a unix platform. Hooray! :)
28425      path="$BOOT_JDK"
28426      has_space=`$ECHO "$path" | $GREP " "`
28427      if test "x$has_space" != x; then
28428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28431      fi
28432
28433      # Use eval to expand a potential ~
28434      eval path="$path"
28435      if test ! -f "$path" && test ! -d "$path"; then
28436        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28437      fi
28438
28439      if test -d "$path"; then
28440        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28441      else
28442        dir="`$DIRNAME "$path"`"
28443        base="`$BASENAME "$path"`"
28444        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28445      fi
28446    fi
28447  fi
28448
28449            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28450$as_echo_n "checking for Boot JDK... " >&6; }
28451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28452$as_echo "$BOOT_JDK" >&6; }
28453            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28454$as_echo_n "checking Boot JDK version... " >&6; }
28455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28457$as_echo "$BOOT_JDK_VERSION" >&6; }
28458          fi # end check jdk version
28459        fi # end check javac
28460      fi # end check java
28461    fi # end check boot jdk found
28462  fi
28463
28464    done
28465  fi
28466
28467
28468    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28469    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28470      # Do we have a bin/java?
28471      if test ! -x "$BOOT_JDK/bin/java"; then
28472        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28474        BOOT_JDK_FOUND=no
28475      else
28476        # Do we have a bin/javac?
28477        if test ! -x "$BOOT_JDK/bin/javac"; then
28478          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28480          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28481$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28482          BOOT_JDK_FOUND=no
28483        else
28484          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28485          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28486
28487          # Extra M4 quote needed to protect [] in grep expression.
28488          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28489          if test "x$FOUND_CORRECT_VERSION" = x; then
28490            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28492            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28493$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28494            BOOT_JDK_FOUND=no
28495          else
28496            # We're done! :-)
28497            BOOT_JDK_FOUND=yes
28498
28499  # Only process if variable expands to non-empty
28500
28501  if test "x$BOOT_JDK" != x; then
28502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28503
28504  # Input might be given as Windows format, start by converting to
28505  # unix format.
28506  path="$BOOT_JDK"
28507  new_path=`$CYGPATH -u "$path"`
28508
28509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28512  # "foo.exe" is OK but "foo" is an error.
28513  #
28514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28515  # It is also a way to make sure we got the proper file name for the real test later on.
28516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28517  if test "x$test_shortpath" = x; then
28518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28520    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28521  fi
28522
28523  # Call helper function which possibly converts this using DOS-style short mode.
28524  # If so, the updated path is stored in $new_path.
28525
28526  input_path="$new_path"
28527  # Check if we need to convert this using DOS-style short mode. If the path
28528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28529  # take no chances and rewrite it.
28530  # Note: m4 eats our [], so we need to use [ and ] instead.
28531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28532  if test "x$has_forbidden_chars" != x; then
28533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28537      # Going to short mode and back again did indeed matter. Since short mode is
28538      # case insensitive, let's make it lowercase to improve readability.
28539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28540      # Now convert it back to Unix-style (cygpath)
28541      input_path=`$CYGPATH -u "$shortmode_path"`
28542      new_path="$input_path"
28543    fi
28544  fi
28545
28546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28547  if test "x$test_cygdrive_prefix" = x; then
28548    # As a simple fix, exclude /usr/bin since it's not a real path.
28549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28551      # a path prefixed by /cygdrive for fixpath to work.
28552      new_path="$CYGWIN_ROOT_PATH$input_path"
28553    fi
28554  fi
28555
28556
28557  if test "x$path" != "x$new_path"; then
28558    BOOT_JDK="$new_path"
28559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28561  fi
28562
28563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28564
28565  path="$BOOT_JDK"
28566  has_colon=`$ECHO $path | $GREP ^.:`
28567  new_path="$path"
28568  if test "x$has_colon" = x; then
28569    # Not in mixed or Windows style, start by that.
28570    new_path=`cmd //c echo $path`
28571  fi
28572
28573
28574  input_path="$new_path"
28575  # Check if we need to convert this using DOS-style short mode. If the path
28576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28577  # take no chances and rewrite it.
28578  # Note: m4 eats our [], so we need to use [ and ] instead.
28579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28580  if test "x$has_forbidden_chars" != x; then
28581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28583  fi
28584
28585
28586  windows_path="$new_path"
28587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28588    unix_path=`$CYGPATH -u "$windows_path"`
28589    new_path="$unix_path"
28590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28592    new_path="$unix_path"
28593  fi
28594
28595  if test "x$path" != "x$new_path"; then
28596    BOOT_JDK="$new_path"
28597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28599  fi
28600
28601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28603
28604    else
28605      # We're on a unix platform. Hooray! :)
28606      path="$BOOT_JDK"
28607      has_space=`$ECHO "$path" | $GREP " "`
28608      if test "x$has_space" != x; then
28609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28612      fi
28613
28614      # Use eval to expand a potential ~
28615      eval path="$path"
28616      if test ! -f "$path" && test ! -d "$path"; then
28617        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28618      fi
28619
28620      if test -d "$path"; then
28621        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28622      else
28623        dir="`$DIRNAME "$path"`"
28624        base="`$BASENAME "$path"`"
28625        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28626      fi
28627    fi
28628  fi
28629
28630            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28631$as_echo_n "checking for Boot JDK... " >&6; }
28632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28633$as_echo "$BOOT_JDK" >&6; }
28634            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28635$as_echo_n "checking Boot JDK version... " >&6; }
28636            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28638$as_echo "$BOOT_JDK_VERSION" >&6; }
28639          fi # end check jdk version
28640        fi # end check javac
28641      fi # end check java
28642    fi # end check boot jdk found
28643  fi
28644
28645  fi
28646
28647
28648    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28649    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28650      # Do we have a bin/java?
28651      if test ! -x "$BOOT_JDK/bin/java"; then
28652        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28654        BOOT_JDK_FOUND=no
28655      else
28656        # Do we have a bin/javac?
28657        if test ! -x "$BOOT_JDK/bin/javac"; then
28658          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28660          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28661$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28662          BOOT_JDK_FOUND=no
28663        else
28664          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28665          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28666
28667          # Extra M4 quote needed to protect [] in grep expression.
28668          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28669          if test "x$FOUND_CORRECT_VERSION" = x; then
28670            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28672            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28673$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28674            BOOT_JDK_FOUND=no
28675          else
28676            # We're done! :-)
28677            BOOT_JDK_FOUND=yes
28678
28679  # Only process if variable expands to non-empty
28680
28681  if test "x$BOOT_JDK" != x; then
28682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28683
28684  # Input might be given as Windows format, start by converting to
28685  # unix format.
28686  path="$BOOT_JDK"
28687  new_path=`$CYGPATH -u "$path"`
28688
28689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28692  # "foo.exe" is OK but "foo" is an error.
28693  #
28694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28695  # It is also a way to make sure we got the proper file name for the real test later on.
28696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28697  if test "x$test_shortpath" = x; then
28698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28701  fi
28702
28703  # Call helper function which possibly converts this using DOS-style short mode.
28704  # If so, the updated path is stored in $new_path.
28705
28706  input_path="$new_path"
28707  # Check if we need to convert this using DOS-style short mode. If the path
28708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28709  # take no chances and rewrite it.
28710  # Note: m4 eats our [], so we need to use [ and ] instead.
28711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28712  if test "x$has_forbidden_chars" != x; then
28713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28717      # Going to short mode and back again did indeed matter. Since short mode is
28718      # case insensitive, let's make it lowercase to improve readability.
28719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28720      # Now convert it back to Unix-style (cygpath)
28721      input_path=`$CYGPATH -u "$shortmode_path"`
28722      new_path="$input_path"
28723    fi
28724  fi
28725
28726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28727  if test "x$test_cygdrive_prefix" = x; then
28728    # As a simple fix, exclude /usr/bin since it's not a real path.
28729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28731      # a path prefixed by /cygdrive for fixpath to work.
28732      new_path="$CYGWIN_ROOT_PATH$input_path"
28733    fi
28734  fi
28735
28736
28737  if test "x$path" != "x$new_path"; then
28738    BOOT_JDK="$new_path"
28739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28741  fi
28742
28743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28744
28745  path="$BOOT_JDK"
28746  has_colon=`$ECHO $path | $GREP ^.:`
28747  new_path="$path"
28748  if test "x$has_colon" = x; then
28749    # Not in mixed or Windows style, start by that.
28750    new_path=`cmd //c echo $path`
28751  fi
28752
28753
28754  input_path="$new_path"
28755  # Check if we need to convert this using DOS-style short mode. If the path
28756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28757  # take no chances and rewrite it.
28758  # Note: m4 eats our [], so we need to use [ and ] instead.
28759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28760  if test "x$has_forbidden_chars" != x; then
28761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28763  fi
28764
28765
28766  windows_path="$new_path"
28767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28768    unix_path=`$CYGPATH -u "$windows_path"`
28769    new_path="$unix_path"
28770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28772    new_path="$unix_path"
28773  fi
28774
28775  if test "x$path" != "x$new_path"; then
28776    BOOT_JDK="$new_path"
28777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28779  fi
28780
28781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28783
28784    else
28785      # We're on a unix platform. Hooray! :)
28786      path="$BOOT_JDK"
28787      has_space=`$ECHO "$path" | $GREP " "`
28788      if test "x$has_space" != x; then
28789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28792      fi
28793
28794      # Use eval to expand a potential ~
28795      eval path="$path"
28796      if test ! -f "$path" && test ! -d "$path"; then
28797        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28798      fi
28799
28800      if test -d "$path"; then
28801        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28802      else
28803        dir="`$DIRNAME "$path"`"
28804        base="`$BASENAME "$path"`"
28805        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28806      fi
28807    fi
28808  fi
28809
28810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28811$as_echo_n "checking for Boot JDK... " >&6; }
28812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28813$as_echo "$BOOT_JDK" >&6; }
28814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28815$as_echo_n "checking Boot JDK version... " >&6; }
28816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28818$as_echo "$BOOT_JDK_VERSION" >&6; }
28819          fi # end check jdk version
28820        fi # end check javac
28821      fi # end check java
28822    fi # end check boot jdk found
28823  fi
28824
28825
28826  # If we haven't found anything yet, we've truly lost. Give up.
28827  if test "x$BOOT_JDK_FOUND" = xno; then
28828
28829  # Print a helpful message on how to acquire the necessary build dependency.
28830  # openjdk is the help tag: freetype, cups, alsa etc
28831  MISSING_DEPENDENCY=openjdk
28832
28833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28834    cygwin_help $MISSING_DEPENDENCY
28835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28836    msys_help $MISSING_DEPENDENCY
28837  else
28838    PKGHANDLER_COMMAND=
28839
28840    case $PKGHANDLER in
28841      apt-get)
28842        apt_help     $MISSING_DEPENDENCY ;;
28843      yum)
28844        yum_help     $MISSING_DEPENDENCY ;;
28845      port)
28846        port_help    $MISSING_DEPENDENCY ;;
28847      pkgutil)
28848        pkgutil_help $MISSING_DEPENDENCY ;;
28849      pkgadd)
28850        pkgadd_help  $MISSING_DEPENDENCY ;;
28851    esac
28852
28853    if test "x$PKGHANDLER_COMMAND" != x; then
28854      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28855    fi
28856  fi
28857
28858    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28859$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28860    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28861$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28862    as_fn_error $? "Cannot continue" "$LINENO" 5
28863  fi
28864
28865
28866
28867  # Setup tools from the Boot JDK.
28868
28869  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28870
28871  # Publish this variable in the help.
28872
28873
28874  if [ -z "${JAVA+x}" ]; then
28875    # The variable is not set by user, try to locate tool using the code snippet
28876
28877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28878$as_echo_n "checking for java in Boot JDK... " >&6; }
28879      JAVA=$BOOT_JDK/bin/java
28880      if test ! -x $JAVA; then
28881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28882$as_echo "not found" >&6; }
28883        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28884$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28885        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28886      fi
28887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28888$as_echo "ok" >&6; }
28889
28890
28891  else
28892    # The variable is set, but is it from the command line or the environment?
28893
28894    # Try to remove the string !JAVA! from our list.
28895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28897      # If it failed, the variable was not from the command line. Ignore it,
28898      # but warn the user (except for BASH, which is always set by the calling BASH).
28899      if test "xJAVA" != xBASH; then
28900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28901$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28902      fi
28903      # Try to locate tool using the code snippet
28904
28905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28906$as_echo_n "checking for java in Boot JDK... " >&6; }
28907      JAVA=$BOOT_JDK/bin/java
28908      if test ! -x $JAVA; then
28909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28910$as_echo "not found" >&6; }
28911        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28912$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28913        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28914      fi
28915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28916$as_echo "ok" >&6; }
28917
28918
28919    else
28920      # If it succeeded, then it was overridden by the user. We will use it
28921      # for the tool.
28922
28923      # First remove it from the list of overridden variables, so we can test
28924      # for unknown variables in the end.
28925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28926
28927      # Check if we try to supply an empty value
28928      if test "x$JAVA" = x; then
28929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28930$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28932$as_echo_n "checking for JAVA... " >&6; }
28933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28934$as_echo "disabled" >&6; }
28935      else
28936        # Check if the provided tool contains a complete path.
28937        tool_specified="$JAVA"
28938        tool_basename="${tool_specified##*/}"
28939        if test "x$tool_basename" = "x$tool_specified"; then
28940          # A command without a complete path is provided, search $PATH.
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28942$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28943          # Extract the first word of "$tool_basename", so it can be a program name with args.
28944set dummy $tool_basename; ac_word=$2
28945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28946$as_echo_n "checking for $ac_word... " >&6; }
28947if ${ac_cv_path_JAVA+:} false; then :
28948  $as_echo_n "(cached) " >&6
28949else
28950  case $JAVA in
28951  [\\/]* | ?:[\\/]*)
28952  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28953  ;;
28954  *)
28955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28956for as_dir in $PATH
28957do
28958  IFS=$as_save_IFS
28959  test -z "$as_dir" && as_dir=.
28960    for ac_exec_ext in '' $ac_executable_extensions; do
28961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28962    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28964    break 2
28965  fi
28966done
28967  done
28968IFS=$as_save_IFS
28969
28970  ;;
28971esac
28972fi
28973JAVA=$ac_cv_path_JAVA
28974if test -n "$JAVA"; then
28975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28976$as_echo "$JAVA" >&6; }
28977else
28978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28979$as_echo "no" >&6; }
28980fi
28981
28982
28983          if test "x$JAVA" = x; then
28984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28985          fi
28986        else
28987          # Otherwise we believe it is a complete path. Use it as it is.
28988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28989$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28991$as_echo_n "checking for JAVA... " >&6; }
28992          if test ! -x "$tool_specified"; then
28993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28994$as_echo "not found" >&6; }
28995            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28996          fi
28997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28998$as_echo "$tool_specified" >&6; }
28999        fi
29000      fi
29001    fi
29002
29003  fi
29004
29005
29006
29007  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29008
29009  # Publish this variable in the help.
29010
29011
29012  if [ -z "${JAVAC+x}" ]; then
29013    # The variable is not set by user, try to locate tool using the code snippet
29014
29015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29016$as_echo_n "checking for javac in Boot JDK... " >&6; }
29017      JAVAC=$BOOT_JDK/bin/javac
29018      if test ! -x $JAVAC; then
29019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29020$as_echo "not found" >&6; }
29021        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29022$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29023        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29024      fi
29025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29026$as_echo "ok" >&6; }
29027
29028
29029  else
29030    # The variable is set, but is it from the command line or the environment?
29031
29032    # Try to remove the string !JAVAC! from our list.
29033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29035      # If it failed, the variable was not from the command line. Ignore it,
29036      # but warn the user (except for BASH, which is always set by the calling BASH).
29037      if test "xJAVAC" != xBASH; then
29038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29039$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29040      fi
29041      # Try to locate tool using the code snippet
29042
29043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29044$as_echo_n "checking for javac in Boot JDK... " >&6; }
29045      JAVAC=$BOOT_JDK/bin/javac
29046      if test ! -x $JAVAC; then
29047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29048$as_echo "not found" >&6; }
29049        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29050$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29051        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29052      fi
29053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29054$as_echo "ok" >&6; }
29055
29056
29057    else
29058      # If it succeeded, then it was overridden by the user. We will use it
29059      # for the tool.
29060
29061      # First remove it from the list of overridden variables, so we can test
29062      # for unknown variables in the end.
29063      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29064
29065      # Check if we try to supply an empty value
29066      if test "x$JAVAC" = x; then
29067        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29068$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29070$as_echo_n "checking for JAVAC... " >&6; }
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29072$as_echo "disabled" >&6; }
29073      else
29074        # Check if the provided tool contains a complete path.
29075        tool_specified="$JAVAC"
29076        tool_basename="${tool_specified##*/}"
29077        if test "x$tool_basename" = "x$tool_specified"; then
29078          # A command without a complete path is provided, search $PATH.
29079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29080$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29081          # Extract the first word of "$tool_basename", so it can be a program name with args.
29082set dummy $tool_basename; ac_word=$2
29083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29084$as_echo_n "checking for $ac_word... " >&6; }
29085if ${ac_cv_path_JAVAC+:} false; then :
29086  $as_echo_n "(cached) " >&6
29087else
29088  case $JAVAC in
29089  [\\/]* | ?:[\\/]*)
29090  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29091  ;;
29092  *)
29093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29094for as_dir in $PATH
29095do
29096  IFS=$as_save_IFS
29097  test -z "$as_dir" && as_dir=.
29098    for ac_exec_ext in '' $ac_executable_extensions; do
29099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29100    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29102    break 2
29103  fi
29104done
29105  done
29106IFS=$as_save_IFS
29107
29108  ;;
29109esac
29110fi
29111JAVAC=$ac_cv_path_JAVAC
29112if test -n "$JAVAC"; then
29113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29114$as_echo "$JAVAC" >&6; }
29115else
29116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29117$as_echo "no" >&6; }
29118fi
29119
29120
29121          if test "x$JAVAC" = x; then
29122            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29123          fi
29124        else
29125          # Otherwise we believe it is a complete path. Use it as it is.
29126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29127$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29128          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29129$as_echo_n "checking for JAVAC... " >&6; }
29130          if test ! -x "$tool_specified"; then
29131            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29132$as_echo "not found" >&6; }
29133            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29134          fi
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29136$as_echo "$tool_specified" >&6; }
29137        fi
29138      fi
29139    fi
29140
29141  fi
29142
29143
29144
29145  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29146
29147  # Publish this variable in the help.
29148
29149
29150  if [ -z "${JAVAH+x}" ]; then
29151    # The variable is not set by user, try to locate tool using the code snippet
29152
29153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29154$as_echo_n "checking for javah in Boot JDK... " >&6; }
29155      JAVAH=$BOOT_JDK/bin/javah
29156      if test ! -x $JAVAH; then
29157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29158$as_echo "not found" >&6; }
29159        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29160$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29161        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29162      fi
29163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29164$as_echo "ok" >&6; }
29165
29166
29167  else
29168    # The variable is set, but is it from the command line or the environment?
29169
29170    # Try to remove the string !JAVAH! from our list.
29171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29173      # If it failed, the variable was not from the command line. Ignore it,
29174      # but warn the user (except for BASH, which is always set by the calling BASH).
29175      if test "xJAVAH" != xBASH; then
29176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29177$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29178      fi
29179      # Try to locate tool using the code snippet
29180
29181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29182$as_echo_n "checking for javah in Boot JDK... " >&6; }
29183      JAVAH=$BOOT_JDK/bin/javah
29184      if test ! -x $JAVAH; then
29185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29186$as_echo "not found" >&6; }
29187        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29188$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29189        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29190      fi
29191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29192$as_echo "ok" >&6; }
29193
29194
29195    else
29196      # If it succeeded, then it was overridden by the user. We will use it
29197      # for the tool.
29198
29199      # First remove it from the list of overridden variables, so we can test
29200      # for unknown variables in the end.
29201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29202
29203      # Check if we try to supply an empty value
29204      if test "x$JAVAH" = x; then
29205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29206$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29208$as_echo_n "checking for JAVAH... " >&6; }
29209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29210$as_echo "disabled" >&6; }
29211      else
29212        # Check if the provided tool contains a complete path.
29213        tool_specified="$JAVAH"
29214        tool_basename="${tool_specified##*/}"
29215        if test "x$tool_basename" = "x$tool_specified"; then
29216          # A command without a complete path is provided, search $PATH.
29217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29218$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29219          # Extract the first word of "$tool_basename", so it can be a program name with args.
29220set dummy $tool_basename; ac_word=$2
29221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29222$as_echo_n "checking for $ac_word... " >&6; }
29223if ${ac_cv_path_JAVAH+:} false; then :
29224  $as_echo_n "(cached) " >&6
29225else
29226  case $JAVAH in
29227  [\\/]* | ?:[\\/]*)
29228  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29229  ;;
29230  *)
29231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29232for as_dir in $PATH
29233do
29234  IFS=$as_save_IFS
29235  test -z "$as_dir" && as_dir=.
29236    for ac_exec_ext in '' $ac_executable_extensions; do
29237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29238    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29240    break 2
29241  fi
29242done
29243  done
29244IFS=$as_save_IFS
29245
29246  ;;
29247esac
29248fi
29249JAVAH=$ac_cv_path_JAVAH
29250if test -n "$JAVAH"; then
29251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29252$as_echo "$JAVAH" >&6; }
29253else
29254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29255$as_echo "no" >&6; }
29256fi
29257
29258
29259          if test "x$JAVAH" = x; then
29260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29261          fi
29262        else
29263          # Otherwise we believe it is a complete path. Use it as it is.
29264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29265$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29267$as_echo_n "checking for JAVAH... " >&6; }
29268          if test ! -x "$tool_specified"; then
29269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29270$as_echo "not found" >&6; }
29271            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29272          fi
29273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29274$as_echo "$tool_specified" >&6; }
29275        fi
29276      fi
29277    fi
29278
29279  fi
29280
29281
29282
29283  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29284
29285  # Publish this variable in the help.
29286
29287
29288  if [ -z "${JAR+x}" ]; then
29289    # The variable is not set by user, try to locate tool using the code snippet
29290
29291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29292$as_echo_n "checking for jar in Boot JDK... " >&6; }
29293      JAR=$BOOT_JDK/bin/jar
29294      if test ! -x $JAR; then
29295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29296$as_echo "not found" >&6; }
29297        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29298$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29299        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29300      fi
29301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29302$as_echo "ok" >&6; }
29303
29304
29305  else
29306    # The variable is set, but is it from the command line or the environment?
29307
29308    # Try to remove the string !JAR! from our list.
29309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29311      # If it failed, the variable was not from the command line. Ignore it,
29312      # but warn the user (except for BASH, which is always set by the calling BASH).
29313      if test "xJAR" != xBASH; then
29314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29315$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29316      fi
29317      # Try to locate tool using the code snippet
29318
29319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29320$as_echo_n "checking for jar in Boot JDK... " >&6; }
29321      JAR=$BOOT_JDK/bin/jar
29322      if test ! -x $JAR; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29324$as_echo "not found" >&6; }
29325        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29326$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29327        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29328      fi
29329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29330$as_echo "ok" >&6; }
29331
29332
29333    else
29334      # If it succeeded, then it was overridden by the user. We will use it
29335      # for the tool.
29336
29337      # First remove it from the list of overridden variables, so we can test
29338      # for unknown variables in the end.
29339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29340
29341      # Check if we try to supply an empty value
29342      if test "x$JAR" = x; then
29343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29344$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29346$as_echo_n "checking for JAR... " >&6; }
29347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29348$as_echo "disabled" >&6; }
29349      else
29350        # Check if the provided tool contains a complete path.
29351        tool_specified="$JAR"
29352        tool_basename="${tool_specified##*/}"
29353        if test "x$tool_basename" = "x$tool_specified"; then
29354          # A command without a complete path is provided, search $PATH.
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29356$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29357          # Extract the first word of "$tool_basename", so it can be a program name with args.
29358set dummy $tool_basename; ac_word=$2
29359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29360$as_echo_n "checking for $ac_word... " >&6; }
29361if ${ac_cv_path_JAR+:} false; then :
29362  $as_echo_n "(cached) " >&6
29363else
29364  case $JAR in
29365  [\\/]* | ?:[\\/]*)
29366  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29367  ;;
29368  *)
29369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29370for as_dir in $PATH
29371do
29372  IFS=$as_save_IFS
29373  test -z "$as_dir" && as_dir=.
29374    for ac_exec_ext in '' $ac_executable_extensions; do
29375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29376    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29378    break 2
29379  fi
29380done
29381  done
29382IFS=$as_save_IFS
29383
29384  ;;
29385esac
29386fi
29387JAR=$ac_cv_path_JAR
29388if test -n "$JAR"; then
29389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29390$as_echo "$JAR" >&6; }
29391else
29392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29393$as_echo "no" >&6; }
29394fi
29395
29396
29397          if test "x$JAR" = x; then
29398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29399          fi
29400        else
29401          # Otherwise we believe it is a complete path. Use it as it is.
29402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29403$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29405$as_echo_n "checking for JAR... " >&6; }
29406          if test ! -x "$tool_specified"; then
29407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29408$as_echo "not found" >&6; }
29409            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29410          fi
29411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29412$as_echo "$tool_specified" >&6; }
29413        fi
29414      fi
29415    fi
29416
29417  fi
29418
29419
29420
29421  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29422
29423  # Publish this variable in the help.
29424
29425
29426  if [ -z "${JARSIGNER+x}" ]; then
29427    # The variable is not set by user, try to locate tool using the code snippet
29428
29429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29430$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29431      JARSIGNER=$BOOT_JDK/bin/jarsigner
29432      if test ! -x $JARSIGNER; then
29433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29434$as_echo "not found" >&6; }
29435        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29436$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29437        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29438      fi
29439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29440$as_echo "ok" >&6; }
29441
29442
29443  else
29444    # The variable is set, but is it from the command line or the environment?
29445
29446    # Try to remove the string !JARSIGNER! from our list.
29447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29449      # If it failed, the variable was not from the command line. Ignore it,
29450      # but warn the user (except for BASH, which is always set by the calling BASH).
29451      if test "xJARSIGNER" != xBASH; then
29452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29453$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29454      fi
29455      # Try to locate tool using the code snippet
29456
29457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29458$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29459      JARSIGNER=$BOOT_JDK/bin/jarsigner
29460      if test ! -x $JARSIGNER; then
29461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29462$as_echo "not found" >&6; }
29463        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29464$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29465        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29466      fi
29467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29468$as_echo "ok" >&6; }
29469
29470
29471    else
29472      # If it succeeded, then it was overridden by the user. We will use it
29473      # for the tool.
29474
29475      # First remove it from the list of overridden variables, so we can test
29476      # for unknown variables in the end.
29477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29478
29479      # Check if we try to supply an empty value
29480      if test "x$JARSIGNER" = x; then
29481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29482$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29484$as_echo_n "checking for JARSIGNER... " >&6; }
29485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29486$as_echo "disabled" >&6; }
29487      else
29488        # Check if the provided tool contains a complete path.
29489        tool_specified="$JARSIGNER"
29490        tool_basename="${tool_specified##*/}"
29491        if test "x$tool_basename" = "x$tool_specified"; then
29492          # A command without a complete path is provided, search $PATH.
29493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29494$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29495          # Extract the first word of "$tool_basename", so it can be a program name with args.
29496set dummy $tool_basename; ac_word=$2
29497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29498$as_echo_n "checking for $ac_word... " >&6; }
29499if ${ac_cv_path_JARSIGNER+:} false; then :
29500  $as_echo_n "(cached) " >&6
29501else
29502  case $JARSIGNER in
29503  [\\/]* | ?:[\\/]*)
29504  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29505  ;;
29506  *)
29507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29508for as_dir in $PATH
29509do
29510  IFS=$as_save_IFS
29511  test -z "$as_dir" && as_dir=.
29512    for ac_exec_ext in '' $ac_executable_extensions; do
29513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29514    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29516    break 2
29517  fi
29518done
29519  done
29520IFS=$as_save_IFS
29521
29522  ;;
29523esac
29524fi
29525JARSIGNER=$ac_cv_path_JARSIGNER
29526if test -n "$JARSIGNER"; then
29527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29528$as_echo "$JARSIGNER" >&6; }
29529else
29530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29531$as_echo "no" >&6; }
29532fi
29533
29534
29535          if test "x$JARSIGNER" = x; then
29536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29537          fi
29538        else
29539          # Otherwise we believe it is a complete path. Use it as it is.
29540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29541$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29543$as_echo_n "checking for JARSIGNER... " >&6; }
29544          if test ! -x "$tool_specified"; then
29545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29546$as_echo "not found" >&6; }
29547            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29548          fi
29549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29550$as_echo "$tool_specified" >&6; }
29551        fi
29552      fi
29553    fi
29554
29555  fi
29556
29557
29558
29559  # Finally, set some other options...
29560
29561  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29562  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29563
29564
29565
29566  # Check if the boot jdk is 32 or 64 bit
29567  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29568    BOOT_JDK_BITS="64"
29569  else
29570    BOOT_JDK_BITS="32"
29571  fi
29572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29573$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29575$as_echo "$BOOT_JDK_BITS" >&6; }
29576
29577
29578
29579###############################################################################
29580#
29581# Configure the sources to use. We can add or override individual directories.
29582#
29583###############################################################################
29584
29585
29586  # Where are the sources.
29587  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29588  CORBA_TOPDIR="$SRC_ROOT/corba"
29589  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29590  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29591  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29592  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29593  JDK_TOPDIR="$SRC_ROOT/jdk"
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603  # This feature is no longer supported.
29604
29605
29606
29607# Check whether --with-add-source-root was given.
29608if test "${with_add_source_root+set}" = set; then :
29609  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
29610$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29611fi
29612
29613
29614
29615
29616# Check whether --with-override-source-root was given.
29617if test "${with_override_source_root+set}" = set; then :
29618  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
29619$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29620fi
29621
29622
29623
29624
29625# Check whether --with-adds-and-overrides was given.
29626if test "${with_adds_and_overrides+set}" = set; then :
29627  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
29628$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29629fi
29630
29631
29632
29633
29634# Check whether --with-override-langtools was given.
29635if test "${with_override_langtools+set}" = set; then :
29636  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29637$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29638fi
29639
29640
29641
29642
29643# Check whether --with-override-corba was given.
29644if test "${with_override_corba+set}" = set; then :
29645  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29646$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29647fi
29648
29649
29650
29651
29652# Check whether --with-override-jaxp was given.
29653if test "${with_override_jaxp+set}" = set; then :
29654  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29655$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29656fi
29657
29658
29659
29660
29661# Check whether --with-override-jaxws was given.
29662if test "${with_override_jaxws+set}" = set; then :
29663  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29664$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29665fi
29666
29667
29668
29669
29670# Check whether --with-override-hotspot was given.
29671if test "${with_override_hotspot+set}" = set; then :
29672  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29673$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29674fi
29675
29676
29677
29678
29679# Check whether --with-override-nashorn was given.
29680if test "${with_override_nashorn+set}" = set; then :
29681  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29682$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29683fi
29684
29685
29686
29687
29688# Check whether --with-override-jdk was given.
29689if test "${with_override_jdk+set}" = set; then :
29690  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29691$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29692fi
29693
29694
29695
29696
29697  BUILD_OUTPUT="$OUTPUT_ROOT"
29698
29699
29700  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29701  BUILD_HOTSPOT=true
29702
29703
29704
29705# Check whether --with-import-hotspot was given.
29706if test "${with_import_hotspot+set}" = set; then :
29707  withval=$with_import_hotspot;
29708fi
29709
29710  if test "x$with_import_hotspot" != x; then
29711    CURDIR="$PWD"
29712    cd "$with_import_hotspot"
29713    HOTSPOT_DIST="`pwd`"
29714    cd "$CURDIR"
29715    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29716      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29717    fi
29718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29719$as_echo_n "checking if hotspot should be imported... " >&6; }
29720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29721$as_echo "yes from $HOTSPOT_DIST" >&6; }
29722    BUILD_HOTSPOT=false
29723  fi
29724
29725  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29726
29727
29728###############################################################################
29729#
29730# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29731# native code.
29732#
29733###############################################################################
29734
29735# See if we are doing a complete static build or not
29736
29737  # Check whether --enable-static-build was given.
29738if test "${enable_static_build+set}" = set; then :
29739  enableval=$enable_static_build;
29740fi
29741
29742  STATIC_BUILD=false
29743  if test "x$enable_static_build" = "xyes"; then
29744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29745$as_echo_n "checking if static build is enabled... " >&6; }
29746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29747$as_echo "yes" >&6; }
29748    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29749      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29750    fi
29751    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29752    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29753    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29754    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29755    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29756    STATIC_BUILD=true
29757  elif test "x$enable_static_build" = "xno"; then
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29759$as_echo_n "checking if static build is enabled... " >&6; }
29760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29761$as_echo "no" >&6; }
29762  elif test "x$enable_static_build" != "x"; then
29763    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29764  fi
29765
29766
29767
29768
29769# First determine the toolchain type (compiler family)
29770
29771
29772# Check whether --with-toolchain-type was given.
29773if test "${with_toolchain_type+set}" = set; then :
29774  withval=$with_toolchain_type;
29775fi
29776
29777
29778  # Use indirect variable referencing
29779  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29780  VALID_TOOLCHAINS=${!toolchain_var_name}
29781
29782  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29783    if test -n "$XCODEBUILD"; then
29784      # On Mac OS X, default toolchain to clang after Xcode 5
29785      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29786      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29787      if test $? -ne 0; then
29788        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29789      fi
29790      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29791          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29792          $CUT -f 1 -d .`
29793      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29794$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29795      if test $XCODE_MAJOR_VERSION -ge 5; then
29796          DEFAULT_TOOLCHAIN="clang"
29797      else
29798          DEFAULT_TOOLCHAIN="gcc"
29799      fi
29800    else
29801      # If Xcode is not installed, but the command line tools are
29802      # then we can't run xcodebuild. On these systems we should
29803      # default to clang
29804      DEFAULT_TOOLCHAIN="clang"
29805    fi
29806  else
29807    # First toolchain type in the list is the default
29808    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29809  fi
29810
29811  if test "x$with_toolchain_type" = xlist; then
29812    # List all toolchains
29813    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29814$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29815    for toolchain in $VALID_TOOLCHAINS; do
29816      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29817      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29818      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29819    done
29820
29821    exit 0
29822  elif test "x$with_toolchain_type" != x; then
29823    # User override; check that it is valid
29824    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29825      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29826$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29827      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29828$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29829      as_fn_error $? "Cannot continue." "$LINENO" 5
29830    fi
29831    TOOLCHAIN_TYPE=$with_toolchain_type
29832  else
29833    # No flag given, use default
29834    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29835  fi
29836
29837
29838  TOOLCHAIN_CC_BINARY_clang="clang"
29839  TOOLCHAIN_CC_BINARY_gcc="gcc"
29840  TOOLCHAIN_CC_BINARY_microsoft="cl"
29841  TOOLCHAIN_CC_BINARY_solstudio="cc"
29842  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29843
29844  TOOLCHAIN_CXX_BINARY_clang="clang++"
29845  TOOLCHAIN_CXX_BINARY_gcc="g++"
29846  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29847  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29848  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29849
29850  # Use indirect variable referencing
29851  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29852  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29853  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29854  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29855  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29856  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29857
29858
29859  # Define filename patterns
29860  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29861    LIBRARY_PREFIX=
29862    SHARED_LIBRARY_SUFFIX='.dll'
29863    STATIC_LIBRARY_SUFFIX='.lib'
29864    SHARED_LIBRARY='$1.dll'
29865    STATIC_LIBRARY='$1.lib'
29866    OBJ_SUFFIX='.obj'
29867    EXE_SUFFIX='.exe'
29868  else
29869    LIBRARY_PREFIX=lib
29870    SHARED_LIBRARY_SUFFIX='.so'
29871    STATIC_LIBRARY_SUFFIX='.a'
29872    SHARED_LIBRARY='lib$1.so'
29873    STATIC_LIBRARY='lib$1.a'
29874    OBJ_SUFFIX='.o'
29875    EXE_SUFFIX=''
29876    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29877      # For full static builds, we're overloading the SHARED_LIBRARY
29878      # variables in order to limit the amount of changes required.
29879      # It would be better to remove SHARED and just use LIBRARY and
29880      # LIBRARY_SUFFIX for libraries that can be built either
29881      # shared or static and use STATIC_* for libraries that are
29882      # always built statically.
29883      if test "x$STATIC_BUILD" = xtrue; then
29884        SHARED_LIBRARY='lib$1.a'
29885        SHARED_LIBRARY_SUFFIX='.a'
29886      else
29887        SHARED_LIBRARY='lib$1.dylib'
29888        SHARED_LIBRARY_SUFFIX='.dylib'
29889      fi
29890    fi
29891  fi
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29903    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29904$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29905  else
29906    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29907$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29908  fi
29909
29910
29911# User supplied flags should be used when configure detects compilers
29912
29913  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29914    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29915$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29916  fi
29917
29918  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29920$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29921  fi
29922
29923  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29924    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29925$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29926  fi
29927
29928
29929# Check whether --with-extra-cflags was given.
29930if test "${with_extra_cflags+set}" = set; then :
29931  withval=$with_extra_cflags;
29932fi
29933
29934
29935
29936# Check whether --with-extra-cxxflags was given.
29937if test "${with_extra_cxxflags+set}" = set; then :
29938  withval=$with_extra_cxxflags;
29939fi
29940
29941
29942
29943# Check whether --with-extra-ldflags was given.
29944if test "${with_extra_ldflags+set}" = set; then :
29945  withval=$with_extra_ldflags;
29946fi
29947
29948
29949  EXTRA_CFLAGS="$with_extra_cflags"
29950  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29951  EXTRA_LDFLAGS="$with_extra_ldflags"
29952
29953  # Hotspot needs these set in their legacy form
29954  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29955  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29956  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29957
29958
29959
29960
29961
29962  # The global CFLAGS and LDLAGS variables are used by configure tests and
29963  # should include the extra parameters
29964  CFLAGS="$EXTRA_CFLAGS"
29965  CXXFLAGS="$EXTRA_CXXFLAGS"
29966  LDFLAGS="$EXTRA_LDFLAGS"
29967  CPPFLAGS=""
29968
29969# The sysroot cflags are needed for configure to be able to run the compilers
29970
29971  if test "x$SYSROOT" != "x"; then
29972    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29973      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29974        # Solaris Studio does not have a concept of sysroot. Instead we must
29975        # make sure the default include and lib dirs are appended to each
29976        # compile and link command line.
29977        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29978        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29979            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29980            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29981      fi
29982    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29983      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29984      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29985    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29986      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29987      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29988    fi
29989    # Propagate the sysroot args to hotspot
29990    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29991    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29992    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29993    # The global CFLAGS and LDFLAGS variables need these for configure to function
29994    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29995    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29996    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29997    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29998  fi
29999
30000  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30001    # We also need -iframework<path>/System/Library/Frameworks
30002    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30003    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30004    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30005    # set this here so it doesn't have to be peppered throughout the forest
30006    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30007    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30008  fi
30009
30010
30011
30012
30013
30014# Then detect the actual binaries needed
30015
30016  # FIXME: Is this needed?
30017  ac_ext=cpp
30018ac_cpp='$CXXCPP $CPPFLAGS'
30019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30022
30023
30024  # Store the CFLAGS etc passed to the configure script.
30025  ORG_CFLAGS="$CFLAGS"
30026  ORG_CXXFLAGS="$CXXFLAGS"
30027
30028  # autoconf magic only relies on PATH, so update it if tools dir is specified
30029  OLD_PATH="$PATH"
30030
30031  # On Windows, we need to detect the visual studio installation first.
30032  # This will change the PATH, but we need to keep that new PATH even
30033  # after toolchain detection is done, since the compiler (on x86) uses
30034  # it for DLL resolution in runtime.
30035  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30036      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30037
30038  # Store path to cygwin link.exe to help excluding it when searching for
30039  # VS linker. This must be done before changing the PATH when looking for VS.
30040  # Extract the first word of "link", so it can be a program name with args.
30041set dummy link; ac_word=$2
30042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30043$as_echo_n "checking for $ac_word... " >&6; }
30044if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30045  $as_echo_n "(cached) " >&6
30046else
30047  case $CYGWIN_LINK in
30048  [\\/]* | ?:[\\/]*)
30049  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30050  ;;
30051  *)
30052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30053for as_dir in $PATH
30054do
30055  IFS=$as_save_IFS
30056  test -z "$as_dir" && as_dir=.
30057    for ac_exec_ext in '' $ac_executable_extensions; do
30058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30059    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30061    break 2
30062  fi
30063done
30064  done
30065IFS=$as_save_IFS
30066
30067  ;;
30068esac
30069fi
30070CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30071if test -n "$CYGWIN_LINK"; then
30072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30073$as_echo "$CYGWIN_LINK" >&6; }
30074else
30075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30076$as_echo "no" >&6; }
30077fi
30078
30079
30080  if test "x$CYGWIN_LINK" != x; then
30081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30082$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30083    "$CYGWIN_LINK" --version > /dev/null
30084    if test $? -eq 0 ; then
30085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30086$as_echo "yes" >&6; }
30087    else
30088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30089$as_echo "no" >&6; }
30090      # This might be the VS linker. Don't exclude it later on.
30091      CYGWIN_LINK=""
30092    fi
30093  fi
30094
30095  # First-hand choice is to locate and run the vsvars bat file.
30096
30097
30098# Check whether --with-toolchain-version was given.
30099if test "${with_toolchain_version+set}" = set; then :
30100  withval=$with_toolchain_version;
30101fi
30102
30103
30104  if test "x$with_toolchain_version" = xlist; then
30105    # List all toolchains
30106    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30107$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30108    for version in $VALID_VS_VERSIONS; do
30109      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30110      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30111    done
30112
30113    exit 0
30114  elif test "x$DEVKIT_VS_VERSION" != x; then
30115    VS_VERSION=$DEVKIT_VS_VERSION
30116    TOOLCHAIN_VERSION=$VS_VERSION
30117    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30118    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30119    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30120    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30121    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30122    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30123
30124    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30125    # can still be exported as INCLUDE for compiler invocations without
30126    # SYSROOT_CFLAGS
30127    OLDIFS="$IFS"
30128    IFS=";"
30129    for i in $DEVKIT_VS_INCLUDE; do
30130      ipath=$i
30131
30132  unix_path="$ipath"
30133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30134    windows_path=`$CYGPATH -m "$unix_path"`
30135    ipath="$windows_path"
30136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30137    windows_path=`cmd //c echo $unix_path`
30138    ipath="$windows_path"
30139  fi
30140
30141      VS_INCLUDE="$VS_INCLUDE;$ipath"
30142    done
30143    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30144    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30145    for i in $DEVKIT_VS_LIB; do
30146      libpath=$i
30147
30148  unix_path="$libpath"
30149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30150    windows_path=`$CYGPATH -m "$unix_path"`
30151    libpath="$windows_path"
30152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30153    windows_path=`cmd //c echo $unix_path`
30154    libpath="$windows_path"
30155  fi
30156
30157      VS_LIB="$VS_LIB;$libpath"
30158    done
30159    IFS="$OLDIFS"
30160
30161    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30162$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30163
30164  elif test "x$with_toolchain_version" != x; then
30165    # User override; check that it is valid
30166    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30167      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30168$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30169      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30170$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30171      as_fn_error $? "Cannot continue." "$LINENO" 5
30172    fi
30173    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30174  else
30175    # No flag given, use default
30176    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30177  fi
30178
30179  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30180
30181  VS_VERSION="$VS_VERSION"
30182  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30183  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30184  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30185  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30186
30187  # When using --with-tools-dir, assume it points to the correct and default
30188  # version of Visual Studio or that --with-toolchain-version was also set.
30189  if test "x$with_tools_dir" != x; then
30190
30191  if test "x$VS_ENV_CMD" = x; then
30192    VS_VERSION="${VS_VERSION}"
30193    VS_BASE="$with_tools_dir/../.."
30194    METHOD="--with-tools-dir"
30195
30196    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30197      VCVARSFILE="vc/bin/vcvars32.bat"
30198    else
30199      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30200    fi
30201
30202
30203  windows_path="$VS_BASE"
30204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205    unix_path=`$CYGPATH -u "$windows_path"`
30206    VS_BASE="$unix_path"
30207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30209    VS_BASE="$unix_path"
30210  fi
30211
30212    if test -d "$VS_BASE"; then
30213      if test -f "$VS_BASE/$VCVARSFILE"; then
30214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30215$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30216        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30217        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30218        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30219        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30220      else
30221        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30222$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30223        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30224$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30225      fi
30226    fi
30227  fi
30228
30229
30230  if test "x$VS_ENV_CMD" = x; then
30231    VS_VERSION="${VS_VERSION}"
30232    VS_BASE="$with_tools_dir/../../.."
30233    METHOD="--with-tools-dir"
30234
30235    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30236      VCVARSFILE="vc/bin/vcvars32.bat"
30237    else
30238      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30239    fi
30240
30241
30242  windows_path="$VS_BASE"
30243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30244    unix_path=`$CYGPATH -u "$windows_path"`
30245    VS_BASE="$unix_path"
30246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30248    VS_BASE="$unix_path"
30249  fi
30250
30251    if test -d "$VS_BASE"; then
30252      if test -f "$VS_BASE/$VCVARSFILE"; then
30253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30254$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30255        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30256        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30257        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30258        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30259      else
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30261$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30262        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30263$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30264      fi
30265    fi
30266  fi
30267
30268    if test "x$VS_ENV_CMD" = x; then
30269      # Having specified an argument which is incorrect will produce an instant failure;
30270      # we should not go on looking
30271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30272$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30273      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30274$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30275      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30276$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30277      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30278    fi
30279  fi
30280
30281  VS_ENV_CMD=""
30282  VS_ENV_ARGS=""
30283
30284  if test "x$VS_COMNTOOLS" != x; then
30285
30286  if test "x$VS_ENV_CMD" = x; then
30287    VS_VERSION="${VS_VERSION}"
30288    VS_BASE="$VS_COMNTOOLS/../.."
30289    METHOD="$VS_COMNTOOLS_VAR variable"
30290
30291    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30292      VCVARSFILE="vc/bin/vcvars32.bat"
30293    else
30294      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30295    fi
30296
30297
30298  windows_path="$VS_BASE"
30299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30300    unix_path=`$CYGPATH -u "$windows_path"`
30301    VS_BASE="$unix_path"
30302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30304    VS_BASE="$unix_path"
30305  fi
30306
30307    if test -d "$VS_BASE"; then
30308      if test -f "$VS_BASE/$VCVARSFILE"; then
30309        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30310$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30311        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30312        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30313        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30314        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30315      else
30316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30317$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30319$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30320      fi
30321    fi
30322  fi
30323
30324  fi
30325  if test "x$PROGRAMFILES" != x; then
30326
30327  if test "x$VS_ENV_CMD" = x; then
30328    VS_VERSION="${VS_VERSION}"
30329    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30330    METHOD="well-known name"
30331
30332    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30333      VCVARSFILE="vc/bin/vcvars32.bat"
30334    else
30335      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30336    fi
30337
30338
30339  windows_path="$VS_BASE"
30340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30341    unix_path=`$CYGPATH -u "$windows_path"`
30342    VS_BASE="$unix_path"
30343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30345    VS_BASE="$unix_path"
30346  fi
30347
30348    if test -d "$VS_BASE"; then
30349      if test -f "$VS_BASE/$VCVARSFILE"; then
30350        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30351$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30352        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30353        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30354        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30355        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30356      else
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30358$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30359        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30360$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30361      fi
30362    fi
30363  fi
30364
30365  fi
30366  # Work around the insanely named ProgramFiles(x86) env variable
30367  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30368  if test "x$PROGRAMFILES_X86" != x; then
30369
30370  if test "x$VS_ENV_CMD" = x; then
30371    VS_VERSION="${VS_VERSION}"
30372    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30373    METHOD="well-known name"
30374
30375    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30376      VCVARSFILE="vc/bin/vcvars32.bat"
30377    else
30378      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30379    fi
30380
30381
30382  windows_path="$VS_BASE"
30383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30384    unix_path=`$CYGPATH -u "$windows_path"`
30385    VS_BASE="$unix_path"
30386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30388    VS_BASE="$unix_path"
30389  fi
30390
30391    if test -d "$VS_BASE"; then
30392      if test -f "$VS_BASE/$VCVARSFILE"; then
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30394$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30395        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30396        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30397        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30398        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30399      else
30400        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30401$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30402        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30403$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30404      fi
30405    fi
30406  fi
30407
30408  fi
30409
30410  if test "x$VS_ENV_CMD" = x; then
30411    VS_VERSION="${VS_VERSION}"
30412    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30413    METHOD="well-known name"
30414
30415    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30416      VCVARSFILE="vc/bin/vcvars32.bat"
30417    else
30418      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30419    fi
30420
30421
30422  windows_path="$VS_BASE"
30423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30424    unix_path=`$CYGPATH -u "$windows_path"`
30425    VS_BASE="$unix_path"
30426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30428    VS_BASE="$unix_path"
30429  fi
30430
30431    if test -d "$VS_BASE"; then
30432      if test -f "$VS_BASE/$VCVARSFILE"; then
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30434$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30435        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30436        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30437        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30438        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30439      else
30440        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30441$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30442        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30443$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30444      fi
30445    fi
30446  fi
30447
30448
30449  if test "x$VS_ENV_CMD" = x; then
30450    VS_VERSION="${VS_VERSION}"
30451    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30452    METHOD="well-known name"
30453
30454    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30455      VCVARSFILE="vc/bin/vcvars32.bat"
30456    else
30457      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30458    fi
30459
30460
30461  windows_path="$VS_BASE"
30462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30463    unix_path=`$CYGPATH -u "$windows_path"`
30464    VS_BASE="$unix_path"
30465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30467    VS_BASE="$unix_path"
30468  fi
30469
30470    if test -d "$VS_BASE"; then
30471      if test -f "$VS_BASE/$VCVARSFILE"; then
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30473$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30474        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30475        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30476        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30477        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30478      else
30479        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30480$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30481        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30482$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30483      fi
30484    fi
30485  fi
30486
30487
30488  if test "x$SDK_INSTALL_DIR" != x; then
30489    if test "x$ProgramW6432" != x; then
30490
30491  if test "x$VS_ENV_CMD" = x; then
30492    VS_VERSION="${VS_VERSION}"
30493    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30494    METHOD="well-known name"
30495
30496  windows_path="$WIN_SDK_BASE"
30497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30498    unix_path=`$CYGPATH -u "$windows_path"`
30499    WIN_SDK_BASE="$unix_path"
30500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30502    WIN_SDK_BASE="$unix_path"
30503  fi
30504
30505    if test -d "$WIN_SDK_BASE"; then
30506      # There have been cases of partial or broken SDK installations. A missing
30507      # lib dir is not going to work.
30508      if test ! -d "$WIN_SDK_BASE/lib"; then
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30510$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30512$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30513      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30514        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30515$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30516        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30517        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30518          VS_ENV_ARGS="/x86"
30519        else
30520          VS_ENV_ARGS="/x64"
30521        fi
30522        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30523        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30524        # TODO: improve detection for other versions of SDK
30525        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30526      else
30527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30528$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30529        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30530$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30531      fi
30532    fi
30533  fi
30534
30535    fi
30536    if test "x$PROGRAMW6432" != x; then
30537
30538  if test "x$VS_ENV_CMD" = x; then
30539    VS_VERSION="${VS_VERSION}"
30540    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30541    METHOD="well-known name"
30542
30543  windows_path="$WIN_SDK_BASE"
30544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30545    unix_path=`$CYGPATH -u "$windows_path"`
30546    WIN_SDK_BASE="$unix_path"
30547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30549    WIN_SDK_BASE="$unix_path"
30550  fi
30551
30552    if test -d "$WIN_SDK_BASE"; then
30553      # There have been cases of partial or broken SDK installations. A missing
30554      # lib dir is not going to work.
30555      if test ! -d "$WIN_SDK_BASE/lib"; then
30556        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30557$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30558        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30559$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30560      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30561        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30562$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30563        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30564        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30565          VS_ENV_ARGS="/x86"
30566        else
30567          VS_ENV_ARGS="/x64"
30568        fi
30569        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30570        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30571        # TODO: improve detection for other versions of SDK
30572        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30573      else
30574        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30575$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30576        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30577$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30578      fi
30579    fi
30580  fi
30581
30582    fi
30583    if test "x$PROGRAMFILES" != x; then
30584
30585  if test "x$VS_ENV_CMD" = x; then
30586    VS_VERSION="${VS_VERSION}"
30587    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30588    METHOD="well-known name"
30589
30590  windows_path="$WIN_SDK_BASE"
30591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30592    unix_path=`$CYGPATH -u "$windows_path"`
30593    WIN_SDK_BASE="$unix_path"
30594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30596    WIN_SDK_BASE="$unix_path"
30597  fi
30598
30599    if test -d "$WIN_SDK_BASE"; then
30600      # There have been cases of partial or broken SDK installations. A missing
30601      # lib dir is not going to work.
30602      if test ! -d "$WIN_SDK_BASE/lib"; then
30603        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30604$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30605        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30606$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30607      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30608        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30609$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30610        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30611        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30612          VS_ENV_ARGS="/x86"
30613        else
30614          VS_ENV_ARGS="/x64"
30615        fi
30616        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30617        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30618        # TODO: improve detection for other versions of SDK
30619        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30620      else
30621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30622$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30623        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30624$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30625      fi
30626    fi
30627  fi
30628
30629    fi
30630
30631  if test "x$VS_ENV_CMD" = x; then
30632    VS_VERSION="${VS_VERSION}"
30633    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30634    METHOD="well-known name"
30635
30636  windows_path="$WIN_SDK_BASE"
30637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30638    unix_path=`$CYGPATH -u "$windows_path"`
30639    WIN_SDK_BASE="$unix_path"
30640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30642    WIN_SDK_BASE="$unix_path"
30643  fi
30644
30645    if test -d "$WIN_SDK_BASE"; then
30646      # There have been cases of partial or broken SDK installations. A missing
30647      # lib dir is not going to work.
30648      if test ! -d "$WIN_SDK_BASE/lib"; then
30649        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30650$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30651        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30652$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30653      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30654        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30655$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30656        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30657        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30658          VS_ENV_ARGS="/x86"
30659        else
30660          VS_ENV_ARGS="/x64"
30661        fi
30662        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30663        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30664        # TODO: improve detection for other versions of SDK
30665        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30666      else
30667        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30668$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30669        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30670$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30671      fi
30672    fi
30673  fi
30674
30675
30676  if test "x$VS_ENV_CMD" = x; then
30677    VS_VERSION="${VS_VERSION}"
30678    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30679    METHOD="well-known name"
30680
30681  windows_path="$WIN_SDK_BASE"
30682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30683    unix_path=`$CYGPATH -u "$windows_path"`
30684    WIN_SDK_BASE="$unix_path"
30685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30687    WIN_SDK_BASE="$unix_path"
30688  fi
30689
30690    if test -d "$WIN_SDK_BASE"; then
30691      # There have been cases of partial or broken SDK installations. A missing
30692      # lib dir is not going to work.
30693      if test ! -d "$WIN_SDK_BASE/lib"; then
30694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30695$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30696        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30697$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30698      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30700$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30701        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30702        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30703          VS_ENV_ARGS="/x86"
30704        else
30705          VS_ENV_ARGS="/x64"
30706        fi
30707        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30708        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30709        # TODO: improve detection for other versions of SDK
30710        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30711      else
30712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30713$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30714        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30715$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30716      fi
30717    fi
30718  fi
30719
30720  fi
30721
30722    if test "x$VS_ENV_CMD" != x; then
30723      TOOLCHAIN_VERSION=$VS_VERSION
30724      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30725      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30726      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30727      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30728      # The rest of the variables are already evaled while probing
30729      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30730$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30731      break
30732    fi
30733  done
30734
30735
30736  # If we have a devkit, skip all of the below.
30737  if test "x$DEVKIT_VS_VERSION" = x; then
30738    if test "x$VS_ENV_CMD" != x; then
30739      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30740
30741  # Only process if variable expands to non-empty
30742
30743  if test "x$VS_ENV_CMD" != x; then
30744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30745
30746  # First separate the path from the arguments. This will split at the first
30747  # space.
30748  complete="$VS_ENV_CMD"
30749  path="${complete%% *}"
30750  tmp="$complete EOL"
30751  arguments="${tmp#* }"
30752
30753  # Input might be given as Windows format, start by converting to
30754  # unix format.
30755  new_path=`$CYGPATH -u "$path"`
30756
30757  # Now try to locate executable using which
30758  new_path=`$WHICH "$new_path" 2> /dev/null`
30759  # bat and cmd files are not always considered executable in cygwin causing which
30760  # to not find them
30761  if test "x$new_path" = x \
30762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30764    new_path=`$CYGPATH -u "$path"`
30765  fi
30766  if test "x$new_path" = x; then
30767    # Oops. Which didn't find the executable.
30768    # The splitting of arguments from the executable at a space might have been incorrect,
30769    # since paths with space are more likely in Windows. Give it another try with the whole
30770    # argument.
30771    path="$complete"
30772    arguments="EOL"
30773    new_path=`$CYGPATH -u "$path"`
30774    new_path=`$WHICH "$new_path" 2> /dev/null`
30775    # bat and cmd files are not always considered executable in cygwin causing which
30776    # to not find them
30777    if test "x$new_path" = x \
30778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30780      new_path=`$CYGPATH -u "$path"`
30781    fi
30782    if test "x$new_path" = x; then
30783      # It's still not found. Now this is an unrecoverable error.
30784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30785$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30786      has_space=`$ECHO "$complete" | $GREP " "`
30787      if test "x$has_space" != x; then
30788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30790      fi
30791      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30792    fi
30793  fi
30794
30795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30798  # "foo.exe" is OK but "foo" is an error.
30799  #
30800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30801  # It is also a way to make sure we got the proper file name for the real test later on.
30802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30803  if test "x$test_shortpath" = x; then
30804    # Short path failed, file does not exist as specified.
30805    # Try adding .exe or .cmd
30806    if test -f "${new_path}.exe"; then
30807      input_to_shortpath="${new_path}.exe"
30808    elif test -f "${new_path}.cmd"; then
30809      input_to_shortpath="${new_path}.cmd"
30810    else
30811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30812$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30815      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30816    fi
30817  else
30818    input_to_shortpath="$new_path"
30819  fi
30820
30821  # Call helper function which possibly converts this using DOS-style short mode.
30822  # If so, the updated path is stored in $new_path.
30823  new_path="$input_to_shortpath"
30824
30825  input_path="$input_to_shortpath"
30826  # Check if we need to convert this using DOS-style short mode. If the path
30827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30828  # take no chances and rewrite it.
30829  # Note: m4 eats our [], so we need to use [ and ] instead.
30830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30831  if test "x$has_forbidden_chars" != x; then
30832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30836      # Going to short mode and back again did indeed matter. Since short mode is
30837      # case insensitive, let's make it lowercase to improve readability.
30838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30839      # Now convert it back to Unix-style (cygpath)
30840      input_path=`$CYGPATH -u "$shortmode_path"`
30841      new_path="$input_path"
30842    fi
30843  fi
30844
30845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30846  if test "x$test_cygdrive_prefix" = x; then
30847    # As a simple fix, exclude /usr/bin since it's not a real path.
30848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30850      # a path prefixed by /cygdrive for fixpath to work.
30851      new_path="$CYGWIN_ROOT_PATH$input_path"
30852    fi
30853  fi
30854
30855  # remove trailing .exe if any
30856  new_path="${new_path/%.exe/}"
30857
30858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30859
30860  # First separate the path from the arguments. This will split at the first
30861  # space.
30862  complete="$VS_ENV_CMD"
30863  path="${complete%% *}"
30864  tmp="$complete EOL"
30865  arguments="${tmp#* }"
30866
30867  # Input might be given as Windows format, start by converting to
30868  # unix format.
30869  new_path="$path"
30870
30871  windows_path="$new_path"
30872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30873    unix_path=`$CYGPATH -u "$windows_path"`
30874    new_path="$unix_path"
30875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30877    new_path="$unix_path"
30878  fi
30879
30880
30881  # Now try to locate executable using which
30882  new_path=`$WHICH "$new_path" 2> /dev/null`
30883
30884  if test "x$new_path" = x; then
30885    # Oops. Which didn't find the executable.
30886    # The splitting of arguments from the executable at a space might have been incorrect,
30887    # since paths with space are more likely in Windows. Give it another try with the whole
30888    # argument.
30889    path="$complete"
30890    arguments="EOL"
30891    new_path="$path"
30892
30893  windows_path="$new_path"
30894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30895    unix_path=`$CYGPATH -u "$windows_path"`
30896    new_path="$unix_path"
30897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30899    new_path="$unix_path"
30900  fi
30901
30902
30903    new_path=`$WHICH "$new_path" 2> /dev/null`
30904    # bat and cmd files are not always considered executable in MSYS causing which
30905    # to not find them
30906    if test "x$new_path" = x \
30907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30909      new_path="$path"
30910
30911  windows_path="$new_path"
30912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30913    unix_path=`$CYGPATH -u "$windows_path"`
30914    new_path="$unix_path"
30915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30917    new_path="$unix_path"
30918  fi
30919
30920    fi
30921
30922    if test "x$new_path" = x; then
30923      # It's still not found. Now this is an unrecoverable error.
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30925$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30926      has_space=`$ECHO "$complete" | $GREP " "`
30927      if test "x$has_space" != x; then
30928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30930      fi
30931      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30932    fi
30933  fi
30934
30935  # Now new_path has a complete unix path to the binary
30936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30937    # Keep paths in /bin as-is, but remove trailing .exe if any
30938    new_path="${new_path/%.exe/}"
30939    # Do not save /bin paths to all_fixpath_prefixes!
30940  else
30941    # Not in mixed or Windows style, start by that.
30942    new_path=`cmd //c echo $new_path`
30943
30944  input_path="$new_path"
30945  # Check if we need to convert this using DOS-style short mode. If the path
30946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30947  # take no chances and rewrite it.
30948  # Note: m4 eats our [], so we need to use [ and ] instead.
30949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30950  if test "x$has_forbidden_chars" != x; then
30951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30953  fi
30954
30955    # Output is in $new_path
30956
30957  windows_path="$new_path"
30958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30959    unix_path=`$CYGPATH -u "$windows_path"`
30960    new_path="$unix_path"
30961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30963    new_path="$unix_path"
30964  fi
30965
30966    # remove trailing .exe if any
30967    new_path="${new_path/%.exe/}"
30968
30969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30971  fi
30972
30973    else
30974      # We're on a unix platform. Hooray! :)
30975      # First separate the path from the arguments. This will split at the first
30976      # space.
30977      complete="$VS_ENV_CMD"
30978      path="${complete%% *}"
30979      tmp="$complete EOL"
30980      arguments="${tmp#* }"
30981
30982      # Cannot rely on the command "which" here since it doesn't always work.
30983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30984      if test -z "$is_absolute_path"; then
30985        # Path to executable is not absolute. Find it.
30986        IFS_save="$IFS"
30987        IFS=:
30988        for p in $PATH; do
30989          if test -f "$p/$path" && test -x "$p/$path"; then
30990            new_path="$p/$path"
30991            break
30992          fi
30993        done
30994        IFS="$IFS_save"
30995      else
30996        # This is an absolute path, we can use it without further modifications.
30997        new_path="$path"
30998      fi
30999
31000      if test "x$new_path" = x; then
31001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31002$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31003        has_space=`$ECHO "$complete" | $GREP " "`
31004        if test "x$has_space" != x; then
31005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31007        fi
31008        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31009      fi
31010    fi
31011
31012    # Now join together the path and the arguments once again
31013    if test "x$arguments" != xEOL; then
31014      new_complete="$new_path ${arguments% *}"
31015    else
31016      new_complete="$new_path"
31017    fi
31018
31019    if test "x$complete" != "x$new_complete"; then
31020      VS_ENV_CMD="$new_complete"
31021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31022$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31023    fi
31024  fi
31025
31026
31027      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31028      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31029$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31030
31031      # We need to create a couple of temporary files.
31032      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31033      $MKDIR -p $VS_ENV_TMP_DIR
31034
31035      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31036      # Instead create a shell script which will set the relevant variables when run.
31037      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31038
31039  unix_path="$WINPATH_VS_ENV_CMD"
31040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31041    windows_path=`$CYGPATH -m "$unix_path"`
31042    WINPATH_VS_ENV_CMD="$windows_path"
31043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31044    windows_path=`cmd //c echo $unix_path`
31045    WINPATH_VS_ENV_CMD="$windows_path"
31046  fi
31047
31048      WINPATH_BASH="$BASH"
31049
31050  unix_path="$WINPATH_BASH"
31051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31052    windows_path=`$CYGPATH -m "$unix_path"`
31053    WINPATH_BASH="$windows_path"
31054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31055    windows_path=`cmd //c echo $unix_path`
31056    WINPATH_BASH="$windows_path"
31057  fi
31058
31059
31060      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31061      # script (executable by bash) that will setup the important variables.
31062      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31063      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31064      # This will end up something like:
31065      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31066      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31067      # These will end up something like:
31068      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31069      # The trailing space for everyone except PATH is no typo, but is needed due
31070      # to trailing \ in the Windows paths. These will be stripped later.
31071      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31072          >> $EXTRACT_VC_ENV_BAT_FILE
31073      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31074          >> $EXTRACT_VC_ENV_BAT_FILE
31075      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31076          >> $EXTRACT_VC_ENV_BAT_FILE
31077      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31078          >> $EXTRACT_VC_ENV_BAT_FILE
31079      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31080          >> $EXTRACT_VC_ENV_BAT_FILE
31081      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31082          >> $EXTRACT_VC_ENV_BAT_FILE
31083
31084      # Now execute the newly created bat file.
31085      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31086      # Change directory so we don't need to mess with Windows paths in redirects.
31087      cd $VS_ENV_TMP_DIR
31088      cmd /c extract-vs-env.bat | $CAT
31089      cd $CURDIR
31090
31091      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31092        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31093$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31094        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31095$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31096        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31097$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31098        as_fn_error $? "Cannot continue" "$LINENO" 5
31099      fi
31100
31101      # Now set all paths and other env variables. This will allow the rest of
31102      # the configure script to find and run the compiler in the proper way.
31103      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31104$as_echo "$as_me: Setting extracted environment variables" >&6;}
31105      . $VS_ENV_TMP_DIR/set-vs-env.sh
31106      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31107      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31108    else
31109      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31110      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31111$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31112    fi
31113  fi
31114
31115  # At this point, we should have correct variables in the environment, or we can't continue.
31116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31117$as_echo_n "checking for Visual Studio variables... " >&6; }
31118
31119  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31120      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31121    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31123$as_echo "present but broken" >&6; }
31124      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31125    else
31126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31127$as_echo "ok" >&6; }
31128      # Remove any trailing "\" ";" and " " from the variables.
31129      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31130      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31131      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31132      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31133      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31134      # Remove any paths containing # (typically F#) as that messes up make. This
31135      # is needed if visual studio was installed with F# support.
31136      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31137
31138
31139
31140
31141
31142      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31143      OLDIFS="$IFS"
31144      IFS=";"
31145      for i in $VS_INCLUDE; do
31146        ipath=$i
31147        # Only process non-empty elements
31148        if test "x$ipath" != x; then
31149          IFS="$OLDIFS"
31150          # Check that directory exists before calling fixup_path
31151          testpath=$ipath
31152
31153  windows_path="$testpath"
31154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31155    unix_path=`$CYGPATH -u "$windows_path"`
31156    testpath="$unix_path"
31157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31159    testpath="$unix_path"
31160  fi
31161
31162          if test -d "$testpath"; then
31163
31164  # Only process if variable expands to non-empty
31165
31166  if test "x$ipath" != x; then
31167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31168
31169  # Input might be given as Windows format, start by converting to
31170  # unix format.
31171  path="$ipath"
31172  new_path=`$CYGPATH -u "$path"`
31173
31174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31177  # "foo.exe" is OK but "foo" is an error.
31178  #
31179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31180  # It is also a way to make sure we got the proper file name for the real test later on.
31181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31182  if test "x$test_shortpath" = x; then
31183    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31184$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31185    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31186  fi
31187
31188  # Call helper function which possibly converts this using DOS-style short mode.
31189  # If so, the updated path is stored in $new_path.
31190
31191  input_path="$new_path"
31192  # Check if we need to convert this using DOS-style short mode. If the path
31193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31194  # take no chances and rewrite it.
31195  # Note: m4 eats our [], so we need to use [ and ] instead.
31196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31197  if test "x$has_forbidden_chars" != x; then
31198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31202      # Going to short mode and back again did indeed matter. Since short mode is
31203      # case insensitive, let's make it lowercase to improve readability.
31204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31205      # Now convert it back to Unix-style (cygpath)
31206      input_path=`$CYGPATH -u "$shortmode_path"`
31207      new_path="$input_path"
31208    fi
31209  fi
31210
31211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31212  if test "x$test_cygdrive_prefix" = x; then
31213    # As a simple fix, exclude /usr/bin since it's not a real path.
31214    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31216      # a path prefixed by /cygdrive for fixpath to work.
31217      new_path="$CYGWIN_ROOT_PATH$input_path"
31218    fi
31219  fi
31220
31221
31222  if test "x$path" != "x$new_path"; then
31223    ipath="$new_path"
31224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31225$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31226  fi
31227
31228    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31229
31230  path="$ipath"
31231  has_colon=`$ECHO $path | $GREP ^.:`
31232  new_path="$path"
31233  if test "x$has_colon" = x; then
31234    # Not in mixed or Windows style, start by that.
31235    new_path=`cmd //c echo $path`
31236  fi
31237
31238
31239  input_path="$new_path"
31240  # Check if we need to convert this using DOS-style short mode. If the path
31241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31242  # take no chances and rewrite it.
31243  # Note: m4 eats our [], so we need to use [ and ] instead.
31244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31245  if test "x$has_forbidden_chars" != x; then
31246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31248  fi
31249
31250
31251  windows_path="$new_path"
31252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31253    unix_path=`$CYGPATH -u "$windows_path"`
31254    new_path="$unix_path"
31255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31257    new_path="$unix_path"
31258  fi
31259
31260  if test "x$path" != "x$new_path"; then
31261    ipath="$new_path"
31262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31263$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31264  fi
31265
31266  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31267  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31268
31269    else
31270      # We're on a unix platform. Hooray! :)
31271      path="$ipath"
31272      has_space=`$ECHO "$path" | $GREP " "`
31273      if test "x$has_space" != x; then
31274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31275$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31276        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31277      fi
31278
31279      # Use eval to expand a potential ~
31280      eval path="$path"
31281      if test ! -f "$path" && test ! -d "$path"; then
31282        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31283      fi
31284
31285      if test -d "$path"; then
31286        ipath="`cd "$path"; $THEPWDCMD -L`"
31287      else
31288        dir="`$DIRNAME "$path"`"
31289        base="`$BASENAME "$path"`"
31290        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31291      fi
31292    fi
31293  fi
31294
31295            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31296          fi
31297          IFS=";"
31298        fi
31299      done
31300      # Convert VS_LIB into SYSROOT_LDFLAGS
31301      for i in $VS_LIB; do
31302        libpath=$i
31303        # Only process non-empty elements
31304        if test "x$libpath" != x; then
31305          IFS="$OLDIFS"
31306          # Check that directory exists before calling fixup_path
31307          testpath=$libpath
31308
31309  windows_path="$testpath"
31310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31311    unix_path=`$CYGPATH -u "$windows_path"`
31312    testpath="$unix_path"
31313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31315    testpath="$unix_path"
31316  fi
31317
31318          if test -d "$testpath"; then
31319
31320  # Only process if variable expands to non-empty
31321
31322  if test "x$libpath" != x; then
31323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31324
31325  # Input might be given as Windows format, start by converting to
31326  # unix format.
31327  path="$libpath"
31328  new_path=`$CYGPATH -u "$path"`
31329
31330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31333  # "foo.exe" is OK but "foo" is an error.
31334  #
31335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31336  # It is also a way to make sure we got the proper file name for the real test later on.
31337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31338  if test "x$test_shortpath" = x; then
31339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31340$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31341    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31342  fi
31343
31344  # Call helper function which possibly converts this using DOS-style short mode.
31345  # If so, the updated path is stored in $new_path.
31346
31347  input_path="$new_path"
31348  # Check if we need to convert this using DOS-style short mode. If the path
31349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31350  # take no chances and rewrite it.
31351  # Note: m4 eats our [], so we need to use [ and ] instead.
31352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31353  if test "x$has_forbidden_chars" != x; then
31354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31358      # Going to short mode and back again did indeed matter. Since short mode is
31359      # case insensitive, let's make it lowercase to improve readability.
31360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31361      # Now convert it back to Unix-style (cygpath)
31362      input_path=`$CYGPATH -u "$shortmode_path"`
31363      new_path="$input_path"
31364    fi
31365  fi
31366
31367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31368  if test "x$test_cygdrive_prefix" = x; then
31369    # As a simple fix, exclude /usr/bin since it's not a real path.
31370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31372      # a path prefixed by /cygdrive for fixpath to work.
31373      new_path="$CYGWIN_ROOT_PATH$input_path"
31374    fi
31375  fi
31376
31377
31378  if test "x$path" != "x$new_path"; then
31379    libpath="$new_path"
31380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31381$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31382  fi
31383
31384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31385
31386  path="$libpath"
31387  has_colon=`$ECHO $path | $GREP ^.:`
31388  new_path="$path"
31389  if test "x$has_colon" = x; then
31390    # Not in mixed or Windows style, start by that.
31391    new_path=`cmd //c echo $path`
31392  fi
31393
31394
31395  input_path="$new_path"
31396  # Check if we need to convert this using DOS-style short mode. If the path
31397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31398  # take no chances and rewrite it.
31399  # Note: m4 eats our [], so we need to use [ and ] instead.
31400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31401  if test "x$has_forbidden_chars" != x; then
31402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31404  fi
31405
31406
31407  windows_path="$new_path"
31408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31409    unix_path=`$CYGPATH -u "$windows_path"`
31410    new_path="$unix_path"
31411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31413    new_path="$unix_path"
31414  fi
31415
31416  if test "x$path" != "x$new_path"; then
31417    libpath="$new_path"
31418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31419$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31420  fi
31421
31422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31424
31425    else
31426      # We're on a unix platform. Hooray! :)
31427      path="$libpath"
31428      has_space=`$ECHO "$path" | $GREP " "`
31429      if test "x$has_space" != x; then
31430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31431$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31433      fi
31434
31435      # Use eval to expand a potential ~
31436      eval path="$path"
31437      if test ! -f "$path" && test ! -d "$path"; then
31438        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31439      fi
31440
31441      if test -d "$path"; then
31442        libpath="`cd "$path"; $THEPWDCMD -L`"
31443      else
31444        dir="`$DIRNAME "$path"`"
31445        base="`$BASENAME "$path"`"
31446        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31447      fi
31448    fi
31449  fi
31450
31451            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31452          fi
31453          IFS=";"
31454        fi
31455      done
31456      IFS="$OLDIFS"
31457    fi
31458  else
31459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31460$as_echo "not found" >&6; }
31461
31462    if test "x$VS_ENV_CMD" = x; then
31463      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31464$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31465      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31466$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31467    else
31468      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31469$as_echo "$as_me: Running the extraction script failed." >&6;}
31470    fi
31471    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31472$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31473    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31474$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31475    as_fn_error $? "Cannot continue" "$LINENO" 5
31476  fi
31477
31478    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31479    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31480    PATH="$VS_PATH"
31481    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31482    export INCLUDE="$VS_INCLUDE"
31483    export LIB="$VS_LIB"
31484  else
31485    # Currently we do not define this for other toolchains. This might change as the need arise.
31486    TOOLCHAIN_VERSION=
31487  fi
31488
31489
31490  # For solaris we really need solaris tools, and not the GNU equivalent.
31491  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31492  # so add that to path before starting to probe.
31493  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31494  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31495    PATH="/usr/ccs/bin:$PATH"
31496  fi
31497
31498  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31499  # override all other locations.
31500  if test "x$TOOLCHAIN_PATH" != x; then
31501    PATH=$TOOLCHAIN_PATH:$PATH
31502  fi
31503
31504
31505  #
31506  # Setup the compilers (CC and CXX)
31507  #
31508
31509  COMPILER_NAME=C
31510  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31511
31512  if test "x$CC" != x; then
31513    # User has supplied compiler name already, always let that override.
31514    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31515$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31516    if test "x`basename $CC`" = "x$CC"; then
31517      # A command without a complete path is provided, search $PATH.
31518
31519      for ac_prog in $CC
31520do
31521  # Extract the first word of "$ac_prog", so it can be a program name with args.
31522set dummy $ac_prog; ac_word=$2
31523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31524$as_echo_n "checking for $ac_word... " >&6; }
31525if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31526  $as_echo_n "(cached) " >&6
31527else
31528  case $POTENTIAL_CC in
31529  [\\/]* | ?:[\\/]*)
31530  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31531  ;;
31532  *)
31533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31534for as_dir in $PATH
31535do
31536  IFS=$as_save_IFS
31537  test -z "$as_dir" && as_dir=.
31538    for ac_exec_ext in '' $ac_executable_extensions; do
31539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31540    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31542    break 2
31543  fi
31544done
31545  done
31546IFS=$as_save_IFS
31547
31548  ;;
31549esac
31550fi
31551POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31552if test -n "$POTENTIAL_CC"; then
31553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31554$as_echo "$POTENTIAL_CC" >&6; }
31555else
31556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31557$as_echo "no" >&6; }
31558fi
31559
31560
31561  test -n "$POTENTIAL_CC" && break
31562done
31563
31564      if test "x$POTENTIAL_CC" != x; then
31565        CC=$POTENTIAL_CC
31566      else
31567        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31568      fi
31569    else
31570      # Otherwise it might already be a complete path
31571      if test ! -x "$CC"; then
31572        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31573      fi
31574    fi
31575  else
31576    # No user supplied value. Locate compiler ourselves.
31577
31578    # If we are cross compiling, assume cross compilation tools follows the
31579    # cross compilation standard where they are prefixed with the autoconf
31580    # standard name for the target. For example the binary
31581    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31582    # If we are not cross compiling, then the default compiler name will be
31583    # used.
31584
31585    CC=
31586    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31587    # before checking the rest of the PATH.
31588    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31589    # step, this should not be necessary.
31590    if test -n "$TOOLCHAIN_PATH"; then
31591      PATH_save="$PATH"
31592      PATH="$TOOLCHAIN_PATH"
31593      for ac_prog in $SEARCH_LIST
31594do
31595  # Extract the first word of "$ac_prog", so it can be a program name with args.
31596set dummy $ac_prog; ac_word=$2
31597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31598$as_echo_n "checking for $ac_word... " >&6; }
31599if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31600  $as_echo_n "(cached) " >&6
31601else
31602  case $TOOLCHAIN_PATH_CC in
31603  [\\/]* | ?:[\\/]*)
31604  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31605  ;;
31606  *)
31607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31608for as_dir in $PATH
31609do
31610  IFS=$as_save_IFS
31611  test -z "$as_dir" && as_dir=.
31612    for ac_exec_ext in '' $ac_executable_extensions; do
31613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31614    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31616    break 2
31617  fi
31618done
31619  done
31620IFS=$as_save_IFS
31621
31622  ;;
31623esac
31624fi
31625TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31626if test -n "$TOOLCHAIN_PATH_CC"; then
31627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31628$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31629else
31630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31631$as_echo "no" >&6; }
31632fi
31633
31634
31635  test -n "$TOOLCHAIN_PATH_CC" && break
31636done
31637
31638      CC=$TOOLCHAIN_PATH_CC
31639      PATH="$PATH_save"
31640    fi
31641
31642    # AC_PATH_PROGS can't be run multiple times with the same variable,
31643    # so create a new name for this run.
31644    if test "x$CC" = x; then
31645      for ac_prog in $SEARCH_LIST
31646do
31647  # Extract the first word of "$ac_prog", so it can be a program name with args.
31648set dummy $ac_prog; ac_word=$2
31649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31650$as_echo_n "checking for $ac_word... " >&6; }
31651if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31652  $as_echo_n "(cached) " >&6
31653else
31654  case $POTENTIAL_CC in
31655  [\\/]* | ?:[\\/]*)
31656  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31657  ;;
31658  *)
31659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31660for as_dir in $PATH
31661do
31662  IFS=$as_save_IFS
31663  test -z "$as_dir" && as_dir=.
31664    for ac_exec_ext in '' $ac_executable_extensions; do
31665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31666    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31668    break 2
31669  fi
31670done
31671  done
31672IFS=$as_save_IFS
31673
31674  ;;
31675esac
31676fi
31677POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31678if test -n "$POTENTIAL_CC"; then
31679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31680$as_echo "$POTENTIAL_CC" >&6; }
31681else
31682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31683$as_echo "no" >&6; }
31684fi
31685
31686
31687  test -n "$POTENTIAL_CC" && break
31688done
31689
31690      CC=$POTENTIAL_CC
31691    fi
31692
31693    if test "x$CC" = x; then
31694
31695  # Print a helpful message on how to acquire the necessary build dependency.
31696  # devkit is the help tag: freetype, cups, alsa etc
31697  MISSING_DEPENDENCY=devkit
31698
31699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700    cygwin_help $MISSING_DEPENDENCY
31701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31702    msys_help $MISSING_DEPENDENCY
31703  else
31704    PKGHANDLER_COMMAND=
31705
31706    case $PKGHANDLER in
31707      apt-get)
31708        apt_help     $MISSING_DEPENDENCY ;;
31709      yum)
31710        yum_help     $MISSING_DEPENDENCY ;;
31711      port)
31712        port_help    $MISSING_DEPENDENCY ;;
31713      pkgutil)
31714        pkgutil_help $MISSING_DEPENDENCY ;;
31715      pkgadd)
31716        pkgadd_help  $MISSING_DEPENDENCY ;;
31717    esac
31718
31719    if test "x$PKGHANDLER_COMMAND" != x; then
31720      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31721    fi
31722  fi
31723
31724      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31725    fi
31726  fi
31727
31728  # Now we have a compiler binary in CC. Make sure it's okay.
31729
31730  # Only process if variable expands to non-empty
31731
31732  if test "x$CC" != x; then
31733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31734
31735  # First separate the path from the arguments. This will split at the first
31736  # space.
31737  complete="$CC"
31738  path="${complete%% *}"
31739  tmp="$complete EOL"
31740  arguments="${tmp#* }"
31741
31742  # Input might be given as Windows format, start by converting to
31743  # unix format.
31744  new_path=`$CYGPATH -u "$path"`
31745
31746  # Now try to locate executable using which
31747  new_path=`$WHICH "$new_path" 2> /dev/null`
31748  # bat and cmd files are not always considered executable in cygwin causing which
31749  # to not find them
31750  if test "x$new_path" = x \
31751      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31752      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31753    new_path=`$CYGPATH -u "$path"`
31754  fi
31755  if test "x$new_path" = x; then
31756    # Oops. Which didn't find the executable.
31757    # The splitting of arguments from the executable at a space might have been incorrect,
31758    # since paths with space are more likely in Windows. Give it another try with the whole
31759    # argument.
31760    path="$complete"
31761    arguments="EOL"
31762    new_path=`$CYGPATH -u "$path"`
31763    new_path=`$WHICH "$new_path" 2> /dev/null`
31764    # bat and cmd files are not always considered executable in cygwin causing which
31765    # to not find them
31766    if test "x$new_path" = x \
31767        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31768        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31769      new_path=`$CYGPATH -u "$path"`
31770    fi
31771    if test "x$new_path" = x; then
31772      # It's still not found. Now this is an unrecoverable error.
31773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31774$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31775      has_space=`$ECHO "$complete" | $GREP " "`
31776      if test "x$has_space" != x; then
31777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31779      fi
31780      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31781    fi
31782  fi
31783
31784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31787  # "foo.exe" is OK but "foo" is an error.
31788  #
31789  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31790  # It is also a way to make sure we got the proper file name for the real test later on.
31791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31792  if test "x$test_shortpath" = x; then
31793    # Short path failed, file does not exist as specified.
31794    # Try adding .exe or .cmd
31795    if test -f "${new_path}.exe"; then
31796      input_to_shortpath="${new_path}.exe"
31797    elif test -f "${new_path}.cmd"; then
31798      input_to_shortpath="${new_path}.cmd"
31799    else
31800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31801$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31804      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31805    fi
31806  else
31807    input_to_shortpath="$new_path"
31808  fi
31809
31810  # Call helper function which possibly converts this using DOS-style short mode.
31811  # If so, the updated path is stored in $new_path.
31812  new_path="$input_to_shortpath"
31813
31814  input_path="$input_to_shortpath"
31815  # Check if we need to convert this using DOS-style short mode. If the path
31816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31817  # take no chances and rewrite it.
31818  # Note: m4 eats our [], so we need to use [ and ] instead.
31819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31820  if test "x$has_forbidden_chars" != x; then
31821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31825      # Going to short mode and back again did indeed matter. Since short mode is
31826      # case insensitive, let's make it lowercase to improve readability.
31827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31828      # Now convert it back to Unix-style (cygpath)
31829      input_path=`$CYGPATH -u "$shortmode_path"`
31830      new_path="$input_path"
31831    fi
31832  fi
31833
31834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31835  if test "x$test_cygdrive_prefix" = x; then
31836    # As a simple fix, exclude /usr/bin since it's not a real path.
31837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31839      # a path prefixed by /cygdrive for fixpath to work.
31840      new_path="$CYGWIN_ROOT_PATH$input_path"
31841    fi
31842  fi
31843
31844  # remove trailing .exe if any
31845  new_path="${new_path/%.exe/}"
31846
31847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31848
31849  # First separate the path from the arguments. This will split at the first
31850  # space.
31851  complete="$CC"
31852  path="${complete%% *}"
31853  tmp="$complete EOL"
31854  arguments="${tmp#* }"
31855
31856  # Input might be given as Windows format, start by converting to
31857  # unix format.
31858  new_path="$path"
31859
31860  windows_path="$new_path"
31861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31862    unix_path=`$CYGPATH -u "$windows_path"`
31863    new_path="$unix_path"
31864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31866    new_path="$unix_path"
31867  fi
31868
31869
31870  # Now try to locate executable using which
31871  new_path=`$WHICH "$new_path" 2> /dev/null`
31872
31873  if test "x$new_path" = x; then
31874    # Oops. Which didn't find the executable.
31875    # The splitting of arguments from the executable at a space might have been incorrect,
31876    # since paths with space are more likely in Windows. Give it another try with the whole
31877    # argument.
31878    path="$complete"
31879    arguments="EOL"
31880    new_path="$path"
31881
31882  windows_path="$new_path"
31883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31884    unix_path=`$CYGPATH -u "$windows_path"`
31885    new_path="$unix_path"
31886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31888    new_path="$unix_path"
31889  fi
31890
31891
31892    new_path=`$WHICH "$new_path" 2> /dev/null`
31893    # bat and cmd files are not always considered executable in MSYS causing which
31894    # to not find them
31895    if test "x$new_path" = x \
31896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31898      new_path="$path"
31899
31900  windows_path="$new_path"
31901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31902    unix_path=`$CYGPATH -u "$windows_path"`
31903    new_path="$unix_path"
31904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31906    new_path="$unix_path"
31907  fi
31908
31909    fi
31910
31911    if test "x$new_path" = x; then
31912      # It's still not found. Now this is an unrecoverable error.
31913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31914$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31915      has_space=`$ECHO "$complete" | $GREP " "`
31916      if test "x$has_space" != x; then
31917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31919      fi
31920      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31921    fi
31922  fi
31923
31924  # Now new_path has a complete unix path to the binary
31925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31926    # Keep paths in /bin as-is, but remove trailing .exe if any
31927    new_path="${new_path/%.exe/}"
31928    # Do not save /bin paths to all_fixpath_prefixes!
31929  else
31930    # Not in mixed or Windows style, start by that.
31931    new_path=`cmd //c echo $new_path`
31932
31933  input_path="$new_path"
31934  # Check if we need to convert this using DOS-style short mode. If the path
31935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31936  # take no chances and rewrite it.
31937  # Note: m4 eats our [], so we need to use [ and ] instead.
31938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31939  if test "x$has_forbidden_chars" != x; then
31940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31942  fi
31943
31944    # Output is in $new_path
31945
31946  windows_path="$new_path"
31947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31948    unix_path=`$CYGPATH -u "$windows_path"`
31949    new_path="$unix_path"
31950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31952    new_path="$unix_path"
31953  fi
31954
31955    # remove trailing .exe if any
31956    new_path="${new_path/%.exe/}"
31957
31958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31960  fi
31961
31962    else
31963      # We're on a unix platform. Hooray! :)
31964      # First separate the path from the arguments. This will split at the first
31965      # space.
31966      complete="$CC"
31967      path="${complete%% *}"
31968      tmp="$complete EOL"
31969      arguments="${tmp#* }"
31970
31971      # Cannot rely on the command "which" here since it doesn't always work.
31972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31973      if test -z "$is_absolute_path"; then
31974        # Path to executable is not absolute. Find it.
31975        IFS_save="$IFS"
31976        IFS=:
31977        for p in $PATH; do
31978          if test -f "$p/$path" && test -x "$p/$path"; then
31979            new_path="$p/$path"
31980            break
31981          fi
31982        done
31983        IFS="$IFS_save"
31984      else
31985        # This is an absolute path, we can use it without further modifications.
31986        new_path="$path"
31987      fi
31988
31989      if test "x$new_path" = x; then
31990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31991$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31992        has_space=`$ECHO "$complete" | $GREP " "`
31993        if test "x$has_space" != x; then
31994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31996        fi
31997        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31998      fi
31999    fi
32000
32001    # Now join together the path and the arguments once again
32002    if test "x$arguments" != xEOL; then
32003      new_complete="$new_path ${arguments% *}"
32004    else
32005      new_complete="$new_path"
32006    fi
32007
32008    if test "x$complete" != "x$new_complete"; then
32009      CC="$new_complete"
32010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32011$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32012    fi
32013  fi
32014
32015  TEST_COMPILER="$CC"
32016
32017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32018$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32019  SYMLINK_ORIGINAL="$TEST_COMPILER"
32020
32021  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32022    # Follow a chain of symbolic links. Use readlink
32023    # where it exists, else fall back to horribly
32024    # complicated shell code.
32025    if test "x$READLINK_TESTED" != yes; then
32026      # On MacOSX there is a readlink tool with a different
32027      # purpose than the GNU readlink tool. Check the found readlink.
32028      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32029      if test "x$ISGNU" = x; then
32030        # A readlink that we do not know how to use.
32031        # Are there other non-GNU readlinks out there?
32032        READLINK_TESTED=yes
32033        READLINK=
32034      fi
32035    fi
32036
32037    if test "x$READLINK" != x; then
32038      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32039    else
32040      # Save the current directory for restoring afterwards
32041      STARTDIR=$PWD
32042      COUNTER=0
32043      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32044      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32045      cd $sym_link_dir
32046      # Use -P flag to resolve symlinks in directories.
32047      cd `$THEPWDCMD -P`
32048      sym_link_dir=`$THEPWDCMD -P`
32049      # Resolve file symlinks
32050      while test $COUNTER -lt 20; do
32051        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32052        if test "x$ISLINK" == x; then
32053          # This is not a symbolic link! We are done!
32054          break
32055        fi
32056        # Again resolve directory symlinks since the target of the just found
32057        # link could be in a different directory
32058        cd `$DIRNAME $ISLINK`
32059        sym_link_dir=`$THEPWDCMD -P`
32060        sym_link_file=`$BASENAME $ISLINK`
32061        let COUNTER=COUNTER+1
32062      done
32063      cd $STARTDIR
32064      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32065    fi
32066  fi
32067
32068  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32070$as_echo "no symlink" >&6; }
32071  else
32072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32073$as_echo "$SYMLINK_ORIGINAL" >&6; }
32074
32075    # We can't handle ccache by gcc wrappers, since we need to know if we're
32076    # using ccache. Instead ccache usage must be controlled by a configure option.
32077    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32078    if test "x$COMPILER_BASENAME" = "xccache"; then
32079      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32080$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32081      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32082    fi
32083  fi
32084
32085
32086  COMPILER=$CC
32087  COMPILER_NAME=$COMPILER_NAME
32088
32089  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32090    # cc -V output typically looks like
32091    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32092    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32093    # Check that this is likely to be the Solaris Studio cc.
32094    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32095    if test $? -ne 0; then
32096      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32097      { $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
32098$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32099      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32100$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32101      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32102$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32103      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32104    fi
32105    # Remove usage instructions (if present), and
32106    # collapse compiler output into a single line
32107    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32108        $SED -e 's/ *[Uu]sage:.*//'`
32109    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32110        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32111  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32112    # xlc -qversion output typically looks like
32113    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32114    #     Version: 11.01.0000.0015
32115    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32116    # Check that this is likely to be the IBM XL C compiler.
32117    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32118    if test $? -ne 0; then
32119      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32120      { $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
32121$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32122      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32123$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32124      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32125$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32126      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32127    fi
32128    # Collapse compiler output into a single line
32129    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32130    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32131        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32132  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32133    # There is no specific version flag, but all output starts with a version string.
32134    # First line typically looks something like:
32135    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32136    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32137    # Check that this is likely to be Microsoft CL.EXE.
32138    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32139    if test $? -ne 0; then
32140      { $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
32141$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32142      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32143$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32144      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32145    fi
32146    # Collapse compiler output into a single line
32147    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32148    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32149        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32150  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32151    # gcc --version output typically looks like
32152    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32153    #     Copyright (C) 2013 Free Software Foundation, Inc.
32154    #     This is free software; see the source for copying conditions.  There is NO
32155    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32156    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32157    # Check that this is likely to be GCC.
32158    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32159    if test $? -ne 0; then
32160      { $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
32161$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32162      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32163$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32164      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32165    fi
32166    # Remove Copyright and legalese from version string, and
32167    # collapse into a single line
32168    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32169        $SED -e 's/ *Copyright .*//'`
32170    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32171        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32172  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32173    # clang --version output typically looks like
32174    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32175    #    clang version 3.3 (tags/RELEASE_33/final)
32176    # or
32177    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32178    #    Target: x86_64-pc-linux-gnu
32179    #    Thread model: posix
32180    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32181    # Check that this is likely to be clang
32182    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32183    if test $? -ne 0; then
32184      { $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
32185$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32186      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32187$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32188      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32189    fi
32190    # Collapse compiler output into a single line
32191    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32192    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32193        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32194  else
32195      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32196  fi
32197  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32198  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32199  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32200  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32201
32202  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32203$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32204
32205
32206  # Now that we have resolved CC ourself, let autoconf have its go at it
32207  ac_ext=c
32208ac_cpp='$CPP $CPPFLAGS'
32209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32211ac_compiler_gnu=$ac_cv_c_compiler_gnu
32212if test -n "$ac_tool_prefix"; then
32213  for ac_prog in $CC
32214  do
32215    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32216set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32218$as_echo_n "checking for $ac_word... " >&6; }
32219if ${ac_cv_prog_CC+:} false; then :
32220  $as_echo_n "(cached) " >&6
32221else
32222  if test -n "$CC"; then
32223  ac_cv_prog_CC="$CC" # Let the user override the test.
32224else
32225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32226for as_dir in $PATH
32227do
32228  IFS=$as_save_IFS
32229  test -z "$as_dir" && as_dir=.
32230    for ac_exec_ext in '' $ac_executable_extensions; do
32231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32232    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32234    break 2
32235  fi
32236done
32237  done
32238IFS=$as_save_IFS
32239
32240fi
32241fi
32242CC=$ac_cv_prog_CC
32243if test -n "$CC"; then
32244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32245$as_echo "$CC" >&6; }
32246else
32247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32248$as_echo "no" >&6; }
32249fi
32250
32251
32252    test -n "$CC" && break
32253  done
32254fi
32255if test -z "$CC"; then
32256  ac_ct_CC=$CC
32257  for ac_prog in $CC
32258do
32259  # Extract the first word of "$ac_prog", so it can be a program name with args.
32260set dummy $ac_prog; ac_word=$2
32261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32262$as_echo_n "checking for $ac_word... " >&6; }
32263if ${ac_cv_prog_ac_ct_CC+:} false; then :
32264  $as_echo_n "(cached) " >&6
32265else
32266  if test -n "$ac_ct_CC"; then
32267  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32268else
32269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32270for as_dir in $PATH
32271do
32272  IFS=$as_save_IFS
32273  test -z "$as_dir" && as_dir=.
32274    for ac_exec_ext in '' $ac_executable_extensions; do
32275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32276    ac_cv_prog_ac_ct_CC="$ac_prog"
32277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32278    break 2
32279  fi
32280done
32281  done
32282IFS=$as_save_IFS
32283
32284fi
32285fi
32286ac_ct_CC=$ac_cv_prog_ac_ct_CC
32287if test -n "$ac_ct_CC"; then
32288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32289$as_echo "$ac_ct_CC" >&6; }
32290else
32291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32292$as_echo "no" >&6; }
32293fi
32294
32295
32296  test -n "$ac_ct_CC" && break
32297done
32298
32299  if test "x$ac_ct_CC" = x; then
32300    CC=""
32301  else
32302    case $cross_compiling:$ac_tool_warned in
32303yes:)
32304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32306ac_tool_warned=yes ;;
32307esac
32308    CC=$ac_ct_CC
32309  fi
32310fi
32311
32312
32313test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32315as_fn_error $? "no acceptable C compiler found in \$PATH
32316See \`config.log' for more details" "$LINENO" 5; }
32317
32318# Provide some information about the compiler.
32319$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32320set X $ac_compile
32321ac_compiler=$2
32322for ac_option in --version -v -V -qversion; do
32323  { { ac_try="$ac_compiler $ac_option >&5"
32324case "(($ac_try" in
32325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32326  *) ac_try_echo=$ac_try;;
32327esac
32328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32329$as_echo "$ac_try_echo"; } >&5
32330  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32331  ac_status=$?
32332  if test -s conftest.err; then
32333    sed '10a\
32334... rest of stderr output deleted ...
32335         10q' conftest.err >conftest.er1
32336    cat conftest.er1 >&5
32337  fi
32338  rm -f conftest.er1 conftest.err
32339  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32340  test $ac_status = 0; }
32341done
32342
32343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32344/* end confdefs.h.  */
32345
32346int
32347main ()
32348{
32349
32350  ;
32351  return 0;
32352}
32353_ACEOF
32354ac_clean_files_save=$ac_clean_files
32355ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32356# Try to create an executable without -o first, disregard a.out.
32357# It will help us diagnose broken compilers, and finding out an intuition
32358# of exeext.
32359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32360$as_echo_n "checking whether the C compiler works... " >&6; }
32361ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32362
32363# The possible output files:
32364ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32365
32366ac_rmfiles=
32367for ac_file in $ac_files
32368do
32369  case $ac_file in
32370    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32371    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32372  esac
32373done
32374rm -f $ac_rmfiles
32375
32376if { { ac_try="$ac_link_default"
32377case "(($ac_try" in
32378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32379  *) ac_try_echo=$ac_try;;
32380esac
32381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32382$as_echo "$ac_try_echo"; } >&5
32383  (eval "$ac_link_default") 2>&5
32384  ac_status=$?
32385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32386  test $ac_status = 0; }; then :
32387  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32388# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32389# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32390# so that the user can short-circuit this test for compilers unknown to
32391# Autoconf.
32392for ac_file in $ac_files ''
32393do
32394  test -f "$ac_file" || continue
32395  case $ac_file in
32396    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32397	;;
32398    [ab].out )
32399	# We found the default executable, but exeext='' is most
32400	# certainly right.
32401	break;;
32402    *.* )
32403	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32404	then :; else
32405	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32406	fi
32407	# We set ac_cv_exeext here because the later test for it is not
32408	# safe: cross compilers may not add the suffix if given an `-o'
32409	# argument, so we may need to know it at that point already.
32410	# Even if this section looks crufty: it has the advantage of
32411	# actually working.
32412	break;;
32413    * )
32414	break;;
32415  esac
32416done
32417test "$ac_cv_exeext" = no && ac_cv_exeext=
32418
32419else
32420  ac_file=''
32421fi
32422if test -z "$ac_file"; then :
32423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32424$as_echo "no" >&6; }
32425$as_echo "$as_me: failed program was:" >&5
32426sed 's/^/| /' conftest.$ac_ext >&5
32427
32428{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32430as_fn_error 77 "C compiler cannot create executables
32431See \`config.log' for more details" "$LINENO" 5; }
32432else
32433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32434$as_echo "yes" >&6; }
32435fi
32436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32437$as_echo_n "checking for C compiler default output file name... " >&6; }
32438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32439$as_echo "$ac_file" >&6; }
32440ac_exeext=$ac_cv_exeext
32441
32442rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32443ac_clean_files=$ac_clean_files_save
32444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32445$as_echo_n "checking for suffix of executables... " >&6; }
32446if { { ac_try="$ac_link"
32447case "(($ac_try" in
32448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32449  *) ac_try_echo=$ac_try;;
32450esac
32451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32452$as_echo "$ac_try_echo"; } >&5
32453  (eval "$ac_link") 2>&5
32454  ac_status=$?
32455  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32456  test $ac_status = 0; }; then :
32457  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32458# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32459# work properly (i.e., refer to `conftest.exe'), while it won't with
32460# `rm'.
32461for ac_file in conftest.exe conftest conftest.*; do
32462  test -f "$ac_file" || continue
32463  case $ac_file in
32464    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32465    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32466	  break;;
32467    * ) break;;
32468  esac
32469done
32470else
32471  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32472$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32473as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32474See \`config.log' for more details" "$LINENO" 5; }
32475fi
32476rm -f conftest conftest$ac_cv_exeext
32477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32478$as_echo "$ac_cv_exeext" >&6; }
32479
32480rm -f conftest.$ac_ext
32481EXEEXT=$ac_cv_exeext
32482ac_exeext=$EXEEXT
32483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32484/* end confdefs.h.  */
32485#include <stdio.h>
32486int
32487main ()
32488{
32489FILE *f = fopen ("conftest.out", "w");
32490 return ferror (f) || fclose (f) != 0;
32491
32492  ;
32493  return 0;
32494}
32495_ACEOF
32496ac_clean_files="$ac_clean_files conftest.out"
32497# Check that the compiler produces executables we can run.  If not, either
32498# the compiler is broken, or we cross compile.
32499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32500$as_echo_n "checking whether we are cross compiling... " >&6; }
32501if test "$cross_compiling" != yes; then
32502  { { ac_try="$ac_link"
32503case "(($ac_try" in
32504  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32505  *) ac_try_echo=$ac_try;;
32506esac
32507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32508$as_echo "$ac_try_echo"; } >&5
32509  (eval "$ac_link") 2>&5
32510  ac_status=$?
32511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32512  test $ac_status = 0; }
32513  if { ac_try='./conftest$ac_cv_exeext'
32514  { { case "(($ac_try" in
32515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32516  *) ac_try_echo=$ac_try;;
32517esac
32518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32519$as_echo "$ac_try_echo"; } >&5
32520  (eval "$ac_try") 2>&5
32521  ac_status=$?
32522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32523  test $ac_status = 0; }; }; then
32524    cross_compiling=no
32525  else
32526    if test "$cross_compiling" = maybe; then
32527	cross_compiling=yes
32528    else
32529	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32531as_fn_error $? "cannot run C compiled programs.
32532If you meant to cross compile, use \`--host'.
32533See \`config.log' for more details" "$LINENO" 5; }
32534    fi
32535  fi
32536fi
32537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32538$as_echo "$cross_compiling" >&6; }
32539
32540rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32541ac_clean_files=$ac_clean_files_save
32542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32543$as_echo_n "checking for suffix of object files... " >&6; }
32544if ${ac_cv_objext+:} false; then :
32545  $as_echo_n "(cached) " >&6
32546else
32547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32548/* end confdefs.h.  */
32549
32550int
32551main ()
32552{
32553
32554  ;
32555  return 0;
32556}
32557_ACEOF
32558rm -f conftest.o conftest.obj
32559if { { ac_try="$ac_compile"
32560case "(($ac_try" in
32561  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32562  *) ac_try_echo=$ac_try;;
32563esac
32564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32565$as_echo "$ac_try_echo"; } >&5
32566  (eval "$ac_compile") 2>&5
32567  ac_status=$?
32568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32569  test $ac_status = 0; }; then :
32570  for ac_file in conftest.o conftest.obj conftest.*; do
32571  test -f "$ac_file" || continue;
32572  case $ac_file in
32573    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32574    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32575       break;;
32576  esac
32577done
32578else
32579  $as_echo "$as_me: failed program was:" >&5
32580sed 's/^/| /' conftest.$ac_ext >&5
32581
32582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32584as_fn_error $? "cannot compute suffix of object files: cannot compile
32585See \`config.log' for more details" "$LINENO" 5; }
32586fi
32587rm -f conftest.$ac_cv_objext conftest.$ac_ext
32588fi
32589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32590$as_echo "$ac_cv_objext" >&6; }
32591OBJEXT=$ac_cv_objext
32592ac_objext=$OBJEXT
32593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32594$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32595if ${ac_cv_c_compiler_gnu+:} false; then :
32596  $as_echo_n "(cached) " >&6
32597else
32598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32599/* end confdefs.h.  */
32600
32601int
32602main ()
32603{
32604#ifndef __GNUC__
32605       choke me
32606#endif
32607
32608  ;
32609  return 0;
32610}
32611_ACEOF
32612if ac_fn_c_try_compile "$LINENO"; then :
32613  ac_compiler_gnu=yes
32614else
32615  ac_compiler_gnu=no
32616fi
32617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32618ac_cv_c_compiler_gnu=$ac_compiler_gnu
32619
32620fi
32621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32622$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32623if test $ac_compiler_gnu = yes; then
32624  GCC=yes
32625else
32626  GCC=
32627fi
32628ac_test_CFLAGS=${CFLAGS+set}
32629ac_save_CFLAGS=$CFLAGS
32630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32631$as_echo_n "checking whether $CC accepts -g... " >&6; }
32632if ${ac_cv_prog_cc_g+:} false; then :
32633  $as_echo_n "(cached) " >&6
32634else
32635  ac_save_c_werror_flag=$ac_c_werror_flag
32636   ac_c_werror_flag=yes
32637   ac_cv_prog_cc_g=no
32638   CFLAGS="-g"
32639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32640/* end confdefs.h.  */
32641
32642int
32643main ()
32644{
32645
32646  ;
32647  return 0;
32648}
32649_ACEOF
32650if ac_fn_c_try_compile "$LINENO"; then :
32651  ac_cv_prog_cc_g=yes
32652else
32653  CFLAGS=""
32654      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32655/* end confdefs.h.  */
32656
32657int
32658main ()
32659{
32660
32661  ;
32662  return 0;
32663}
32664_ACEOF
32665if ac_fn_c_try_compile "$LINENO"; then :
32666
32667else
32668  ac_c_werror_flag=$ac_save_c_werror_flag
32669	 CFLAGS="-g"
32670	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32671/* end confdefs.h.  */
32672
32673int
32674main ()
32675{
32676
32677  ;
32678  return 0;
32679}
32680_ACEOF
32681if ac_fn_c_try_compile "$LINENO"; then :
32682  ac_cv_prog_cc_g=yes
32683fi
32684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32685fi
32686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32687fi
32688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32689   ac_c_werror_flag=$ac_save_c_werror_flag
32690fi
32691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32692$as_echo "$ac_cv_prog_cc_g" >&6; }
32693if test "$ac_test_CFLAGS" = set; then
32694  CFLAGS=$ac_save_CFLAGS
32695elif test $ac_cv_prog_cc_g = yes; then
32696  if test "$GCC" = yes; then
32697    CFLAGS="-g -O2"
32698  else
32699    CFLAGS="-g"
32700  fi
32701else
32702  if test "$GCC" = yes; then
32703    CFLAGS="-O2"
32704  else
32705    CFLAGS=
32706  fi
32707fi
32708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32709$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32710if ${ac_cv_prog_cc_c89+:} false; then :
32711  $as_echo_n "(cached) " >&6
32712else
32713  ac_cv_prog_cc_c89=no
32714ac_save_CC=$CC
32715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32716/* end confdefs.h.  */
32717#include <stdarg.h>
32718#include <stdio.h>
32719struct stat;
32720/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32721struct buf { int x; };
32722FILE * (*rcsopen) (struct buf *, struct stat *, int);
32723static char *e (p, i)
32724     char **p;
32725     int i;
32726{
32727  return p[i];
32728}
32729static char *f (char * (*g) (char **, int), char **p, ...)
32730{
32731  char *s;
32732  va_list v;
32733  va_start (v,p);
32734  s = g (p, va_arg (v,int));
32735  va_end (v);
32736  return s;
32737}
32738
32739/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32740   function prototypes and stuff, but not '\xHH' hex character constants.
32741   These don't provoke an error unfortunately, instead are silently treated
32742   as 'x'.  The following induces an error, until -std is added to get
32743   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32744   array size at least.  It's necessary to write '\x00'==0 to get something
32745   that's true only with -std.  */
32746int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32747
32748/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32749   inside strings and character constants.  */
32750#define FOO(x) 'x'
32751int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32752
32753int test (int i, double x);
32754struct s1 {int (*f) (int a);};
32755struct s2 {int (*f) (double a);};
32756int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32757int argc;
32758char **argv;
32759int
32760main ()
32761{
32762return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32763  ;
32764  return 0;
32765}
32766_ACEOF
32767for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32768	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32769do
32770  CC="$ac_save_CC $ac_arg"
32771  if ac_fn_c_try_compile "$LINENO"; then :
32772  ac_cv_prog_cc_c89=$ac_arg
32773fi
32774rm -f core conftest.err conftest.$ac_objext
32775  test "x$ac_cv_prog_cc_c89" != "xno" && break
32776done
32777rm -f conftest.$ac_ext
32778CC=$ac_save_CC
32779
32780fi
32781# AC_CACHE_VAL
32782case "x$ac_cv_prog_cc_c89" in
32783  x)
32784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32785$as_echo "none needed" >&6; } ;;
32786  xno)
32787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32788$as_echo "unsupported" >&6; } ;;
32789  *)
32790    CC="$CC $ac_cv_prog_cc_c89"
32791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32792$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32793esac
32794if test "x$ac_cv_prog_cc_c89" != xno; then :
32795
32796fi
32797
32798ac_ext=cpp
32799ac_cpp='$CXXCPP $CPPFLAGS'
32800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32803
32804
32805
32806  COMPILER_NAME=C++
32807  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32808
32809  if test "x$CXX" != x; then
32810    # User has supplied compiler name already, always let that override.
32811    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32812$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32813    if test "x`basename $CXX`" = "x$CXX"; then
32814      # A command without a complete path is provided, search $PATH.
32815
32816      for ac_prog in $CXX
32817do
32818  # Extract the first word of "$ac_prog", so it can be a program name with args.
32819set dummy $ac_prog; ac_word=$2
32820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32821$as_echo_n "checking for $ac_word... " >&6; }
32822if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32823  $as_echo_n "(cached) " >&6
32824else
32825  case $POTENTIAL_CXX in
32826  [\\/]* | ?:[\\/]*)
32827  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32828  ;;
32829  *)
32830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32831for as_dir in $PATH
32832do
32833  IFS=$as_save_IFS
32834  test -z "$as_dir" && as_dir=.
32835    for ac_exec_ext in '' $ac_executable_extensions; do
32836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32837    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32839    break 2
32840  fi
32841done
32842  done
32843IFS=$as_save_IFS
32844
32845  ;;
32846esac
32847fi
32848POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32849if test -n "$POTENTIAL_CXX"; then
32850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32851$as_echo "$POTENTIAL_CXX" >&6; }
32852else
32853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32854$as_echo "no" >&6; }
32855fi
32856
32857
32858  test -n "$POTENTIAL_CXX" && break
32859done
32860
32861      if test "x$POTENTIAL_CXX" != x; then
32862        CXX=$POTENTIAL_CXX
32863      else
32864        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32865      fi
32866    else
32867      # Otherwise it might already be a complete path
32868      if test ! -x "$CXX"; then
32869        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32870      fi
32871    fi
32872  else
32873    # No user supplied value. Locate compiler ourselves.
32874
32875    # If we are cross compiling, assume cross compilation tools follows the
32876    # cross compilation standard where they are prefixed with the autoconf
32877    # standard name for the target. For example the binary
32878    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32879    # If we are not cross compiling, then the default compiler name will be
32880    # used.
32881
32882    CXX=
32883    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32884    # before checking the rest of the PATH.
32885    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32886    # step, this should not be necessary.
32887    if test -n "$TOOLCHAIN_PATH"; then
32888      PATH_save="$PATH"
32889      PATH="$TOOLCHAIN_PATH"
32890      for ac_prog in $SEARCH_LIST
32891do
32892  # Extract the first word of "$ac_prog", so it can be a program name with args.
32893set dummy $ac_prog; ac_word=$2
32894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32895$as_echo_n "checking for $ac_word... " >&6; }
32896if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32897  $as_echo_n "(cached) " >&6
32898else
32899  case $TOOLCHAIN_PATH_CXX in
32900  [\\/]* | ?:[\\/]*)
32901  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32902  ;;
32903  *)
32904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32905for as_dir in $PATH
32906do
32907  IFS=$as_save_IFS
32908  test -z "$as_dir" && as_dir=.
32909    for ac_exec_ext in '' $ac_executable_extensions; do
32910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32911    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32913    break 2
32914  fi
32915done
32916  done
32917IFS=$as_save_IFS
32918
32919  ;;
32920esac
32921fi
32922TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32923if test -n "$TOOLCHAIN_PATH_CXX"; then
32924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32925$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32926else
32927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32928$as_echo "no" >&6; }
32929fi
32930
32931
32932  test -n "$TOOLCHAIN_PATH_CXX" && break
32933done
32934
32935      CXX=$TOOLCHAIN_PATH_CXX
32936      PATH="$PATH_save"
32937    fi
32938
32939    # AC_PATH_PROGS can't be run multiple times with the same variable,
32940    # so create a new name for this run.
32941    if test "x$CXX" = x; then
32942      for ac_prog in $SEARCH_LIST
32943do
32944  # Extract the first word of "$ac_prog", so it can be a program name with args.
32945set dummy $ac_prog; ac_word=$2
32946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32947$as_echo_n "checking for $ac_word... " >&6; }
32948if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32949  $as_echo_n "(cached) " >&6
32950else
32951  case $POTENTIAL_CXX in
32952  [\\/]* | ?:[\\/]*)
32953  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32954  ;;
32955  *)
32956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32957for as_dir in $PATH
32958do
32959  IFS=$as_save_IFS
32960  test -z "$as_dir" && as_dir=.
32961    for ac_exec_ext in '' $ac_executable_extensions; do
32962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32963    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32965    break 2
32966  fi
32967done
32968  done
32969IFS=$as_save_IFS
32970
32971  ;;
32972esac
32973fi
32974POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32975if test -n "$POTENTIAL_CXX"; then
32976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32977$as_echo "$POTENTIAL_CXX" >&6; }
32978else
32979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32980$as_echo "no" >&6; }
32981fi
32982
32983
32984  test -n "$POTENTIAL_CXX" && break
32985done
32986
32987      CXX=$POTENTIAL_CXX
32988    fi
32989
32990    if test "x$CXX" = x; then
32991
32992  # Print a helpful message on how to acquire the necessary build dependency.
32993  # devkit is the help tag: freetype, cups, alsa etc
32994  MISSING_DEPENDENCY=devkit
32995
32996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32997    cygwin_help $MISSING_DEPENDENCY
32998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32999    msys_help $MISSING_DEPENDENCY
33000  else
33001    PKGHANDLER_COMMAND=
33002
33003    case $PKGHANDLER in
33004      apt-get)
33005        apt_help     $MISSING_DEPENDENCY ;;
33006      yum)
33007        yum_help     $MISSING_DEPENDENCY ;;
33008      port)
33009        port_help    $MISSING_DEPENDENCY ;;
33010      pkgutil)
33011        pkgutil_help $MISSING_DEPENDENCY ;;
33012      pkgadd)
33013        pkgadd_help  $MISSING_DEPENDENCY ;;
33014    esac
33015
33016    if test "x$PKGHANDLER_COMMAND" != x; then
33017      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33018    fi
33019  fi
33020
33021      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33022    fi
33023  fi
33024
33025  # Now we have a compiler binary in CXX. Make sure it's okay.
33026
33027  # Only process if variable expands to non-empty
33028
33029  if test "x$CXX" != x; then
33030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33031
33032  # First separate the path from the arguments. This will split at the first
33033  # space.
33034  complete="$CXX"
33035  path="${complete%% *}"
33036  tmp="$complete EOL"
33037  arguments="${tmp#* }"
33038
33039  # Input might be given as Windows format, start by converting to
33040  # unix format.
33041  new_path=`$CYGPATH -u "$path"`
33042
33043  # Now try to locate executable using which
33044  new_path=`$WHICH "$new_path" 2> /dev/null`
33045  # bat and cmd files are not always considered executable in cygwin causing which
33046  # to not find them
33047  if test "x$new_path" = x \
33048      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33049      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33050    new_path=`$CYGPATH -u "$path"`
33051  fi
33052  if test "x$new_path" = x; then
33053    # Oops. Which didn't find the executable.
33054    # The splitting of arguments from the executable at a space might have been incorrect,
33055    # since paths with space are more likely in Windows. Give it another try with the whole
33056    # argument.
33057    path="$complete"
33058    arguments="EOL"
33059    new_path=`$CYGPATH -u "$path"`
33060    new_path=`$WHICH "$new_path" 2> /dev/null`
33061    # bat and cmd files are not always considered executable in cygwin causing which
33062    # to not find them
33063    if test "x$new_path" = x \
33064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33066      new_path=`$CYGPATH -u "$path"`
33067    fi
33068    if test "x$new_path" = x; then
33069      # It's still not found. Now this is an unrecoverable error.
33070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33071$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33072      has_space=`$ECHO "$complete" | $GREP " "`
33073      if test "x$has_space" != x; then
33074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33076      fi
33077      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33078    fi
33079  fi
33080
33081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33084  # "foo.exe" is OK but "foo" is an error.
33085  #
33086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33087  # It is also a way to make sure we got the proper file name for the real test later on.
33088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33089  if test "x$test_shortpath" = x; then
33090    # Short path failed, file does not exist as specified.
33091    # Try adding .exe or .cmd
33092    if test -f "${new_path}.exe"; then
33093      input_to_shortpath="${new_path}.exe"
33094    elif test -f "${new_path}.cmd"; then
33095      input_to_shortpath="${new_path}.cmd"
33096    else
33097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33098$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33101      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33102    fi
33103  else
33104    input_to_shortpath="$new_path"
33105  fi
33106
33107  # Call helper function which possibly converts this using DOS-style short mode.
33108  # If so, the updated path is stored in $new_path.
33109  new_path="$input_to_shortpath"
33110
33111  input_path="$input_to_shortpath"
33112  # Check if we need to convert this using DOS-style short mode. If the path
33113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33114  # take no chances and rewrite it.
33115  # Note: m4 eats our [], so we need to use [ and ] instead.
33116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33117  if test "x$has_forbidden_chars" != x; then
33118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33122      # Going to short mode and back again did indeed matter. Since short mode is
33123      # case insensitive, let's make it lowercase to improve readability.
33124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33125      # Now convert it back to Unix-style (cygpath)
33126      input_path=`$CYGPATH -u "$shortmode_path"`
33127      new_path="$input_path"
33128    fi
33129  fi
33130
33131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33132  if test "x$test_cygdrive_prefix" = x; then
33133    # As a simple fix, exclude /usr/bin since it's not a real path.
33134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33136      # a path prefixed by /cygdrive for fixpath to work.
33137      new_path="$CYGWIN_ROOT_PATH$input_path"
33138    fi
33139  fi
33140
33141  # remove trailing .exe if any
33142  new_path="${new_path/%.exe/}"
33143
33144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33145
33146  # First separate the path from the arguments. This will split at the first
33147  # space.
33148  complete="$CXX"
33149  path="${complete%% *}"
33150  tmp="$complete EOL"
33151  arguments="${tmp#* }"
33152
33153  # Input might be given as Windows format, start by converting to
33154  # unix format.
33155  new_path="$path"
33156
33157  windows_path="$new_path"
33158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33159    unix_path=`$CYGPATH -u "$windows_path"`
33160    new_path="$unix_path"
33161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33163    new_path="$unix_path"
33164  fi
33165
33166
33167  # Now try to locate executable using which
33168  new_path=`$WHICH "$new_path" 2> /dev/null`
33169
33170  if test "x$new_path" = x; then
33171    # Oops. Which didn't find the executable.
33172    # The splitting of arguments from the executable at a space might have been incorrect,
33173    # since paths with space are more likely in Windows. Give it another try with the whole
33174    # argument.
33175    path="$complete"
33176    arguments="EOL"
33177    new_path="$path"
33178
33179  windows_path="$new_path"
33180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33181    unix_path=`$CYGPATH -u "$windows_path"`
33182    new_path="$unix_path"
33183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33185    new_path="$unix_path"
33186  fi
33187
33188
33189    new_path=`$WHICH "$new_path" 2> /dev/null`
33190    # bat and cmd files are not always considered executable in MSYS causing which
33191    # to not find them
33192    if test "x$new_path" = x \
33193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33195      new_path="$path"
33196
33197  windows_path="$new_path"
33198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33199    unix_path=`$CYGPATH -u "$windows_path"`
33200    new_path="$unix_path"
33201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33203    new_path="$unix_path"
33204  fi
33205
33206    fi
33207
33208    if test "x$new_path" = x; then
33209      # It's still not found. Now this is an unrecoverable error.
33210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33211$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33212      has_space=`$ECHO "$complete" | $GREP " "`
33213      if test "x$has_space" != x; then
33214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33216      fi
33217      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33218    fi
33219  fi
33220
33221  # Now new_path has a complete unix path to the binary
33222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33223    # Keep paths in /bin as-is, but remove trailing .exe if any
33224    new_path="${new_path/%.exe/}"
33225    # Do not save /bin paths to all_fixpath_prefixes!
33226  else
33227    # Not in mixed or Windows style, start by that.
33228    new_path=`cmd //c echo $new_path`
33229
33230  input_path="$new_path"
33231  # Check if we need to convert this using DOS-style short mode. If the path
33232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33233  # take no chances and rewrite it.
33234  # Note: m4 eats our [], so we need to use [ and ] instead.
33235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33236  if test "x$has_forbidden_chars" != x; then
33237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33239  fi
33240
33241    # Output is in $new_path
33242
33243  windows_path="$new_path"
33244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33245    unix_path=`$CYGPATH -u "$windows_path"`
33246    new_path="$unix_path"
33247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33249    new_path="$unix_path"
33250  fi
33251
33252    # remove trailing .exe if any
33253    new_path="${new_path/%.exe/}"
33254
33255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33257  fi
33258
33259    else
33260      # We're on a unix platform. Hooray! :)
33261      # First separate the path from the arguments. This will split at the first
33262      # space.
33263      complete="$CXX"
33264      path="${complete%% *}"
33265      tmp="$complete EOL"
33266      arguments="${tmp#* }"
33267
33268      # Cannot rely on the command "which" here since it doesn't always work.
33269      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33270      if test -z "$is_absolute_path"; then
33271        # Path to executable is not absolute. Find it.
33272        IFS_save="$IFS"
33273        IFS=:
33274        for p in $PATH; do
33275          if test -f "$p/$path" && test -x "$p/$path"; then
33276            new_path="$p/$path"
33277            break
33278          fi
33279        done
33280        IFS="$IFS_save"
33281      else
33282        # This is an absolute path, we can use it without further modifications.
33283        new_path="$path"
33284      fi
33285
33286      if test "x$new_path" = x; then
33287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33288$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33289        has_space=`$ECHO "$complete" | $GREP " "`
33290        if test "x$has_space" != x; then
33291          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33293        fi
33294        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33295      fi
33296    fi
33297
33298    # Now join together the path and the arguments once again
33299    if test "x$arguments" != xEOL; then
33300      new_complete="$new_path ${arguments% *}"
33301    else
33302      new_complete="$new_path"
33303    fi
33304
33305    if test "x$complete" != "x$new_complete"; then
33306      CXX="$new_complete"
33307      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33308$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33309    fi
33310  fi
33311
33312  TEST_COMPILER="$CXX"
33313
33314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33315$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33316  SYMLINK_ORIGINAL="$TEST_COMPILER"
33317
33318  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33319    # Follow a chain of symbolic links. Use readlink
33320    # where it exists, else fall back to horribly
33321    # complicated shell code.
33322    if test "x$READLINK_TESTED" != yes; then
33323      # On MacOSX there is a readlink tool with a different
33324      # purpose than the GNU readlink tool. Check the found readlink.
33325      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33326      if test "x$ISGNU" = x; then
33327        # A readlink that we do not know how to use.
33328        # Are there other non-GNU readlinks out there?
33329        READLINK_TESTED=yes
33330        READLINK=
33331      fi
33332    fi
33333
33334    if test "x$READLINK" != x; then
33335      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33336    else
33337      # Save the current directory for restoring afterwards
33338      STARTDIR=$PWD
33339      COUNTER=0
33340      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33341      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33342      cd $sym_link_dir
33343      # Use -P flag to resolve symlinks in directories.
33344      cd `$THEPWDCMD -P`
33345      sym_link_dir=`$THEPWDCMD -P`
33346      # Resolve file symlinks
33347      while test $COUNTER -lt 20; do
33348        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33349        if test "x$ISLINK" == x; then
33350          # This is not a symbolic link! We are done!
33351          break
33352        fi
33353        # Again resolve directory symlinks since the target of the just found
33354        # link could be in a different directory
33355        cd `$DIRNAME $ISLINK`
33356        sym_link_dir=`$THEPWDCMD -P`
33357        sym_link_file=`$BASENAME $ISLINK`
33358        let COUNTER=COUNTER+1
33359      done
33360      cd $STARTDIR
33361      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33362    fi
33363  fi
33364
33365  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33367$as_echo "no symlink" >&6; }
33368  else
33369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33370$as_echo "$SYMLINK_ORIGINAL" >&6; }
33371
33372    # We can't handle ccache by gcc wrappers, since we need to know if we're
33373    # using ccache. Instead ccache usage must be controlled by a configure option.
33374    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33375    if test "x$COMPILER_BASENAME" = "xccache"; then
33376      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33377$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33378      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33379    fi
33380  fi
33381
33382
33383  COMPILER=$CXX
33384  COMPILER_NAME=$COMPILER_NAME
33385
33386  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33387    # cc -V output typically looks like
33388    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33389    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33390    # Check that this is likely to be the Solaris Studio cc.
33391    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33392    if test $? -ne 0; then
33393      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33394      { $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
33395$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33396      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33397$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33398      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33399$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33400      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33401    fi
33402    # Remove usage instructions (if present), and
33403    # collapse compiler output into a single line
33404    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33405        $SED -e 's/ *[Uu]sage:.*//'`
33406    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33407        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33408  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33409    # xlc -qversion output typically looks like
33410    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33411    #     Version: 11.01.0000.0015
33412    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33413    # Check that this is likely to be the IBM XL C compiler.
33414    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33415    if test $? -ne 0; then
33416      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33417      { $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
33418$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33419      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33420$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33421      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33422$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33423      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33424    fi
33425    # Collapse compiler output into a single line
33426    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33427    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33428        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33429  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33430    # There is no specific version flag, but all output starts with a version string.
33431    # First line typically looks something like:
33432    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33433    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33434    # Check that this is likely to be Microsoft CL.EXE.
33435    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33436    if test $? -ne 0; then
33437      { $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
33438$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33439      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33440$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33441      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33442    fi
33443    # Collapse compiler output into a single line
33444    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33445    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33446        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33447  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33448    # gcc --version output typically looks like
33449    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33450    #     Copyright (C) 2013 Free Software Foundation, Inc.
33451    #     This is free software; see the source for copying conditions.  There is NO
33452    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33453    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33454    # Check that this is likely to be GCC.
33455    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33456    if test $? -ne 0; then
33457      { $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
33458$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33459      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33460$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33461      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33462    fi
33463    # Remove Copyright and legalese from version string, and
33464    # collapse into a single line
33465    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33466        $SED -e 's/ *Copyright .*//'`
33467    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33468        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33469  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33470    # clang --version output typically looks like
33471    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33472    #    clang version 3.3 (tags/RELEASE_33/final)
33473    # or
33474    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33475    #    Target: x86_64-pc-linux-gnu
33476    #    Thread model: posix
33477    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33478    # Check that this is likely to be clang
33479    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33480    if test $? -ne 0; then
33481      { $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
33482$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33483      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33484$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33485      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33486    fi
33487    # Collapse compiler output into a single line
33488    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33489    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33490        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33491  else
33492      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33493  fi
33494  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33495  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33496  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33497  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33498
33499  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33500$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33501
33502
33503  # Now that we have resolved CXX ourself, let autoconf have its go at it
33504  ac_ext=cpp
33505ac_cpp='$CXXCPP $CPPFLAGS'
33506ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33507ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33508ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33509if test -z "$CXX"; then
33510  if test -n "$CCC"; then
33511    CXX=$CCC
33512  else
33513    if test -n "$ac_tool_prefix"; then
33514  for ac_prog in $CXX
33515  do
33516    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33519$as_echo_n "checking for $ac_word... " >&6; }
33520if ${ac_cv_prog_CXX+:} false; then :
33521  $as_echo_n "(cached) " >&6
33522else
33523  if test -n "$CXX"; then
33524  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33525else
33526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33527for as_dir in $PATH
33528do
33529  IFS=$as_save_IFS
33530  test -z "$as_dir" && as_dir=.
33531    for ac_exec_ext in '' $ac_executable_extensions; do
33532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33533    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33535    break 2
33536  fi
33537done
33538  done
33539IFS=$as_save_IFS
33540
33541fi
33542fi
33543CXX=$ac_cv_prog_CXX
33544if test -n "$CXX"; then
33545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33546$as_echo "$CXX" >&6; }
33547else
33548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33549$as_echo "no" >&6; }
33550fi
33551
33552
33553    test -n "$CXX" && break
33554  done
33555fi
33556if test -z "$CXX"; then
33557  ac_ct_CXX=$CXX
33558  for ac_prog in $CXX
33559do
33560  # Extract the first word of "$ac_prog", so it can be a program name with args.
33561set dummy $ac_prog; ac_word=$2
33562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33563$as_echo_n "checking for $ac_word... " >&6; }
33564if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33565  $as_echo_n "(cached) " >&6
33566else
33567  if test -n "$ac_ct_CXX"; then
33568  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33569else
33570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33571for as_dir in $PATH
33572do
33573  IFS=$as_save_IFS
33574  test -z "$as_dir" && as_dir=.
33575    for ac_exec_ext in '' $ac_executable_extensions; do
33576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33577    ac_cv_prog_ac_ct_CXX="$ac_prog"
33578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33579    break 2
33580  fi
33581done
33582  done
33583IFS=$as_save_IFS
33584
33585fi
33586fi
33587ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33588if test -n "$ac_ct_CXX"; then
33589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33590$as_echo "$ac_ct_CXX" >&6; }
33591else
33592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33593$as_echo "no" >&6; }
33594fi
33595
33596
33597  test -n "$ac_ct_CXX" && break
33598done
33599
33600  if test "x$ac_ct_CXX" = x; then
33601    CXX="g++"
33602  else
33603    case $cross_compiling:$ac_tool_warned in
33604yes:)
33605{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33606$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33607ac_tool_warned=yes ;;
33608esac
33609    CXX=$ac_ct_CXX
33610  fi
33611fi
33612
33613  fi
33614fi
33615# Provide some information about the compiler.
33616$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33617set X $ac_compile
33618ac_compiler=$2
33619for ac_option in --version -v -V -qversion; do
33620  { { ac_try="$ac_compiler $ac_option >&5"
33621case "(($ac_try" in
33622  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33623  *) ac_try_echo=$ac_try;;
33624esac
33625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33626$as_echo "$ac_try_echo"; } >&5
33627  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33628  ac_status=$?
33629  if test -s conftest.err; then
33630    sed '10a\
33631... rest of stderr output deleted ...
33632         10q' conftest.err >conftest.er1
33633    cat conftest.er1 >&5
33634  fi
33635  rm -f conftest.er1 conftest.err
33636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33637  test $ac_status = 0; }
33638done
33639
33640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33641$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33642if ${ac_cv_cxx_compiler_gnu+:} false; then :
33643  $as_echo_n "(cached) " >&6
33644else
33645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33646/* end confdefs.h.  */
33647
33648int
33649main ()
33650{
33651#ifndef __GNUC__
33652       choke me
33653#endif
33654
33655  ;
33656  return 0;
33657}
33658_ACEOF
33659if ac_fn_cxx_try_compile "$LINENO"; then :
33660  ac_compiler_gnu=yes
33661else
33662  ac_compiler_gnu=no
33663fi
33664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33665ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33666
33667fi
33668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33669$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33670if test $ac_compiler_gnu = yes; then
33671  GXX=yes
33672else
33673  GXX=
33674fi
33675ac_test_CXXFLAGS=${CXXFLAGS+set}
33676ac_save_CXXFLAGS=$CXXFLAGS
33677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33678$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33679if ${ac_cv_prog_cxx_g+:} false; then :
33680  $as_echo_n "(cached) " >&6
33681else
33682  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33683   ac_cxx_werror_flag=yes
33684   ac_cv_prog_cxx_g=no
33685   CXXFLAGS="-g"
33686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33687/* end confdefs.h.  */
33688
33689int
33690main ()
33691{
33692
33693  ;
33694  return 0;
33695}
33696_ACEOF
33697if ac_fn_cxx_try_compile "$LINENO"; then :
33698  ac_cv_prog_cxx_g=yes
33699else
33700  CXXFLAGS=""
33701      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33702/* end confdefs.h.  */
33703
33704int
33705main ()
33706{
33707
33708  ;
33709  return 0;
33710}
33711_ACEOF
33712if ac_fn_cxx_try_compile "$LINENO"; then :
33713
33714else
33715  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33716	 CXXFLAGS="-g"
33717	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33718/* end confdefs.h.  */
33719
33720int
33721main ()
33722{
33723
33724  ;
33725  return 0;
33726}
33727_ACEOF
33728if ac_fn_cxx_try_compile "$LINENO"; then :
33729  ac_cv_prog_cxx_g=yes
33730fi
33731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33732fi
33733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33734fi
33735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33736   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33737fi
33738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33739$as_echo "$ac_cv_prog_cxx_g" >&6; }
33740if test "$ac_test_CXXFLAGS" = set; then
33741  CXXFLAGS=$ac_save_CXXFLAGS
33742elif test $ac_cv_prog_cxx_g = yes; then
33743  if test "$GXX" = yes; then
33744    CXXFLAGS="-g -O2"
33745  else
33746    CXXFLAGS="-g"
33747  fi
33748else
33749  if test "$GXX" = yes; then
33750    CXXFLAGS="-O2"
33751  else
33752    CXXFLAGS=
33753  fi
33754fi
33755ac_ext=cpp
33756ac_cpp='$CXXCPP $CPPFLAGS'
33757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33760
33761
33762  #
33763  # Setup the preprocessor (CPP and CXXCPP)
33764  #
33765  ac_ext=c
33766ac_cpp='$CPP $CPPFLAGS'
33767ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33768ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33769ac_compiler_gnu=$ac_cv_c_compiler_gnu
33770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33771$as_echo_n "checking how to run the C preprocessor... " >&6; }
33772# On Suns, sometimes $CPP names a directory.
33773if test -n "$CPP" && test -d "$CPP"; then
33774  CPP=
33775fi
33776if test -z "$CPP"; then
33777  if ${ac_cv_prog_CPP+:} false; then :
33778  $as_echo_n "(cached) " >&6
33779else
33780      # Double quotes because CPP needs to be expanded
33781    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33782    do
33783      ac_preproc_ok=false
33784for ac_c_preproc_warn_flag in '' yes
33785do
33786  # Use a header file that comes with gcc, so configuring glibc
33787  # with a fresh cross-compiler works.
33788  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33789  # <limits.h> exists even on freestanding compilers.
33790  # On the NeXT, cc -E runs the code through the compiler's parser,
33791  # not just through cpp. "Syntax error" is here to catch this case.
33792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33793/* end confdefs.h.  */
33794#ifdef __STDC__
33795# include <limits.h>
33796#else
33797# include <assert.h>
33798#endif
33799		     Syntax error
33800_ACEOF
33801if ac_fn_c_try_cpp "$LINENO"; then :
33802
33803else
33804  # Broken: fails on valid input.
33805continue
33806fi
33807rm -f conftest.err conftest.i conftest.$ac_ext
33808
33809  # OK, works on sane cases.  Now check whether nonexistent headers
33810  # can be detected and how.
33811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33812/* end confdefs.h.  */
33813#include <ac_nonexistent.h>
33814_ACEOF
33815if ac_fn_c_try_cpp "$LINENO"; then :
33816  # Broken: success on invalid input.
33817continue
33818else
33819  # Passes both tests.
33820ac_preproc_ok=:
33821break
33822fi
33823rm -f conftest.err conftest.i conftest.$ac_ext
33824
33825done
33826# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33827rm -f conftest.i conftest.err conftest.$ac_ext
33828if $ac_preproc_ok; then :
33829  break
33830fi
33831
33832    done
33833    ac_cv_prog_CPP=$CPP
33834
33835fi
33836  CPP=$ac_cv_prog_CPP
33837else
33838  ac_cv_prog_CPP=$CPP
33839fi
33840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33841$as_echo "$CPP" >&6; }
33842ac_preproc_ok=false
33843for ac_c_preproc_warn_flag in '' yes
33844do
33845  # Use a header file that comes with gcc, so configuring glibc
33846  # with a fresh cross-compiler works.
33847  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33848  # <limits.h> exists even on freestanding compilers.
33849  # On the NeXT, cc -E runs the code through the compiler's parser,
33850  # not just through cpp. "Syntax error" is here to catch this case.
33851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33852/* end confdefs.h.  */
33853#ifdef __STDC__
33854# include <limits.h>
33855#else
33856# include <assert.h>
33857#endif
33858		     Syntax error
33859_ACEOF
33860if ac_fn_c_try_cpp "$LINENO"; then :
33861
33862else
33863  # Broken: fails on valid input.
33864continue
33865fi
33866rm -f conftest.err conftest.i conftest.$ac_ext
33867
33868  # OK, works on sane cases.  Now check whether nonexistent headers
33869  # can be detected and how.
33870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33871/* end confdefs.h.  */
33872#include <ac_nonexistent.h>
33873_ACEOF
33874if ac_fn_c_try_cpp "$LINENO"; then :
33875  # Broken: success on invalid input.
33876continue
33877else
33878  # Passes both tests.
33879ac_preproc_ok=:
33880break
33881fi
33882rm -f conftest.err conftest.i conftest.$ac_ext
33883
33884done
33885# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33886rm -f conftest.i conftest.err conftest.$ac_ext
33887if $ac_preproc_ok; then :
33888
33889else
33890  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33892as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
33893See \`config.log' for more details" "$LINENO" 5; }
33894fi
33895
33896ac_ext=cpp
33897ac_cpp='$CXXCPP $CPPFLAGS'
33898ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33899ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33900ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33901
33902
33903  # Only process if variable expands to non-empty
33904
33905  if test "x$CPP" != x; then
33906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33907
33908  # First separate the path from the arguments. This will split at the first
33909  # space.
33910  complete="$CPP"
33911  path="${complete%% *}"
33912  tmp="$complete EOL"
33913  arguments="${tmp#* }"
33914
33915  # Input might be given as Windows format, start by converting to
33916  # unix format.
33917  new_path=`$CYGPATH -u "$path"`
33918
33919  # Now try to locate executable using which
33920  new_path=`$WHICH "$new_path" 2> /dev/null`
33921  # bat and cmd files are not always considered executable in cygwin causing which
33922  # to not find them
33923  if test "x$new_path" = x \
33924      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33925      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33926    new_path=`$CYGPATH -u "$path"`
33927  fi
33928  if test "x$new_path" = x; then
33929    # Oops. Which didn't find the executable.
33930    # The splitting of arguments from the executable at a space might have been incorrect,
33931    # since paths with space are more likely in Windows. Give it another try with the whole
33932    # argument.
33933    path="$complete"
33934    arguments="EOL"
33935    new_path=`$CYGPATH -u "$path"`
33936    new_path=`$WHICH "$new_path" 2> /dev/null`
33937    # bat and cmd files are not always considered executable in cygwin causing which
33938    # to not find them
33939    if test "x$new_path" = x \
33940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33942      new_path=`$CYGPATH -u "$path"`
33943    fi
33944    if test "x$new_path" = x; then
33945      # It's still not found. Now this is an unrecoverable error.
33946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33947$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33948      has_space=`$ECHO "$complete" | $GREP " "`
33949      if test "x$has_space" != x; then
33950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33952      fi
33953      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33954    fi
33955  fi
33956
33957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33960  # "foo.exe" is OK but "foo" is an error.
33961  #
33962  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33963  # It is also a way to make sure we got the proper file name for the real test later on.
33964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33965  if test "x$test_shortpath" = x; then
33966    # Short path failed, file does not exist as specified.
33967    # Try adding .exe or .cmd
33968    if test -f "${new_path}.exe"; then
33969      input_to_shortpath="${new_path}.exe"
33970    elif test -f "${new_path}.cmd"; then
33971      input_to_shortpath="${new_path}.cmd"
33972    else
33973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
33974$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
33975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33977      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33978    fi
33979  else
33980    input_to_shortpath="$new_path"
33981  fi
33982
33983  # Call helper function which possibly converts this using DOS-style short mode.
33984  # If so, the updated path is stored in $new_path.
33985  new_path="$input_to_shortpath"
33986
33987  input_path="$input_to_shortpath"
33988  # Check if we need to convert this using DOS-style short mode. If the path
33989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33990  # take no chances and rewrite it.
33991  # Note: m4 eats our [], so we need to use [ and ] instead.
33992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33993  if test "x$has_forbidden_chars" != x; then
33994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33998      # Going to short mode and back again did indeed matter. Since short mode is
33999      # case insensitive, let's make it lowercase to improve readability.
34000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34001      # Now convert it back to Unix-style (cygpath)
34002      input_path=`$CYGPATH -u "$shortmode_path"`
34003      new_path="$input_path"
34004    fi
34005  fi
34006
34007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34008  if test "x$test_cygdrive_prefix" = x; then
34009    # As a simple fix, exclude /usr/bin since it's not a real path.
34010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34012      # a path prefixed by /cygdrive for fixpath to work.
34013      new_path="$CYGWIN_ROOT_PATH$input_path"
34014    fi
34015  fi
34016
34017  # remove trailing .exe if any
34018  new_path="${new_path/%.exe/}"
34019
34020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34021
34022  # First separate the path from the arguments. This will split at the first
34023  # space.
34024  complete="$CPP"
34025  path="${complete%% *}"
34026  tmp="$complete EOL"
34027  arguments="${tmp#* }"
34028
34029  # Input might be given as Windows format, start by converting to
34030  # unix format.
34031  new_path="$path"
34032
34033  windows_path="$new_path"
34034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34035    unix_path=`$CYGPATH -u "$windows_path"`
34036    new_path="$unix_path"
34037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34039    new_path="$unix_path"
34040  fi
34041
34042
34043  # Now try to locate executable using which
34044  new_path=`$WHICH "$new_path" 2> /dev/null`
34045
34046  if test "x$new_path" = x; then
34047    # Oops. Which didn't find the executable.
34048    # The splitting of arguments from the executable at a space might have been incorrect,
34049    # since paths with space are more likely in Windows. Give it another try with the whole
34050    # argument.
34051    path="$complete"
34052    arguments="EOL"
34053    new_path="$path"
34054
34055  windows_path="$new_path"
34056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34057    unix_path=`$CYGPATH -u "$windows_path"`
34058    new_path="$unix_path"
34059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34061    new_path="$unix_path"
34062  fi
34063
34064
34065    new_path=`$WHICH "$new_path" 2> /dev/null`
34066    # bat and cmd files are not always considered executable in MSYS causing which
34067    # to not find them
34068    if test "x$new_path" = x \
34069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34071      new_path="$path"
34072
34073  windows_path="$new_path"
34074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34075    unix_path=`$CYGPATH -u "$windows_path"`
34076    new_path="$unix_path"
34077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34079    new_path="$unix_path"
34080  fi
34081
34082    fi
34083
34084    if test "x$new_path" = x; then
34085      # It's still not found. Now this is an unrecoverable error.
34086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34087$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34088      has_space=`$ECHO "$complete" | $GREP " "`
34089      if test "x$has_space" != x; then
34090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34092      fi
34093      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34094    fi
34095  fi
34096
34097  # Now new_path has a complete unix path to the binary
34098  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34099    # Keep paths in /bin as-is, but remove trailing .exe if any
34100    new_path="${new_path/%.exe/}"
34101    # Do not save /bin paths to all_fixpath_prefixes!
34102  else
34103    # Not in mixed or Windows style, start by that.
34104    new_path=`cmd //c echo $new_path`
34105
34106  input_path="$new_path"
34107  # Check if we need to convert this using DOS-style short mode. If the path
34108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34109  # take no chances and rewrite it.
34110  # Note: m4 eats our [], so we need to use [ and ] instead.
34111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34112  if test "x$has_forbidden_chars" != x; then
34113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34115  fi
34116
34117    # Output is in $new_path
34118
34119  windows_path="$new_path"
34120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34121    unix_path=`$CYGPATH -u "$windows_path"`
34122    new_path="$unix_path"
34123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34125    new_path="$unix_path"
34126  fi
34127
34128    # remove trailing .exe if any
34129    new_path="${new_path/%.exe/}"
34130
34131    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34132    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34133  fi
34134
34135    else
34136      # We're on a unix platform. Hooray! :)
34137      # First separate the path from the arguments. This will split at the first
34138      # space.
34139      complete="$CPP"
34140      path="${complete%% *}"
34141      tmp="$complete EOL"
34142      arguments="${tmp#* }"
34143
34144      # Cannot rely on the command "which" here since it doesn't always work.
34145      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34146      if test -z "$is_absolute_path"; then
34147        # Path to executable is not absolute. Find it.
34148        IFS_save="$IFS"
34149        IFS=:
34150        for p in $PATH; do
34151          if test -f "$p/$path" && test -x "$p/$path"; then
34152            new_path="$p/$path"
34153            break
34154          fi
34155        done
34156        IFS="$IFS_save"
34157      else
34158        # This is an absolute path, we can use it without further modifications.
34159        new_path="$path"
34160      fi
34161
34162      if test "x$new_path" = x; then
34163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34164$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34165        has_space=`$ECHO "$complete" | $GREP " "`
34166        if test "x$has_space" != x; then
34167          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34169        fi
34170        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34171      fi
34172    fi
34173
34174    # Now join together the path and the arguments once again
34175    if test "x$arguments" != xEOL; then
34176      new_complete="$new_path ${arguments% *}"
34177    else
34178      new_complete="$new_path"
34179    fi
34180
34181    if test "x$complete" != "x$new_complete"; then
34182      CPP="$new_complete"
34183      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34184$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34185    fi
34186  fi
34187
34188  ac_ext=cpp
34189ac_cpp='$CXXCPP $CPPFLAGS'
34190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34194$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34195if test -z "$CXXCPP"; then
34196  if ${ac_cv_prog_CXXCPP+:} false; then :
34197  $as_echo_n "(cached) " >&6
34198else
34199      # Double quotes because CXXCPP needs to be expanded
34200    for CXXCPP in "$CXX -E" "/lib/cpp"
34201    do
34202      ac_preproc_ok=false
34203for ac_cxx_preproc_warn_flag in '' yes
34204do
34205  # Use a header file that comes with gcc, so configuring glibc
34206  # with a fresh cross-compiler works.
34207  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34208  # <limits.h> exists even on freestanding compilers.
34209  # On the NeXT, cc -E runs the code through the compiler's parser,
34210  # not just through cpp. "Syntax error" is here to catch this case.
34211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34212/* end confdefs.h.  */
34213#ifdef __STDC__
34214# include <limits.h>
34215#else
34216# include <assert.h>
34217#endif
34218		     Syntax error
34219_ACEOF
34220if ac_fn_cxx_try_cpp "$LINENO"; then :
34221
34222else
34223  # Broken: fails on valid input.
34224continue
34225fi
34226rm -f conftest.err conftest.i conftest.$ac_ext
34227
34228  # OK, works on sane cases.  Now check whether nonexistent headers
34229  # can be detected and how.
34230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34231/* end confdefs.h.  */
34232#include <ac_nonexistent.h>
34233_ACEOF
34234if ac_fn_cxx_try_cpp "$LINENO"; then :
34235  # Broken: success on invalid input.
34236continue
34237else
34238  # Passes both tests.
34239ac_preproc_ok=:
34240break
34241fi
34242rm -f conftest.err conftest.i conftest.$ac_ext
34243
34244done
34245# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34246rm -f conftest.i conftest.err conftest.$ac_ext
34247if $ac_preproc_ok; then :
34248  break
34249fi
34250
34251    done
34252    ac_cv_prog_CXXCPP=$CXXCPP
34253
34254fi
34255  CXXCPP=$ac_cv_prog_CXXCPP
34256else
34257  ac_cv_prog_CXXCPP=$CXXCPP
34258fi
34259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34260$as_echo "$CXXCPP" >&6; }
34261ac_preproc_ok=false
34262for ac_cxx_preproc_warn_flag in '' yes
34263do
34264  # Use a header file that comes with gcc, so configuring glibc
34265  # with a fresh cross-compiler works.
34266  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34267  # <limits.h> exists even on freestanding compilers.
34268  # On the NeXT, cc -E runs the code through the compiler's parser,
34269  # not just through cpp. "Syntax error" is here to catch this case.
34270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34271/* end confdefs.h.  */
34272#ifdef __STDC__
34273# include <limits.h>
34274#else
34275# include <assert.h>
34276#endif
34277		     Syntax error
34278_ACEOF
34279if ac_fn_cxx_try_cpp "$LINENO"; then :
34280
34281else
34282  # Broken: fails on valid input.
34283continue
34284fi
34285rm -f conftest.err conftest.i conftest.$ac_ext
34286
34287  # OK, works on sane cases.  Now check whether nonexistent headers
34288  # can be detected and how.
34289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34290/* end confdefs.h.  */
34291#include <ac_nonexistent.h>
34292_ACEOF
34293if ac_fn_cxx_try_cpp "$LINENO"; then :
34294  # Broken: success on invalid input.
34295continue
34296else
34297  # Passes both tests.
34298ac_preproc_ok=:
34299break
34300fi
34301rm -f conftest.err conftest.i conftest.$ac_ext
34302
34303done
34304# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34305rm -f conftest.i conftest.err conftest.$ac_ext
34306if $ac_preproc_ok; then :
34307
34308else
34309  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34311as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34312See \`config.log' for more details" "$LINENO" 5; }
34313fi
34314
34315ac_ext=cpp
34316ac_cpp='$CXXCPP $CPPFLAGS'
34317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34320
34321
34322  # Only process if variable expands to non-empty
34323
34324  if test "x$CXXCPP" != x; then
34325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34326
34327  # First separate the path from the arguments. This will split at the first
34328  # space.
34329  complete="$CXXCPP"
34330  path="${complete%% *}"
34331  tmp="$complete EOL"
34332  arguments="${tmp#* }"
34333
34334  # Input might be given as Windows format, start by converting to
34335  # unix format.
34336  new_path=`$CYGPATH -u "$path"`
34337
34338  # Now try to locate executable using which
34339  new_path=`$WHICH "$new_path" 2> /dev/null`
34340  # bat and cmd files are not always considered executable in cygwin causing which
34341  # to not find them
34342  if test "x$new_path" = x \
34343      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34344      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34345    new_path=`$CYGPATH -u "$path"`
34346  fi
34347  if test "x$new_path" = x; then
34348    # Oops. Which didn't find the executable.
34349    # The splitting of arguments from the executable at a space might have been incorrect,
34350    # since paths with space are more likely in Windows. Give it another try with the whole
34351    # argument.
34352    path="$complete"
34353    arguments="EOL"
34354    new_path=`$CYGPATH -u "$path"`
34355    new_path=`$WHICH "$new_path" 2> /dev/null`
34356    # bat and cmd files are not always considered executable in cygwin causing which
34357    # to not find them
34358    if test "x$new_path" = x \
34359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34361      new_path=`$CYGPATH -u "$path"`
34362    fi
34363    if test "x$new_path" = x; then
34364      # It's still not found. Now this is an unrecoverable error.
34365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34366$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34367      has_space=`$ECHO "$complete" | $GREP " "`
34368      if test "x$has_space" != x; then
34369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34371      fi
34372      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34373    fi
34374  fi
34375
34376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34379  # "foo.exe" is OK but "foo" is an error.
34380  #
34381  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34382  # It is also a way to make sure we got the proper file name for the real test later on.
34383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34384  if test "x$test_shortpath" = x; then
34385    # Short path failed, file does not exist as specified.
34386    # Try adding .exe or .cmd
34387    if test -f "${new_path}.exe"; then
34388      input_to_shortpath="${new_path}.exe"
34389    elif test -f "${new_path}.cmd"; then
34390      input_to_shortpath="${new_path}.cmd"
34391    else
34392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34393$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34394      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34395$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34396      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34397    fi
34398  else
34399    input_to_shortpath="$new_path"
34400  fi
34401
34402  # Call helper function which possibly converts this using DOS-style short mode.
34403  # If so, the updated path is stored in $new_path.
34404  new_path="$input_to_shortpath"
34405
34406  input_path="$input_to_shortpath"
34407  # Check if we need to convert this using DOS-style short mode. If the path
34408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34409  # take no chances and rewrite it.
34410  # Note: m4 eats our [], so we need to use [ and ] instead.
34411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34412  if test "x$has_forbidden_chars" != x; then
34413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34417      # Going to short mode and back again did indeed matter. Since short mode is
34418      # case insensitive, let's make it lowercase to improve readability.
34419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34420      # Now convert it back to Unix-style (cygpath)
34421      input_path=`$CYGPATH -u "$shortmode_path"`
34422      new_path="$input_path"
34423    fi
34424  fi
34425
34426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34427  if test "x$test_cygdrive_prefix" = x; then
34428    # As a simple fix, exclude /usr/bin since it's not a real path.
34429    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34431      # a path prefixed by /cygdrive for fixpath to work.
34432      new_path="$CYGWIN_ROOT_PATH$input_path"
34433    fi
34434  fi
34435
34436  # remove trailing .exe if any
34437  new_path="${new_path/%.exe/}"
34438
34439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34440
34441  # First separate the path from the arguments. This will split at the first
34442  # space.
34443  complete="$CXXCPP"
34444  path="${complete%% *}"
34445  tmp="$complete EOL"
34446  arguments="${tmp#* }"
34447
34448  # Input might be given as Windows format, start by converting to
34449  # unix format.
34450  new_path="$path"
34451
34452  windows_path="$new_path"
34453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34454    unix_path=`$CYGPATH -u "$windows_path"`
34455    new_path="$unix_path"
34456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34458    new_path="$unix_path"
34459  fi
34460
34461
34462  # Now try to locate executable using which
34463  new_path=`$WHICH "$new_path" 2> /dev/null`
34464
34465  if test "x$new_path" = x; then
34466    # Oops. Which didn't find the executable.
34467    # The splitting of arguments from the executable at a space might have been incorrect,
34468    # since paths with space are more likely in Windows. Give it another try with the whole
34469    # argument.
34470    path="$complete"
34471    arguments="EOL"
34472    new_path="$path"
34473
34474  windows_path="$new_path"
34475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34476    unix_path=`$CYGPATH -u "$windows_path"`
34477    new_path="$unix_path"
34478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34480    new_path="$unix_path"
34481  fi
34482
34483
34484    new_path=`$WHICH "$new_path" 2> /dev/null`
34485    # bat and cmd files are not always considered executable in MSYS causing which
34486    # to not find them
34487    if test "x$new_path" = x \
34488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34490      new_path="$path"
34491
34492  windows_path="$new_path"
34493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34494    unix_path=`$CYGPATH -u "$windows_path"`
34495    new_path="$unix_path"
34496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34498    new_path="$unix_path"
34499  fi
34500
34501    fi
34502
34503    if test "x$new_path" = x; then
34504      # It's still not found. Now this is an unrecoverable error.
34505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34506$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34507      has_space=`$ECHO "$complete" | $GREP " "`
34508      if test "x$has_space" != x; then
34509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34511      fi
34512      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34513    fi
34514  fi
34515
34516  # Now new_path has a complete unix path to the binary
34517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34518    # Keep paths in /bin as-is, but remove trailing .exe if any
34519    new_path="${new_path/%.exe/}"
34520    # Do not save /bin paths to all_fixpath_prefixes!
34521  else
34522    # Not in mixed or Windows style, start by that.
34523    new_path=`cmd //c echo $new_path`
34524
34525  input_path="$new_path"
34526  # Check if we need to convert this using DOS-style short mode. If the path
34527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34528  # take no chances and rewrite it.
34529  # Note: m4 eats our [], so we need to use [ and ] instead.
34530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34531  if test "x$has_forbidden_chars" != x; then
34532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34534  fi
34535
34536    # Output is in $new_path
34537
34538  windows_path="$new_path"
34539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34540    unix_path=`$CYGPATH -u "$windows_path"`
34541    new_path="$unix_path"
34542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34544    new_path="$unix_path"
34545  fi
34546
34547    # remove trailing .exe if any
34548    new_path="${new_path/%.exe/}"
34549
34550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34552  fi
34553
34554    else
34555      # We're on a unix platform. Hooray! :)
34556      # First separate the path from the arguments. This will split at the first
34557      # space.
34558      complete="$CXXCPP"
34559      path="${complete%% *}"
34560      tmp="$complete EOL"
34561      arguments="${tmp#* }"
34562
34563      # Cannot rely on the command "which" here since it doesn't always work.
34564      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34565      if test -z "$is_absolute_path"; then
34566        # Path to executable is not absolute. Find it.
34567        IFS_save="$IFS"
34568        IFS=:
34569        for p in $PATH; do
34570          if test -f "$p/$path" && test -x "$p/$path"; then
34571            new_path="$p/$path"
34572            break
34573          fi
34574        done
34575        IFS="$IFS_save"
34576      else
34577        # This is an absolute path, we can use it without further modifications.
34578        new_path="$path"
34579      fi
34580
34581      if test "x$new_path" = x; then
34582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34583$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34584        has_space=`$ECHO "$complete" | $GREP " "`
34585        if test "x$has_space" != x; then
34586          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34588        fi
34589        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34590      fi
34591    fi
34592
34593    # Now join together the path and the arguments once again
34594    if test "x$arguments" != xEOL; then
34595      new_complete="$new_path ${arguments% *}"
34596    else
34597      new_complete="$new_path"
34598    fi
34599
34600    if test "x$complete" != "x$new_complete"; then
34601      CXXCPP="$new_complete"
34602      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34603$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34604    fi
34605  fi
34606
34607
34608  #
34609  # Setup the linker (LD)
34610  #
34611  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34612    # In the Microsoft toolchain we have a separate LD command "link".
34613    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34614    # a cygwin program for something completely different.
34615    # Extract the first word of "link", so it can be a program name with args.
34616set dummy link; ac_word=$2
34617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34618$as_echo_n "checking for $ac_word... " >&6; }
34619if ${ac_cv_prog_LD+:} false; then :
34620  $as_echo_n "(cached) " >&6
34621else
34622  if test -n "$LD"; then
34623  ac_cv_prog_LD="$LD" # Let the user override the test.
34624else
34625  ac_prog_rejected=no
34626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34627for as_dir in $PATH
34628do
34629  IFS=$as_save_IFS
34630  test -z "$as_dir" && as_dir=.
34631    for ac_exec_ext in '' $ac_executable_extensions; do
34632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34633    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34634       ac_prog_rejected=yes
34635       continue
34636     fi
34637    ac_cv_prog_LD="link"
34638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34639    break 2
34640  fi
34641done
34642  done
34643IFS=$as_save_IFS
34644
34645if test $ac_prog_rejected = yes; then
34646  # We found a bogon in the path, so make sure we never use it.
34647  set dummy $ac_cv_prog_LD
34648  shift
34649  if test $# != 0; then
34650    # We chose a different compiler from the bogus one.
34651    # However, it has the same basename, so the bogon will be chosen
34652    # first if we set LD to just the basename; use the full file name.
34653    shift
34654    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34655  fi
34656fi
34657fi
34658fi
34659LD=$ac_cv_prog_LD
34660if test -n "$LD"; then
34661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34662$as_echo "$LD" >&6; }
34663else
34664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34665$as_echo "no" >&6; }
34666fi
34667
34668
34669
34670  # Only process if variable expands to non-empty
34671
34672  if test "x$LD" != x; then
34673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34674
34675  # First separate the path from the arguments. This will split at the first
34676  # space.
34677  complete="$LD"
34678  path="${complete%% *}"
34679  tmp="$complete EOL"
34680  arguments="${tmp#* }"
34681
34682  # Input might be given as Windows format, start by converting to
34683  # unix format.
34684  new_path=`$CYGPATH -u "$path"`
34685
34686  # Now try to locate executable using which
34687  new_path=`$WHICH "$new_path" 2> /dev/null`
34688  # bat and cmd files are not always considered executable in cygwin causing which
34689  # to not find them
34690  if test "x$new_path" = x \
34691      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34692      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34693    new_path=`$CYGPATH -u "$path"`
34694  fi
34695  if test "x$new_path" = x; then
34696    # Oops. Which didn't find the executable.
34697    # The splitting of arguments from the executable at a space might have been incorrect,
34698    # since paths with space are more likely in Windows. Give it another try with the whole
34699    # argument.
34700    path="$complete"
34701    arguments="EOL"
34702    new_path=`$CYGPATH -u "$path"`
34703    new_path=`$WHICH "$new_path" 2> /dev/null`
34704    # bat and cmd files are not always considered executable in cygwin causing which
34705    # to not find them
34706    if test "x$new_path" = x \
34707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34709      new_path=`$CYGPATH -u "$path"`
34710    fi
34711    if test "x$new_path" = x; then
34712      # It's still not found. Now this is an unrecoverable error.
34713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34714$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34715      has_space=`$ECHO "$complete" | $GREP " "`
34716      if test "x$has_space" != x; then
34717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34719      fi
34720      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34721    fi
34722  fi
34723
34724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34727  # "foo.exe" is OK but "foo" is an error.
34728  #
34729  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34730  # It is also a way to make sure we got the proper file name for the real test later on.
34731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34732  if test "x$test_shortpath" = x; then
34733    # Short path failed, file does not exist as specified.
34734    # Try adding .exe or .cmd
34735    if test -f "${new_path}.exe"; then
34736      input_to_shortpath="${new_path}.exe"
34737    elif test -f "${new_path}.cmd"; then
34738      input_to_shortpath="${new_path}.cmd"
34739    else
34740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34741$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34744      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34745    fi
34746  else
34747    input_to_shortpath="$new_path"
34748  fi
34749
34750  # Call helper function which possibly converts this using DOS-style short mode.
34751  # If so, the updated path is stored in $new_path.
34752  new_path="$input_to_shortpath"
34753
34754  input_path="$input_to_shortpath"
34755  # Check if we need to convert this using DOS-style short mode. If the path
34756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34757  # take no chances and rewrite it.
34758  # Note: m4 eats our [], so we need to use [ and ] instead.
34759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34760  if test "x$has_forbidden_chars" != x; then
34761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34765      # Going to short mode and back again did indeed matter. Since short mode is
34766      # case insensitive, let's make it lowercase to improve readability.
34767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34768      # Now convert it back to Unix-style (cygpath)
34769      input_path=`$CYGPATH -u "$shortmode_path"`
34770      new_path="$input_path"
34771    fi
34772  fi
34773
34774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34775  if test "x$test_cygdrive_prefix" = x; then
34776    # As a simple fix, exclude /usr/bin since it's not a real path.
34777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34779      # a path prefixed by /cygdrive for fixpath to work.
34780      new_path="$CYGWIN_ROOT_PATH$input_path"
34781    fi
34782  fi
34783
34784  # remove trailing .exe if any
34785  new_path="${new_path/%.exe/}"
34786
34787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34788
34789  # First separate the path from the arguments. This will split at the first
34790  # space.
34791  complete="$LD"
34792  path="${complete%% *}"
34793  tmp="$complete EOL"
34794  arguments="${tmp#* }"
34795
34796  # Input might be given as Windows format, start by converting to
34797  # unix format.
34798  new_path="$path"
34799
34800  windows_path="$new_path"
34801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34802    unix_path=`$CYGPATH -u "$windows_path"`
34803    new_path="$unix_path"
34804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34806    new_path="$unix_path"
34807  fi
34808
34809
34810  # Now try to locate executable using which
34811  new_path=`$WHICH "$new_path" 2> /dev/null`
34812
34813  if test "x$new_path" = x; then
34814    # Oops. Which didn't find the executable.
34815    # The splitting of arguments from the executable at a space might have been incorrect,
34816    # since paths with space are more likely in Windows. Give it another try with the whole
34817    # argument.
34818    path="$complete"
34819    arguments="EOL"
34820    new_path="$path"
34821
34822  windows_path="$new_path"
34823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34824    unix_path=`$CYGPATH -u "$windows_path"`
34825    new_path="$unix_path"
34826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34828    new_path="$unix_path"
34829  fi
34830
34831
34832    new_path=`$WHICH "$new_path" 2> /dev/null`
34833    # bat and cmd files are not always considered executable in MSYS causing which
34834    # to not find them
34835    if test "x$new_path" = x \
34836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34838      new_path="$path"
34839
34840  windows_path="$new_path"
34841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34842    unix_path=`$CYGPATH -u "$windows_path"`
34843    new_path="$unix_path"
34844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34846    new_path="$unix_path"
34847  fi
34848
34849    fi
34850
34851    if test "x$new_path" = x; then
34852      # It's still not found. Now this is an unrecoverable error.
34853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34854$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34855      has_space=`$ECHO "$complete" | $GREP " "`
34856      if test "x$has_space" != x; then
34857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34859      fi
34860      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34861    fi
34862  fi
34863
34864  # Now new_path has a complete unix path to the binary
34865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34866    # Keep paths in /bin as-is, but remove trailing .exe if any
34867    new_path="${new_path/%.exe/}"
34868    # Do not save /bin paths to all_fixpath_prefixes!
34869  else
34870    # Not in mixed or Windows style, start by that.
34871    new_path=`cmd //c echo $new_path`
34872
34873  input_path="$new_path"
34874  # Check if we need to convert this using DOS-style short mode. If the path
34875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34876  # take no chances and rewrite it.
34877  # Note: m4 eats our [], so we need to use [ and ] instead.
34878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34879  if test "x$has_forbidden_chars" != x; then
34880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34882  fi
34883
34884    # Output is in $new_path
34885
34886  windows_path="$new_path"
34887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34888    unix_path=`$CYGPATH -u "$windows_path"`
34889    new_path="$unix_path"
34890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34892    new_path="$unix_path"
34893  fi
34894
34895    # remove trailing .exe if any
34896    new_path="${new_path/%.exe/}"
34897
34898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34900  fi
34901
34902    else
34903      # We're on a unix platform. Hooray! :)
34904      # First separate the path from the arguments. This will split at the first
34905      # space.
34906      complete="$LD"
34907      path="${complete%% *}"
34908      tmp="$complete EOL"
34909      arguments="${tmp#* }"
34910
34911      # Cannot rely on the command "which" here since it doesn't always work.
34912      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34913      if test -z "$is_absolute_path"; then
34914        # Path to executable is not absolute. Find it.
34915        IFS_save="$IFS"
34916        IFS=:
34917        for p in $PATH; do
34918          if test -f "$p/$path" && test -x "$p/$path"; then
34919            new_path="$p/$path"
34920            break
34921          fi
34922        done
34923        IFS="$IFS_save"
34924      else
34925        # This is an absolute path, we can use it without further modifications.
34926        new_path="$path"
34927      fi
34928
34929      if test "x$new_path" = x; then
34930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34931$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34932        has_space=`$ECHO "$complete" | $GREP " "`
34933        if test "x$has_space" != x; then
34934          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34935$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34936        fi
34937        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34938      fi
34939    fi
34940
34941    # Now join together the path and the arguments once again
34942    if test "x$arguments" != xEOL; then
34943      new_complete="$new_path ${arguments% *}"
34944    else
34945      new_complete="$new_path"
34946    fi
34947
34948    if test "x$complete" != "x$new_complete"; then
34949      LD="$new_complete"
34950      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
34951$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
34952    fi
34953  fi
34954
34955    # Verify that we indeed succeeded with this trick.
34956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
34957$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
34958    "$LD" --version > /dev/null
34959    if test $? -eq 0 ; then
34960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34961$as_echo "no" >&6; }
34962      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
34963    else
34964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34965$as_echo "yes" >&6; }
34966    fi
34967    LDCXX="$LD"
34968  else
34969    # All other toolchains use the compiler to link.
34970    LD="$CC"
34971    LDCXX="$CXX"
34972  fi
34973
34974  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
34975
34976
34977  #
34978  # Setup the assembler (AS)
34979  #
34980  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34981    # FIXME: should this really be solaris, or solstudio?
34982
34983
34984  # Publish this variable in the help.
34985
34986
34987  if [ -z "${AS+x}" ]; then
34988    # The variable is not set by user, try to locate tool using the code snippet
34989    for ac_prog in as
34990do
34991  # Extract the first word of "$ac_prog", so it can be a program name with args.
34992set dummy $ac_prog; ac_word=$2
34993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34994$as_echo_n "checking for $ac_word... " >&6; }
34995if ${ac_cv_path_AS+:} false; then :
34996  $as_echo_n "(cached) " >&6
34997else
34998  case $AS in
34999  [\\/]* | ?:[\\/]*)
35000  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35001  ;;
35002  *)
35003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35004for as_dir in $PATH
35005do
35006  IFS=$as_save_IFS
35007  test -z "$as_dir" && as_dir=.
35008    for ac_exec_ext in '' $ac_executable_extensions; do
35009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35010    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35012    break 2
35013  fi
35014done
35015  done
35016IFS=$as_save_IFS
35017
35018  ;;
35019esac
35020fi
35021AS=$ac_cv_path_AS
35022if test -n "$AS"; then
35023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35024$as_echo "$AS" >&6; }
35025else
35026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35027$as_echo "no" >&6; }
35028fi
35029
35030
35031  test -n "$AS" && break
35032done
35033
35034  else
35035    # The variable is set, but is it from the command line or the environment?
35036
35037    # Try to remove the string !AS! from our list.
35038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35040      # If it failed, the variable was not from the command line. Ignore it,
35041      # but warn the user (except for BASH, which is always set by the calling BASH).
35042      if test "xAS" != xBASH; then
35043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35044$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35045      fi
35046      # Try to locate tool using the code snippet
35047      for ac_prog in as
35048do
35049  # Extract the first word of "$ac_prog", so it can be a program name with args.
35050set dummy $ac_prog; ac_word=$2
35051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35052$as_echo_n "checking for $ac_word... " >&6; }
35053if ${ac_cv_path_AS+:} false; then :
35054  $as_echo_n "(cached) " >&6
35055else
35056  case $AS in
35057  [\\/]* | ?:[\\/]*)
35058  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35059  ;;
35060  *)
35061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35062for as_dir in $PATH
35063do
35064  IFS=$as_save_IFS
35065  test -z "$as_dir" && as_dir=.
35066    for ac_exec_ext in '' $ac_executable_extensions; do
35067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35068    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35070    break 2
35071  fi
35072done
35073  done
35074IFS=$as_save_IFS
35075
35076  ;;
35077esac
35078fi
35079AS=$ac_cv_path_AS
35080if test -n "$AS"; then
35081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35082$as_echo "$AS" >&6; }
35083else
35084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35085$as_echo "no" >&6; }
35086fi
35087
35088
35089  test -n "$AS" && break
35090done
35091
35092    else
35093      # If it succeeded, then it was overridden by the user. We will use it
35094      # for the tool.
35095
35096      # First remove it from the list of overridden variables, so we can test
35097      # for unknown variables in the end.
35098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35099
35100      # Check if we try to supply an empty value
35101      if test "x$AS" = x; then
35102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35103$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35105$as_echo_n "checking for AS... " >&6; }
35106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35107$as_echo "disabled" >&6; }
35108      else
35109        # Check if the provided tool contains a complete path.
35110        tool_specified="$AS"
35111        tool_basename="${tool_specified##*/}"
35112        if test "x$tool_basename" = "x$tool_specified"; then
35113          # A command without a complete path is provided, search $PATH.
35114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35115$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35116          # Extract the first word of "$tool_basename", so it can be a program name with args.
35117set dummy $tool_basename; ac_word=$2
35118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35119$as_echo_n "checking for $ac_word... " >&6; }
35120if ${ac_cv_path_AS+:} false; then :
35121  $as_echo_n "(cached) " >&6
35122else
35123  case $AS in
35124  [\\/]* | ?:[\\/]*)
35125  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35126  ;;
35127  *)
35128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35129for as_dir in $PATH
35130do
35131  IFS=$as_save_IFS
35132  test -z "$as_dir" && as_dir=.
35133    for ac_exec_ext in '' $ac_executable_extensions; do
35134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35135    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35137    break 2
35138  fi
35139done
35140  done
35141IFS=$as_save_IFS
35142
35143  ;;
35144esac
35145fi
35146AS=$ac_cv_path_AS
35147if test -n "$AS"; then
35148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35149$as_echo "$AS" >&6; }
35150else
35151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35152$as_echo "no" >&6; }
35153fi
35154
35155
35156          if test "x$AS" = x; then
35157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35158          fi
35159        else
35160          # Otherwise we believe it is a complete path. Use it as it is.
35161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35162$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35164$as_echo_n "checking for AS... " >&6; }
35165          if test ! -x "$tool_specified"; then
35166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35167$as_echo "not found" >&6; }
35168            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35169          fi
35170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35171$as_echo "$tool_specified" >&6; }
35172        fi
35173      fi
35174    fi
35175
35176  fi
35177
35178
35179
35180  # Only process if variable expands to non-empty
35181
35182  if test "x$AS" != x; then
35183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35184
35185  # First separate the path from the arguments. This will split at the first
35186  # space.
35187  complete="$AS"
35188  path="${complete%% *}"
35189  tmp="$complete EOL"
35190  arguments="${tmp#* }"
35191
35192  # Input might be given as Windows format, start by converting to
35193  # unix format.
35194  new_path=`$CYGPATH -u "$path"`
35195
35196  # Now try to locate executable using which
35197  new_path=`$WHICH "$new_path" 2> /dev/null`
35198  # bat and cmd files are not always considered executable in cygwin causing which
35199  # to not find them
35200  if test "x$new_path" = x \
35201      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35202      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35203    new_path=`$CYGPATH -u "$path"`
35204  fi
35205  if test "x$new_path" = x; then
35206    # Oops. Which didn't find the executable.
35207    # The splitting of arguments from the executable at a space might have been incorrect,
35208    # since paths with space are more likely in Windows. Give it another try with the whole
35209    # argument.
35210    path="$complete"
35211    arguments="EOL"
35212    new_path=`$CYGPATH -u "$path"`
35213    new_path=`$WHICH "$new_path" 2> /dev/null`
35214    # bat and cmd files are not always considered executable in cygwin causing which
35215    # to not find them
35216    if test "x$new_path" = x \
35217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35219      new_path=`$CYGPATH -u "$path"`
35220    fi
35221    if test "x$new_path" = x; then
35222      # It's still not found. Now this is an unrecoverable error.
35223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35224$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35225      has_space=`$ECHO "$complete" | $GREP " "`
35226      if test "x$has_space" != x; then
35227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35229      fi
35230      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35231    fi
35232  fi
35233
35234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35237  # "foo.exe" is OK but "foo" is an error.
35238  #
35239  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35240  # It is also a way to make sure we got the proper file name for the real test later on.
35241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35242  if test "x$test_shortpath" = x; then
35243    # Short path failed, file does not exist as specified.
35244    # Try adding .exe or .cmd
35245    if test -f "${new_path}.exe"; then
35246      input_to_shortpath="${new_path}.exe"
35247    elif test -f "${new_path}.cmd"; then
35248      input_to_shortpath="${new_path}.cmd"
35249    else
35250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35251$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35252      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35253$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35254      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35255    fi
35256  else
35257    input_to_shortpath="$new_path"
35258  fi
35259
35260  # Call helper function which possibly converts this using DOS-style short mode.
35261  # If so, the updated path is stored in $new_path.
35262  new_path="$input_to_shortpath"
35263
35264  input_path="$input_to_shortpath"
35265  # Check if we need to convert this using DOS-style short mode. If the path
35266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35267  # take no chances and rewrite it.
35268  # Note: m4 eats our [], so we need to use [ and ] instead.
35269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35270  if test "x$has_forbidden_chars" != x; then
35271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35275      # Going to short mode and back again did indeed matter. Since short mode is
35276      # case insensitive, let's make it lowercase to improve readability.
35277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35278      # Now convert it back to Unix-style (cygpath)
35279      input_path=`$CYGPATH -u "$shortmode_path"`
35280      new_path="$input_path"
35281    fi
35282  fi
35283
35284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35285  if test "x$test_cygdrive_prefix" = x; then
35286    # As a simple fix, exclude /usr/bin since it's not a real path.
35287    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35289      # a path prefixed by /cygdrive for fixpath to work.
35290      new_path="$CYGWIN_ROOT_PATH$input_path"
35291    fi
35292  fi
35293
35294  # remove trailing .exe if any
35295  new_path="${new_path/%.exe/}"
35296
35297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35298
35299  # First separate the path from the arguments. This will split at the first
35300  # space.
35301  complete="$AS"
35302  path="${complete%% *}"
35303  tmp="$complete EOL"
35304  arguments="${tmp#* }"
35305
35306  # Input might be given as Windows format, start by converting to
35307  # unix format.
35308  new_path="$path"
35309
35310  windows_path="$new_path"
35311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35312    unix_path=`$CYGPATH -u "$windows_path"`
35313    new_path="$unix_path"
35314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35316    new_path="$unix_path"
35317  fi
35318
35319
35320  # Now try to locate executable using which
35321  new_path=`$WHICH "$new_path" 2> /dev/null`
35322
35323  if test "x$new_path" = x; then
35324    # Oops. Which didn't find the executable.
35325    # The splitting of arguments from the executable at a space might have been incorrect,
35326    # since paths with space are more likely in Windows. Give it another try with the whole
35327    # argument.
35328    path="$complete"
35329    arguments="EOL"
35330    new_path="$path"
35331
35332  windows_path="$new_path"
35333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35334    unix_path=`$CYGPATH -u "$windows_path"`
35335    new_path="$unix_path"
35336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35338    new_path="$unix_path"
35339  fi
35340
35341
35342    new_path=`$WHICH "$new_path" 2> /dev/null`
35343    # bat and cmd files are not always considered executable in MSYS causing which
35344    # to not find them
35345    if test "x$new_path" = x \
35346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35348      new_path="$path"
35349
35350  windows_path="$new_path"
35351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35352    unix_path=`$CYGPATH -u "$windows_path"`
35353    new_path="$unix_path"
35354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35356    new_path="$unix_path"
35357  fi
35358
35359    fi
35360
35361    if test "x$new_path" = x; then
35362      # It's still not found. Now this is an unrecoverable error.
35363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35364$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35365      has_space=`$ECHO "$complete" | $GREP " "`
35366      if test "x$has_space" != x; then
35367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35369      fi
35370      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35371    fi
35372  fi
35373
35374  # Now new_path has a complete unix path to the binary
35375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35376    # Keep paths in /bin as-is, but remove trailing .exe if any
35377    new_path="${new_path/%.exe/}"
35378    # Do not save /bin paths to all_fixpath_prefixes!
35379  else
35380    # Not in mixed or Windows style, start by that.
35381    new_path=`cmd //c echo $new_path`
35382
35383  input_path="$new_path"
35384  # Check if we need to convert this using DOS-style short mode. If the path
35385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35386  # take no chances and rewrite it.
35387  # Note: m4 eats our [], so we need to use [ and ] instead.
35388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35389  if test "x$has_forbidden_chars" != x; then
35390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35392  fi
35393
35394    # Output is in $new_path
35395
35396  windows_path="$new_path"
35397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35398    unix_path=`$CYGPATH -u "$windows_path"`
35399    new_path="$unix_path"
35400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35402    new_path="$unix_path"
35403  fi
35404
35405    # remove trailing .exe if any
35406    new_path="${new_path/%.exe/}"
35407
35408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35410  fi
35411
35412    else
35413      # We're on a unix platform. Hooray! :)
35414      # First separate the path from the arguments. This will split at the first
35415      # space.
35416      complete="$AS"
35417      path="${complete%% *}"
35418      tmp="$complete EOL"
35419      arguments="${tmp#* }"
35420
35421      # Cannot rely on the command "which" here since it doesn't always work.
35422      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35423      if test -z "$is_absolute_path"; then
35424        # Path to executable is not absolute. Find it.
35425        IFS_save="$IFS"
35426        IFS=:
35427        for p in $PATH; do
35428          if test -f "$p/$path" && test -x "$p/$path"; then
35429            new_path="$p/$path"
35430            break
35431          fi
35432        done
35433        IFS="$IFS_save"
35434      else
35435        # This is an absolute path, we can use it without further modifications.
35436        new_path="$path"
35437      fi
35438
35439      if test "x$new_path" = x; then
35440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35441$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35442        has_space=`$ECHO "$complete" | $GREP " "`
35443        if test "x$has_space" != x; then
35444          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35446        fi
35447        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35448      fi
35449    fi
35450
35451    # Now join together the path and the arguments once again
35452    if test "x$arguments" != xEOL; then
35453      new_complete="$new_path ${arguments% *}"
35454    else
35455      new_complete="$new_path"
35456    fi
35457
35458    if test "x$complete" != "x$new_complete"; then
35459      AS="$new_complete"
35460      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35461$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35462    fi
35463  fi
35464
35465  else
35466    # FIXME: is this correct for microsoft?
35467    AS="$CC -c"
35468  fi
35469
35470
35471  #
35472  # Setup the archiver (AR)
35473  #
35474  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35475    # The corresponding ar tool is lib.exe (used to create static libraries)
35476    # Extract the first word of "lib", so it can be a program name with args.
35477set dummy lib; ac_word=$2
35478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35479$as_echo_n "checking for $ac_word... " >&6; }
35480if ${ac_cv_prog_AR+:} false; then :
35481  $as_echo_n "(cached) " >&6
35482else
35483  if test -n "$AR"; then
35484  ac_cv_prog_AR="$AR" # Let the user override the test.
35485else
35486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35487for as_dir in $PATH
35488do
35489  IFS=$as_save_IFS
35490  test -z "$as_dir" && as_dir=.
35491    for ac_exec_ext in '' $ac_executable_extensions; do
35492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35493    ac_cv_prog_AR="lib"
35494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35495    break 2
35496  fi
35497done
35498  done
35499IFS=$as_save_IFS
35500
35501fi
35502fi
35503AR=$ac_cv_prog_AR
35504if test -n "$AR"; then
35505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35506$as_echo "$AR" >&6; }
35507else
35508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35509$as_echo "no" >&6; }
35510fi
35511
35512
35513  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35514
35515
35516  # Publish this variable in the help.
35517
35518
35519  if [ -z "${AR+x}" ]; then
35520    # The variable is not set by user, try to locate tool using the code snippet
35521    if test -n "$ac_tool_prefix"; then
35522  for ac_prog in ar gcc-ar
35523  do
35524    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35525set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35527$as_echo_n "checking for $ac_word... " >&6; }
35528if ${ac_cv_prog_AR+:} false; then :
35529  $as_echo_n "(cached) " >&6
35530else
35531  if test -n "$AR"; then
35532  ac_cv_prog_AR="$AR" # Let the user override the test.
35533else
35534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35535for as_dir in $PATH
35536do
35537  IFS=$as_save_IFS
35538  test -z "$as_dir" && as_dir=.
35539    for ac_exec_ext in '' $ac_executable_extensions; do
35540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35541    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35543    break 2
35544  fi
35545done
35546  done
35547IFS=$as_save_IFS
35548
35549fi
35550fi
35551AR=$ac_cv_prog_AR
35552if test -n "$AR"; then
35553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35554$as_echo "$AR" >&6; }
35555else
35556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35557$as_echo "no" >&6; }
35558fi
35559
35560
35561    test -n "$AR" && break
35562  done
35563fi
35564if test -z "$AR"; then
35565  ac_ct_AR=$AR
35566  for ac_prog in ar gcc-ar
35567do
35568  # Extract the first word of "$ac_prog", so it can be a program name with args.
35569set dummy $ac_prog; ac_word=$2
35570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35571$as_echo_n "checking for $ac_word... " >&6; }
35572if ${ac_cv_prog_ac_ct_AR+:} false; then :
35573  $as_echo_n "(cached) " >&6
35574else
35575  if test -n "$ac_ct_AR"; then
35576  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35577else
35578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35579for as_dir in $PATH
35580do
35581  IFS=$as_save_IFS
35582  test -z "$as_dir" && as_dir=.
35583    for ac_exec_ext in '' $ac_executable_extensions; do
35584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35585    ac_cv_prog_ac_ct_AR="$ac_prog"
35586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35587    break 2
35588  fi
35589done
35590  done
35591IFS=$as_save_IFS
35592
35593fi
35594fi
35595ac_ct_AR=$ac_cv_prog_ac_ct_AR
35596if test -n "$ac_ct_AR"; then
35597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35598$as_echo "$ac_ct_AR" >&6; }
35599else
35600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35601$as_echo "no" >&6; }
35602fi
35603
35604
35605  test -n "$ac_ct_AR" && break
35606done
35607
35608  if test "x$ac_ct_AR" = x; then
35609    AR=""
35610  else
35611    case $cross_compiling:$ac_tool_warned in
35612yes:)
35613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35615ac_tool_warned=yes ;;
35616esac
35617    AR=$ac_ct_AR
35618  fi
35619fi
35620
35621  else
35622    # The variable is set, but is it from the command line or the environment?
35623
35624    # Try to remove the string !AR! from our list.
35625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35627      # If it failed, the variable was not from the command line. Ignore it,
35628      # but warn the user (except for BASH, which is always set by the calling BASH).
35629      if test "xAR" != xBASH; then
35630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35631$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35632      fi
35633      # Try to locate tool using the code snippet
35634      if test -n "$ac_tool_prefix"; then
35635  for ac_prog in ar gcc-ar
35636  do
35637    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35640$as_echo_n "checking for $ac_word... " >&6; }
35641if ${ac_cv_prog_AR+:} false; then :
35642  $as_echo_n "(cached) " >&6
35643else
35644  if test -n "$AR"; then
35645  ac_cv_prog_AR="$AR" # Let the user override the test.
35646else
35647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35648for as_dir in $PATH
35649do
35650  IFS=$as_save_IFS
35651  test -z "$as_dir" && as_dir=.
35652    for ac_exec_ext in '' $ac_executable_extensions; do
35653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35654    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35656    break 2
35657  fi
35658done
35659  done
35660IFS=$as_save_IFS
35661
35662fi
35663fi
35664AR=$ac_cv_prog_AR
35665if test -n "$AR"; then
35666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35667$as_echo "$AR" >&6; }
35668else
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35670$as_echo "no" >&6; }
35671fi
35672
35673
35674    test -n "$AR" && break
35675  done
35676fi
35677if test -z "$AR"; then
35678  ac_ct_AR=$AR
35679  for ac_prog in ar gcc-ar
35680do
35681  # Extract the first word of "$ac_prog", so it can be a program name with args.
35682set dummy $ac_prog; ac_word=$2
35683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35684$as_echo_n "checking for $ac_word... " >&6; }
35685if ${ac_cv_prog_ac_ct_AR+:} false; then :
35686  $as_echo_n "(cached) " >&6
35687else
35688  if test -n "$ac_ct_AR"; then
35689  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35690else
35691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35692for as_dir in $PATH
35693do
35694  IFS=$as_save_IFS
35695  test -z "$as_dir" && as_dir=.
35696    for ac_exec_ext in '' $ac_executable_extensions; do
35697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35698    ac_cv_prog_ac_ct_AR="$ac_prog"
35699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35700    break 2
35701  fi
35702done
35703  done
35704IFS=$as_save_IFS
35705
35706fi
35707fi
35708ac_ct_AR=$ac_cv_prog_ac_ct_AR
35709if test -n "$ac_ct_AR"; then
35710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35711$as_echo "$ac_ct_AR" >&6; }
35712else
35713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35714$as_echo "no" >&6; }
35715fi
35716
35717
35718  test -n "$ac_ct_AR" && break
35719done
35720
35721  if test "x$ac_ct_AR" = x; then
35722    AR=""
35723  else
35724    case $cross_compiling:$ac_tool_warned in
35725yes:)
35726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35728ac_tool_warned=yes ;;
35729esac
35730    AR=$ac_ct_AR
35731  fi
35732fi
35733
35734    else
35735      # If it succeeded, then it was overridden by the user. We will use it
35736      # for the tool.
35737
35738      # First remove it from the list of overridden variables, so we can test
35739      # for unknown variables in the end.
35740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35741
35742      # Check if we try to supply an empty value
35743      if test "x$AR" = x; then
35744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35745$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35747$as_echo_n "checking for AR... " >&6; }
35748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35749$as_echo "disabled" >&6; }
35750      else
35751        # Check if the provided tool contains a complete path.
35752        tool_specified="$AR"
35753        tool_basename="${tool_specified##*/}"
35754        if test "x$tool_basename" = "x$tool_specified"; then
35755          # A command without a complete path is provided, search $PATH.
35756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35757$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35758          # Extract the first word of "$tool_basename", so it can be a program name with args.
35759set dummy $tool_basename; ac_word=$2
35760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35761$as_echo_n "checking for $ac_word... " >&6; }
35762if ${ac_cv_path_AR+:} false; then :
35763  $as_echo_n "(cached) " >&6
35764else
35765  case $AR in
35766  [\\/]* | ?:[\\/]*)
35767  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35768  ;;
35769  *)
35770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35771for as_dir in $PATH
35772do
35773  IFS=$as_save_IFS
35774  test -z "$as_dir" && as_dir=.
35775    for ac_exec_ext in '' $ac_executable_extensions; do
35776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35777    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35779    break 2
35780  fi
35781done
35782  done
35783IFS=$as_save_IFS
35784
35785  ;;
35786esac
35787fi
35788AR=$ac_cv_path_AR
35789if test -n "$AR"; then
35790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35791$as_echo "$AR" >&6; }
35792else
35793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35794$as_echo "no" >&6; }
35795fi
35796
35797
35798          if test "x$AR" = x; then
35799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35800          fi
35801        else
35802          # Otherwise we believe it is a complete path. Use it as it is.
35803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35804$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35806$as_echo_n "checking for AR... " >&6; }
35807          if test ! -x "$tool_specified"; then
35808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35809$as_echo "not found" >&6; }
35810            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35811          fi
35812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35813$as_echo "$tool_specified" >&6; }
35814        fi
35815      fi
35816    fi
35817
35818  fi
35819
35820
35821  else
35822
35823
35824  # Publish this variable in the help.
35825
35826
35827  if [ -z "${AR+x}" ]; then
35828    # The variable is not set by user, try to locate tool using the code snippet
35829    if test -n "$ac_tool_prefix"; then
35830  for ac_prog in ar
35831  do
35832    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35833set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35835$as_echo_n "checking for $ac_word... " >&6; }
35836if ${ac_cv_prog_AR+:} false; then :
35837  $as_echo_n "(cached) " >&6
35838else
35839  if test -n "$AR"; then
35840  ac_cv_prog_AR="$AR" # Let the user override the test.
35841else
35842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35843for as_dir in $PATH
35844do
35845  IFS=$as_save_IFS
35846  test -z "$as_dir" && as_dir=.
35847    for ac_exec_ext in '' $ac_executable_extensions; do
35848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35849    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35851    break 2
35852  fi
35853done
35854  done
35855IFS=$as_save_IFS
35856
35857fi
35858fi
35859AR=$ac_cv_prog_AR
35860if test -n "$AR"; then
35861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35862$as_echo "$AR" >&6; }
35863else
35864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35865$as_echo "no" >&6; }
35866fi
35867
35868
35869    test -n "$AR" && break
35870  done
35871fi
35872if test -z "$AR"; then
35873  ac_ct_AR=$AR
35874  for ac_prog in ar
35875do
35876  # Extract the first word of "$ac_prog", so it can be a program name with args.
35877set dummy $ac_prog; ac_word=$2
35878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35879$as_echo_n "checking for $ac_word... " >&6; }
35880if ${ac_cv_prog_ac_ct_AR+:} false; then :
35881  $as_echo_n "(cached) " >&6
35882else
35883  if test -n "$ac_ct_AR"; then
35884  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35885else
35886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35887for as_dir in $PATH
35888do
35889  IFS=$as_save_IFS
35890  test -z "$as_dir" && as_dir=.
35891    for ac_exec_ext in '' $ac_executable_extensions; do
35892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35893    ac_cv_prog_ac_ct_AR="$ac_prog"
35894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35895    break 2
35896  fi
35897done
35898  done
35899IFS=$as_save_IFS
35900
35901fi
35902fi
35903ac_ct_AR=$ac_cv_prog_ac_ct_AR
35904if test -n "$ac_ct_AR"; then
35905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35906$as_echo "$ac_ct_AR" >&6; }
35907else
35908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35909$as_echo "no" >&6; }
35910fi
35911
35912
35913  test -n "$ac_ct_AR" && break
35914done
35915
35916  if test "x$ac_ct_AR" = x; then
35917    AR=""
35918  else
35919    case $cross_compiling:$ac_tool_warned in
35920yes:)
35921{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35922$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35923ac_tool_warned=yes ;;
35924esac
35925    AR=$ac_ct_AR
35926  fi
35927fi
35928
35929  else
35930    # The variable is set, but is it from the command line or the environment?
35931
35932    # Try to remove the string !AR! from our list.
35933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35935      # If it failed, the variable was not from the command line. Ignore it,
35936      # but warn the user (except for BASH, which is always set by the calling BASH).
35937      if test "xAR" != xBASH; then
35938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35939$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35940      fi
35941      # Try to locate tool using the code snippet
35942      if test -n "$ac_tool_prefix"; then
35943  for ac_prog in ar
35944  do
35945    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35946set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35948$as_echo_n "checking for $ac_word... " >&6; }
35949if ${ac_cv_prog_AR+:} false; then :
35950  $as_echo_n "(cached) " >&6
35951else
35952  if test -n "$AR"; then
35953  ac_cv_prog_AR="$AR" # Let the user override the test.
35954else
35955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35956for as_dir in $PATH
35957do
35958  IFS=$as_save_IFS
35959  test -z "$as_dir" && as_dir=.
35960    for ac_exec_ext in '' $ac_executable_extensions; do
35961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35962    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35964    break 2
35965  fi
35966done
35967  done
35968IFS=$as_save_IFS
35969
35970fi
35971fi
35972AR=$ac_cv_prog_AR
35973if test -n "$AR"; then
35974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35975$as_echo "$AR" >&6; }
35976else
35977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35978$as_echo "no" >&6; }
35979fi
35980
35981
35982    test -n "$AR" && break
35983  done
35984fi
35985if test -z "$AR"; then
35986  ac_ct_AR=$AR
35987  for ac_prog in ar
35988do
35989  # Extract the first word of "$ac_prog", so it can be a program name with args.
35990set dummy $ac_prog; ac_word=$2
35991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35992$as_echo_n "checking for $ac_word... " >&6; }
35993if ${ac_cv_prog_ac_ct_AR+:} false; then :
35994  $as_echo_n "(cached) " >&6
35995else
35996  if test -n "$ac_ct_AR"; then
35997  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35998else
35999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36000for as_dir in $PATH
36001do
36002  IFS=$as_save_IFS
36003  test -z "$as_dir" && as_dir=.
36004    for ac_exec_ext in '' $ac_executable_extensions; do
36005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36006    ac_cv_prog_ac_ct_AR="$ac_prog"
36007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36008    break 2
36009  fi
36010done
36011  done
36012IFS=$as_save_IFS
36013
36014fi
36015fi
36016ac_ct_AR=$ac_cv_prog_ac_ct_AR
36017if test -n "$ac_ct_AR"; then
36018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36019$as_echo "$ac_ct_AR" >&6; }
36020else
36021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36022$as_echo "no" >&6; }
36023fi
36024
36025
36026  test -n "$ac_ct_AR" && break
36027done
36028
36029  if test "x$ac_ct_AR" = x; then
36030    AR=""
36031  else
36032    case $cross_compiling:$ac_tool_warned in
36033yes:)
36034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36036ac_tool_warned=yes ;;
36037esac
36038    AR=$ac_ct_AR
36039  fi
36040fi
36041
36042    else
36043      # If it succeeded, then it was overridden by the user. We will use it
36044      # for the tool.
36045
36046      # First remove it from the list of overridden variables, so we can test
36047      # for unknown variables in the end.
36048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36049
36050      # Check if we try to supply an empty value
36051      if test "x$AR" = x; then
36052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36053$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36055$as_echo_n "checking for AR... " >&6; }
36056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36057$as_echo "disabled" >&6; }
36058      else
36059        # Check if the provided tool contains a complete path.
36060        tool_specified="$AR"
36061        tool_basename="${tool_specified##*/}"
36062        if test "x$tool_basename" = "x$tool_specified"; then
36063          # A command without a complete path is provided, search $PATH.
36064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36065$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36066          # Extract the first word of "$tool_basename", so it can be a program name with args.
36067set dummy $tool_basename; ac_word=$2
36068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36069$as_echo_n "checking for $ac_word... " >&6; }
36070if ${ac_cv_path_AR+:} false; then :
36071  $as_echo_n "(cached) " >&6
36072else
36073  case $AR in
36074  [\\/]* | ?:[\\/]*)
36075  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36076  ;;
36077  *)
36078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36079for as_dir in $PATH
36080do
36081  IFS=$as_save_IFS
36082  test -z "$as_dir" && as_dir=.
36083    for ac_exec_ext in '' $ac_executable_extensions; do
36084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36085    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36087    break 2
36088  fi
36089done
36090  done
36091IFS=$as_save_IFS
36092
36093  ;;
36094esac
36095fi
36096AR=$ac_cv_path_AR
36097if test -n "$AR"; then
36098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36099$as_echo "$AR" >&6; }
36100else
36101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36102$as_echo "no" >&6; }
36103fi
36104
36105
36106          if test "x$AR" = x; then
36107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36108          fi
36109        else
36110          # Otherwise we believe it is a complete path. Use it as it is.
36111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36112$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36114$as_echo_n "checking for AR... " >&6; }
36115          if test ! -x "$tool_specified"; then
36116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36117$as_echo "not found" >&6; }
36118            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36119          fi
36120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36121$as_echo "$tool_specified" >&6; }
36122        fi
36123      fi
36124    fi
36125
36126  fi
36127
36128
36129  fi
36130
36131  # Only process if variable expands to non-empty
36132
36133  if test "x$AR" != x; then
36134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36135
36136  # First separate the path from the arguments. This will split at the first
36137  # space.
36138  complete="$AR"
36139  path="${complete%% *}"
36140  tmp="$complete EOL"
36141  arguments="${tmp#* }"
36142
36143  # Input might be given as Windows format, start by converting to
36144  # unix format.
36145  new_path=`$CYGPATH -u "$path"`
36146
36147  # Now try to locate executable using which
36148  new_path=`$WHICH "$new_path" 2> /dev/null`
36149  # bat and cmd files are not always considered executable in cygwin causing which
36150  # to not find them
36151  if test "x$new_path" = x \
36152      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36153      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36154    new_path=`$CYGPATH -u "$path"`
36155  fi
36156  if test "x$new_path" = x; then
36157    # Oops. Which didn't find the executable.
36158    # The splitting of arguments from the executable at a space might have been incorrect,
36159    # since paths with space are more likely in Windows. Give it another try with the whole
36160    # argument.
36161    path="$complete"
36162    arguments="EOL"
36163    new_path=`$CYGPATH -u "$path"`
36164    new_path=`$WHICH "$new_path" 2> /dev/null`
36165    # bat and cmd files are not always considered executable in cygwin causing which
36166    # to not find them
36167    if test "x$new_path" = x \
36168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36170      new_path=`$CYGPATH -u "$path"`
36171    fi
36172    if test "x$new_path" = x; then
36173      # It's still not found. Now this is an unrecoverable error.
36174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36175$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36176      has_space=`$ECHO "$complete" | $GREP " "`
36177      if test "x$has_space" != x; then
36178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36180      fi
36181      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36182    fi
36183  fi
36184
36185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36188  # "foo.exe" is OK but "foo" is an error.
36189  #
36190  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36191  # It is also a way to make sure we got the proper file name for the real test later on.
36192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36193  if test "x$test_shortpath" = x; then
36194    # Short path failed, file does not exist as specified.
36195    # Try adding .exe or .cmd
36196    if test -f "${new_path}.exe"; then
36197      input_to_shortpath="${new_path}.exe"
36198    elif test -f "${new_path}.cmd"; then
36199      input_to_shortpath="${new_path}.cmd"
36200    else
36201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36202$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36203      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36204$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36205      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36206    fi
36207  else
36208    input_to_shortpath="$new_path"
36209  fi
36210
36211  # Call helper function which possibly converts this using DOS-style short mode.
36212  # If so, the updated path is stored in $new_path.
36213  new_path="$input_to_shortpath"
36214
36215  input_path="$input_to_shortpath"
36216  # Check if we need to convert this using DOS-style short mode. If the path
36217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36218  # take no chances and rewrite it.
36219  # Note: m4 eats our [], so we need to use [ and ] instead.
36220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36221  if test "x$has_forbidden_chars" != x; then
36222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36226      # Going to short mode and back again did indeed matter. Since short mode is
36227      # case insensitive, let's make it lowercase to improve readability.
36228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36229      # Now convert it back to Unix-style (cygpath)
36230      input_path=`$CYGPATH -u "$shortmode_path"`
36231      new_path="$input_path"
36232    fi
36233  fi
36234
36235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36236  if test "x$test_cygdrive_prefix" = x; then
36237    # As a simple fix, exclude /usr/bin since it's not a real path.
36238    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36240      # a path prefixed by /cygdrive for fixpath to work.
36241      new_path="$CYGWIN_ROOT_PATH$input_path"
36242    fi
36243  fi
36244
36245  # remove trailing .exe if any
36246  new_path="${new_path/%.exe/}"
36247
36248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36249
36250  # First separate the path from the arguments. This will split at the first
36251  # space.
36252  complete="$AR"
36253  path="${complete%% *}"
36254  tmp="$complete EOL"
36255  arguments="${tmp#* }"
36256
36257  # Input might be given as Windows format, start by converting to
36258  # unix format.
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
36271  # Now try to locate executable using which
36272  new_path=`$WHICH "$new_path" 2> /dev/null`
36273
36274  if test "x$new_path" = x; then
36275    # Oops. Which didn't find the executable.
36276    # The splitting of arguments from the executable at a space might have been incorrect,
36277    # since paths with space are more likely in Windows. Give it another try with the whole
36278    # argument.
36279    path="$complete"
36280    arguments="EOL"
36281    new_path="$path"
36282
36283  windows_path="$new_path"
36284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36285    unix_path=`$CYGPATH -u "$windows_path"`
36286    new_path="$unix_path"
36287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36289    new_path="$unix_path"
36290  fi
36291
36292
36293    new_path=`$WHICH "$new_path" 2> /dev/null`
36294    # bat and cmd files are not always considered executable in MSYS causing which
36295    # to not find them
36296    if test "x$new_path" = x \
36297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36299      new_path="$path"
36300
36301  windows_path="$new_path"
36302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36303    unix_path=`$CYGPATH -u "$windows_path"`
36304    new_path="$unix_path"
36305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36307    new_path="$unix_path"
36308  fi
36309
36310    fi
36311
36312    if test "x$new_path" = x; then
36313      # It's still not found. Now this is an unrecoverable error.
36314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36315$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36316      has_space=`$ECHO "$complete" | $GREP " "`
36317      if test "x$has_space" != x; then
36318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36320      fi
36321      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36322    fi
36323  fi
36324
36325  # Now new_path has a complete unix path to the binary
36326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36327    # Keep paths in /bin as-is, but remove trailing .exe if any
36328    new_path="${new_path/%.exe/}"
36329    # Do not save /bin paths to all_fixpath_prefixes!
36330  else
36331    # Not in mixed or Windows style, start by that.
36332    new_path=`cmd //c echo $new_path`
36333
36334  input_path="$new_path"
36335  # Check if we need to convert this using DOS-style short mode. If the path
36336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36337  # take no chances and rewrite it.
36338  # Note: m4 eats our [], so we need to use [ and ] instead.
36339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36340  if test "x$has_forbidden_chars" != x; then
36341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36343  fi
36344
36345    # Output is in $new_path
36346
36347  windows_path="$new_path"
36348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36349    unix_path=`$CYGPATH -u "$windows_path"`
36350    new_path="$unix_path"
36351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36353    new_path="$unix_path"
36354  fi
36355
36356    # remove trailing .exe if any
36357    new_path="${new_path/%.exe/}"
36358
36359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36361  fi
36362
36363    else
36364      # We're on a unix platform. Hooray! :)
36365      # First separate the path from the arguments. This will split at the first
36366      # space.
36367      complete="$AR"
36368      path="${complete%% *}"
36369      tmp="$complete EOL"
36370      arguments="${tmp#* }"
36371
36372      # Cannot rely on the command "which" here since it doesn't always work.
36373      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36374      if test -z "$is_absolute_path"; then
36375        # Path to executable is not absolute. Find it.
36376        IFS_save="$IFS"
36377        IFS=:
36378        for p in $PATH; do
36379          if test -f "$p/$path" && test -x "$p/$path"; then
36380            new_path="$p/$path"
36381            break
36382          fi
36383        done
36384        IFS="$IFS_save"
36385      else
36386        # This is an absolute path, we can use it without further modifications.
36387        new_path="$path"
36388      fi
36389
36390      if test "x$new_path" = x; then
36391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36392$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36393        has_space=`$ECHO "$complete" | $GREP " "`
36394        if test "x$has_space" != x; then
36395          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36396$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36397        fi
36398        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36399      fi
36400    fi
36401
36402    # Now join together the path and the arguments once again
36403    if test "x$arguments" != xEOL; then
36404      new_complete="$new_path ${arguments% *}"
36405    else
36406      new_complete="$new_path"
36407    fi
36408
36409    if test "x$complete" != "x$new_complete"; then
36410      AR="$new_complete"
36411      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36412$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36413    fi
36414  fi
36415
36416
36417
36418  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36419
36420
36421  # Publish this variable in the help.
36422
36423
36424  if [ -z "${LIPO+x}" ]; then
36425    # The variable is not set by user, try to locate tool using the code snippet
36426    for ac_prog in lipo
36427do
36428  # Extract the first word of "$ac_prog", so it can be a program name with args.
36429set dummy $ac_prog; ac_word=$2
36430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36431$as_echo_n "checking for $ac_word... " >&6; }
36432if ${ac_cv_path_LIPO+:} false; then :
36433  $as_echo_n "(cached) " >&6
36434else
36435  case $LIPO in
36436  [\\/]* | ?:[\\/]*)
36437  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36438  ;;
36439  *)
36440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36441for as_dir in $PATH
36442do
36443  IFS=$as_save_IFS
36444  test -z "$as_dir" && as_dir=.
36445    for ac_exec_ext in '' $ac_executable_extensions; do
36446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36447    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36449    break 2
36450  fi
36451done
36452  done
36453IFS=$as_save_IFS
36454
36455  ;;
36456esac
36457fi
36458LIPO=$ac_cv_path_LIPO
36459if test -n "$LIPO"; then
36460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36461$as_echo "$LIPO" >&6; }
36462else
36463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36464$as_echo "no" >&6; }
36465fi
36466
36467
36468  test -n "$LIPO" && break
36469done
36470
36471  else
36472    # The variable is set, but is it from the command line or the environment?
36473
36474    # Try to remove the string !LIPO! from our list.
36475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36477      # If it failed, the variable was not from the command line. Ignore it,
36478      # but warn the user (except for BASH, which is always set by the calling BASH).
36479      if test "xLIPO" != xBASH; then
36480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36481$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36482      fi
36483      # Try to locate tool using the code snippet
36484      for ac_prog in lipo
36485do
36486  # Extract the first word of "$ac_prog", so it can be a program name with args.
36487set dummy $ac_prog; ac_word=$2
36488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36489$as_echo_n "checking for $ac_word... " >&6; }
36490if ${ac_cv_path_LIPO+:} false; then :
36491  $as_echo_n "(cached) " >&6
36492else
36493  case $LIPO in
36494  [\\/]* | ?:[\\/]*)
36495  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36496  ;;
36497  *)
36498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36499for as_dir in $PATH
36500do
36501  IFS=$as_save_IFS
36502  test -z "$as_dir" && as_dir=.
36503    for ac_exec_ext in '' $ac_executable_extensions; do
36504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36505    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36507    break 2
36508  fi
36509done
36510  done
36511IFS=$as_save_IFS
36512
36513  ;;
36514esac
36515fi
36516LIPO=$ac_cv_path_LIPO
36517if test -n "$LIPO"; then
36518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36519$as_echo "$LIPO" >&6; }
36520else
36521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36522$as_echo "no" >&6; }
36523fi
36524
36525
36526  test -n "$LIPO" && break
36527done
36528
36529    else
36530      # If it succeeded, then it was overridden by the user. We will use it
36531      # for the tool.
36532
36533      # First remove it from the list of overridden variables, so we can test
36534      # for unknown variables in the end.
36535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36536
36537      # Check if we try to supply an empty value
36538      if test "x$LIPO" = x; then
36539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36540$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36542$as_echo_n "checking for LIPO... " >&6; }
36543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36544$as_echo "disabled" >&6; }
36545      else
36546        # Check if the provided tool contains a complete path.
36547        tool_specified="$LIPO"
36548        tool_basename="${tool_specified##*/}"
36549        if test "x$tool_basename" = "x$tool_specified"; then
36550          # A command without a complete path is provided, search $PATH.
36551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36552$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36553          # Extract the first word of "$tool_basename", so it can be a program name with args.
36554set dummy $tool_basename; ac_word=$2
36555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36556$as_echo_n "checking for $ac_word... " >&6; }
36557if ${ac_cv_path_LIPO+:} false; then :
36558  $as_echo_n "(cached) " >&6
36559else
36560  case $LIPO in
36561  [\\/]* | ?:[\\/]*)
36562  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36563  ;;
36564  *)
36565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36566for as_dir in $PATH
36567do
36568  IFS=$as_save_IFS
36569  test -z "$as_dir" && as_dir=.
36570    for ac_exec_ext in '' $ac_executable_extensions; do
36571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36572    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36574    break 2
36575  fi
36576done
36577  done
36578IFS=$as_save_IFS
36579
36580  ;;
36581esac
36582fi
36583LIPO=$ac_cv_path_LIPO
36584if test -n "$LIPO"; then
36585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36586$as_echo "$LIPO" >&6; }
36587else
36588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36589$as_echo "no" >&6; }
36590fi
36591
36592
36593          if test "x$LIPO" = x; then
36594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36595          fi
36596        else
36597          # Otherwise we believe it is a complete path. Use it as it is.
36598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36599$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36601$as_echo_n "checking for LIPO... " >&6; }
36602          if test ! -x "$tool_specified"; then
36603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36604$as_echo "not found" >&6; }
36605            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36606          fi
36607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36608$as_echo "$tool_specified" >&6; }
36609        fi
36610      fi
36611    fi
36612
36613  fi
36614
36615
36616
36617  # Only process if variable expands to non-empty
36618
36619  if test "x$LIPO" != x; then
36620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36621
36622  # First separate the path from the arguments. This will split at the first
36623  # space.
36624  complete="$LIPO"
36625  path="${complete%% *}"
36626  tmp="$complete EOL"
36627  arguments="${tmp#* }"
36628
36629  # Input might be given as Windows format, start by converting to
36630  # unix format.
36631  new_path=`$CYGPATH -u "$path"`
36632
36633  # Now try to locate executable using which
36634  new_path=`$WHICH "$new_path" 2> /dev/null`
36635  # bat and cmd files are not always considered executable in cygwin causing which
36636  # to not find them
36637  if test "x$new_path" = x \
36638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36640    new_path=`$CYGPATH -u "$path"`
36641  fi
36642  if test "x$new_path" = x; then
36643    # Oops. Which didn't find the executable.
36644    # The splitting of arguments from the executable at a space might have been incorrect,
36645    # since paths with space are more likely in Windows. Give it another try with the whole
36646    # argument.
36647    path="$complete"
36648    arguments="EOL"
36649    new_path=`$CYGPATH -u "$path"`
36650    new_path=`$WHICH "$new_path" 2> /dev/null`
36651    # bat and cmd files are not always considered executable in cygwin causing which
36652    # to not find them
36653    if test "x$new_path" = x \
36654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36656      new_path=`$CYGPATH -u "$path"`
36657    fi
36658    if test "x$new_path" = x; then
36659      # It's still not found. Now this is an unrecoverable error.
36660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36661$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36662      has_space=`$ECHO "$complete" | $GREP " "`
36663      if test "x$has_space" != x; then
36664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36666      fi
36667      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36668    fi
36669  fi
36670
36671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36674  # "foo.exe" is OK but "foo" is an error.
36675  #
36676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36677  # It is also a way to make sure we got the proper file name for the real test later on.
36678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36679  if test "x$test_shortpath" = x; then
36680    # Short path failed, file does not exist as specified.
36681    # Try adding .exe or .cmd
36682    if test -f "${new_path}.exe"; then
36683      input_to_shortpath="${new_path}.exe"
36684    elif test -f "${new_path}.cmd"; then
36685      input_to_shortpath="${new_path}.cmd"
36686    else
36687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36688$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36691      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36692    fi
36693  else
36694    input_to_shortpath="$new_path"
36695  fi
36696
36697  # Call helper function which possibly converts this using DOS-style short mode.
36698  # If so, the updated path is stored in $new_path.
36699  new_path="$input_to_shortpath"
36700
36701  input_path="$input_to_shortpath"
36702  # Check if we need to convert this using DOS-style short mode. If the path
36703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36704  # take no chances and rewrite it.
36705  # Note: m4 eats our [], so we need to use [ and ] instead.
36706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36707  if test "x$has_forbidden_chars" != x; then
36708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36712      # Going to short mode and back again did indeed matter. Since short mode is
36713      # case insensitive, let's make it lowercase to improve readability.
36714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36715      # Now convert it back to Unix-style (cygpath)
36716      input_path=`$CYGPATH -u "$shortmode_path"`
36717      new_path="$input_path"
36718    fi
36719  fi
36720
36721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36722  if test "x$test_cygdrive_prefix" = x; then
36723    # As a simple fix, exclude /usr/bin since it's not a real path.
36724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36726      # a path prefixed by /cygdrive for fixpath to work.
36727      new_path="$CYGWIN_ROOT_PATH$input_path"
36728    fi
36729  fi
36730
36731  # remove trailing .exe if any
36732  new_path="${new_path/%.exe/}"
36733
36734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36735
36736  # First separate the path from the arguments. This will split at the first
36737  # space.
36738  complete="$LIPO"
36739  path="${complete%% *}"
36740  tmp="$complete EOL"
36741  arguments="${tmp#* }"
36742
36743  # Input might be given as Windows format, start by converting to
36744  # unix format.
36745  new_path="$path"
36746
36747  windows_path="$new_path"
36748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36749    unix_path=`$CYGPATH -u "$windows_path"`
36750    new_path="$unix_path"
36751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36753    new_path="$unix_path"
36754  fi
36755
36756
36757  # Now try to locate executable using which
36758  new_path=`$WHICH "$new_path" 2> /dev/null`
36759
36760  if test "x$new_path" = x; then
36761    # Oops. Which didn't find the executable.
36762    # The splitting of arguments from the executable at a space might have been incorrect,
36763    # since paths with space are more likely in Windows. Give it another try with the whole
36764    # argument.
36765    path="$complete"
36766    arguments="EOL"
36767    new_path="$path"
36768
36769  windows_path="$new_path"
36770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36771    unix_path=`$CYGPATH -u "$windows_path"`
36772    new_path="$unix_path"
36773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36775    new_path="$unix_path"
36776  fi
36777
36778
36779    new_path=`$WHICH "$new_path" 2> /dev/null`
36780    # bat and cmd files are not always considered executable in MSYS causing which
36781    # to not find them
36782    if test "x$new_path" = x \
36783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36785      new_path="$path"
36786
36787  windows_path="$new_path"
36788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36789    unix_path=`$CYGPATH -u "$windows_path"`
36790    new_path="$unix_path"
36791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36793    new_path="$unix_path"
36794  fi
36795
36796    fi
36797
36798    if test "x$new_path" = x; then
36799      # It's still not found. Now this is an unrecoverable error.
36800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36801$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36802      has_space=`$ECHO "$complete" | $GREP " "`
36803      if test "x$has_space" != x; then
36804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36806      fi
36807      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36808    fi
36809  fi
36810
36811  # Now new_path has a complete unix path to the binary
36812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36813    # Keep paths in /bin as-is, but remove trailing .exe if any
36814    new_path="${new_path/%.exe/}"
36815    # Do not save /bin paths to all_fixpath_prefixes!
36816  else
36817    # Not in mixed or Windows style, start by that.
36818    new_path=`cmd //c echo $new_path`
36819
36820  input_path="$new_path"
36821  # Check if we need to convert this using DOS-style short mode. If the path
36822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36823  # take no chances and rewrite it.
36824  # Note: m4 eats our [], so we need to use [ and ] instead.
36825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36826  if test "x$has_forbidden_chars" != x; then
36827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36829  fi
36830
36831    # Output is in $new_path
36832
36833  windows_path="$new_path"
36834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36835    unix_path=`$CYGPATH -u "$windows_path"`
36836    new_path="$unix_path"
36837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36839    new_path="$unix_path"
36840  fi
36841
36842    # remove trailing .exe if any
36843    new_path="${new_path/%.exe/}"
36844
36845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36847  fi
36848
36849    else
36850      # We're on a unix platform. Hooray! :)
36851      # First separate the path from the arguments. This will split at the first
36852      # space.
36853      complete="$LIPO"
36854      path="${complete%% *}"
36855      tmp="$complete EOL"
36856      arguments="${tmp#* }"
36857
36858      # Cannot rely on the command "which" here since it doesn't always work.
36859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36860      if test -z "$is_absolute_path"; then
36861        # Path to executable is not absolute. Find it.
36862        IFS_save="$IFS"
36863        IFS=:
36864        for p in $PATH; do
36865          if test -f "$p/$path" && test -x "$p/$path"; then
36866            new_path="$p/$path"
36867            break
36868          fi
36869        done
36870        IFS="$IFS_save"
36871      else
36872        # This is an absolute path, we can use it without further modifications.
36873        new_path="$path"
36874      fi
36875
36876      if test "x$new_path" = x; then
36877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36878$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36879        has_space=`$ECHO "$complete" | $GREP " "`
36880        if test "x$has_space" != x; then
36881          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36883        fi
36884        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36885      fi
36886    fi
36887
36888    # Now join together the path and the arguments once again
36889    if test "x$arguments" != xEOL; then
36890      new_complete="$new_path ${arguments% *}"
36891    else
36892      new_complete="$new_path"
36893    fi
36894
36895    if test "x$complete" != "x$new_complete"; then
36896      LIPO="$new_complete"
36897      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36898$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36899    fi
36900  fi
36901
36902  fi
36903
36904  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36905    # Extract the first word of "mt", so it can be a program name with args.
36906set dummy mt; ac_word=$2
36907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36908$as_echo_n "checking for $ac_word... " >&6; }
36909if ${ac_cv_prog_MT+:} false; then :
36910  $as_echo_n "(cached) " >&6
36911else
36912  if test -n "$MT"; then
36913  ac_cv_prog_MT="$MT" # Let the user override the test.
36914else
36915  ac_prog_rejected=no
36916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36917for as_dir in $PATH
36918do
36919  IFS=$as_save_IFS
36920  test -z "$as_dir" && as_dir=.
36921    for ac_exec_ext in '' $ac_executable_extensions; do
36922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36923    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36924       ac_prog_rejected=yes
36925       continue
36926     fi
36927    ac_cv_prog_MT="mt"
36928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36929    break 2
36930  fi
36931done
36932  done
36933IFS=$as_save_IFS
36934
36935if test $ac_prog_rejected = yes; then
36936  # We found a bogon in the path, so make sure we never use it.
36937  set dummy $ac_cv_prog_MT
36938  shift
36939  if test $# != 0; then
36940    # We chose a different compiler from the bogus one.
36941    # However, it has the same basename, so the bogon will be chosen
36942    # first if we set MT to just the basename; use the full file name.
36943    shift
36944    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36945  fi
36946fi
36947fi
36948fi
36949MT=$ac_cv_prog_MT
36950if test -n "$MT"; then
36951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36952$as_echo "$MT" >&6; }
36953else
36954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36955$as_echo "no" >&6; }
36956fi
36957
36958
36959
36960  # Only process if variable expands to non-empty
36961
36962  if test "x$MT" != x; then
36963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36964
36965  # First separate the path from the arguments. This will split at the first
36966  # space.
36967  complete="$MT"
36968  path="${complete%% *}"
36969  tmp="$complete EOL"
36970  arguments="${tmp#* }"
36971
36972  # Input might be given as Windows format, start by converting to
36973  # unix format.
36974  new_path=`$CYGPATH -u "$path"`
36975
36976  # Now try to locate executable using which
36977  new_path=`$WHICH "$new_path" 2> /dev/null`
36978  # bat and cmd files are not always considered executable in cygwin causing which
36979  # to not find them
36980  if test "x$new_path" = x \
36981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36983    new_path=`$CYGPATH -u "$path"`
36984  fi
36985  if test "x$new_path" = x; then
36986    # Oops. Which didn't find the executable.
36987    # The splitting of arguments from the executable at a space might have been incorrect,
36988    # since paths with space are more likely in Windows. Give it another try with the whole
36989    # argument.
36990    path="$complete"
36991    arguments="EOL"
36992    new_path=`$CYGPATH -u "$path"`
36993    new_path=`$WHICH "$new_path" 2> /dev/null`
36994    # bat and cmd files are not always considered executable in cygwin causing which
36995    # to not find them
36996    if test "x$new_path" = x \
36997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36999      new_path=`$CYGPATH -u "$path"`
37000    fi
37001    if test "x$new_path" = x; then
37002      # It's still not found. Now this is an unrecoverable error.
37003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37004$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37005      has_space=`$ECHO "$complete" | $GREP " "`
37006      if test "x$has_space" != x; then
37007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37009      fi
37010      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37011    fi
37012  fi
37013
37014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37017  # "foo.exe" is OK but "foo" is an error.
37018  #
37019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37020  # It is also a way to make sure we got the proper file name for the real test later on.
37021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37022  if test "x$test_shortpath" = x; then
37023    # Short path failed, file does not exist as specified.
37024    # Try adding .exe or .cmd
37025    if test -f "${new_path}.exe"; then
37026      input_to_shortpath="${new_path}.exe"
37027    elif test -f "${new_path}.cmd"; then
37028      input_to_shortpath="${new_path}.cmd"
37029    else
37030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37031$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37034      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37035    fi
37036  else
37037    input_to_shortpath="$new_path"
37038  fi
37039
37040  # Call helper function which possibly converts this using DOS-style short mode.
37041  # If so, the updated path is stored in $new_path.
37042  new_path="$input_to_shortpath"
37043
37044  input_path="$input_to_shortpath"
37045  # Check if we need to convert this using DOS-style short mode. If the path
37046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37047  # take no chances and rewrite it.
37048  # Note: m4 eats our [], so we need to use [ and ] instead.
37049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37050  if test "x$has_forbidden_chars" != x; then
37051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37055      # Going to short mode and back again did indeed matter. Since short mode is
37056      # case insensitive, let's make it lowercase to improve readability.
37057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37058      # Now convert it back to Unix-style (cygpath)
37059      input_path=`$CYGPATH -u "$shortmode_path"`
37060      new_path="$input_path"
37061    fi
37062  fi
37063
37064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37065  if test "x$test_cygdrive_prefix" = x; then
37066    # As a simple fix, exclude /usr/bin since it's not a real path.
37067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37069      # a path prefixed by /cygdrive for fixpath to work.
37070      new_path="$CYGWIN_ROOT_PATH$input_path"
37071    fi
37072  fi
37073
37074  # remove trailing .exe if any
37075  new_path="${new_path/%.exe/}"
37076
37077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37078
37079  # First separate the path from the arguments. This will split at the first
37080  # space.
37081  complete="$MT"
37082  path="${complete%% *}"
37083  tmp="$complete EOL"
37084  arguments="${tmp#* }"
37085
37086  # Input might be given as Windows format, start by converting to
37087  # unix format.
37088  new_path="$path"
37089
37090  windows_path="$new_path"
37091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37092    unix_path=`$CYGPATH -u "$windows_path"`
37093    new_path="$unix_path"
37094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37096    new_path="$unix_path"
37097  fi
37098
37099
37100  # Now try to locate executable using which
37101  new_path=`$WHICH "$new_path" 2> /dev/null`
37102
37103  if test "x$new_path" = x; then
37104    # Oops. Which didn't find the executable.
37105    # The splitting of arguments from the executable at a space might have been incorrect,
37106    # since paths with space are more likely in Windows. Give it another try with the whole
37107    # argument.
37108    path="$complete"
37109    arguments="EOL"
37110    new_path="$path"
37111
37112  windows_path="$new_path"
37113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37114    unix_path=`$CYGPATH -u "$windows_path"`
37115    new_path="$unix_path"
37116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37118    new_path="$unix_path"
37119  fi
37120
37121
37122    new_path=`$WHICH "$new_path" 2> /dev/null`
37123    # bat and cmd files are not always considered executable in MSYS causing which
37124    # to not find them
37125    if test "x$new_path" = x \
37126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37128      new_path="$path"
37129
37130  windows_path="$new_path"
37131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37132    unix_path=`$CYGPATH -u "$windows_path"`
37133    new_path="$unix_path"
37134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37136    new_path="$unix_path"
37137  fi
37138
37139    fi
37140
37141    if test "x$new_path" = x; then
37142      # It's still not found. Now this is an unrecoverable error.
37143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37144$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37145      has_space=`$ECHO "$complete" | $GREP " "`
37146      if test "x$has_space" != x; then
37147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37149      fi
37150      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37151    fi
37152  fi
37153
37154  # Now new_path has a complete unix path to the binary
37155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37156    # Keep paths in /bin as-is, but remove trailing .exe if any
37157    new_path="${new_path/%.exe/}"
37158    # Do not save /bin paths to all_fixpath_prefixes!
37159  else
37160    # Not in mixed or Windows style, start by that.
37161    new_path=`cmd //c echo $new_path`
37162
37163  input_path="$new_path"
37164  # Check if we need to convert this using DOS-style short mode. If the path
37165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37166  # take no chances and rewrite it.
37167  # Note: m4 eats our [], so we need to use [ and ] instead.
37168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37169  if test "x$has_forbidden_chars" != x; then
37170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37172  fi
37173
37174    # Output is in $new_path
37175
37176  windows_path="$new_path"
37177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37178    unix_path=`$CYGPATH -u "$windows_path"`
37179    new_path="$unix_path"
37180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37182    new_path="$unix_path"
37183  fi
37184
37185    # remove trailing .exe if any
37186    new_path="${new_path/%.exe/}"
37187
37188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37190  fi
37191
37192    else
37193      # We're on a unix platform. Hooray! :)
37194      # First separate the path from the arguments. This will split at the first
37195      # space.
37196      complete="$MT"
37197      path="${complete%% *}"
37198      tmp="$complete EOL"
37199      arguments="${tmp#* }"
37200
37201      # Cannot rely on the command "which" here since it doesn't always work.
37202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37203      if test -z "$is_absolute_path"; then
37204        # Path to executable is not absolute. Find it.
37205        IFS_save="$IFS"
37206        IFS=:
37207        for p in $PATH; do
37208          if test -f "$p/$path" && test -x "$p/$path"; then
37209            new_path="$p/$path"
37210            break
37211          fi
37212        done
37213        IFS="$IFS_save"
37214      else
37215        # This is an absolute path, we can use it without further modifications.
37216        new_path="$path"
37217      fi
37218
37219      if test "x$new_path" = x; then
37220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37221$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37222        has_space=`$ECHO "$complete" | $GREP " "`
37223        if test "x$has_space" != x; then
37224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37226        fi
37227        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37228      fi
37229    fi
37230
37231    # Now join together the path and the arguments once again
37232    if test "x$arguments" != xEOL; then
37233      new_complete="$new_path ${arguments% *}"
37234    else
37235      new_complete="$new_path"
37236    fi
37237
37238    if test "x$complete" != "x$new_complete"; then
37239      MT="$new_complete"
37240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37241$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37242    fi
37243  fi
37244
37245    # Setup the resource compiler (RC)
37246    # Extract the first word of "rc", so it can be a program name with args.
37247set dummy rc; ac_word=$2
37248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37249$as_echo_n "checking for $ac_word... " >&6; }
37250if ${ac_cv_prog_RC+:} false; then :
37251  $as_echo_n "(cached) " >&6
37252else
37253  if test -n "$RC"; then
37254  ac_cv_prog_RC="$RC" # Let the user override the test.
37255else
37256  ac_prog_rejected=no
37257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37258for as_dir in $PATH
37259do
37260  IFS=$as_save_IFS
37261  test -z "$as_dir" && as_dir=.
37262    for ac_exec_ext in '' $ac_executable_extensions; do
37263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37264    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37265       ac_prog_rejected=yes
37266       continue
37267     fi
37268    ac_cv_prog_RC="rc"
37269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37270    break 2
37271  fi
37272done
37273  done
37274IFS=$as_save_IFS
37275
37276if test $ac_prog_rejected = yes; then
37277  # We found a bogon in the path, so make sure we never use it.
37278  set dummy $ac_cv_prog_RC
37279  shift
37280  if test $# != 0; then
37281    # We chose a different compiler from the bogus one.
37282    # However, it has the same basename, so the bogon will be chosen
37283    # first if we set RC to just the basename; use the full file name.
37284    shift
37285    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37286  fi
37287fi
37288fi
37289fi
37290RC=$ac_cv_prog_RC
37291if test -n "$RC"; then
37292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37293$as_echo "$RC" >&6; }
37294else
37295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37296$as_echo "no" >&6; }
37297fi
37298
37299
37300
37301  # Only process if variable expands to non-empty
37302
37303  if test "x$RC" != x; then
37304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37305
37306  # First separate the path from the arguments. This will split at the first
37307  # space.
37308  complete="$RC"
37309  path="${complete%% *}"
37310  tmp="$complete EOL"
37311  arguments="${tmp#* }"
37312
37313  # Input might be given as Windows format, start by converting to
37314  # unix format.
37315  new_path=`$CYGPATH -u "$path"`
37316
37317  # Now try to locate executable using which
37318  new_path=`$WHICH "$new_path" 2> /dev/null`
37319  # bat and cmd files are not always considered executable in cygwin causing which
37320  # to not find them
37321  if test "x$new_path" = x \
37322      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37323      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37324    new_path=`$CYGPATH -u "$path"`
37325  fi
37326  if test "x$new_path" = x; then
37327    # Oops. Which didn't find the executable.
37328    # The splitting of arguments from the executable at a space might have been incorrect,
37329    # since paths with space are more likely in Windows. Give it another try with the whole
37330    # argument.
37331    path="$complete"
37332    arguments="EOL"
37333    new_path=`$CYGPATH -u "$path"`
37334    new_path=`$WHICH "$new_path" 2> /dev/null`
37335    # bat and cmd files are not always considered executable in cygwin causing which
37336    # to not find them
37337    if test "x$new_path" = x \
37338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37340      new_path=`$CYGPATH -u "$path"`
37341    fi
37342    if test "x$new_path" = x; then
37343      # It's still not found. Now this is an unrecoverable error.
37344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37345$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37346      has_space=`$ECHO "$complete" | $GREP " "`
37347      if test "x$has_space" != x; then
37348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37350      fi
37351      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37352    fi
37353  fi
37354
37355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37358  # "foo.exe" is OK but "foo" is an error.
37359  #
37360  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37361  # It is also a way to make sure we got the proper file name for the real test later on.
37362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37363  if test "x$test_shortpath" = x; then
37364    # Short path failed, file does not exist as specified.
37365    # Try adding .exe or .cmd
37366    if test -f "${new_path}.exe"; then
37367      input_to_shortpath="${new_path}.exe"
37368    elif test -f "${new_path}.cmd"; then
37369      input_to_shortpath="${new_path}.cmd"
37370    else
37371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37372$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37373      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37374$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37375      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37376    fi
37377  else
37378    input_to_shortpath="$new_path"
37379  fi
37380
37381  # Call helper function which possibly converts this using DOS-style short mode.
37382  # If so, the updated path is stored in $new_path.
37383  new_path="$input_to_shortpath"
37384
37385  input_path="$input_to_shortpath"
37386  # Check if we need to convert this using DOS-style short mode. If the path
37387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37388  # take no chances and rewrite it.
37389  # Note: m4 eats our [], so we need to use [ and ] instead.
37390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37391  if test "x$has_forbidden_chars" != x; then
37392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37396      # Going to short mode and back again did indeed matter. Since short mode is
37397      # case insensitive, let's make it lowercase to improve readability.
37398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37399      # Now convert it back to Unix-style (cygpath)
37400      input_path=`$CYGPATH -u "$shortmode_path"`
37401      new_path="$input_path"
37402    fi
37403  fi
37404
37405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37406  if test "x$test_cygdrive_prefix" = x; then
37407    # As a simple fix, exclude /usr/bin since it's not a real path.
37408    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37410      # a path prefixed by /cygdrive for fixpath to work.
37411      new_path="$CYGWIN_ROOT_PATH$input_path"
37412    fi
37413  fi
37414
37415  # remove trailing .exe if any
37416  new_path="${new_path/%.exe/}"
37417
37418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37419
37420  # First separate the path from the arguments. This will split at the first
37421  # space.
37422  complete="$RC"
37423  path="${complete%% *}"
37424  tmp="$complete EOL"
37425  arguments="${tmp#* }"
37426
37427  # Input might be given as Windows format, start by converting to
37428  # unix format.
37429  new_path="$path"
37430
37431  windows_path="$new_path"
37432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37433    unix_path=`$CYGPATH -u "$windows_path"`
37434    new_path="$unix_path"
37435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37437    new_path="$unix_path"
37438  fi
37439
37440
37441  # Now try to locate executable using which
37442  new_path=`$WHICH "$new_path" 2> /dev/null`
37443
37444  if test "x$new_path" = x; then
37445    # Oops. Which didn't find the executable.
37446    # The splitting of arguments from the executable at a space might have been incorrect,
37447    # since paths with space are more likely in Windows. Give it another try with the whole
37448    # argument.
37449    path="$complete"
37450    arguments="EOL"
37451    new_path="$path"
37452
37453  windows_path="$new_path"
37454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37455    unix_path=`$CYGPATH -u "$windows_path"`
37456    new_path="$unix_path"
37457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37459    new_path="$unix_path"
37460  fi
37461
37462
37463    new_path=`$WHICH "$new_path" 2> /dev/null`
37464    # bat and cmd files are not always considered executable in MSYS causing which
37465    # to not find them
37466    if test "x$new_path" = x \
37467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37469      new_path="$path"
37470
37471  windows_path="$new_path"
37472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37473    unix_path=`$CYGPATH -u "$windows_path"`
37474    new_path="$unix_path"
37475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37477    new_path="$unix_path"
37478  fi
37479
37480    fi
37481
37482    if test "x$new_path" = x; then
37483      # It's still not found. Now this is an unrecoverable error.
37484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37485$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37486      has_space=`$ECHO "$complete" | $GREP " "`
37487      if test "x$has_space" != x; then
37488        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37490      fi
37491      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37492    fi
37493  fi
37494
37495  # Now new_path has a complete unix path to the binary
37496  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37497    # Keep paths in /bin as-is, but remove trailing .exe if any
37498    new_path="${new_path/%.exe/}"
37499    # Do not save /bin paths to all_fixpath_prefixes!
37500  else
37501    # Not in mixed or Windows style, start by that.
37502    new_path=`cmd //c echo $new_path`
37503
37504  input_path="$new_path"
37505  # Check if we need to convert this using DOS-style short mode. If the path
37506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37507  # take no chances and rewrite it.
37508  # Note: m4 eats our [], so we need to use [ and ] instead.
37509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37510  if test "x$has_forbidden_chars" != x; then
37511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37513  fi
37514
37515    # Output is in $new_path
37516
37517  windows_path="$new_path"
37518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37519    unix_path=`$CYGPATH -u "$windows_path"`
37520    new_path="$unix_path"
37521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37523    new_path="$unix_path"
37524  fi
37525
37526    # remove trailing .exe if any
37527    new_path="${new_path/%.exe/}"
37528
37529    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37530    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37531  fi
37532
37533    else
37534      # We're on a unix platform. Hooray! :)
37535      # First separate the path from the arguments. This will split at the first
37536      # space.
37537      complete="$RC"
37538      path="${complete%% *}"
37539      tmp="$complete EOL"
37540      arguments="${tmp#* }"
37541
37542      # Cannot rely on the command "which" here since it doesn't always work.
37543      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37544      if test -z "$is_absolute_path"; then
37545        # Path to executable is not absolute. Find it.
37546        IFS_save="$IFS"
37547        IFS=:
37548        for p in $PATH; do
37549          if test -f "$p/$path" && test -x "$p/$path"; then
37550            new_path="$p/$path"
37551            break
37552          fi
37553        done
37554        IFS="$IFS_save"
37555      else
37556        # This is an absolute path, we can use it without further modifications.
37557        new_path="$path"
37558      fi
37559
37560      if test "x$new_path" = x; then
37561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37562$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37563        has_space=`$ECHO "$complete" | $GREP " "`
37564        if test "x$has_space" != x; then
37565          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37566$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37567        fi
37568        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37569      fi
37570    fi
37571
37572    # Now join together the path and the arguments once again
37573    if test "x$arguments" != xEOL; then
37574      new_complete="$new_path ${arguments% *}"
37575    else
37576      new_complete="$new_path"
37577    fi
37578
37579    if test "x$complete" != "x$new_complete"; then
37580      RC="$new_complete"
37581      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37582$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37583    fi
37584  fi
37585
37586    # Extract the first word of "dumpbin", so it can be a program name with args.
37587set dummy dumpbin; ac_word=$2
37588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37589$as_echo_n "checking for $ac_word... " >&6; }
37590if ${ac_cv_prog_DUMPBIN+:} false; then :
37591  $as_echo_n "(cached) " >&6
37592else
37593  if test -n "$DUMPBIN"; then
37594  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37595else
37596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37597for as_dir in $PATH
37598do
37599  IFS=$as_save_IFS
37600  test -z "$as_dir" && as_dir=.
37601    for ac_exec_ext in '' $ac_executable_extensions; do
37602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37603    ac_cv_prog_DUMPBIN="dumpbin"
37604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37605    break 2
37606  fi
37607done
37608  done
37609IFS=$as_save_IFS
37610
37611fi
37612fi
37613DUMPBIN=$ac_cv_prog_DUMPBIN
37614if test -n "$DUMPBIN"; then
37615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37616$as_echo "$DUMPBIN" >&6; }
37617else
37618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37619$as_echo "no" >&6; }
37620fi
37621
37622
37623
37624  # Only process if variable expands to non-empty
37625
37626  if test "x$DUMPBIN" != x; then
37627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37628
37629  # First separate the path from the arguments. This will split at the first
37630  # space.
37631  complete="$DUMPBIN"
37632  path="${complete%% *}"
37633  tmp="$complete EOL"
37634  arguments="${tmp#* }"
37635
37636  # Input might be given as Windows format, start by converting to
37637  # unix format.
37638  new_path=`$CYGPATH -u "$path"`
37639
37640  # Now try to locate executable using which
37641  new_path=`$WHICH "$new_path" 2> /dev/null`
37642  # bat and cmd files are not always considered executable in cygwin causing which
37643  # to not find them
37644  if test "x$new_path" = x \
37645      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37646      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37647    new_path=`$CYGPATH -u "$path"`
37648  fi
37649  if test "x$new_path" = x; then
37650    # Oops. Which didn't find the executable.
37651    # The splitting of arguments from the executable at a space might have been incorrect,
37652    # since paths with space are more likely in Windows. Give it another try with the whole
37653    # argument.
37654    path="$complete"
37655    arguments="EOL"
37656    new_path=`$CYGPATH -u "$path"`
37657    new_path=`$WHICH "$new_path" 2> /dev/null`
37658    # bat and cmd files are not always considered executable in cygwin causing which
37659    # to not find them
37660    if test "x$new_path" = x \
37661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37663      new_path=`$CYGPATH -u "$path"`
37664    fi
37665    if test "x$new_path" = x; then
37666      # It's still not found. Now this is an unrecoverable error.
37667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37668$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37669      has_space=`$ECHO "$complete" | $GREP " "`
37670      if test "x$has_space" != x; then
37671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37673      fi
37674      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37675    fi
37676  fi
37677
37678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37681  # "foo.exe" is OK but "foo" is an error.
37682  #
37683  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37684  # It is also a way to make sure we got the proper file name for the real test later on.
37685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37686  if test "x$test_shortpath" = x; then
37687    # Short path failed, file does not exist as specified.
37688    # Try adding .exe or .cmd
37689    if test -f "${new_path}.exe"; then
37690      input_to_shortpath="${new_path}.exe"
37691    elif test -f "${new_path}.cmd"; then
37692      input_to_shortpath="${new_path}.cmd"
37693    else
37694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37695$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37696      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37697$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37698      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37699    fi
37700  else
37701    input_to_shortpath="$new_path"
37702  fi
37703
37704  # Call helper function which possibly converts this using DOS-style short mode.
37705  # If so, the updated path is stored in $new_path.
37706  new_path="$input_to_shortpath"
37707
37708  input_path="$input_to_shortpath"
37709  # Check if we need to convert this using DOS-style short mode. If the path
37710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37711  # take no chances and rewrite it.
37712  # Note: m4 eats our [], so we need to use [ and ] instead.
37713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37714  if test "x$has_forbidden_chars" != x; then
37715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37719      # Going to short mode and back again did indeed matter. Since short mode is
37720      # case insensitive, let's make it lowercase to improve readability.
37721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37722      # Now convert it back to Unix-style (cygpath)
37723      input_path=`$CYGPATH -u "$shortmode_path"`
37724      new_path="$input_path"
37725    fi
37726  fi
37727
37728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37729  if test "x$test_cygdrive_prefix" = x; then
37730    # As a simple fix, exclude /usr/bin since it's not a real path.
37731    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37733      # a path prefixed by /cygdrive for fixpath to work.
37734      new_path="$CYGWIN_ROOT_PATH$input_path"
37735    fi
37736  fi
37737
37738  # remove trailing .exe if any
37739  new_path="${new_path/%.exe/}"
37740
37741    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37742
37743  # First separate the path from the arguments. This will split at the first
37744  # space.
37745  complete="$DUMPBIN"
37746  path="${complete%% *}"
37747  tmp="$complete EOL"
37748  arguments="${tmp#* }"
37749
37750  # Input might be given as Windows format, start by converting to
37751  # unix format.
37752  new_path="$path"
37753
37754  windows_path="$new_path"
37755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37756    unix_path=`$CYGPATH -u "$windows_path"`
37757    new_path="$unix_path"
37758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37760    new_path="$unix_path"
37761  fi
37762
37763
37764  # Now try to locate executable using which
37765  new_path=`$WHICH "$new_path" 2> /dev/null`
37766
37767  if test "x$new_path" = x; then
37768    # Oops. Which didn't find the executable.
37769    # The splitting of arguments from the executable at a space might have been incorrect,
37770    # since paths with space are more likely in Windows. Give it another try with the whole
37771    # argument.
37772    path="$complete"
37773    arguments="EOL"
37774    new_path="$path"
37775
37776  windows_path="$new_path"
37777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37778    unix_path=`$CYGPATH -u "$windows_path"`
37779    new_path="$unix_path"
37780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37782    new_path="$unix_path"
37783  fi
37784
37785
37786    new_path=`$WHICH "$new_path" 2> /dev/null`
37787    # bat and cmd files are not always considered executable in MSYS causing which
37788    # to not find them
37789    if test "x$new_path" = x \
37790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37792      new_path="$path"
37793
37794  windows_path="$new_path"
37795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37796    unix_path=`$CYGPATH -u "$windows_path"`
37797    new_path="$unix_path"
37798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37800    new_path="$unix_path"
37801  fi
37802
37803    fi
37804
37805    if test "x$new_path" = x; then
37806      # It's still not found. Now this is an unrecoverable error.
37807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37808$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37809      has_space=`$ECHO "$complete" | $GREP " "`
37810      if test "x$has_space" != x; then
37811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37813      fi
37814      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37815    fi
37816  fi
37817
37818  # Now new_path has a complete unix path to the binary
37819  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37820    # Keep paths in /bin as-is, but remove trailing .exe if any
37821    new_path="${new_path/%.exe/}"
37822    # Do not save /bin paths to all_fixpath_prefixes!
37823  else
37824    # Not in mixed or Windows style, start by that.
37825    new_path=`cmd //c echo $new_path`
37826
37827  input_path="$new_path"
37828  # Check if we need to convert this using DOS-style short mode. If the path
37829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37830  # take no chances and rewrite it.
37831  # Note: m4 eats our [], so we need to use [ and ] instead.
37832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37833  if test "x$has_forbidden_chars" != x; then
37834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37836  fi
37837
37838    # Output is in $new_path
37839
37840  windows_path="$new_path"
37841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37842    unix_path=`$CYGPATH -u "$windows_path"`
37843    new_path="$unix_path"
37844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37846    new_path="$unix_path"
37847  fi
37848
37849    # remove trailing .exe if any
37850    new_path="${new_path/%.exe/}"
37851
37852    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37853    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37854  fi
37855
37856    else
37857      # We're on a unix platform. Hooray! :)
37858      # First separate the path from the arguments. This will split at the first
37859      # space.
37860      complete="$DUMPBIN"
37861      path="${complete%% *}"
37862      tmp="$complete EOL"
37863      arguments="${tmp#* }"
37864
37865      # Cannot rely on the command "which" here since it doesn't always work.
37866      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37867      if test -z "$is_absolute_path"; then
37868        # Path to executable is not absolute. Find it.
37869        IFS_save="$IFS"
37870        IFS=:
37871        for p in $PATH; do
37872          if test -f "$p/$path" && test -x "$p/$path"; then
37873            new_path="$p/$path"
37874            break
37875          fi
37876        done
37877        IFS="$IFS_save"
37878      else
37879        # This is an absolute path, we can use it without further modifications.
37880        new_path="$path"
37881      fi
37882
37883      if test "x$new_path" = x; then
37884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37885$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37886        has_space=`$ECHO "$complete" | $GREP " "`
37887        if test "x$has_space" != x; then
37888          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37890        fi
37891        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37892      fi
37893    fi
37894
37895    # Now join together the path and the arguments once again
37896    if test "x$arguments" != xEOL; then
37897      new_complete="$new_path ${arguments% *}"
37898    else
37899      new_complete="$new_path"
37900    fi
37901
37902    if test "x$complete" != "x$new_complete"; then
37903      DUMPBIN="$new_complete"
37904      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37905$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37906    fi
37907  fi
37908
37909    # We need to check for 'msbuild.exe' because at the place where we expect to
37910    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37911    # won't find the 'msbuild.exe' executable in that case (and the
37912    # 'ac_executable_extensions' is unusable due to performance reasons).
37913    # Notice that we intentionally don't fix up the path to MSBUILD because we
37914    # will call it in a DOS shell during freetype detection on Windows (see
37915    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37916    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37917set dummy msbuild.exe; ac_word=$2
37918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37919$as_echo_n "checking for $ac_word... " >&6; }
37920if ${ac_cv_prog_MSBUILD+:} false; then :
37921  $as_echo_n "(cached) " >&6
37922else
37923  if test -n "$MSBUILD"; then
37924  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37925else
37926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37927for as_dir in $PATH
37928do
37929  IFS=$as_save_IFS
37930  test -z "$as_dir" && as_dir=.
37931    for ac_exec_ext in '' $ac_executable_extensions; do
37932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37933    ac_cv_prog_MSBUILD="msbuild.exe"
37934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37935    break 2
37936  fi
37937done
37938  done
37939IFS=$as_save_IFS
37940
37941fi
37942fi
37943MSBUILD=$ac_cv_prog_MSBUILD
37944if test -n "$MSBUILD"; then
37945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37946$as_echo "$MSBUILD" >&6; }
37947else
37948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37949$as_echo "no" >&6; }
37950fi
37951
37952
37953  fi
37954
37955  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37956
37957
37958  # Publish this variable in the help.
37959
37960
37961  if [ -z "${STRIP+x}" ]; then
37962    # The variable is not set by user, try to locate tool using the code snippet
37963    for ac_prog in strip
37964do
37965  # Extract the first word of "$ac_prog", so it can be a program name with args.
37966set dummy $ac_prog; ac_word=$2
37967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37968$as_echo_n "checking for $ac_word... " >&6; }
37969if ${ac_cv_path_STRIP+:} false; then :
37970  $as_echo_n "(cached) " >&6
37971else
37972  case $STRIP in
37973  [\\/]* | ?:[\\/]*)
37974  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37975  ;;
37976  *)
37977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37978for as_dir in $PATH
37979do
37980  IFS=$as_save_IFS
37981  test -z "$as_dir" && as_dir=.
37982    for ac_exec_ext in '' $ac_executable_extensions; do
37983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37984    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37986    break 2
37987  fi
37988done
37989  done
37990IFS=$as_save_IFS
37991
37992  ;;
37993esac
37994fi
37995STRIP=$ac_cv_path_STRIP
37996if test -n "$STRIP"; then
37997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37998$as_echo "$STRIP" >&6; }
37999else
38000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38001$as_echo "no" >&6; }
38002fi
38003
38004
38005  test -n "$STRIP" && break
38006done
38007
38008  else
38009    # The variable is set, but is it from the command line or the environment?
38010
38011    # Try to remove the string !STRIP! from our list.
38012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38014      # If it failed, the variable was not from the command line. Ignore it,
38015      # but warn the user (except for BASH, which is always set by the calling BASH).
38016      if test "xSTRIP" != xBASH; then
38017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38018$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38019      fi
38020      # Try to locate tool using the code snippet
38021      for ac_prog in strip
38022do
38023  # Extract the first word of "$ac_prog", so it can be a program name with args.
38024set dummy $ac_prog; ac_word=$2
38025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38026$as_echo_n "checking for $ac_word... " >&6; }
38027if ${ac_cv_path_STRIP+:} false; then :
38028  $as_echo_n "(cached) " >&6
38029else
38030  case $STRIP in
38031  [\\/]* | ?:[\\/]*)
38032  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38033  ;;
38034  *)
38035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38036for as_dir in $PATH
38037do
38038  IFS=$as_save_IFS
38039  test -z "$as_dir" && as_dir=.
38040    for ac_exec_ext in '' $ac_executable_extensions; do
38041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38042    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38044    break 2
38045  fi
38046done
38047  done
38048IFS=$as_save_IFS
38049
38050  ;;
38051esac
38052fi
38053STRIP=$ac_cv_path_STRIP
38054if test -n "$STRIP"; then
38055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38056$as_echo "$STRIP" >&6; }
38057else
38058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38059$as_echo "no" >&6; }
38060fi
38061
38062
38063  test -n "$STRIP" && break
38064done
38065
38066    else
38067      # If it succeeded, then it was overridden by the user. We will use it
38068      # for the tool.
38069
38070      # First remove it from the list of overridden variables, so we can test
38071      # for unknown variables in the end.
38072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38073
38074      # Check if we try to supply an empty value
38075      if test "x$STRIP" = x; then
38076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38077$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38079$as_echo_n "checking for STRIP... " >&6; }
38080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38081$as_echo "disabled" >&6; }
38082      else
38083        # Check if the provided tool contains a complete path.
38084        tool_specified="$STRIP"
38085        tool_basename="${tool_specified##*/}"
38086        if test "x$tool_basename" = "x$tool_specified"; then
38087          # A command without a complete path is provided, search $PATH.
38088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38089$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38090          # Extract the first word of "$tool_basename", so it can be a program name with args.
38091set dummy $tool_basename; ac_word=$2
38092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38093$as_echo_n "checking for $ac_word... " >&6; }
38094if ${ac_cv_path_STRIP+:} false; then :
38095  $as_echo_n "(cached) " >&6
38096else
38097  case $STRIP in
38098  [\\/]* | ?:[\\/]*)
38099  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38100  ;;
38101  *)
38102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38103for as_dir in $PATH
38104do
38105  IFS=$as_save_IFS
38106  test -z "$as_dir" && as_dir=.
38107    for ac_exec_ext in '' $ac_executable_extensions; do
38108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38109    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38111    break 2
38112  fi
38113done
38114  done
38115IFS=$as_save_IFS
38116
38117  ;;
38118esac
38119fi
38120STRIP=$ac_cv_path_STRIP
38121if test -n "$STRIP"; then
38122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38123$as_echo "$STRIP" >&6; }
38124else
38125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38126$as_echo "no" >&6; }
38127fi
38128
38129
38130          if test "x$STRIP" = x; then
38131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38132          fi
38133        else
38134          # Otherwise we believe it is a complete path. Use it as it is.
38135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38136$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38138$as_echo_n "checking for STRIP... " >&6; }
38139          if test ! -x "$tool_specified"; then
38140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38141$as_echo "not found" >&6; }
38142            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38143          fi
38144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38145$as_echo "$tool_specified" >&6; }
38146        fi
38147      fi
38148    fi
38149
38150  fi
38151
38152
38153
38154  # Only process if variable expands to non-empty
38155
38156  if test "x$STRIP" != x; then
38157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38158
38159  # First separate the path from the arguments. This will split at the first
38160  # space.
38161  complete="$STRIP"
38162  path="${complete%% *}"
38163  tmp="$complete EOL"
38164  arguments="${tmp#* }"
38165
38166  # Input might be given as Windows format, start by converting to
38167  # unix format.
38168  new_path=`$CYGPATH -u "$path"`
38169
38170  # Now try to locate executable using which
38171  new_path=`$WHICH "$new_path" 2> /dev/null`
38172  # bat and cmd files are not always considered executable in cygwin causing which
38173  # to not find them
38174  if test "x$new_path" = x \
38175      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38176      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38177    new_path=`$CYGPATH -u "$path"`
38178  fi
38179  if test "x$new_path" = x; then
38180    # Oops. Which didn't find the executable.
38181    # The splitting of arguments from the executable at a space might have been incorrect,
38182    # since paths with space are more likely in Windows. Give it another try with the whole
38183    # argument.
38184    path="$complete"
38185    arguments="EOL"
38186    new_path=`$CYGPATH -u "$path"`
38187    new_path=`$WHICH "$new_path" 2> /dev/null`
38188    # bat and cmd files are not always considered executable in cygwin causing which
38189    # to not find them
38190    if test "x$new_path" = x \
38191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38193      new_path=`$CYGPATH -u "$path"`
38194    fi
38195    if test "x$new_path" = x; then
38196      # It's still not found. Now this is an unrecoverable error.
38197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38198$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38199      has_space=`$ECHO "$complete" | $GREP " "`
38200      if test "x$has_space" != x; then
38201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38203      fi
38204      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38205    fi
38206  fi
38207
38208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38211  # "foo.exe" is OK but "foo" is an error.
38212  #
38213  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38214  # It is also a way to make sure we got the proper file name for the real test later on.
38215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38216  if test "x$test_shortpath" = x; then
38217    # Short path failed, file does not exist as specified.
38218    # Try adding .exe or .cmd
38219    if test -f "${new_path}.exe"; then
38220      input_to_shortpath="${new_path}.exe"
38221    elif test -f "${new_path}.cmd"; then
38222      input_to_shortpath="${new_path}.cmd"
38223    else
38224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38225$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38226      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38227$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38228      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38229    fi
38230  else
38231    input_to_shortpath="$new_path"
38232  fi
38233
38234  # Call helper function which possibly converts this using DOS-style short mode.
38235  # If so, the updated path is stored in $new_path.
38236  new_path="$input_to_shortpath"
38237
38238  input_path="$input_to_shortpath"
38239  # Check if we need to convert this using DOS-style short mode. If the path
38240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38241  # take no chances and rewrite it.
38242  # Note: m4 eats our [], so we need to use [ and ] instead.
38243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38244  if test "x$has_forbidden_chars" != x; then
38245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38249      # Going to short mode and back again did indeed matter. Since short mode is
38250      # case insensitive, let's make it lowercase to improve readability.
38251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38252      # Now convert it back to Unix-style (cygpath)
38253      input_path=`$CYGPATH -u "$shortmode_path"`
38254      new_path="$input_path"
38255    fi
38256  fi
38257
38258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38259  if test "x$test_cygdrive_prefix" = x; then
38260    # As a simple fix, exclude /usr/bin since it's not a real path.
38261    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38263      # a path prefixed by /cygdrive for fixpath to work.
38264      new_path="$CYGWIN_ROOT_PATH$input_path"
38265    fi
38266  fi
38267
38268  # remove trailing .exe if any
38269  new_path="${new_path/%.exe/}"
38270
38271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38272
38273  # First separate the path from the arguments. This will split at the first
38274  # space.
38275  complete="$STRIP"
38276  path="${complete%% *}"
38277  tmp="$complete EOL"
38278  arguments="${tmp#* }"
38279
38280  # Input might be given as Windows format, start by converting to
38281  # unix format.
38282  new_path="$path"
38283
38284  windows_path="$new_path"
38285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38286    unix_path=`$CYGPATH -u "$windows_path"`
38287    new_path="$unix_path"
38288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38290    new_path="$unix_path"
38291  fi
38292
38293
38294  # Now try to locate executable using which
38295  new_path=`$WHICH "$new_path" 2> /dev/null`
38296
38297  if test "x$new_path" = x; then
38298    # Oops. Which didn't find the executable.
38299    # The splitting of arguments from the executable at a space might have been incorrect,
38300    # since paths with space are more likely in Windows. Give it another try with the whole
38301    # argument.
38302    path="$complete"
38303    arguments="EOL"
38304    new_path="$path"
38305
38306  windows_path="$new_path"
38307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38308    unix_path=`$CYGPATH -u "$windows_path"`
38309    new_path="$unix_path"
38310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38312    new_path="$unix_path"
38313  fi
38314
38315
38316    new_path=`$WHICH "$new_path" 2> /dev/null`
38317    # bat and cmd files are not always considered executable in MSYS causing which
38318    # to not find them
38319    if test "x$new_path" = x \
38320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38322      new_path="$path"
38323
38324  windows_path="$new_path"
38325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38326    unix_path=`$CYGPATH -u "$windows_path"`
38327    new_path="$unix_path"
38328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38330    new_path="$unix_path"
38331  fi
38332
38333    fi
38334
38335    if test "x$new_path" = x; then
38336      # It's still not found. Now this is an unrecoverable error.
38337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38338$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38339      has_space=`$ECHO "$complete" | $GREP " "`
38340      if test "x$has_space" != x; then
38341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38343      fi
38344      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38345    fi
38346  fi
38347
38348  # Now new_path has a complete unix path to the binary
38349  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38350    # Keep paths in /bin as-is, but remove trailing .exe if any
38351    new_path="${new_path/%.exe/}"
38352    # Do not save /bin paths to all_fixpath_prefixes!
38353  else
38354    # Not in mixed or Windows style, start by that.
38355    new_path=`cmd //c echo $new_path`
38356
38357  input_path="$new_path"
38358  # Check if we need to convert this using DOS-style short mode. If the path
38359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38360  # take no chances and rewrite it.
38361  # Note: m4 eats our [], so we need to use [ and ] instead.
38362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38363  if test "x$has_forbidden_chars" != x; then
38364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38366  fi
38367
38368    # Output is in $new_path
38369
38370  windows_path="$new_path"
38371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38372    unix_path=`$CYGPATH -u "$windows_path"`
38373    new_path="$unix_path"
38374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38376    new_path="$unix_path"
38377  fi
38378
38379    # remove trailing .exe if any
38380    new_path="${new_path/%.exe/}"
38381
38382    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38383    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38384  fi
38385
38386    else
38387      # We're on a unix platform. Hooray! :)
38388      # First separate the path from the arguments. This will split at the first
38389      # space.
38390      complete="$STRIP"
38391      path="${complete%% *}"
38392      tmp="$complete EOL"
38393      arguments="${tmp#* }"
38394
38395      # Cannot rely on the command "which" here since it doesn't always work.
38396      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38397      if test -z "$is_absolute_path"; then
38398        # Path to executable is not absolute. Find it.
38399        IFS_save="$IFS"
38400        IFS=:
38401        for p in $PATH; do
38402          if test -f "$p/$path" && test -x "$p/$path"; then
38403            new_path="$p/$path"
38404            break
38405          fi
38406        done
38407        IFS="$IFS_save"
38408      else
38409        # This is an absolute path, we can use it without further modifications.
38410        new_path="$path"
38411      fi
38412
38413      if test "x$new_path" = x; then
38414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38415$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38416        has_space=`$ECHO "$complete" | $GREP " "`
38417        if test "x$has_space" != x; then
38418          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38419$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38420        fi
38421        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38422      fi
38423    fi
38424
38425    # Now join together the path and the arguments once again
38426    if test "x$arguments" != xEOL; then
38427      new_complete="$new_path ${arguments% *}"
38428    else
38429      new_complete="$new_path"
38430    fi
38431
38432    if test "x$complete" != "x$new_complete"; then
38433      STRIP="$new_complete"
38434      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38435$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38436    fi
38437  fi
38438
38439
38440
38441  # Publish this variable in the help.
38442
38443
38444  if [ -z "${NM+x}" ]; then
38445    # The variable is not set by user, try to locate tool using the code snippet
38446    for ac_prog in nm
38447do
38448  # Extract the first word of "$ac_prog", so it can be a program name with args.
38449set dummy $ac_prog; ac_word=$2
38450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38451$as_echo_n "checking for $ac_word... " >&6; }
38452if ${ac_cv_path_NM+:} false; then :
38453  $as_echo_n "(cached) " >&6
38454else
38455  case $NM in
38456  [\\/]* | ?:[\\/]*)
38457  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38458  ;;
38459  *)
38460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38461for as_dir in $PATH
38462do
38463  IFS=$as_save_IFS
38464  test -z "$as_dir" && as_dir=.
38465    for ac_exec_ext in '' $ac_executable_extensions; do
38466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38467    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38469    break 2
38470  fi
38471done
38472  done
38473IFS=$as_save_IFS
38474
38475  ;;
38476esac
38477fi
38478NM=$ac_cv_path_NM
38479if test -n "$NM"; then
38480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38481$as_echo "$NM" >&6; }
38482else
38483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38484$as_echo "no" >&6; }
38485fi
38486
38487
38488  test -n "$NM" && break
38489done
38490
38491  else
38492    # The variable is set, but is it from the command line or the environment?
38493
38494    # Try to remove the string !NM! from our list.
38495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38497      # If it failed, the variable was not from the command line. Ignore it,
38498      # but warn the user (except for BASH, which is always set by the calling BASH).
38499      if test "xNM" != xBASH; then
38500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38501$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38502      fi
38503      # Try to locate tool using the code snippet
38504      for ac_prog in nm
38505do
38506  # Extract the first word of "$ac_prog", so it can be a program name with args.
38507set dummy $ac_prog; ac_word=$2
38508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38509$as_echo_n "checking for $ac_word... " >&6; }
38510if ${ac_cv_path_NM+:} false; then :
38511  $as_echo_n "(cached) " >&6
38512else
38513  case $NM in
38514  [\\/]* | ?:[\\/]*)
38515  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38516  ;;
38517  *)
38518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38519for as_dir in $PATH
38520do
38521  IFS=$as_save_IFS
38522  test -z "$as_dir" && as_dir=.
38523    for ac_exec_ext in '' $ac_executable_extensions; do
38524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38525    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38527    break 2
38528  fi
38529done
38530  done
38531IFS=$as_save_IFS
38532
38533  ;;
38534esac
38535fi
38536NM=$ac_cv_path_NM
38537if test -n "$NM"; then
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38539$as_echo "$NM" >&6; }
38540else
38541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38542$as_echo "no" >&6; }
38543fi
38544
38545
38546  test -n "$NM" && break
38547done
38548
38549    else
38550      # If it succeeded, then it was overridden by the user. We will use it
38551      # for the tool.
38552
38553      # First remove it from the list of overridden variables, so we can test
38554      # for unknown variables in the end.
38555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38556
38557      # Check if we try to supply an empty value
38558      if test "x$NM" = x; then
38559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38560$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38562$as_echo_n "checking for NM... " >&6; }
38563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38564$as_echo "disabled" >&6; }
38565      else
38566        # Check if the provided tool contains a complete path.
38567        tool_specified="$NM"
38568        tool_basename="${tool_specified##*/}"
38569        if test "x$tool_basename" = "x$tool_specified"; then
38570          # A command without a complete path is provided, search $PATH.
38571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38572$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38573          # Extract the first word of "$tool_basename", so it can be a program name with args.
38574set dummy $tool_basename; ac_word=$2
38575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38576$as_echo_n "checking for $ac_word... " >&6; }
38577if ${ac_cv_path_NM+:} false; then :
38578  $as_echo_n "(cached) " >&6
38579else
38580  case $NM in
38581  [\\/]* | ?:[\\/]*)
38582  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38583  ;;
38584  *)
38585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38586for as_dir in $PATH
38587do
38588  IFS=$as_save_IFS
38589  test -z "$as_dir" && as_dir=.
38590    for ac_exec_ext in '' $ac_executable_extensions; do
38591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38592    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38594    break 2
38595  fi
38596done
38597  done
38598IFS=$as_save_IFS
38599
38600  ;;
38601esac
38602fi
38603NM=$ac_cv_path_NM
38604if test -n "$NM"; then
38605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38606$as_echo "$NM" >&6; }
38607else
38608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38609$as_echo "no" >&6; }
38610fi
38611
38612
38613          if test "x$NM" = x; then
38614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38615          fi
38616        else
38617          # Otherwise we believe it is a complete path. Use it as it is.
38618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38619$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38621$as_echo_n "checking for NM... " >&6; }
38622          if test ! -x "$tool_specified"; then
38623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38624$as_echo "not found" >&6; }
38625            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38626          fi
38627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38628$as_echo "$tool_specified" >&6; }
38629        fi
38630      fi
38631    fi
38632
38633  fi
38634
38635
38636
38637  # Only process if variable expands to non-empty
38638
38639  if test "x$NM" != x; then
38640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38641
38642  # First separate the path from the arguments. This will split at the first
38643  # space.
38644  complete="$NM"
38645  path="${complete%% *}"
38646  tmp="$complete EOL"
38647  arguments="${tmp#* }"
38648
38649  # Input might be given as Windows format, start by converting to
38650  # unix format.
38651  new_path=`$CYGPATH -u "$path"`
38652
38653  # Now try to locate executable using which
38654  new_path=`$WHICH "$new_path" 2> /dev/null`
38655  # bat and cmd files are not always considered executable in cygwin causing which
38656  # to not find them
38657  if test "x$new_path" = x \
38658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38660    new_path=`$CYGPATH -u "$path"`
38661  fi
38662  if test "x$new_path" = x; then
38663    # Oops. Which didn't find the executable.
38664    # The splitting of arguments from the executable at a space might have been incorrect,
38665    # since paths with space are more likely in Windows. Give it another try with the whole
38666    # argument.
38667    path="$complete"
38668    arguments="EOL"
38669    new_path=`$CYGPATH -u "$path"`
38670    new_path=`$WHICH "$new_path" 2> /dev/null`
38671    # bat and cmd files are not always considered executable in cygwin causing which
38672    # to not find them
38673    if test "x$new_path" = x \
38674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38676      new_path=`$CYGPATH -u "$path"`
38677    fi
38678    if test "x$new_path" = x; then
38679      # It's still not found. Now this is an unrecoverable error.
38680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38681$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38682      has_space=`$ECHO "$complete" | $GREP " "`
38683      if test "x$has_space" != x; then
38684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38686      fi
38687      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38688    fi
38689  fi
38690
38691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38694  # "foo.exe" is OK but "foo" is an error.
38695  #
38696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38697  # It is also a way to make sure we got the proper file name for the real test later on.
38698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38699  if test "x$test_shortpath" = x; then
38700    # Short path failed, file does not exist as specified.
38701    # Try adding .exe or .cmd
38702    if test -f "${new_path}.exe"; then
38703      input_to_shortpath="${new_path}.exe"
38704    elif test -f "${new_path}.cmd"; then
38705      input_to_shortpath="${new_path}.cmd"
38706    else
38707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38708$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38711      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38712    fi
38713  else
38714    input_to_shortpath="$new_path"
38715  fi
38716
38717  # Call helper function which possibly converts this using DOS-style short mode.
38718  # If so, the updated path is stored in $new_path.
38719  new_path="$input_to_shortpath"
38720
38721  input_path="$input_to_shortpath"
38722  # Check if we need to convert this using DOS-style short mode. If the path
38723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38724  # take no chances and rewrite it.
38725  # Note: m4 eats our [], so we need to use [ and ] instead.
38726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38727  if test "x$has_forbidden_chars" != x; then
38728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38732      # Going to short mode and back again did indeed matter. Since short mode is
38733      # case insensitive, let's make it lowercase to improve readability.
38734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38735      # Now convert it back to Unix-style (cygpath)
38736      input_path=`$CYGPATH -u "$shortmode_path"`
38737      new_path="$input_path"
38738    fi
38739  fi
38740
38741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38742  if test "x$test_cygdrive_prefix" = x; then
38743    # As a simple fix, exclude /usr/bin since it's not a real path.
38744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38746      # a path prefixed by /cygdrive for fixpath to work.
38747      new_path="$CYGWIN_ROOT_PATH$input_path"
38748    fi
38749  fi
38750
38751  # remove trailing .exe if any
38752  new_path="${new_path/%.exe/}"
38753
38754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38755
38756  # First separate the path from the arguments. This will split at the first
38757  # space.
38758  complete="$NM"
38759  path="${complete%% *}"
38760  tmp="$complete EOL"
38761  arguments="${tmp#* }"
38762
38763  # Input might be given as Windows format, start by converting to
38764  # unix format.
38765  new_path="$path"
38766
38767  windows_path="$new_path"
38768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38769    unix_path=`$CYGPATH -u "$windows_path"`
38770    new_path="$unix_path"
38771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38773    new_path="$unix_path"
38774  fi
38775
38776
38777  # Now try to locate executable using which
38778  new_path=`$WHICH "$new_path" 2> /dev/null`
38779
38780  if test "x$new_path" = x; then
38781    # Oops. Which didn't find the executable.
38782    # The splitting of arguments from the executable at a space might have been incorrect,
38783    # since paths with space are more likely in Windows. Give it another try with the whole
38784    # argument.
38785    path="$complete"
38786    arguments="EOL"
38787    new_path="$path"
38788
38789  windows_path="$new_path"
38790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38791    unix_path=`$CYGPATH -u "$windows_path"`
38792    new_path="$unix_path"
38793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38795    new_path="$unix_path"
38796  fi
38797
38798
38799    new_path=`$WHICH "$new_path" 2> /dev/null`
38800    # bat and cmd files are not always considered executable in MSYS causing which
38801    # to not find them
38802    if test "x$new_path" = x \
38803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38805      new_path="$path"
38806
38807  windows_path="$new_path"
38808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38809    unix_path=`$CYGPATH -u "$windows_path"`
38810    new_path="$unix_path"
38811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38813    new_path="$unix_path"
38814  fi
38815
38816    fi
38817
38818    if test "x$new_path" = x; then
38819      # It's still not found. Now this is an unrecoverable error.
38820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38821$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38822      has_space=`$ECHO "$complete" | $GREP " "`
38823      if test "x$has_space" != x; then
38824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38826      fi
38827      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38828    fi
38829  fi
38830
38831  # Now new_path has a complete unix path to the binary
38832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38833    # Keep paths in /bin as-is, but remove trailing .exe if any
38834    new_path="${new_path/%.exe/}"
38835    # Do not save /bin paths to all_fixpath_prefixes!
38836  else
38837    # Not in mixed or Windows style, start by that.
38838    new_path=`cmd //c echo $new_path`
38839
38840  input_path="$new_path"
38841  # Check if we need to convert this using DOS-style short mode. If the path
38842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38843  # take no chances and rewrite it.
38844  # Note: m4 eats our [], so we need to use [ and ] instead.
38845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38846  if test "x$has_forbidden_chars" != x; then
38847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38849  fi
38850
38851    # Output is in $new_path
38852
38853  windows_path="$new_path"
38854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38855    unix_path=`$CYGPATH -u "$windows_path"`
38856    new_path="$unix_path"
38857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38859    new_path="$unix_path"
38860  fi
38861
38862    # remove trailing .exe if any
38863    new_path="${new_path/%.exe/}"
38864
38865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38867  fi
38868
38869    else
38870      # We're on a unix platform. Hooray! :)
38871      # First separate the path from the arguments. This will split at the first
38872      # space.
38873      complete="$NM"
38874      path="${complete%% *}"
38875      tmp="$complete EOL"
38876      arguments="${tmp#* }"
38877
38878      # Cannot rely on the command "which" here since it doesn't always work.
38879      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38880      if test -z "$is_absolute_path"; then
38881        # Path to executable is not absolute. Find it.
38882        IFS_save="$IFS"
38883        IFS=:
38884        for p in $PATH; do
38885          if test -f "$p/$path" && test -x "$p/$path"; then
38886            new_path="$p/$path"
38887            break
38888          fi
38889        done
38890        IFS="$IFS_save"
38891      else
38892        # This is an absolute path, we can use it without further modifications.
38893        new_path="$path"
38894      fi
38895
38896      if test "x$new_path" = x; then
38897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38898$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38899        has_space=`$ECHO "$complete" | $GREP " "`
38900        if test "x$has_space" != x; then
38901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38903        fi
38904        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38905      fi
38906    fi
38907
38908    # Now join together the path and the arguments once again
38909    if test "x$arguments" != xEOL; then
38910      new_complete="$new_path ${arguments% *}"
38911    else
38912      new_complete="$new_path"
38913    fi
38914
38915    if test "x$complete" != "x$new_complete"; then
38916      NM="$new_complete"
38917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38918$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38919    fi
38920  fi
38921
38922
38923
38924  # Publish this variable in the help.
38925
38926
38927  if [ -z "${GNM+x}" ]; then
38928    # The variable is not set by user, try to locate tool using the code snippet
38929    for ac_prog in gnm
38930do
38931  # Extract the first word of "$ac_prog", so it can be a program name with args.
38932set dummy $ac_prog; ac_word=$2
38933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38934$as_echo_n "checking for $ac_word... " >&6; }
38935if ${ac_cv_path_GNM+:} false; then :
38936  $as_echo_n "(cached) " >&6
38937else
38938  case $GNM in
38939  [\\/]* | ?:[\\/]*)
38940  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38941  ;;
38942  *)
38943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38944for as_dir in $PATH
38945do
38946  IFS=$as_save_IFS
38947  test -z "$as_dir" && as_dir=.
38948    for ac_exec_ext in '' $ac_executable_extensions; do
38949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38950    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38952    break 2
38953  fi
38954done
38955  done
38956IFS=$as_save_IFS
38957
38958  ;;
38959esac
38960fi
38961GNM=$ac_cv_path_GNM
38962if test -n "$GNM"; then
38963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38964$as_echo "$GNM" >&6; }
38965else
38966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38967$as_echo "no" >&6; }
38968fi
38969
38970
38971  test -n "$GNM" && break
38972done
38973
38974  else
38975    # The variable is set, but is it from the command line or the environment?
38976
38977    # Try to remove the string !GNM! from our list.
38978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38980      # If it failed, the variable was not from the command line. Ignore it,
38981      # but warn the user (except for BASH, which is always set by the calling BASH).
38982      if test "xGNM" != xBASH; then
38983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38984$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38985      fi
38986      # Try to locate tool using the code snippet
38987      for ac_prog in gnm
38988do
38989  # Extract the first word of "$ac_prog", so it can be a program name with args.
38990set dummy $ac_prog; ac_word=$2
38991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38992$as_echo_n "checking for $ac_word... " >&6; }
38993if ${ac_cv_path_GNM+:} false; then :
38994  $as_echo_n "(cached) " >&6
38995else
38996  case $GNM in
38997  [\\/]* | ?:[\\/]*)
38998  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38999  ;;
39000  *)
39001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39002for as_dir in $PATH
39003do
39004  IFS=$as_save_IFS
39005  test -z "$as_dir" && as_dir=.
39006    for ac_exec_ext in '' $ac_executable_extensions; do
39007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39008    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39010    break 2
39011  fi
39012done
39013  done
39014IFS=$as_save_IFS
39015
39016  ;;
39017esac
39018fi
39019GNM=$ac_cv_path_GNM
39020if test -n "$GNM"; then
39021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39022$as_echo "$GNM" >&6; }
39023else
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025$as_echo "no" >&6; }
39026fi
39027
39028
39029  test -n "$GNM" && break
39030done
39031
39032    else
39033      # If it succeeded, then it was overridden by the user. We will use it
39034      # for the tool.
39035
39036      # First remove it from the list of overridden variables, so we can test
39037      # for unknown variables in the end.
39038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39039
39040      # Check if we try to supply an empty value
39041      if test "x$GNM" = x; then
39042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39043$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39045$as_echo_n "checking for GNM... " >&6; }
39046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39047$as_echo "disabled" >&6; }
39048      else
39049        # Check if the provided tool contains a complete path.
39050        tool_specified="$GNM"
39051        tool_basename="${tool_specified##*/}"
39052        if test "x$tool_basename" = "x$tool_specified"; then
39053          # A command without a complete path is provided, search $PATH.
39054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39055$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39056          # Extract the first word of "$tool_basename", so it can be a program name with args.
39057set dummy $tool_basename; ac_word=$2
39058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39059$as_echo_n "checking for $ac_word... " >&6; }
39060if ${ac_cv_path_GNM+:} false; then :
39061  $as_echo_n "(cached) " >&6
39062else
39063  case $GNM in
39064  [\\/]* | ?:[\\/]*)
39065  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39066  ;;
39067  *)
39068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39069for as_dir in $PATH
39070do
39071  IFS=$as_save_IFS
39072  test -z "$as_dir" && as_dir=.
39073    for ac_exec_ext in '' $ac_executable_extensions; do
39074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39075    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39077    break 2
39078  fi
39079done
39080  done
39081IFS=$as_save_IFS
39082
39083  ;;
39084esac
39085fi
39086GNM=$ac_cv_path_GNM
39087if test -n "$GNM"; then
39088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39089$as_echo "$GNM" >&6; }
39090else
39091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39092$as_echo "no" >&6; }
39093fi
39094
39095
39096          if test "x$GNM" = x; then
39097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39098          fi
39099        else
39100          # Otherwise we believe it is a complete path. Use it as it is.
39101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39102$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39104$as_echo_n "checking for GNM... " >&6; }
39105          if test ! -x "$tool_specified"; then
39106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39107$as_echo "not found" >&6; }
39108            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39109          fi
39110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39111$as_echo "$tool_specified" >&6; }
39112        fi
39113      fi
39114    fi
39115
39116  fi
39117
39118
39119
39120  # Only process if variable expands to non-empty
39121
39122  if test "x$GNM" != x; then
39123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39124
39125  # First separate the path from the arguments. This will split at the first
39126  # space.
39127  complete="$GNM"
39128  path="${complete%% *}"
39129  tmp="$complete EOL"
39130  arguments="${tmp#* }"
39131
39132  # Input might be given as Windows format, start by converting to
39133  # unix format.
39134  new_path=`$CYGPATH -u "$path"`
39135
39136  # Now try to locate executable using which
39137  new_path=`$WHICH "$new_path" 2> /dev/null`
39138  # bat and cmd files are not always considered executable in cygwin causing which
39139  # to not find them
39140  if test "x$new_path" = x \
39141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39143    new_path=`$CYGPATH -u "$path"`
39144  fi
39145  if test "x$new_path" = x; then
39146    # Oops. Which didn't find the executable.
39147    # The splitting of arguments from the executable at a space might have been incorrect,
39148    # since paths with space are more likely in Windows. Give it another try with the whole
39149    # argument.
39150    path="$complete"
39151    arguments="EOL"
39152    new_path=`$CYGPATH -u "$path"`
39153    new_path=`$WHICH "$new_path" 2> /dev/null`
39154    # bat and cmd files are not always considered executable in cygwin causing which
39155    # to not find them
39156    if test "x$new_path" = x \
39157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39159      new_path=`$CYGPATH -u "$path"`
39160    fi
39161    if test "x$new_path" = x; then
39162      # It's still not found. Now this is an unrecoverable error.
39163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39164$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39165      has_space=`$ECHO "$complete" | $GREP " "`
39166      if test "x$has_space" != x; then
39167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39169      fi
39170      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39171    fi
39172  fi
39173
39174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39177  # "foo.exe" is OK but "foo" is an error.
39178  #
39179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39180  # It is also a way to make sure we got the proper file name for the real test later on.
39181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39182  if test "x$test_shortpath" = x; then
39183    # Short path failed, file does not exist as specified.
39184    # Try adding .exe or .cmd
39185    if test -f "${new_path}.exe"; then
39186      input_to_shortpath="${new_path}.exe"
39187    elif test -f "${new_path}.cmd"; then
39188      input_to_shortpath="${new_path}.cmd"
39189    else
39190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39191$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39194      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39195    fi
39196  else
39197    input_to_shortpath="$new_path"
39198  fi
39199
39200  # Call helper function which possibly converts this using DOS-style short mode.
39201  # If so, the updated path is stored in $new_path.
39202  new_path="$input_to_shortpath"
39203
39204  input_path="$input_to_shortpath"
39205  # Check if we need to convert this using DOS-style short mode. If the path
39206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39207  # take no chances and rewrite it.
39208  # Note: m4 eats our [], so we need to use [ and ] instead.
39209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39210  if test "x$has_forbidden_chars" != x; then
39211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39215      # Going to short mode and back again did indeed matter. Since short mode is
39216      # case insensitive, let's make it lowercase to improve readability.
39217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39218      # Now convert it back to Unix-style (cygpath)
39219      input_path=`$CYGPATH -u "$shortmode_path"`
39220      new_path="$input_path"
39221    fi
39222  fi
39223
39224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39225  if test "x$test_cygdrive_prefix" = x; then
39226    # As a simple fix, exclude /usr/bin since it's not a real path.
39227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39229      # a path prefixed by /cygdrive for fixpath to work.
39230      new_path="$CYGWIN_ROOT_PATH$input_path"
39231    fi
39232  fi
39233
39234  # remove trailing .exe if any
39235  new_path="${new_path/%.exe/}"
39236
39237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39238
39239  # First separate the path from the arguments. This will split at the first
39240  # space.
39241  complete="$GNM"
39242  path="${complete%% *}"
39243  tmp="$complete EOL"
39244  arguments="${tmp#* }"
39245
39246  # Input might be given as Windows format, start by converting to
39247  # unix format.
39248  new_path="$path"
39249
39250  windows_path="$new_path"
39251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39252    unix_path=`$CYGPATH -u "$windows_path"`
39253    new_path="$unix_path"
39254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39256    new_path="$unix_path"
39257  fi
39258
39259
39260  # Now try to locate executable using which
39261  new_path=`$WHICH "$new_path" 2> /dev/null`
39262
39263  if test "x$new_path" = x; then
39264    # Oops. Which didn't find the executable.
39265    # The splitting of arguments from the executable at a space might have been incorrect,
39266    # since paths with space are more likely in Windows. Give it another try with the whole
39267    # argument.
39268    path="$complete"
39269    arguments="EOL"
39270    new_path="$path"
39271
39272  windows_path="$new_path"
39273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39274    unix_path=`$CYGPATH -u "$windows_path"`
39275    new_path="$unix_path"
39276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39278    new_path="$unix_path"
39279  fi
39280
39281
39282    new_path=`$WHICH "$new_path" 2> /dev/null`
39283    # bat and cmd files are not always considered executable in MSYS causing which
39284    # to not find them
39285    if test "x$new_path" = x \
39286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39288      new_path="$path"
39289
39290  windows_path="$new_path"
39291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39292    unix_path=`$CYGPATH -u "$windows_path"`
39293    new_path="$unix_path"
39294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39296    new_path="$unix_path"
39297  fi
39298
39299    fi
39300
39301    if test "x$new_path" = x; then
39302      # It's still not found. Now this is an unrecoverable error.
39303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39304$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39305      has_space=`$ECHO "$complete" | $GREP " "`
39306      if test "x$has_space" != x; then
39307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39309      fi
39310      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39311    fi
39312  fi
39313
39314  # Now new_path has a complete unix path to the binary
39315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39316    # Keep paths in /bin as-is, but remove trailing .exe if any
39317    new_path="${new_path/%.exe/}"
39318    # Do not save /bin paths to all_fixpath_prefixes!
39319  else
39320    # Not in mixed or Windows style, start by that.
39321    new_path=`cmd //c echo $new_path`
39322
39323  input_path="$new_path"
39324  # Check if we need to convert this using DOS-style short mode. If the path
39325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39326  # take no chances and rewrite it.
39327  # Note: m4 eats our [], so we need to use [ and ] instead.
39328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39329  if test "x$has_forbidden_chars" != x; then
39330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39332  fi
39333
39334    # Output is in $new_path
39335
39336  windows_path="$new_path"
39337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39338    unix_path=`$CYGPATH -u "$windows_path"`
39339    new_path="$unix_path"
39340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39342    new_path="$unix_path"
39343  fi
39344
39345    # remove trailing .exe if any
39346    new_path="${new_path/%.exe/}"
39347
39348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39350  fi
39351
39352    else
39353      # We're on a unix platform. Hooray! :)
39354      # First separate the path from the arguments. This will split at the first
39355      # space.
39356      complete="$GNM"
39357      path="${complete%% *}"
39358      tmp="$complete EOL"
39359      arguments="${tmp#* }"
39360
39361      # Cannot rely on the command "which" here since it doesn't always work.
39362      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39363      if test -z "$is_absolute_path"; then
39364        # Path to executable is not absolute. Find it.
39365        IFS_save="$IFS"
39366        IFS=:
39367        for p in $PATH; do
39368          if test -f "$p/$path" && test -x "$p/$path"; then
39369            new_path="$p/$path"
39370            break
39371          fi
39372        done
39373        IFS="$IFS_save"
39374      else
39375        # This is an absolute path, we can use it without further modifications.
39376        new_path="$path"
39377      fi
39378
39379      if test "x$new_path" = x; then
39380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39381$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39382        has_space=`$ECHO "$complete" | $GREP " "`
39383        if test "x$has_space" != x; then
39384          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39386        fi
39387        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39388      fi
39389    fi
39390
39391    # Now join together the path and the arguments once again
39392    if test "x$arguments" != xEOL; then
39393      new_complete="$new_path ${arguments% *}"
39394    else
39395      new_complete="$new_path"
39396    fi
39397
39398    if test "x$complete" != "x$new_complete"; then
39399      GNM="$new_complete"
39400      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39401$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39402    fi
39403  fi
39404
39405  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39406    # FIXME: we should unify this with the solaris case above.
39407
39408
39409  # Publish this variable in the help.
39410
39411
39412  if [ -z "${STRIP+x}" ]; then
39413    # The variable is not set by user, try to locate tool using the code snippet
39414    if test -n "$ac_tool_prefix"; then
39415  for ac_prog in strip
39416  do
39417    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39418set dummy $ac_tool_prefix$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_prog_STRIP+:} false; then :
39422  $as_echo_n "(cached) " >&6
39423else
39424  if test -n "$STRIP"; then
39425  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39426else
39427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39428for as_dir in $PATH
39429do
39430  IFS=$as_save_IFS
39431  test -z "$as_dir" && as_dir=.
39432    for ac_exec_ext in '' $ac_executable_extensions; do
39433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39434    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39436    break 2
39437  fi
39438done
39439  done
39440IFS=$as_save_IFS
39441
39442fi
39443fi
39444STRIP=$ac_cv_prog_STRIP
39445if test -n "$STRIP"; then
39446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39447$as_echo "$STRIP" >&6; }
39448else
39449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39450$as_echo "no" >&6; }
39451fi
39452
39453
39454    test -n "$STRIP" && break
39455  done
39456fi
39457if test -z "$STRIP"; then
39458  ac_ct_STRIP=$STRIP
39459  for ac_prog in strip
39460do
39461  # Extract the first word of "$ac_prog", so it can be a program name with args.
39462set dummy $ac_prog; ac_word=$2
39463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39464$as_echo_n "checking for $ac_word... " >&6; }
39465if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39466  $as_echo_n "(cached) " >&6
39467else
39468  if test -n "$ac_ct_STRIP"; then
39469  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39470else
39471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39472for as_dir in $PATH
39473do
39474  IFS=$as_save_IFS
39475  test -z "$as_dir" && as_dir=.
39476    for ac_exec_ext in '' $ac_executable_extensions; do
39477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39478    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39480    break 2
39481  fi
39482done
39483  done
39484IFS=$as_save_IFS
39485
39486fi
39487fi
39488ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39489if test -n "$ac_ct_STRIP"; then
39490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39491$as_echo "$ac_ct_STRIP" >&6; }
39492else
39493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39494$as_echo "no" >&6; }
39495fi
39496
39497
39498  test -n "$ac_ct_STRIP" && break
39499done
39500
39501  if test "x$ac_ct_STRIP" = x; then
39502    STRIP=""
39503  else
39504    case $cross_compiling:$ac_tool_warned in
39505yes:)
39506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39508ac_tool_warned=yes ;;
39509esac
39510    STRIP=$ac_ct_STRIP
39511  fi
39512fi
39513
39514  else
39515    # The variable is set, but is it from the command line or the environment?
39516
39517    # Try to remove the string !STRIP! from our list.
39518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39520      # If it failed, the variable was not from the command line. Ignore it,
39521      # but warn the user (except for BASH, which is always set by the calling BASH).
39522      if test "xSTRIP" != xBASH; then
39523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39524$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39525      fi
39526      # Try to locate tool using the code snippet
39527      if test -n "$ac_tool_prefix"; then
39528  for ac_prog in strip
39529  do
39530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39533$as_echo_n "checking for $ac_word... " >&6; }
39534if ${ac_cv_prog_STRIP+:} false; then :
39535  $as_echo_n "(cached) " >&6
39536else
39537  if test -n "$STRIP"; then
39538  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39539else
39540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39541for as_dir in $PATH
39542do
39543  IFS=$as_save_IFS
39544  test -z "$as_dir" && as_dir=.
39545    for ac_exec_ext in '' $ac_executable_extensions; do
39546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39547    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39549    break 2
39550  fi
39551done
39552  done
39553IFS=$as_save_IFS
39554
39555fi
39556fi
39557STRIP=$ac_cv_prog_STRIP
39558if test -n "$STRIP"; then
39559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39560$as_echo "$STRIP" >&6; }
39561else
39562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39563$as_echo "no" >&6; }
39564fi
39565
39566
39567    test -n "$STRIP" && break
39568  done
39569fi
39570if test -z "$STRIP"; then
39571  ac_ct_STRIP=$STRIP
39572  for ac_prog in strip
39573do
39574  # Extract the first word of "$ac_prog", so it can be a program name with args.
39575set dummy $ac_prog; ac_word=$2
39576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39577$as_echo_n "checking for $ac_word... " >&6; }
39578if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39579  $as_echo_n "(cached) " >&6
39580else
39581  if test -n "$ac_ct_STRIP"; then
39582  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39583else
39584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39585for as_dir in $PATH
39586do
39587  IFS=$as_save_IFS
39588  test -z "$as_dir" && as_dir=.
39589    for ac_exec_ext in '' $ac_executable_extensions; do
39590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39591    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39593    break 2
39594  fi
39595done
39596  done
39597IFS=$as_save_IFS
39598
39599fi
39600fi
39601ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39602if test -n "$ac_ct_STRIP"; then
39603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39604$as_echo "$ac_ct_STRIP" >&6; }
39605else
39606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39607$as_echo "no" >&6; }
39608fi
39609
39610
39611  test -n "$ac_ct_STRIP" && break
39612done
39613
39614  if test "x$ac_ct_STRIP" = x; then
39615    STRIP=""
39616  else
39617    case $cross_compiling:$ac_tool_warned in
39618yes:)
39619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39621ac_tool_warned=yes ;;
39622esac
39623    STRIP=$ac_ct_STRIP
39624  fi
39625fi
39626
39627    else
39628      # If it succeeded, then it was overridden by the user. We will use it
39629      # for the tool.
39630
39631      # First remove it from the list of overridden variables, so we can test
39632      # for unknown variables in the end.
39633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39634
39635      # Check if we try to supply an empty value
39636      if test "x$STRIP" = x; then
39637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39638$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39640$as_echo_n "checking for STRIP... " >&6; }
39641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39642$as_echo "disabled" >&6; }
39643      else
39644        # Check if the provided tool contains a complete path.
39645        tool_specified="$STRIP"
39646        tool_basename="${tool_specified##*/}"
39647        if test "x$tool_basename" = "x$tool_specified"; then
39648          # A command without a complete path is provided, search $PATH.
39649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39650$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39651          # Extract the first word of "$tool_basename", so it can be a program name with args.
39652set dummy $tool_basename; ac_word=$2
39653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39654$as_echo_n "checking for $ac_word... " >&6; }
39655if ${ac_cv_path_STRIP+:} false; then :
39656  $as_echo_n "(cached) " >&6
39657else
39658  case $STRIP in
39659  [\\/]* | ?:[\\/]*)
39660  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39661  ;;
39662  *)
39663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39664for as_dir in $PATH
39665do
39666  IFS=$as_save_IFS
39667  test -z "$as_dir" && as_dir=.
39668    for ac_exec_ext in '' $ac_executable_extensions; do
39669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39670    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39672    break 2
39673  fi
39674done
39675  done
39676IFS=$as_save_IFS
39677
39678  ;;
39679esac
39680fi
39681STRIP=$ac_cv_path_STRIP
39682if test -n "$STRIP"; then
39683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39684$as_echo "$STRIP" >&6; }
39685else
39686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39687$as_echo "no" >&6; }
39688fi
39689
39690
39691          if test "x$STRIP" = x; then
39692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39693          fi
39694        else
39695          # Otherwise we believe it is a complete path. Use it as it is.
39696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39697$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39699$as_echo_n "checking for STRIP... " >&6; }
39700          if test ! -x "$tool_specified"; then
39701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39702$as_echo "not found" >&6; }
39703            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39704          fi
39705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39706$as_echo "$tool_specified" >&6; }
39707        fi
39708      fi
39709    fi
39710
39711  fi
39712
39713
39714
39715  # Only process if variable expands to non-empty
39716
39717  if test "x$STRIP" != x; then
39718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39719
39720  # First separate the path from the arguments. This will split at the first
39721  # space.
39722  complete="$STRIP"
39723  path="${complete%% *}"
39724  tmp="$complete EOL"
39725  arguments="${tmp#* }"
39726
39727  # Input might be given as Windows format, start by converting to
39728  # unix format.
39729  new_path=`$CYGPATH -u "$path"`
39730
39731  # Now try to locate executable using which
39732  new_path=`$WHICH "$new_path" 2> /dev/null`
39733  # bat and cmd files are not always considered executable in cygwin causing which
39734  # to not find them
39735  if test "x$new_path" = x \
39736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39738    new_path=`$CYGPATH -u "$path"`
39739  fi
39740  if test "x$new_path" = x; then
39741    # Oops. Which didn't find the executable.
39742    # The splitting of arguments from the executable at a space might have been incorrect,
39743    # since paths with space are more likely in Windows. Give it another try with the whole
39744    # argument.
39745    path="$complete"
39746    arguments="EOL"
39747    new_path=`$CYGPATH -u "$path"`
39748    new_path=`$WHICH "$new_path" 2> /dev/null`
39749    # bat and cmd files are not always considered executable in cygwin causing which
39750    # to not find them
39751    if test "x$new_path" = x \
39752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39754      new_path=`$CYGPATH -u "$path"`
39755    fi
39756    if test "x$new_path" = x; then
39757      # It's still not found. Now this is an unrecoverable error.
39758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39759$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39760      has_space=`$ECHO "$complete" | $GREP " "`
39761      if test "x$has_space" != x; then
39762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39764      fi
39765      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39766    fi
39767  fi
39768
39769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39772  # "foo.exe" is OK but "foo" is an error.
39773  #
39774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39775  # It is also a way to make sure we got the proper file name for the real test later on.
39776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39777  if test "x$test_shortpath" = x; then
39778    # Short path failed, file does not exist as specified.
39779    # Try adding .exe or .cmd
39780    if test -f "${new_path}.exe"; then
39781      input_to_shortpath="${new_path}.exe"
39782    elif test -f "${new_path}.cmd"; then
39783      input_to_shortpath="${new_path}.cmd"
39784    else
39785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39786$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39789      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39790    fi
39791  else
39792    input_to_shortpath="$new_path"
39793  fi
39794
39795  # Call helper function which possibly converts this using DOS-style short mode.
39796  # If so, the updated path is stored in $new_path.
39797  new_path="$input_to_shortpath"
39798
39799  input_path="$input_to_shortpath"
39800  # Check if we need to convert this using DOS-style short mode. If the path
39801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39802  # take no chances and rewrite it.
39803  # Note: m4 eats our [], so we need to use [ and ] instead.
39804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39805  if test "x$has_forbidden_chars" != x; then
39806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39810      # Going to short mode and back again did indeed matter. Since short mode is
39811      # case insensitive, let's make it lowercase to improve readability.
39812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39813      # Now convert it back to Unix-style (cygpath)
39814      input_path=`$CYGPATH -u "$shortmode_path"`
39815      new_path="$input_path"
39816    fi
39817  fi
39818
39819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39820  if test "x$test_cygdrive_prefix" = x; then
39821    # As a simple fix, exclude /usr/bin since it's not a real path.
39822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39824      # a path prefixed by /cygdrive for fixpath to work.
39825      new_path="$CYGWIN_ROOT_PATH$input_path"
39826    fi
39827  fi
39828
39829  # remove trailing .exe if any
39830  new_path="${new_path/%.exe/}"
39831
39832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39833
39834  # First separate the path from the arguments. This will split at the first
39835  # space.
39836  complete="$STRIP"
39837  path="${complete%% *}"
39838  tmp="$complete EOL"
39839  arguments="${tmp#* }"
39840
39841  # Input might be given as Windows format, start by converting to
39842  # unix format.
39843  new_path="$path"
39844
39845  windows_path="$new_path"
39846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39847    unix_path=`$CYGPATH -u "$windows_path"`
39848    new_path="$unix_path"
39849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39851    new_path="$unix_path"
39852  fi
39853
39854
39855  # Now try to locate executable using which
39856  new_path=`$WHICH "$new_path" 2> /dev/null`
39857
39858  if test "x$new_path" = x; then
39859    # Oops. Which didn't find the executable.
39860    # The splitting of arguments from the executable at a space might have been incorrect,
39861    # since paths with space are more likely in Windows. Give it another try with the whole
39862    # argument.
39863    path="$complete"
39864    arguments="EOL"
39865    new_path="$path"
39866
39867  windows_path="$new_path"
39868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39869    unix_path=`$CYGPATH -u "$windows_path"`
39870    new_path="$unix_path"
39871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39873    new_path="$unix_path"
39874  fi
39875
39876
39877    new_path=`$WHICH "$new_path" 2> /dev/null`
39878    # bat and cmd files are not always considered executable in MSYS causing which
39879    # to not find them
39880    if test "x$new_path" = x \
39881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39883      new_path="$path"
39884
39885  windows_path="$new_path"
39886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39887    unix_path=`$CYGPATH -u "$windows_path"`
39888    new_path="$unix_path"
39889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39891    new_path="$unix_path"
39892  fi
39893
39894    fi
39895
39896    if test "x$new_path" = x; then
39897      # It's still not found. Now this is an unrecoverable error.
39898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39899$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39900      has_space=`$ECHO "$complete" | $GREP " "`
39901      if test "x$has_space" != x; then
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39904      fi
39905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39906    fi
39907  fi
39908
39909  # Now new_path has a complete unix path to the binary
39910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39911    # Keep paths in /bin as-is, but remove trailing .exe if any
39912    new_path="${new_path/%.exe/}"
39913    # Do not save /bin paths to all_fixpath_prefixes!
39914  else
39915    # Not in mixed or Windows style, start by that.
39916    new_path=`cmd //c echo $new_path`
39917
39918  input_path="$new_path"
39919  # Check if we need to convert this using DOS-style short mode. If the path
39920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39921  # take no chances and rewrite it.
39922  # Note: m4 eats our [], so we need to use [ and ] instead.
39923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39924  if test "x$has_forbidden_chars" != x; then
39925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39927  fi
39928
39929    # Output is in $new_path
39930
39931  windows_path="$new_path"
39932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39933    unix_path=`$CYGPATH -u "$windows_path"`
39934    new_path="$unix_path"
39935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39937    new_path="$unix_path"
39938  fi
39939
39940    # remove trailing .exe if any
39941    new_path="${new_path/%.exe/}"
39942
39943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39945  fi
39946
39947    else
39948      # We're on a unix platform. Hooray! :)
39949      # First separate the path from the arguments. This will split at the first
39950      # space.
39951      complete="$STRIP"
39952      path="${complete%% *}"
39953      tmp="$complete EOL"
39954      arguments="${tmp#* }"
39955
39956      # Cannot rely on the command "which" here since it doesn't always work.
39957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39958      if test -z "$is_absolute_path"; then
39959        # Path to executable is not absolute. Find it.
39960        IFS_save="$IFS"
39961        IFS=:
39962        for p in $PATH; do
39963          if test -f "$p/$path" && test -x "$p/$path"; then
39964            new_path="$p/$path"
39965            break
39966          fi
39967        done
39968        IFS="$IFS_save"
39969      else
39970        # This is an absolute path, we can use it without further modifications.
39971        new_path="$path"
39972      fi
39973
39974      if test "x$new_path" = x; then
39975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39976$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39977        has_space=`$ECHO "$complete" | $GREP " "`
39978        if test "x$has_space" != x; then
39979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39981        fi
39982        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39983      fi
39984    fi
39985
39986    # Now join together the path and the arguments once again
39987    if test "x$arguments" != xEOL; then
39988      new_complete="$new_path ${arguments% *}"
39989    else
39990      new_complete="$new_path"
39991    fi
39992
39993    if test "x$complete" != "x$new_complete"; then
39994      STRIP="$new_complete"
39995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39996$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39997    fi
39998  fi
39999
40000    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40001
40002
40003  # Publish this variable in the help.
40004
40005
40006  if [ -z "${NM+x}" ]; then
40007    # The variable is not set by user, try to locate tool using the code snippet
40008    if test -n "$ac_tool_prefix"; then
40009  for ac_prog in nm gcc-nm
40010  do
40011    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40014$as_echo_n "checking for $ac_word... " >&6; }
40015if ${ac_cv_prog_NM+:} false; then :
40016  $as_echo_n "(cached) " >&6
40017else
40018  if test -n "$NM"; then
40019  ac_cv_prog_NM="$NM" # Let the user override the test.
40020else
40021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40022for as_dir in $PATH
40023do
40024  IFS=$as_save_IFS
40025  test -z "$as_dir" && as_dir=.
40026    for ac_exec_ext in '' $ac_executable_extensions; do
40027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40028    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40030    break 2
40031  fi
40032done
40033  done
40034IFS=$as_save_IFS
40035
40036fi
40037fi
40038NM=$ac_cv_prog_NM
40039if test -n "$NM"; then
40040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40041$as_echo "$NM" >&6; }
40042else
40043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40044$as_echo "no" >&6; }
40045fi
40046
40047
40048    test -n "$NM" && break
40049  done
40050fi
40051if test -z "$NM"; then
40052  ac_ct_NM=$NM
40053  for ac_prog in nm gcc-nm
40054do
40055  # Extract the first word of "$ac_prog", so it can be a program name with args.
40056set dummy $ac_prog; ac_word=$2
40057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40058$as_echo_n "checking for $ac_word... " >&6; }
40059if ${ac_cv_prog_ac_ct_NM+:} false; then :
40060  $as_echo_n "(cached) " >&6
40061else
40062  if test -n "$ac_ct_NM"; then
40063  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40064else
40065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40066for as_dir in $PATH
40067do
40068  IFS=$as_save_IFS
40069  test -z "$as_dir" && as_dir=.
40070    for ac_exec_ext in '' $ac_executable_extensions; do
40071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40072    ac_cv_prog_ac_ct_NM="$ac_prog"
40073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40074    break 2
40075  fi
40076done
40077  done
40078IFS=$as_save_IFS
40079
40080fi
40081fi
40082ac_ct_NM=$ac_cv_prog_ac_ct_NM
40083if test -n "$ac_ct_NM"; then
40084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40085$as_echo "$ac_ct_NM" >&6; }
40086else
40087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40088$as_echo "no" >&6; }
40089fi
40090
40091
40092  test -n "$ac_ct_NM" && break
40093done
40094
40095  if test "x$ac_ct_NM" = x; then
40096    NM=""
40097  else
40098    case $cross_compiling:$ac_tool_warned in
40099yes:)
40100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40102ac_tool_warned=yes ;;
40103esac
40104    NM=$ac_ct_NM
40105  fi
40106fi
40107
40108  else
40109    # The variable is set, but is it from the command line or the environment?
40110
40111    # Try to remove the string !NM! from our list.
40112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40114      # If it failed, the variable was not from the command line. Ignore it,
40115      # but warn the user (except for BASH, which is always set by the calling BASH).
40116      if test "xNM" != xBASH; then
40117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40118$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40119      fi
40120      # Try to locate tool using the code snippet
40121      if test -n "$ac_tool_prefix"; then
40122  for ac_prog in nm gcc-nm
40123  do
40124    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40125set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40127$as_echo_n "checking for $ac_word... " >&6; }
40128if ${ac_cv_prog_NM+:} false; then :
40129  $as_echo_n "(cached) " >&6
40130else
40131  if test -n "$NM"; then
40132  ac_cv_prog_NM="$NM" # Let the user override the test.
40133else
40134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40135for as_dir in $PATH
40136do
40137  IFS=$as_save_IFS
40138  test -z "$as_dir" && as_dir=.
40139    for ac_exec_ext in '' $ac_executable_extensions; do
40140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40141    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40143    break 2
40144  fi
40145done
40146  done
40147IFS=$as_save_IFS
40148
40149fi
40150fi
40151NM=$ac_cv_prog_NM
40152if test -n "$NM"; then
40153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40154$as_echo "$NM" >&6; }
40155else
40156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40157$as_echo "no" >&6; }
40158fi
40159
40160
40161    test -n "$NM" && break
40162  done
40163fi
40164if test -z "$NM"; then
40165  ac_ct_NM=$NM
40166  for ac_prog in nm gcc-nm
40167do
40168  # Extract the first word of "$ac_prog", so it can be a program name with args.
40169set dummy $ac_prog; ac_word=$2
40170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40171$as_echo_n "checking for $ac_word... " >&6; }
40172if ${ac_cv_prog_ac_ct_NM+:} false; then :
40173  $as_echo_n "(cached) " >&6
40174else
40175  if test -n "$ac_ct_NM"; then
40176  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40177else
40178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40179for as_dir in $PATH
40180do
40181  IFS=$as_save_IFS
40182  test -z "$as_dir" && as_dir=.
40183    for ac_exec_ext in '' $ac_executable_extensions; do
40184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40185    ac_cv_prog_ac_ct_NM="$ac_prog"
40186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40187    break 2
40188  fi
40189done
40190  done
40191IFS=$as_save_IFS
40192
40193fi
40194fi
40195ac_ct_NM=$ac_cv_prog_ac_ct_NM
40196if test -n "$ac_ct_NM"; then
40197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40198$as_echo "$ac_ct_NM" >&6; }
40199else
40200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40201$as_echo "no" >&6; }
40202fi
40203
40204
40205  test -n "$ac_ct_NM" && break
40206done
40207
40208  if test "x$ac_ct_NM" = x; then
40209    NM=""
40210  else
40211    case $cross_compiling:$ac_tool_warned in
40212yes:)
40213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40215ac_tool_warned=yes ;;
40216esac
40217    NM=$ac_ct_NM
40218  fi
40219fi
40220
40221    else
40222      # If it succeeded, then it was overridden by the user. We will use it
40223      # for the tool.
40224
40225      # First remove it from the list of overridden variables, so we can test
40226      # for unknown variables in the end.
40227      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40228
40229      # Check if we try to supply an empty value
40230      if test "x$NM" = x; then
40231        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40232$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40234$as_echo_n "checking for NM... " >&6; }
40235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40236$as_echo "disabled" >&6; }
40237      else
40238        # Check if the provided tool contains a complete path.
40239        tool_specified="$NM"
40240        tool_basename="${tool_specified##*/}"
40241        if test "x$tool_basename" = "x$tool_specified"; then
40242          # A command without a complete path is provided, search $PATH.
40243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40244$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40245          # Extract the first word of "$tool_basename", so it can be a program name with args.
40246set dummy $tool_basename; ac_word=$2
40247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40248$as_echo_n "checking for $ac_word... " >&6; }
40249if ${ac_cv_path_NM+:} false; then :
40250  $as_echo_n "(cached) " >&6
40251else
40252  case $NM in
40253  [\\/]* | ?:[\\/]*)
40254  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40255  ;;
40256  *)
40257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40258for as_dir in $PATH
40259do
40260  IFS=$as_save_IFS
40261  test -z "$as_dir" && as_dir=.
40262    for ac_exec_ext in '' $ac_executable_extensions; do
40263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40264    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40266    break 2
40267  fi
40268done
40269  done
40270IFS=$as_save_IFS
40271
40272  ;;
40273esac
40274fi
40275NM=$ac_cv_path_NM
40276if test -n "$NM"; then
40277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40278$as_echo "$NM" >&6; }
40279else
40280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40281$as_echo "no" >&6; }
40282fi
40283
40284
40285          if test "x$NM" = x; then
40286            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40287          fi
40288        else
40289          # Otherwise we believe it is a complete path. Use it as it is.
40290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40291$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40292          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40293$as_echo_n "checking for NM... " >&6; }
40294          if test ! -x "$tool_specified"; then
40295            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40296$as_echo "not found" >&6; }
40297            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40298          fi
40299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40300$as_echo "$tool_specified" >&6; }
40301        fi
40302      fi
40303    fi
40304
40305  fi
40306
40307
40308    else
40309
40310
40311  # Publish this variable in the help.
40312
40313
40314  if [ -z "${NM+x}" ]; then
40315    # The variable is not set by user, try to locate tool using the code snippet
40316    if test -n "$ac_tool_prefix"; then
40317  for ac_prog in nm
40318  do
40319    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40320set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40322$as_echo_n "checking for $ac_word... " >&6; }
40323if ${ac_cv_prog_NM+:} false; then :
40324  $as_echo_n "(cached) " >&6
40325else
40326  if test -n "$NM"; then
40327  ac_cv_prog_NM="$NM" # Let the user override the test.
40328else
40329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40330for as_dir in $PATH
40331do
40332  IFS=$as_save_IFS
40333  test -z "$as_dir" && as_dir=.
40334    for ac_exec_ext in '' $ac_executable_extensions; do
40335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40336    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40338    break 2
40339  fi
40340done
40341  done
40342IFS=$as_save_IFS
40343
40344fi
40345fi
40346NM=$ac_cv_prog_NM
40347if test -n "$NM"; then
40348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40349$as_echo "$NM" >&6; }
40350else
40351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40352$as_echo "no" >&6; }
40353fi
40354
40355
40356    test -n "$NM" && break
40357  done
40358fi
40359if test -z "$NM"; then
40360  ac_ct_NM=$NM
40361  for ac_prog in nm
40362do
40363  # Extract the first word of "$ac_prog", so it can be a program name with args.
40364set dummy $ac_prog; ac_word=$2
40365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40366$as_echo_n "checking for $ac_word... " >&6; }
40367if ${ac_cv_prog_ac_ct_NM+:} false; then :
40368  $as_echo_n "(cached) " >&6
40369else
40370  if test -n "$ac_ct_NM"; then
40371  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40372else
40373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40374for as_dir in $PATH
40375do
40376  IFS=$as_save_IFS
40377  test -z "$as_dir" && as_dir=.
40378    for ac_exec_ext in '' $ac_executable_extensions; do
40379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40380    ac_cv_prog_ac_ct_NM="$ac_prog"
40381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40382    break 2
40383  fi
40384done
40385  done
40386IFS=$as_save_IFS
40387
40388fi
40389fi
40390ac_ct_NM=$ac_cv_prog_ac_ct_NM
40391if test -n "$ac_ct_NM"; then
40392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40393$as_echo "$ac_ct_NM" >&6; }
40394else
40395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40396$as_echo "no" >&6; }
40397fi
40398
40399
40400  test -n "$ac_ct_NM" && break
40401done
40402
40403  if test "x$ac_ct_NM" = x; then
40404    NM=""
40405  else
40406    case $cross_compiling:$ac_tool_warned in
40407yes:)
40408{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40409$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40410ac_tool_warned=yes ;;
40411esac
40412    NM=$ac_ct_NM
40413  fi
40414fi
40415
40416  else
40417    # The variable is set, but is it from the command line or the environment?
40418
40419    # Try to remove the string !NM! from our list.
40420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40422      # If it failed, the variable was not from the command line. Ignore it,
40423      # but warn the user (except for BASH, which is always set by the calling BASH).
40424      if test "xNM" != xBASH; then
40425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40426$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40427      fi
40428      # Try to locate tool using the code snippet
40429      if test -n "$ac_tool_prefix"; then
40430  for ac_prog in nm
40431  do
40432    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40435$as_echo_n "checking for $ac_word... " >&6; }
40436if ${ac_cv_prog_NM+:} false; then :
40437  $as_echo_n "(cached) " >&6
40438else
40439  if test -n "$NM"; then
40440  ac_cv_prog_NM="$NM" # Let the user override the test.
40441else
40442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40443for as_dir in $PATH
40444do
40445  IFS=$as_save_IFS
40446  test -z "$as_dir" && as_dir=.
40447    for ac_exec_ext in '' $ac_executable_extensions; do
40448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40449    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40451    break 2
40452  fi
40453done
40454  done
40455IFS=$as_save_IFS
40456
40457fi
40458fi
40459NM=$ac_cv_prog_NM
40460if test -n "$NM"; then
40461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40462$as_echo "$NM" >&6; }
40463else
40464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40465$as_echo "no" >&6; }
40466fi
40467
40468
40469    test -n "$NM" && break
40470  done
40471fi
40472if test -z "$NM"; then
40473  ac_ct_NM=$NM
40474  for ac_prog in nm
40475do
40476  # Extract the first word of "$ac_prog", so it can be a program name with args.
40477set dummy $ac_prog; ac_word=$2
40478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40479$as_echo_n "checking for $ac_word... " >&6; }
40480if ${ac_cv_prog_ac_ct_NM+:} false; then :
40481  $as_echo_n "(cached) " >&6
40482else
40483  if test -n "$ac_ct_NM"; then
40484  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40485else
40486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40487for as_dir in $PATH
40488do
40489  IFS=$as_save_IFS
40490  test -z "$as_dir" && as_dir=.
40491    for ac_exec_ext in '' $ac_executable_extensions; do
40492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40493    ac_cv_prog_ac_ct_NM="$ac_prog"
40494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40495    break 2
40496  fi
40497done
40498  done
40499IFS=$as_save_IFS
40500
40501fi
40502fi
40503ac_ct_NM=$ac_cv_prog_ac_ct_NM
40504if test -n "$ac_ct_NM"; then
40505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40506$as_echo "$ac_ct_NM" >&6; }
40507else
40508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40509$as_echo "no" >&6; }
40510fi
40511
40512
40513  test -n "$ac_ct_NM" && break
40514done
40515
40516  if test "x$ac_ct_NM" = x; then
40517    NM=""
40518  else
40519    case $cross_compiling:$ac_tool_warned in
40520yes:)
40521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40523ac_tool_warned=yes ;;
40524esac
40525    NM=$ac_ct_NM
40526  fi
40527fi
40528
40529    else
40530      # If it succeeded, then it was overridden by the user. We will use it
40531      # for the tool.
40532
40533      # First remove it from the list of overridden variables, so we can test
40534      # for unknown variables in the end.
40535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40536
40537      # Check if we try to supply an empty value
40538      if test "x$NM" = x; then
40539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40540$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40542$as_echo_n "checking for NM... " >&6; }
40543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40544$as_echo "disabled" >&6; }
40545      else
40546        # Check if the provided tool contains a complete path.
40547        tool_specified="$NM"
40548        tool_basename="${tool_specified##*/}"
40549        if test "x$tool_basename" = "x$tool_specified"; then
40550          # A command without a complete path is provided, search $PATH.
40551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40552$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40553          # Extract the first word of "$tool_basename", so it can be a program name with args.
40554set dummy $tool_basename; ac_word=$2
40555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40556$as_echo_n "checking for $ac_word... " >&6; }
40557if ${ac_cv_path_NM+:} false; then :
40558  $as_echo_n "(cached) " >&6
40559else
40560  case $NM in
40561  [\\/]* | ?:[\\/]*)
40562  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40563  ;;
40564  *)
40565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40566for as_dir in $PATH
40567do
40568  IFS=$as_save_IFS
40569  test -z "$as_dir" && as_dir=.
40570    for ac_exec_ext in '' $ac_executable_extensions; do
40571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40572    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40574    break 2
40575  fi
40576done
40577  done
40578IFS=$as_save_IFS
40579
40580  ;;
40581esac
40582fi
40583NM=$ac_cv_path_NM
40584if test -n "$NM"; then
40585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40586$as_echo "$NM" >&6; }
40587else
40588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40589$as_echo "no" >&6; }
40590fi
40591
40592
40593          if test "x$NM" = x; then
40594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40595          fi
40596        else
40597          # Otherwise we believe it is a complete path. Use it as it is.
40598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40599$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40601$as_echo_n "checking for NM... " >&6; }
40602          if test ! -x "$tool_specified"; then
40603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40604$as_echo "not found" >&6; }
40605            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40606          fi
40607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40608$as_echo "$tool_specified" >&6; }
40609        fi
40610      fi
40611    fi
40612
40613  fi
40614
40615
40616    fi
40617
40618  # Only process if variable expands to non-empty
40619
40620  if test "x$NM" != x; then
40621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40622
40623  # First separate the path from the arguments. This will split at the first
40624  # space.
40625  complete="$NM"
40626  path="${complete%% *}"
40627  tmp="$complete EOL"
40628  arguments="${tmp#* }"
40629
40630  # Input might be given as Windows format, start by converting to
40631  # unix format.
40632  new_path=`$CYGPATH -u "$path"`
40633
40634  # Now try to locate executable using which
40635  new_path=`$WHICH "$new_path" 2> /dev/null`
40636  # bat and cmd files are not always considered executable in cygwin causing which
40637  # to not find them
40638  if test "x$new_path" = x \
40639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40641    new_path=`$CYGPATH -u "$path"`
40642  fi
40643  if test "x$new_path" = x; then
40644    # Oops. Which didn't find the executable.
40645    # The splitting of arguments from the executable at a space might have been incorrect,
40646    # since paths with space are more likely in Windows. Give it another try with the whole
40647    # argument.
40648    path="$complete"
40649    arguments="EOL"
40650    new_path=`$CYGPATH -u "$path"`
40651    new_path=`$WHICH "$new_path" 2> /dev/null`
40652    # bat and cmd files are not always considered executable in cygwin causing which
40653    # to not find them
40654    if test "x$new_path" = x \
40655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40657      new_path=`$CYGPATH -u "$path"`
40658    fi
40659    if test "x$new_path" = x; then
40660      # It's still not found. Now this is an unrecoverable error.
40661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40662$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40663      has_space=`$ECHO "$complete" | $GREP " "`
40664      if test "x$has_space" != x; then
40665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40667      fi
40668      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40669    fi
40670  fi
40671
40672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40675  # "foo.exe" is OK but "foo" is an error.
40676  #
40677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40678  # It is also a way to make sure we got the proper file name for the real test later on.
40679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40680  if test "x$test_shortpath" = x; then
40681    # Short path failed, file does not exist as specified.
40682    # Try adding .exe or .cmd
40683    if test -f "${new_path}.exe"; then
40684      input_to_shortpath="${new_path}.exe"
40685    elif test -f "${new_path}.cmd"; then
40686      input_to_shortpath="${new_path}.cmd"
40687    else
40688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40689$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40692      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40693    fi
40694  else
40695    input_to_shortpath="$new_path"
40696  fi
40697
40698  # Call helper function which possibly converts this using DOS-style short mode.
40699  # If so, the updated path is stored in $new_path.
40700  new_path="$input_to_shortpath"
40701
40702  input_path="$input_to_shortpath"
40703  # Check if we need to convert this using DOS-style short mode. If the path
40704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40705  # take no chances and rewrite it.
40706  # Note: m4 eats our [], so we need to use [ and ] instead.
40707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40708  if test "x$has_forbidden_chars" != x; then
40709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40713      # Going to short mode and back again did indeed matter. Since short mode is
40714      # case insensitive, let's make it lowercase to improve readability.
40715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40716      # Now convert it back to Unix-style (cygpath)
40717      input_path=`$CYGPATH -u "$shortmode_path"`
40718      new_path="$input_path"
40719    fi
40720  fi
40721
40722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40723  if test "x$test_cygdrive_prefix" = x; then
40724    # As a simple fix, exclude /usr/bin since it's not a real path.
40725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40727      # a path prefixed by /cygdrive for fixpath to work.
40728      new_path="$CYGWIN_ROOT_PATH$input_path"
40729    fi
40730  fi
40731
40732  # remove trailing .exe if any
40733  new_path="${new_path/%.exe/}"
40734
40735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40736
40737  # First separate the path from the arguments. This will split at the first
40738  # space.
40739  complete="$NM"
40740  path="${complete%% *}"
40741  tmp="$complete EOL"
40742  arguments="${tmp#* }"
40743
40744  # Input might be given as Windows format, start by converting to
40745  # unix format.
40746  new_path="$path"
40747
40748  windows_path="$new_path"
40749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40750    unix_path=`$CYGPATH -u "$windows_path"`
40751    new_path="$unix_path"
40752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40754    new_path="$unix_path"
40755  fi
40756
40757
40758  # Now try to locate executable using which
40759  new_path=`$WHICH "$new_path" 2> /dev/null`
40760
40761  if test "x$new_path" = x; then
40762    # Oops. Which didn't find the executable.
40763    # The splitting of arguments from the executable at a space might have been incorrect,
40764    # since paths with space are more likely in Windows. Give it another try with the whole
40765    # argument.
40766    path="$complete"
40767    arguments="EOL"
40768    new_path="$path"
40769
40770  windows_path="$new_path"
40771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40772    unix_path=`$CYGPATH -u "$windows_path"`
40773    new_path="$unix_path"
40774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40776    new_path="$unix_path"
40777  fi
40778
40779
40780    new_path=`$WHICH "$new_path" 2> /dev/null`
40781    # bat and cmd files are not always considered executable in MSYS causing which
40782    # to not find them
40783    if test "x$new_path" = x \
40784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40786      new_path="$path"
40787
40788  windows_path="$new_path"
40789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40790    unix_path=`$CYGPATH -u "$windows_path"`
40791    new_path="$unix_path"
40792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40794    new_path="$unix_path"
40795  fi
40796
40797    fi
40798
40799    if test "x$new_path" = x; then
40800      # It's still not found. Now this is an unrecoverable error.
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40802$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40803      has_space=`$ECHO "$complete" | $GREP " "`
40804      if test "x$has_space" != x; then
40805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40807      fi
40808      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40809    fi
40810  fi
40811
40812  # Now new_path has a complete unix path to the binary
40813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40814    # Keep paths in /bin as-is, but remove trailing .exe if any
40815    new_path="${new_path/%.exe/}"
40816    # Do not save /bin paths to all_fixpath_prefixes!
40817  else
40818    # Not in mixed or Windows style, start by that.
40819    new_path=`cmd //c echo $new_path`
40820
40821  input_path="$new_path"
40822  # Check if we need to convert this using DOS-style short mode. If the path
40823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40824  # take no chances and rewrite it.
40825  # Note: m4 eats our [], so we need to use [ and ] instead.
40826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40827  if test "x$has_forbidden_chars" != x; then
40828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40830  fi
40831
40832    # Output is in $new_path
40833
40834  windows_path="$new_path"
40835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40836    unix_path=`$CYGPATH -u "$windows_path"`
40837    new_path="$unix_path"
40838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40840    new_path="$unix_path"
40841  fi
40842
40843    # remove trailing .exe if any
40844    new_path="${new_path/%.exe/}"
40845
40846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40848  fi
40849
40850    else
40851      # We're on a unix platform. Hooray! :)
40852      # First separate the path from the arguments. This will split at the first
40853      # space.
40854      complete="$NM"
40855      path="${complete%% *}"
40856      tmp="$complete EOL"
40857      arguments="${tmp#* }"
40858
40859      # Cannot rely on the command "which" here since it doesn't always work.
40860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40861      if test -z "$is_absolute_path"; then
40862        # Path to executable is not absolute. Find it.
40863        IFS_save="$IFS"
40864        IFS=:
40865        for p in $PATH; do
40866          if test -f "$p/$path" && test -x "$p/$path"; then
40867            new_path="$p/$path"
40868            break
40869          fi
40870        done
40871        IFS="$IFS_save"
40872      else
40873        # This is an absolute path, we can use it without further modifications.
40874        new_path="$path"
40875      fi
40876
40877      if test "x$new_path" = x; then
40878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40879$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40880        has_space=`$ECHO "$complete" | $GREP " "`
40881        if test "x$has_space" != x; then
40882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40884        fi
40885        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40886      fi
40887    fi
40888
40889    # Now join together the path and the arguments once again
40890    if test "x$arguments" != xEOL; then
40891      new_complete="$new_path ${arguments% *}"
40892    else
40893      new_complete="$new_path"
40894    fi
40895
40896    if test "x$complete" != "x$new_complete"; then
40897      NM="$new_complete"
40898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40899$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40900    fi
40901  fi
40902
40903    GNM="$NM"
40904
40905  fi
40906
40907  # objcopy is used for moving debug symbols to separate files when
40908  # full debug symbols are enabled.
40909  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40910
40911
40912  # Publish this variable in the help.
40913
40914
40915  if [ -z "${OBJCOPY+x}" ]; then
40916    # The variable is not set by user, try to locate tool using the code snippet
40917    if test -n "$ac_tool_prefix"; then
40918  for ac_prog in gobjcopy objcopy
40919  do
40920    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40921set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40923$as_echo_n "checking for $ac_word... " >&6; }
40924if ${ac_cv_prog_OBJCOPY+:} false; then :
40925  $as_echo_n "(cached) " >&6
40926else
40927  if test -n "$OBJCOPY"; then
40928  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40929else
40930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40931for as_dir in $PATH
40932do
40933  IFS=$as_save_IFS
40934  test -z "$as_dir" && as_dir=.
40935    for ac_exec_ext in '' $ac_executable_extensions; do
40936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40937    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40939    break 2
40940  fi
40941done
40942  done
40943IFS=$as_save_IFS
40944
40945fi
40946fi
40947OBJCOPY=$ac_cv_prog_OBJCOPY
40948if test -n "$OBJCOPY"; then
40949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40950$as_echo "$OBJCOPY" >&6; }
40951else
40952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40953$as_echo "no" >&6; }
40954fi
40955
40956
40957    test -n "$OBJCOPY" && break
40958  done
40959fi
40960if test -z "$OBJCOPY"; then
40961  ac_ct_OBJCOPY=$OBJCOPY
40962  for ac_prog in gobjcopy objcopy
40963do
40964  # Extract the first word of "$ac_prog", so it can be a program name with args.
40965set dummy $ac_prog; ac_word=$2
40966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40967$as_echo_n "checking for $ac_word... " >&6; }
40968if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40969  $as_echo_n "(cached) " >&6
40970else
40971  if test -n "$ac_ct_OBJCOPY"; then
40972  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40973else
40974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40975for as_dir in $PATH
40976do
40977  IFS=$as_save_IFS
40978  test -z "$as_dir" && as_dir=.
40979    for ac_exec_ext in '' $ac_executable_extensions; do
40980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40981    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40983    break 2
40984  fi
40985done
40986  done
40987IFS=$as_save_IFS
40988
40989fi
40990fi
40991ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40992if test -n "$ac_ct_OBJCOPY"; then
40993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40994$as_echo "$ac_ct_OBJCOPY" >&6; }
40995else
40996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40997$as_echo "no" >&6; }
40998fi
40999
41000
41001  test -n "$ac_ct_OBJCOPY" && break
41002done
41003
41004  if test "x$ac_ct_OBJCOPY" = x; then
41005    OBJCOPY=""
41006  else
41007    case $cross_compiling:$ac_tool_warned in
41008yes:)
41009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41011ac_tool_warned=yes ;;
41012esac
41013    OBJCOPY=$ac_ct_OBJCOPY
41014  fi
41015fi
41016
41017  else
41018    # The variable is set, but is it from the command line or the environment?
41019
41020    # Try to remove the string !OBJCOPY! from our list.
41021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41023      # If it failed, the variable was not from the command line. Ignore it,
41024      # but warn the user (except for BASH, which is always set by the calling BASH).
41025      if test "xOBJCOPY" != xBASH; then
41026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41027$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41028      fi
41029      # Try to locate tool using the code snippet
41030      if test -n "$ac_tool_prefix"; then
41031  for ac_prog in gobjcopy objcopy
41032  do
41033    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41034set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41036$as_echo_n "checking for $ac_word... " >&6; }
41037if ${ac_cv_prog_OBJCOPY+:} false; then :
41038  $as_echo_n "(cached) " >&6
41039else
41040  if test -n "$OBJCOPY"; then
41041  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41042else
41043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41044for as_dir in $PATH
41045do
41046  IFS=$as_save_IFS
41047  test -z "$as_dir" && as_dir=.
41048    for ac_exec_ext in '' $ac_executable_extensions; do
41049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41050    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41052    break 2
41053  fi
41054done
41055  done
41056IFS=$as_save_IFS
41057
41058fi
41059fi
41060OBJCOPY=$ac_cv_prog_OBJCOPY
41061if test -n "$OBJCOPY"; then
41062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41063$as_echo "$OBJCOPY" >&6; }
41064else
41065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41066$as_echo "no" >&6; }
41067fi
41068
41069
41070    test -n "$OBJCOPY" && break
41071  done
41072fi
41073if test -z "$OBJCOPY"; then
41074  ac_ct_OBJCOPY=$OBJCOPY
41075  for ac_prog in gobjcopy objcopy
41076do
41077  # Extract the first word of "$ac_prog", so it can be a program name with args.
41078set dummy $ac_prog; ac_word=$2
41079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41080$as_echo_n "checking for $ac_word... " >&6; }
41081if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41082  $as_echo_n "(cached) " >&6
41083else
41084  if test -n "$ac_ct_OBJCOPY"; then
41085  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41086else
41087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41088for as_dir in $PATH
41089do
41090  IFS=$as_save_IFS
41091  test -z "$as_dir" && as_dir=.
41092    for ac_exec_ext in '' $ac_executable_extensions; do
41093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41094    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41096    break 2
41097  fi
41098done
41099  done
41100IFS=$as_save_IFS
41101
41102fi
41103fi
41104ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41105if test -n "$ac_ct_OBJCOPY"; then
41106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41107$as_echo "$ac_ct_OBJCOPY" >&6; }
41108else
41109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41110$as_echo "no" >&6; }
41111fi
41112
41113
41114  test -n "$ac_ct_OBJCOPY" && break
41115done
41116
41117  if test "x$ac_ct_OBJCOPY" = x; then
41118    OBJCOPY=""
41119  else
41120    case $cross_compiling:$ac_tool_warned in
41121yes:)
41122{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41123$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41124ac_tool_warned=yes ;;
41125esac
41126    OBJCOPY=$ac_ct_OBJCOPY
41127  fi
41128fi
41129
41130    else
41131      # If it succeeded, then it was overridden by the user. We will use it
41132      # for the tool.
41133
41134      # First remove it from the list of overridden variables, so we can test
41135      # for unknown variables in the end.
41136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41137
41138      # Check if we try to supply an empty value
41139      if test "x$OBJCOPY" = x; then
41140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41141$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41143$as_echo_n "checking for OBJCOPY... " >&6; }
41144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41145$as_echo "disabled" >&6; }
41146      else
41147        # Check if the provided tool contains a complete path.
41148        tool_specified="$OBJCOPY"
41149        tool_basename="${tool_specified##*/}"
41150        if test "x$tool_basename" = "x$tool_specified"; then
41151          # A command without a complete path is provided, search $PATH.
41152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41153$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41154          # Extract the first word of "$tool_basename", so it can be a program name with args.
41155set dummy $tool_basename; ac_word=$2
41156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41157$as_echo_n "checking for $ac_word... " >&6; }
41158if ${ac_cv_path_OBJCOPY+:} false; then :
41159  $as_echo_n "(cached) " >&6
41160else
41161  case $OBJCOPY in
41162  [\\/]* | ?:[\\/]*)
41163  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41164  ;;
41165  *)
41166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41167for as_dir in $PATH
41168do
41169  IFS=$as_save_IFS
41170  test -z "$as_dir" && as_dir=.
41171    for ac_exec_ext in '' $ac_executable_extensions; do
41172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41173    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41175    break 2
41176  fi
41177done
41178  done
41179IFS=$as_save_IFS
41180
41181  ;;
41182esac
41183fi
41184OBJCOPY=$ac_cv_path_OBJCOPY
41185if test -n "$OBJCOPY"; then
41186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41187$as_echo "$OBJCOPY" >&6; }
41188else
41189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41190$as_echo "no" >&6; }
41191fi
41192
41193
41194          if test "x$OBJCOPY" = x; then
41195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41196          fi
41197        else
41198          # Otherwise we believe it is a complete path. Use it as it is.
41199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41200$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41202$as_echo_n "checking for OBJCOPY... " >&6; }
41203          if test ! -x "$tool_specified"; then
41204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41205$as_echo "not found" >&6; }
41206            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41207          fi
41208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41209$as_echo "$tool_specified" >&6; }
41210        fi
41211      fi
41212    fi
41213
41214  fi
41215
41216
41217    # Only call fixup if objcopy was found.
41218    if test -n "$OBJCOPY"; then
41219
41220  # Only process if variable expands to non-empty
41221
41222  if test "x$OBJCOPY" != x; then
41223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41224
41225  # First separate the path from the arguments. This will split at the first
41226  # space.
41227  complete="$OBJCOPY"
41228  path="${complete%% *}"
41229  tmp="$complete EOL"
41230  arguments="${tmp#* }"
41231
41232  # Input might be given as Windows format, start by converting to
41233  # unix format.
41234  new_path=`$CYGPATH -u "$path"`
41235
41236  # Now try to locate executable using which
41237  new_path=`$WHICH "$new_path" 2> /dev/null`
41238  # bat and cmd files are not always considered executable in cygwin causing which
41239  # to not find them
41240  if test "x$new_path" = x \
41241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41243    new_path=`$CYGPATH -u "$path"`
41244  fi
41245  if test "x$new_path" = x; then
41246    # Oops. Which didn't find the executable.
41247    # The splitting of arguments from the executable at a space might have been incorrect,
41248    # since paths with space are more likely in Windows. Give it another try with the whole
41249    # argument.
41250    path="$complete"
41251    arguments="EOL"
41252    new_path=`$CYGPATH -u "$path"`
41253    new_path=`$WHICH "$new_path" 2> /dev/null`
41254    # bat and cmd files are not always considered executable in cygwin causing which
41255    # to not find them
41256    if test "x$new_path" = x \
41257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41259      new_path=`$CYGPATH -u "$path"`
41260    fi
41261    if test "x$new_path" = x; then
41262      # It's still not found. Now this is an unrecoverable error.
41263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41264$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41265      has_space=`$ECHO "$complete" | $GREP " "`
41266      if test "x$has_space" != x; then
41267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41269      fi
41270      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41271    fi
41272  fi
41273
41274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41277  # "foo.exe" is OK but "foo" is an error.
41278  #
41279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41280  # It is also a way to make sure we got the proper file name for the real test later on.
41281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41282  if test "x$test_shortpath" = x; then
41283    # Short path failed, file does not exist as specified.
41284    # Try adding .exe or .cmd
41285    if test -f "${new_path}.exe"; then
41286      input_to_shortpath="${new_path}.exe"
41287    elif test -f "${new_path}.cmd"; then
41288      input_to_shortpath="${new_path}.cmd"
41289    else
41290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41291$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41294      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41295    fi
41296  else
41297    input_to_shortpath="$new_path"
41298  fi
41299
41300  # Call helper function which possibly converts this using DOS-style short mode.
41301  # If so, the updated path is stored in $new_path.
41302  new_path="$input_to_shortpath"
41303
41304  input_path="$input_to_shortpath"
41305  # Check if we need to convert this using DOS-style short mode. If the path
41306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41307  # take no chances and rewrite it.
41308  # Note: m4 eats our [], so we need to use [ and ] instead.
41309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41310  if test "x$has_forbidden_chars" != x; then
41311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41315      # Going to short mode and back again did indeed matter. Since short mode is
41316      # case insensitive, let's make it lowercase to improve readability.
41317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41318      # Now convert it back to Unix-style (cygpath)
41319      input_path=`$CYGPATH -u "$shortmode_path"`
41320      new_path="$input_path"
41321    fi
41322  fi
41323
41324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41325  if test "x$test_cygdrive_prefix" = x; then
41326    # As a simple fix, exclude /usr/bin since it's not a real path.
41327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41329      # a path prefixed by /cygdrive for fixpath to work.
41330      new_path="$CYGWIN_ROOT_PATH$input_path"
41331    fi
41332  fi
41333
41334  # remove trailing .exe if any
41335  new_path="${new_path/%.exe/}"
41336
41337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41338
41339  # First separate the path from the arguments. This will split at the first
41340  # space.
41341  complete="$OBJCOPY"
41342  path="${complete%% *}"
41343  tmp="$complete EOL"
41344  arguments="${tmp#* }"
41345
41346  # Input might be given as Windows format, start by converting to
41347  # unix format.
41348  new_path="$path"
41349
41350  windows_path="$new_path"
41351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41352    unix_path=`$CYGPATH -u "$windows_path"`
41353    new_path="$unix_path"
41354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41356    new_path="$unix_path"
41357  fi
41358
41359
41360  # Now try to locate executable using which
41361  new_path=`$WHICH "$new_path" 2> /dev/null`
41362
41363  if test "x$new_path" = x; then
41364    # Oops. Which didn't find the executable.
41365    # The splitting of arguments from the executable at a space might have been incorrect,
41366    # since paths with space are more likely in Windows. Give it another try with the whole
41367    # argument.
41368    path="$complete"
41369    arguments="EOL"
41370    new_path="$path"
41371
41372  windows_path="$new_path"
41373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41374    unix_path=`$CYGPATH -u "$windows_path"`
41375    new_path="$unix_path"
41376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41378    new_path="$unix_path"
41379  fi
41380
41381
41382    new_path=`$WHICH "$new_path" 2> /dev/null`
41383    # bat and cmd files are not always considered executable in MSYS causing which
41384    # to not find them
41385    if test "x$new_path" = x \
41386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41388      new_path="$path"
41389
41390  windows_path="$new_path"
41391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41392    unix_path=`$CYGPATH -u "$windows_path"`
41393    new_path="$unix_path"
41394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41396    new_path="$unix_path"
41397  fi
41398
41399    fi
41400
41401    if test "x$new_path" = x; then
41402      # It's still not found. Now this is an unrecoverable error.
41403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41404$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41405      has_space=`$ECHO "$complete" | $GREP " "`
41406      if test "x$has_space" != x; then
41407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41409      fi
41410      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41411    fi
41412  fi
41413
41414  # Now new_path has a complete unix path to the binary
41415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41416    # Keep paths in /bin as-is, but remove trailing .exe if any
41417    new_path="${new_path/%.exe/}"
41418    # Do not save /bin paths to all_fixpath_prefixes!
41419  else
41420    # Not in mixed or Windows style, start by that.
41421    new_path=`cmd //c echo $new_path`
41422
41423  input_path="$new_path"
41424  # Check if we need to convert this using DOS-style short mode. If the path
41425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41426  # take no chances and rewrite it.
41427  # Note: m4 eats our [], so we need to use [ and ] instead.
41428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41429  if test "x$has_forbidden_chars" != x; then
41430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41432  fi
41433
41434    # Output is in $new_path
41435
41436  windows_path="$new_path"
41437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41438    unix_path=`$CYGPATH -u "$windows_path"`
41439    new_path="$unix_path"
41440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41442    new_path="$unix_path"
41443  fi
41444
41445    # remove trailing .exe if any
41446    new_path="${new_path/%.exe/}"
41447
41448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41450  fi
41451
41452    else
41453      # We're on a unix platform. Hooray! :)
41454      # First separate the path from the arguments. This will split at the first
41455      # space.
41456      complete="$OBJCOPY"
41457      path="${complete%% *}"
41458      tmp="$complete EOL"
41459      arguments="${tmp#* }"
41460
41461      # Cannot rely on the command "which" here since it doesn't always work.
41462      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41463      if test -z "$is_absolute_path"; then
41464        # Path to executable is not absolute. Find it.
41465        IFS_save="$IFS"
41466        IFS=:
41467        for p in $PATH; do
41468          if test -f "$p/$path" && test -x "$p/$path"; then
41469            new_path="$p/$path"
41470            break
41471          fi
41472        done
41473        IFS="$IFS_save"
41474      else
41475        # This is an absolute path, we can use it without further modifications.
41476        new_path="$path"
41477      fi
41478
41479      if test "x$new_path" = x; then
41480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41481$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41482        has_space=`$ECHO "$complete" | $GREP " "`
41483        if test "x$has_space" != x; then
41484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41486        fi
41487        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41488      fi
41489    fi
41490
41491    # Now join together the path and the arguments once again
41492    if test "x$arguments" != xEOL; then
41493      new_complete="$new_path ${arguments% *}"
41494    else
41495      new_complete="$new_path"
41496    fi
41497
41498    if test "x$complete" != "x$new_complete"; then
41499      OBJCOPY="$new_complete"
41500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41501$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41502    fi
41503  fi
41504
41505      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41506        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41507        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41508        # - version number is last blank separate word on first line
41509        # - version number formats that have been seen:
41510        #   - <major>.<minor>
41511        #   - <major>.<minor>.<micro>
41512        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41513        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41514         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41515              -e 's/.* //' \
41516              -e '/^[01]\./b bad' \
41517              -e '/^2\./{' \
41518              -e '  s/^2\.//' \
41519              -e '  /^[0-9]$/b bad' \
41520              -e '  /^[0-9]\./b bad' \
41521              -e '  /^1[0-9]$/b bad' \
41522              -e '  /^1[0-9]\./b bad' \
41523              -e '  /^20\./b bad' \
41524              -e '  /^21\.0$/b bad' \
41525              -e '  /^21\.0\./b bad' \
41526              -e '}' \
41527              -e ':good' \
41528              -e 's/.*/VALID_VERSION/p' \
41529              -e 'q' \
41530              -e ':bad' \
41531              -e 's/.*/BAD_VERSION/p' \
41532              -e 'q'`
41533        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41534          OBJCOPY=
41535          { $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
41536$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41537          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41538$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41539          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41540$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41541          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41542$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41543          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41544$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41545        fi
41546      fi
41547    fi
41548  fi
41549
41550
41551
41552  # Publish this variable in the help.
41553
41554
41555  if [ -z "${OBJDUMP+x}" ]; then
41556    # The variable is not set by user, try to locate tool using the code snippet
41557    if test -n "$ac_tool_prefix"; then
41558  for ac_prog in gobjdump objdump
41559  do
41560    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41561set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41563$as_echo_n "checking for $ac_word... " >&6; }
41564if ${ac_cv_prog_OBJDUMP+:} false; then :
41565  $as_echo_n "(cached) " >&6
41566else
41567  if test -n "$OBJDUMP"; then
41568  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41569else
41570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41571for as_dir in $PATH
41572do
41573  IFS=$as_save_IFS
41574  test -z "$as_dir" && as_dir=.
41575    for ac_exec_ext in '' $ac_executable_extensions; do
41576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41577    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41579    break 2
41580  fi
41581done
41582  done
41583IFS=$as_save_IFS
41584
41585fi
41586fi
41587OBJDUMP=$ac_cv_prog_OBJDUMP
41588if test -n "$OBJDUMP"; then
41589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41590$as_echo "$OBJDUMP" >&6; }
41591else
41592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41593$as_echo "no" >&6; }
41594fi
41595
41596
41597    test -n "$OBJDUMP" && break
41598  done
41599fi
41600if test -z "$OBJDUMP"; then
41601  ac_ct_OBJDUMP=$OBJDUMP
41602  for ac_prog in gobjdump objdump
41603do
41604  # Extract the first word of "$ac_prog", so it can be a program name with args.
41605set dummy $ac_prog; ac_word=$2
41606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41607$as_echo_n "checking for $ac_word... " >&6; }
41608if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41609  $as_echo_n "(cached) " >&6
41610else
41611  if test -n "$ac_ct_OBJDUMP"; then
41612  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41613else
41614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41615for as_dir in $PATH
41616do
41617  IFS=$as_save_IFS
41618  test -z "$as_dir" && as_dir=.
41619    for ac_exec_ext in '' $ac_executable_extensions; do
41620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41621    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41623    break 2
41624  fi
41625done
41626  done
41627IFS=$as_save_IFS
41628
41629fi
41630fi
41631ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41632if test -n "$ac_ct_OBJDUMP"; then
41633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41634$as_echo "$ac_ct_OBJDUMP" >&6; }
41635else
41636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41637$as_echo "no" >&6; }
41638fi
41639
41640
41641  test -n "$ac_ct_OBJDUMP" && break
41642done
41643
41644  if test "x$ac_ct_OBJDUMP" = x; then
41645    OBJDUMP=""
41646  else
41647    case $cross_compiling:$ac_tool_warned in
41648yes:)
41649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41651ac_tool_warned=yes ;;
41652esac
41653    OBJDUMP=$ac_ct_OBJDUMP
41654  fi
41655fi
41656
41657  else
41658    # The variable is set, but is it from the command line or the environment?
41659
41660    # Try to remove the string !OBJDUMP! from our list.
41661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41663      # If it failed, the variable was not from the command line. Ignore it,
41664      # but warn the user (except for BASH, which is always set by the calling BASH).
41665      if test "xOBJDUMP" != xBASH; then
41666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41667$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41668      fi
41669      # Try to locate tool using the code snippet
41670      if test -n "$ac_tool_prefix"; then
41671  for ac_prog in gobjdump objdump
41672  do
41673    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41674set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41676$as_echo_n "checking for $ac_word... " >&6; }
41677if ${ac_cv_prog_OBJDUMP+:} false; then :
41678  $as_echo_n "(cached) " >&6
41679else
41680  if test -n "$OBJDUMP"; then
41681  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41682else
41683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41684for as_dir in $PATH
41685do
41686  IFS=$as_save_IFS
41687  test -z "$as_dir" && as_dir=.
41688    for ac_exec_ext in '' $ac_executable_extensions; do
41689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41690    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41692    break 2
41693  fi
41694done
41695  done
41696IFS=$as_save_IFS
41697
41698fi
41699fi
41700OBJDUMP=$ac_cv_prog_OBJDUMP
41701if test -n "$OBJDUMP"; then
41702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41703$as_echo "$OBJDUMP" >&6; }
41704else
41705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41706$as_echo "no" >&6; }
41707fi
41708
41709
41710    test -n "$OBJDUMP" && break
41711  done
41712fi
41713if test -z "$OBJDUMP"; then
41714  ac_ct_OBJDUMP=$OBJDUMP
41715  for ac_prog in gobjdump objdump
41716do
41717  # Extract the first word of "$ac_prog", so it can be a program name with args.
41718set dummy $ac_prog; ac_word=$2
41719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41720$as_echo_n "checking for $ac_word... " >&6; }
41721if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41722  $as_echo_n "(cached) " >&6
41723else
41724  if test -n "$ac_ct_OBJDUMP"; then
41725  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41726else
41727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41728for as_dir in $PATH
41729do
41730  IFS=$as_save_IFS
41731  test -z "$as_dir" && as_dir=.
41732    for ac_exec_ext in '' $ac_executable_extensions; do
41733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41734    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41736    break 2
41737  fi
41738done
41739  done
41740IFS=$as_save_IFS
41741
41742fi
41743fi
41744ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41745if test -n "$ac_ct_OBJDUMP"; then
41746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41747$as_echo "$ac_ct_OBJDUMP" >&6; }
41748else
41749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41750$as_echo "no" >&6; }
41751fi
41752
41753
41754  test -n "$ac_ct_OBJDUMP" && break
41755done
41756
41757  if test "x$ac_ct_OBJDUMP" = x; then
41758    OBJDUMP=""
41759  else
41760    case $cross_compiling:$ac_tool_warned in
41761yes:)
41762{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41763$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41764ac_tool_warned=yes ;;
41765esac
41766    OBJDUMP=$ac_ct_OBJDUMP
41767  fi
41768fi
41769
41770    else
41771      # If it succeeded, then it was overridden by the user. We will use it
41772      # for the tool.
41773
41774      # First remove it from the list of overridden variables, so we can test
41775      # for unknown variables in the end.
41776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41777
41778      # Check if we try to supply an empty value
41779      if test "x$OBJDUMP" = x; then
41780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41781$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41783$as_echo_n "checking for OBJDUMP... " >&6; }
41784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41785$as_echo "disabled" >&6; }
41786      else
41787        # Check if the provided tool contains a complete path.
41788        tool_specified="$OBJDUMP"
41789        tool_basename="${tool_specified##*/}"
41790        if test "x$tool_basename" = "x$tool_specified"; then
41791          # A command without a complete path is provided, search $PATH.
41792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41793$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41794          # Extract the first word of "$tool_basename", so it can be a program name with args.
41795set dummy $tool_basename; ac_word=$2
41796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41797$as_echo_n "checking for $ac_word... " >&6; }
41798if ${ac_cv_path_OBJDUMP+:} false; then :
41799  $as_echo_n "(cached) " >&6
41800else
41801  case $OBJDUMP in
41802  [\\/]* | ?:[\\/]*)
41803  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41804  ;;
41805  *)
41806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41807for as_dir in $PATH
41808do
41809  IFS=$as_save_IFS
41810  test -z "$as_dir" && as_dir=.
41811    for ac_exec_ext in '' $ac_executable_extensions; do
41812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41813    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41815    break 2
41816  fi
41817done
41818  done
41819IFS=$as_save_IFS
41820
41821  ;;
41822esac
41823fi
41824OBJDUMP=$ac_cv_path_OBJDUMP
41825if test -n "$OBJDUMP"; then
41826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41827$as_echo "$OBJDUMP" >&6; }
41828else
41829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41830$as_echo "no" >&6; }
41831fi
41832
41833
41834          if test "x$OBJDUMP" = x; then
41835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41836          fi
41837        else
41838          # Otherwise we believe it is a complete path. Use it as it is.
41839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41840$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41842$as_echo_n "checking for OBJDUMP... " >&6; }
41843          if test ! -x "$tool_specified"; then
41844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41845$as_echo "not found" >&6; }
41846            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41847          fi
41848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41849$as_echo "$tool_specified" >&6; }
41850        fi
41851      fi
41852    fi
41853
41854  fi
41855
41856
41857  if test "x$OBJDUMP" != x; then
41858    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41859    # bails if argument is missing.
41860
41861  # Only process if variable expands to non-empty
41862
41863  if test "x$OBJDUMP" != x; then
41864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41865
41866  # First separate the path from the arguments. This will split at the first
41867  # space.
41868  complete="$OBJDUMP"
41869  path="${complete%% *}"
41870  tmp="$complete EOL"
41871  arguments="${tmp#* }"
41872
41873  # Input might be given as Windows format, start by converting to
41874  # unix format.
41875  new_path=`$CYGPATH -u "$path"`
41876
41877  # Now try to locate executable using which
41878  new_path=`$WHICH "$new_path" 2> /dev/null`
41879  # bat and cmd files are not always considered executable in cygwin causing which
41880  # to not find them
41881  if test "x$new_path" = x \
41882      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41883      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41884    new_path=`$CYGPATH -u "$path"`
41885  fi
41886  if test "x$new_path" = x; then
41887    # Oops. Which didn't find the executable.
41888    # The splitting of arguments from the executable at a space might have been incorrect,
41889    # since paths with space are more likely in Windows. Give it another try with the whole
41890    # argument.
41891    path="$complete"
41892    arguments="EOL"
41893    new_path=`$CYGPATH -u "$path"`
41894    new_path=`$WHICH "$new_path" 2> /dev/null`
41895    # bat and cmd files are not always considered executable in cygwin causing which
41896    # to not find them
41897    if test "x$new_path" = x \
41898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41900      new_path=`$CYGPATH -u "$path"`
41901    fi
41902    if test "x$new_path" = x; then
41903      # It's still not found. Now this is an unrecoverable error.
41904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41905$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41906      has_space=`$ECHO "$complete" | $GREP " "`
41907      if test "x$has_space" != x; then
41908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41910      fi
41911      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41912    fi
41913  fi
41914
41915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41918  # "foo.exe" is OK but "foo" is an error.
41919  #
41920  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41921  # It is also a way to make sure we got the proper file name for the real test later on.
41922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41923  if test "x$test_shortpath" = x; then
41924    # Short path failed, file does not exist as specified.
41925    # Try adding .exe or .cmd
41926    if test -f "${new_path}.exe"; then
41927      input_to_shortpath="${new_path}.exe"
41928    elif test -f "${new_path}.cmd"; then
41929      input_to_shortpath="${new_path}.cmd"
41930    else
41931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41932$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41935      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41936    fi
41937  else
41938    input_to_shortpath="$new_path"
41939  fi
41940
41941  # Call helper function which possibly converts this using DOS-style short mode.
41942  # If so, the updated path is stored in $new_path.
41943  new_path="$input_to_shortpath"
41944
41945  input_path="$input_to_shortpath"
41946  # Check if we need to convert this using DOS-style short mode. If the path
41947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41948  # take no chances and rewrite it.
41949  # Note: m4 eats our [], so we need to use [ and ] instead.
41950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41951  if test "x$has_forbidden_chars" != x; then
41952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41956      # Going to short mode and back again did indeed matter. Since short mode is
41957      # case insensitive, let's make it lowercase to improve readability.
41958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41959      # Now convert it back to Unix-style (cygpath)
41960      input_path=`$CYGPATH -u "$shortmode_path"`
41961      new_path="$input_path"
41962    fi
41963  fi
41964
41965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41966  if test "x$test_cygdrive_prefix" = x; then
41967    # As a simple fix, exclude /usr/bin since it's not a real path.
41968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41970      # a path prefixed by /cygdrive for fixpath to work.
41971      new_path="$CYGWIN_ROOT_PATH$input_path"
41972    fi
41973  fi
41974
41975  # remove trailing .exe if any
41976  new_path="${new_path/%.exe/}"
41977
41978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41979
41980  # First separate the path from the arguments. This will split at the first
41981  # space.
41982  complete="$OBJDUMP"
41983  path="${complete%% *}"
41984  tmp="$complete EOL"
41985  arguments="${tmp#* }"
41986
41987  # Input might be given as Windows format, start by converting to
41988  # unix format.
41989  new_path="$path"
41990
41991  windows_path="$new_path"
41992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41993    unix_path=`$CYGPATH -u "$windows_path"`
41994    new_path="$unix_path"
41995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41997    new_path="$unix_path"
41998  fi
41999
42000
42001  # Now try to locate executable using which
42002  new_path=`$WHICH "$new_path" 2> /dev/null`
42003
42004  if test "x$new_path" = x; then
42005    # Oops. Which didn't find the executable.
42006    # The splitting of arguments from the executable at a space might have been incorrect,
42007    # since paths with space are more likely in Windows. Give it another try with the whole
42008    # argument.
42009    path="$complete"
42010    arguments="EOL"
42011    new_path="$path"
42012
42013  windows_path="$new_path"
42014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42015    unix_path=`$CYGPATH -u "$windows_path"`
42016    new_path="$unix_path"
42017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42019    new_path="$unix_path"
42020  fi
42021
42022
42023    new_path=`$WHICH "$new_path" 2> /dev/null`
42024    # bat and cmd files are not always considered executable in MSYS causing which
42025    # to not find them
42026    if test "x$new_path" = x \
42027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42029      new_path="$path"
42030
42031  windows_path="$new_path"
42032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42033    unix_path=`$CYGPATH -u "$windows_path"`
42034    new_path="$unix_path"
42035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42037    new_path="$unix_path"
42038  fi
42039
42040    fi
42041
42042    if test "x$new_path" = x; then
42043      # It's still not found. Now this is an unrecoverable error.
42044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42045$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42046      has_space=`$ECHO "$complete" | $GREP " "`
42047      if test "x$has_space" != x; then
42048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42050      fi
42051      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42052    fi
42053  fi
42054
42055  # Now new_path has a complete unix path to the binary
42056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42057    # Keep paths in /bin as-is, but remove trailing .exe if any
42058    new_path="${new_path/%.exe/}"
42059    # Do not save /bin paths to all_fixpath_prefixes!
42060  else
42061    # Not in mixed or Windows style, start by that.
42062    new_path=`cmd //c echo $new_path`
42063
42064  input_path="$new_path"
42065  # Check if we need to convert this using DOS-style short mode. If the path
42066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42067  # take no chances and rewrite it.
42068  # Note: m4 eats our [], so we need to use [ and ] instead.
42069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42070  if test "x$has_forbidden_chars" != x; then
42071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42073  fi
42074
42075    # Output is in $new_path
42076
42077  windows_path="$new_path"
42078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42079    unix_path=`$CYGPATH -u "$windows_path"`
42080    new_path="$unix_path"
42081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42083    new_path="$unix_path"
42084  fi
42085
42086    # remove trailing .exe if any
42087    new_path="${new_path/%.exe/}"
42088
42089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42091  fi
42092
42093    else
42094      # We're on a unix platform. Hooray! :)
42095      # First separate the path from the arguments. This will split at the first
42096      # space.
42097      complete="$OBJDUMP"
42098      path="${complete%% *}"
42099      tmp="$complete EOL"
42100      arguments="${tmp#* }"
42101
42102      # Cannot rely on the command "which" here since it doesn't always work.
42103      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42104      if test -z "$is_absolute_path"; then
42105        # Path to executable is not absolute. Find it.
42106        IFS_save="$IFS"
42107        IFS=:
42108        for p in $PATH; do
42109          if test -f "$p/$path" && test -x "$p/$path"; then
42110            new_path="$p/$path"
42111            break
42112          fi
42113        done
42114        IFS="$IFS_save"
42115      else
42116        # This is an absolute path, we can use it without further modifications.
42117        new_path="$path"
42118      fi
42119
42120      if test "x$new_path" = x; then
42121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42122$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42123        has_space=`$ECHO "$complete" | $GREP " "`
42124        if test "x$has_space" != x; then
42125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42127        fi
42128        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42129      fi
42130    fi
42131
42132    # Now join together the path and the arguments once again
42133    if test "x$arguments" != xEOL; then
42134      new_complete="$new_path ${arguments% *}"
42135    else
42136      new_complete="$new_path"
42137    fi
42138
42139    if test "x$complete" != "x$new_complete"; then
42140      OBJDUMP="$new_complete"
42141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42142$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42143    fi
42144  fi
42145
42146  fi
42147
42148
42149  # Restore old path.
42150  PATH="$OLD_PATH"
42151
42152  # Restore the flags to the user specified values.
42153  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42154  CFLAGS="$ORG_CFLAGS"
42155  CXXFLAGS="$ORG_CXXFLAGS"
42156
42157
42158# Finally do some processing after the detection phase
42159
42160  if test "x$COMPILE_TYPE" = "xcross"; then
42161    # Now we need to find a C/C++ compiler that can build executables for the
42162    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42163    # used once. Also, we need to do this without adding a tools dir to the
42164    # path, otherwise we might pick up cross-compilers which don't use standard
42165    # naming.
42166
42167    OLDPATH="$PATH"
42168
42169
42170# Check whether --with-build-devkit was given.
42171if test "${with_build_devkit+set}" = set; then :
42172  withval=$with_build_devkit;
42173fi
42174
42175    if test "x$with_build_devkit" = "xyes"; then
42176      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42177    elif test -n "$with_build_devkit"; then
42178      if test ! -d "$with_build_devkit"; then
42179        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42180      else
42181
42182  # Only process if variable expands to non-empty
42183
42184  if test "x$with_build_devkit" != x; then
42185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42186
42187  # Input might be given as Windows format, start by converting to
42188  # unix format.
42189  path="$with_build_devkit"
42190  new_path=`$CYGPATH -u "$path"`
42191
42192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42195  # "foo.exe" is OK but "foo" is an error.
42196  #
42197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42198  # It is also a way to make sure we got the proper file name for the real test later on.
42199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42200  if test "x$test_shortpath" = x; then
42201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42202$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42203    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42204  fi
42205
42206  # Call helper function which possibly converts this using DOS-style short mode.
42207  # If so, the updated path is stored in $new_path.
42208
42209  input_path="$new_path"
42210  # Check if we need to convert this using DOS-style short mode. If the path
42211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42212  # take no chances and rewrite it.
42213  # Note: m4 eats our [], so we need to use [ and ] instead.
42214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42215  if test "x$has_forbidden_chars" != x; then
42216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42220      # Going to short mode and back again did indeed matter. Since short mode is
42221      # case insensitive, let's make it lowercase to improve readability.
42222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42223      # Now convert it back to Unix-style (cygpath)
42224      input_path=`$CYGPATH -u "$shortmode_path"`
42225      new_path="$input_path"
42226    fi
42227  fi
42228
42229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42230  if test "x$test_cygdrive_prefix" = x; then
42231    # As a simple fix, exclude /usr/bin since it's not a real path.
42232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42234      # a path prefixed by /cygdrive for fixpath to work.
42235      new_path="$CYGWIN_ROOT_PATH$input_path"
42236    fi
42237  fi
42238
42239
42240  if test "x$path" != "x$new_path"; then
42241    with_build_devkit="$new_path"
42242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42243$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42244  fi
42245
42246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42247
42248  path="$with_build_devkit"
42249  has_colon=`$ECHO $path | $GREP ^.:`
42250  new_path="$path"
42251  if test "x$has_colon" = x; then
42252    # Not in mixed or Windows style, start by that.
42253    new_path=`cmd //c echo $path`
42254  fi
42255
42256
42257  input_path="$new_path"
42258  # Check if we need to convert this using DOS-style short mode. If the path
42259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42260  # take no chances and rewrite it.
42261  # Note: m4 eats our [], so we need to use [ and ] instead.
42262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42263  if test "x$has_forbidden_chars" != x; then
42264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42266  fi
42267
42268
42269  windows_path="$new_path"
42270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42271    unix_path=`$CYGPATH -u "$windows_path"`
42272    new_path="$unix_path"
42273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42275    new_path="$unix_path"
42276  fi
42277
42278  if test "x$path" != "x$new_path"; then
42279    with_build_devkit="$new_path"
42280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42281$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42282  fi
42283
42284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42286
42287    else
42288      # We're on a unix platform. Hooray! :)
42289      path="$with_build_devkit"
42290      has_space=`$ECHO "$path" | $GREP " "`
42291      if test "x$has_space" != x; then
42292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42293$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42295      fi
42296
42297      # Use eval to expand a potential ~
42298      eval path="$path"
42299      if test ! -f "$path" && test ! -d "$path"; then
42300        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42301      fi
42302
42303      if test -d "$path"; then
42304        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42305      else
42306        dir="`$DIRNAME "$path"`"
42307        base="`$BASENAME "$path"`"
42308        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
42309      fi
42310    fi
42311  fi
42312
42313        BUILD_DEVKIT_ROOT="$with_build_devkit"
42314        # Check for a meta data info file in the root of the devkit
42315        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42316          # Process devkit.info so that existing devkit variables are not
42317          # modified by this
42318          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42319              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42320              -e "s/\$host/\$build/g" \
42321              $BUILD_DEVKIT_ROOT/devkit.info \
42322              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42323          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42324          # This potentially sets the following:
42325          # A descriptive name of the devkit
42326
42327  if test "x$BUILD_DEVKIT_NAME" = x; then
42328    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42329  fi
42330
42331          # Corresponds to --with-extra-path
42332
42333  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42334    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42335  fi
42336
42337          # Corresponds to --with-toolchain-path
42338
42339  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42340    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42341  fi
42342
42343          # Corresponds to --with-sysroot
42344
42345  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42346    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42347  fi
42348
42349          # Skip the Window specific parts
42350        fi
42351
42352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42353$as_echo_n "checking for build platform devkit... " >&6; }
42354        if test "x$BUILD_DEVKIT_NAME" != x; then
42355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42356$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42357        else
42358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42359$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42360        fi
42361
42362        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42363
42364  if test "x$BUILD_SYSROOT" != "x"; then
42365    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42366      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42367        # Solaris Studio does not have a concept of sysroot. Instead we must
42368        # make sure the default include and lib dirs are appended to each
42369        # compile and link command line.
42370        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42371        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42372            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42373            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42374      fi
42375    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42376      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42377      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42378    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42379      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42380      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42381    fi
42382    # Propagate the sysroot args to hotspot
42383    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42384    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42385    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42386    # The global CFLAGS and LDFLAGS variables need these for configure to function
42387    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42388    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42389    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42390    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42391  fi
42392
42393  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42394    # We also need -iframework<path>/System/Library/Frameworks
42395    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42396    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42397    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42398    # set this here so it doesn't have to be peppered throughout the forest
42399    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42400    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42401  fi
42402
42403
42404
42405
42406
42407         # Fallback default of just /bin if DEVKIT_PATH is not defined
42408        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42409          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42410        fi
42411        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42412      fi
42413    fi
42414
42415    # FIXME: we should list the discovered compilers as an exclude pattern!
42416    # If we do that, we can do this detection before POST_DETECTION, and still
42417    # find the build compilers in the tools dir, if needed.
42418
42419
42420
42421  # Publish this variable in the help.
42422
42423
42424  if [ -z "${BUILD_CC+x}" ]; then
42425    # The variable is not set by user, try to locate tool using the code snippet
42426    for ac_prog in cl cc gcc
42427do
42428  # Extract the first word of "$ac_prog", so it can be a program name with args.
42429set dummy $ac_prog; ac_word=$2
42430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42431$as_echo_n "checking for $ac_word... " >&6; }
42432if ${ac_cv_path_BUILD_CC+:} false; then :
42433  $as_echo_n "(cached) " >&6
42434else
42435  case $BUILD_CC in
42436  [\\/]* | ?:[\\/]*)
42437  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42438  ;;
42439  *)
42440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42441for as_dir in $PATH
42442do
42443  IFS=$as_save_IFS
42444  test -z "$as_dir" && as_dir=.
42445    for ac_exec_ext in '' $ac_executable_extensions; do
42446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42447    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42449    break 2
42450  fi
42451done
42452  done
42453IFS=$as_save_IFS
42454
42455  ;;
42456esac
42457fi
42458BUILD_CC=$ac_cv_path_BUILD_CC
42459if test -n "$BUILD_CC"; then
42460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42461$as_echo "$BUILD_CC" >&6; }
42462else
42463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42464$as_echo "no" >&6; }
42465fi
42466
42467
42468  test -n "$BUILD_CC" && break
42469done
42470
42471  else
42472    # The variable is set, but is it from the command line or the environment?
42473
42474    # Try to remove the string !BUILD_CC! from our list.
42475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42477      # If it failed, the variable was not from the command line. Ignore it,
42478      # but warn the user (except for BASH, which is always set by the calling BASH).
42479      if test "xBUILD_CC" != xBASH; then
42480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42481$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42482      fi
42483      # Try to locate tool using the code snippet
42484      for ac_prog in cl cc gcc
42485do
42486  # Extract the first word of "$ac_prog", so it can be a program name with args.
42487set dummy $ac_prog; ac_word=$2
42488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42489$as_echo_n "checking for $ac_word... " >&6; }
42490if ${ac_cv_path_BUILD_CC+:} false; then :
42491  $as_echo_n "(cached) " >&6
42492else
42493  case $BUILD_CC in
42494  [\\/]* | ?:[\\/]*)
42495  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42496  ;;
42497  *)
42498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42499for as_dir in $PATH
42500do
42501  IFS=$as_save_IFS
42502  test -z "$as_dir" && as_dir=.
42503    for ac_exec_ext in '' $ac_executable_extensions; do
42504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42505    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42507    break 2
42508  fi
42509done
42510  done
42511IFS=$as_save_IFS
42512
42513  ;;
42514esac
42515fi
42516BUILD_CC=$ac_cv_path_BUILD_CC
42517if test -n "$BUILD_CC"; then
42518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42519$as_echo "$BUILD_CC" >&6; }
42520else
42521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42522$as_echo "no" >&6; }
42523fi
42524
42525
42526  test -n "$BUILD_CC" && break
42527done
42528
42529    else
42530      # If it succeeded, then it was overridden by the user. We will use it
42531      # for the tool.
42532
42533      # First remove it from the list of overridden variables, so we can test
42534      # for unknown variables in the end.
42535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42536
42537      # Check if we try to supply an empty value
42538      if test "x$BUILD_CC" = x; then
42539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42540$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42542$as_echo_n "checking for BUILD_CC... " >&6; }
42543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42544$as_echo "disabled" >&6; }
42545      else
42546        # Check if the provided tool contains a complete path.
42547        tool_specified="$BUILD_CC"
42548        tool_basename="${tool_specified##*/}"
42549        if test "x$tool_basename" = "x$tool_specified"; then
42550          # A command without a complete path is provided, search $PATH.
42551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42552$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42553          # Extract the first word of "$tool_basename", so it can be a program name with args.
42554set dummy $tool_basename; ac_word=$2
42555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42556$as_echo_n "checking for $ac_word... " >&6; }
42557if ${ac_cv_path_BUILD_CC+:} false; then :
42558  $as_echo_n "(cached) " >&6
42559else
42560  case $BUILD_CC in
42561  [\\/]* | ?:[\\/]*)
42562  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42563  ;;
42564  *)
42565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42566for as_dir in $PATH
42567do
42568  IFS=$as_save_IFS
42569  test -z "$as_dir" && as_dir=.
42570    for ac_exec_ext in '' $ac_executable_extensions; do
42571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42572    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42574    break 2
42575  fi
42576done
42577  done
42578IFS=$as_save_IFS
42579
42580  ;;
42581esac
42582fi
42583BUILD_CC=$ac_cv_path_BUILD_CC
42584if test -n "$BUILD_CC"; then
42585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42586$as_echo "$BUILD_CC" >&6; }
42587else
42588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42589$as_echo "no" >&6; }
42590fi
42591
42592
42593          if test "x$BUILD_CC" = x; then
42594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42595          fi
42596        else
42597          # Otherwise we believe it is a complete path. Use it as it is.
42598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42599$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42601$as_echo_n "checking for BUILD_CC... " >&6; }
42602          if test ! -x "$tool_specified"; then
42603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42604$as_echo "not found" >&6; }
42605            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42606          fi
42607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42608$as_echo "$tool_specified" >&6; }
42609        fi
42610      fi
42611    fi
42612
42613  fi
42614
42615
42616
42617  if test "x$BUILD_CC" = x; then
42618    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42619  fi
42620
42621
42622
42623  # Only process if variable expands to non-empty
42624
42625  if test "x$BUILD_CC" != x; then
42626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42627
42628  # First separate the path from the arguments. This will split at the first
42629  # space.
42630  complete="$BUILD_CC"
42631  path="${complete%% *}"
42632  tmp="$complete EOL"
42633  arguments="${tmp#* }"
42634
42635  # Input might be given as Windows format, start by converting to
42636  # unix format.
42637  new_path=`$CYGPATH -u "$path"`
42638
42639  # Now try to locate executable using which
42640  new_path=`$WHICH "$new_path" 2> /dev/null`
42641  # bat and cmd files are not always considered executable in cygwin causing which
42642  # to not find them
42643  if test "x$new_path" = x \
42644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42646    new_path=`$CYGPATH -u "$path"`
42647  fi
42648  if test "x$new_path" = x; then
42649    # Oops. Which didn't find the executable.
42650    # The splitting of arguments from the executable at a space might have been incorrect,
42651    # since paths with space are more likely in Windows. Give it another try with the whole
42652    # argument.
42653    path="$complete"
42654    arguments="EOL"
42655    new_path=`$CYGPATH -u "$path"`
42656    new_path=`$WHICH "$new_path" 2> /dev/null`
42657    # bat and cmd files are not always considered executable in cygwin causing which
42658    # to not find them
42659    if test "x$new_path" = x \
42660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42662      new_path=`$CYGPATH -u "$path"`
42663    fi
42664    if test "x$new_path" = x; then
42665      # It's still not found. Now this is an unrecoverable error.
42666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42667$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42668      has_space=`$ECHO "$complete" | $GREP " "`
42669      if test "x$has_space" != x; then
42670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42672      fi
42673      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42674    fi
42675  fi
42676
42677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42680  # "foo.exe" is OK but "foo" is an error.
42681  #
42682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42683  # It is also a way to make sure we got the proper file name for the real test later on.
42684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42685  if test "x$test_shortpath" = x; then
42686    # Short path failed, file does not exist as specified.
42687    # Try adding .exe or .cmd
42688    if test -f "${new_path}.exe"; then
42689      input_to_shortpath="${new_path}.exe"
42690    elif test -f "${new_path}.cmd"; then
42691      input_to_shortpath="${new_path}.cmd"
42692    else
42693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42694$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42697      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42698    fi
42699  else
42700    input_to_shortpath="$new_path"
42701  fi
42702
42703  # Call helper function which possibly converts this using DOS-style short mode.
42704  # If so, the updated path is stored in $new_path.
42705  new_path="$input_to_shortpath"
42706
42707  input_path="$input_to_shortpath"
42708  # Check if we need to convert this using DOS-style short mode. If the path
42709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42710  # take no chances and rewrite it.
42711  # Note: m4 eats our [], so we need to use [ and ] instead.
42712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42713  if test "x$has_forbidden_chars" != x; then
42714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42718      # Going to short mode and back again did indeed matter. Since short mode is
42719      # case insensitive, let's make it lowercase to improve readability.
42720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42721      # Now convert it back to Unix-style (cygpath)
42722      input_path=`$CYGPATH -u "$shortmode_path"`
42723      new_path="$input_path"
42724    fi
42725  fi
42726
42727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42728  if test "x$test_cygdrive_prefix" = x; then
42729    # As a simple fix, exclude /usr/bin since it's not a real path.
42730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42732      # a path prefixed by /cygdrive for fixpath to work.
42733      new_path="$CYGWIN_ROOT_PATH$input_path"
42734    fi
42735  fi
42736
42737  # remove trailing .exe if any
42738  new_path="${new_path/%.exe/}"
42739
42740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42741
42742  # First separate the path from the arguments. This will split at the first
42743  # space.
42744  complete="$BUILD_CC"
42745  path="${complete%% *}"
42746  tmp="$complete EOL"
42747  arguments="${tmp#* }"
42748
42749  # Input might be given as Windows format, start by converting to
42750  # unix format.
42751  new_path="$path"
42752
42753  windows_path="$new_path"
42754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42755    unix_path=`$CYGPATH -u "$windows_path"`
42756    new_path="$unix_path"
42757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42759    new_path="$unix_path"
42760  fi
42761
42762
42763  # Now try to locate executable using which
42764  new_path=`$WHICH "$new_path" 2> /dev/null`
42765
42766  if test "x$new_path" = x; then
42767    # Oops. Which didn't find the executable.
42768    # The splitting of arguments from the executable at a space might have been incorrect,
42769    # since paths with space are more likely in Windows. Give it another try with the whole
42770    # argument.
42771    path="$complete"
42772    arguments="EOL"
42773    new_path="$path"
42774
42775  windows_path="$new_path"
42776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42777    unix_path=`$CYGPATH -u "$windows_path"`
42778    new_path="$unix_path"
42779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42781    new_path="$unix_path"
42782  fi
42783
42784
42785    new_path=`$WHICH "$new_path" 2> /dev/null`
42786    # bat and cmd files are not always considered executable in MSYS causing which
42787    # to not find them
42788    if test "x$new_path" = x \
42789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42791      new_path="$path"
42792
42793  windows_path="$new_path"
42794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42795    unix_path=`$CYGPATH -u "$windows_path"`
42796    new_path="$unix_path"
42797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42799    new_path="$unix_path"
42800  fi
42801
42802    fi
42803
42804    if test "x$new_path" = x; then
42805      # It's still not found. Now this is an unrecoverable error.
42806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42807$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42808      has_space=`$ECHO "$complete" | $GREP " "`
42809      if test "x$has_space" != x; then
42810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42812      fi
42813      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42814    fi
42815  fi
42816
42817  # Now new_path has a complete unix path to the binary
42818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42819    # Keep paths in /bin as-is, but remove trailing .exe if any
42820    new_path="${new_path/%.exe/}"
42821    # Do not save /bin paths to all_fixpath_prefixes!
42822  else
42823    # Not in mixed or Windows style, start by that.
42824    new_path=`cmd //c echo $new_path`
42825
42826  input_path="$new_path"
42827  # Check if we need to convert this using DOS-style short mode. If the path
42828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42829  # take no chances and rewrite it.
42830  # Note: m4 eats our [], so we need to use [ and ] instead.
42831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42832  if test "x$has_forbidden_chars" != x; then
42833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42835  fi
42836
42837    # Output is in $new_path
42838
42839  windows_path="$new_path"
42840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42841    unix_path=`$CYGPATH -u "$windows_path"`
42842    new_path="$unix_path"
42843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42845    new_path="$unix_path"
42846  fi
42847
42848    # remove trailing .exe if any
42849    new_path="${new_path/%.exe/}"
42850
42851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42853  fi
42854
42855    else
42856      # We're on a unix platform. Hooray! :)
42857      # First separate the path from the arguments. This will split at the first
42858      # space.
42859      complete="$BUILD_CC"
42860      path="${complete%% *}"
42861      tmp="$complete EOL"
42862      arguments="${tmp#* }"
42863
42864      # Cannot rely on the command "which" here since it doesn't always work.
42865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42866      if test -z "$is_absolute_path"; then
42867        # Path to executable is not absolute. Find it.
42868        IFS_save="$IFS"
42869        IFS=:
42870        for p in $PATH; do
42871          if test -f "$p/$path" && test -x "$p/$path"; then
42872            new_path="$p/$path"
42873            break
42874          fi
42875        done
42876        IFS="$IFS_save"
42877      else
42878        # This is an absolute path, we can use it without further modifications.
42879        new_path="$path"
42880      fi
42881
42882      if test "x$new_path" = x; then
42883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42884$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42885        has_space=`$ECHO "$complete" | $GREP " "`
42886        if test "x$has_space" != x; then
42887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42889        fi
42890        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42891      fi
42892    fi
42893
42894    # Now join together the path and the arguments once again
42895    if test "x$arguments" != xEOL; then
42896      new_complete="$new_path ${arguments% *}"
42897    else
42898      new_complete="$new_path"
42899    fi
42900
42901    if test "x$complete" != "x$new_complete"; then
42902      BUILD_CC="$new_complete"
42903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42904$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42905    fi
42906  fi
42907
42908
42909
42910
42911  # Publish this variable in the help.
42912
42913
42914  if [ -z "${BUILD_CXX+x}" ]; then
42915    # The variable is not set by user, try to locate tool using the code snippet
42916    for ac_prog in cl CC g++
42917do
42918  # Extract the first word of "$ac_prog", so it can be a program name with args.
42919set dummy $ac_prog; ac_word=$2
42920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42921$as_echo_n "checking for $ac_word... " >&6; }
42922if ${ac_cv_path_BUILD_CXX+:} false; then :
42923  $as_echo_n "(cached) " >&6
42924else
42925  case $BUILD_CXX in
42926  [\\/]* | ?:[\\/]*)
42927  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42928  ;;
42929  *)
42930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42931for as_dir in $PATH
42932do
42933  IFS=$as_save_IFS
42934  test -z "$as_dir" && as_dir=.
42935    for ac_exec_ext in '' $ac_executable_extensions; do
42936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42937    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42939    break 2
42940  fi
42941done
42942  done
42943IFS=$as_save_IFS
42944
42945  ;;
42946esac
42947fi
42948BUILD_CXX=$ac_cv_path_BUILD_CXX
42949if test -n "$BUILD_CXX"; then
42950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42951$as_echo "$BUILD_CXX" >&6; }
42952else
42953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42954$as_echo "no" >&6; }
42955fi
42956
42957
42958  test -n "$BUILD_CXX" && break
42959done
42960
42961  else
42962    # The variable is set, but is it from the command line or the environment?
42963
42964    # Try to remove the string !BUILD_CXX! from our list.
42965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42967      # If it failed, the variable was not from the command line. Ignore it,
42968      # but warn the user (except for BASH, which is always set by the calling BASH).
42969      if test "xBUILD_CXX" != xBASH; then
42970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42971$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42972      fi
42973      # Try to locate tool using the code snippet
42974      for ac_prog in cl CC g++
42975do
42976  # Extract the first word of "$ac_prog", so it can be a program name with args.
42977set dummy $ac_prog; ac_word=$2
42978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42979$as_echo_n "checking for $ac_word... " >&6; }
42980if ${ac_cv_path_BUILD_CXX+:} false; then :
42981  $as_echo_n "(cached) " >&6
42982else
42983  case $BUILD_CXX in
42984  [\\/]* | ?:[\\/]*)
42985  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42986  ;;
42987  *)
42988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42989for as_dir in $PATH
42990do
42991  IFS=$as_save_IFS
42992  test -z "$as_dir" && as_dir=.
42993    for ac_exec_ext in '' $ac_executable_extensions; do
42994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42995    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42997    break 2
42998  fi
42999done
43000  done
43001IFS=$as_save_IFS
43002
43003  ;;
43004esac
43005fi
43006BUILD_CXX=$ac_cv_path_BUILD_CXX
43007if test -n "$BUILD_CXX"; then
43008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43009$as_echo "$BUILD_CXX" >&6; }
43010else
43011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43012$as_echo "no" >&6; }
43013fi
43014
43015
43016  test -n "$BUILD_CXX" && break
43017done
43018
43019    else
43020      # If it succeeded, then it was overridden by the user. We will use it
43021      # for the tool.
43022
43023      # First remove it from the list of overridden variables, so we can test
43024      # for unknown variables in the end.
43025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43026
43027      # Check if we try to supply an empty value
43028      if test "x$BUILD_CXX" = x; then
43029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43030$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43032$as_echo_n "checking for BUILD_CXX... " >&6; }
43033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43034$as_echo "disabled" >&6; }
43035      else
43036        # Check if the provided tool contains a complete path.
43037        tool_specified="$BUILD_CXX"
43038        tool_basename="${tool_specified##*/}"
43039        if test "x$tool_basename" = "x$tool_specified"; then
43040          # A command without a complete path is provided, search $PATH.
43041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43042$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43043          # Extract the first word of "$tool_basename", so it can be a program name with args.
43044set dummy $tool_basename; ac_word=$2
43045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43046$as_echo_n "checking for $ac_word... " >&6; }
43047if ${ac_cv_path_BUILD_CXX+:} false; then :
43048  $as_echo_n "(cached) " >&6
43049else
43050  case $BUILD_CXX in
43051  [\\/]* | ?:[\\/]*)
43052  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43053  ;;
43054  *)
43055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43056for as_dir in $PATH
43057do
43058  IFS=$as_save_IFS
43059  test -z "$as_dir" && as_dir=.
43060    for ac_exec_ext in '' $ac_executable_extensions; do
43061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43062    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43064    break 2
43065  fi
43066done
43067  done
43068IFS=$as_save_IFS
43069
43070  ;;
43071esac
43072fi
43073BUILD_CXX=$ac_cv_path_BUILD_CXX
43074if test -n "$BUILD_CXX"; then
43075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43076$as_echo "$BUILD_CXX" >&6; }
43077else
43078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43079$as_echo "no" >&6; }
43080fi
43081
43082
43083          if test "x$BUILD_CXX" = x; then
43084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43085          fi
43086        else
43087          # Otherwise we believe it is a complete path. Use it as it is.
43088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43089$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43091$as_echo_n "checking for BUILD_CXX... " >&6; }
43092          if test ! -x "$tool_specified"; then
43093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43094$as_echo "not found" >&6; }
43095            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43096          fi
43097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43098$as_echo "$tool_specified" >&6; }
43099        fi
43100      fi
43101    fi
43102
43103  fi
43104
43105
43106
43107  if test "x$BUILD_CXX" = x; then
43108    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43109  fi
43110
43111
43112
43113  # Only process if variable expands to non-empty
43114
43115  if test "x$BUILD_CXX" != x; then
43116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43117
43118  # First separate the path from the arguments. This will split at the first
43119  # space.
43120  complete="$BUILD_CXX"
43121  path="${complete%% *}"
43122  tmp="$complete EOL"
43123  arguments="${tmp#* }"
43124
43125  # Input might be given as Windows format, start by converting to
43126  # unix format.
43127  new_path=`$CYGPATH -u "$path"`
43128
43129  # Now try to locate executable using which
43130  new_path=`$WHICH "$new_path" 2> /dev/null`
43131  # bat and cmd files are not always considered executable in cygwin causing which
43132  # to not find them
43133  if test "x$new_path" = x \
43134      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43135      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43136    new_path=`$CYGPATH -u "$path"`
43137  fi
43138  if test "x$new_path" = x; then
43139    # Oops. Which didn't find the executable.
43140    # The splitting of arguments from the executable at a space might have been incorrect,
43141    # since paths with space are more likely in Windows. Give it another try with the whole
43142    # argument.
43143    path="$complete"
43144    arguments="EOL"
43145    new_path=`$CYGPATH -u "$path"`
43146    new_path=`$WHICH "$new_path" 2> /dev/null`
43147    # bat and cmd files are not always considered executable in cygwin causing which
43148    # to not find them
43149    if test "x$new_path" = x \
43150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43152      new_path=`$CYGPATH -u "$path"`
43153    fi
43154    if test "x$new_path" = x; then
43155      # It's still not found. Now this is an unrecoverable error.
43156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43157$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43158      has_space=`$ECHO "$complete" | $GREP " "`
43159      if test "x$has_space" != x; then
43160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43162      fi
43163      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43164    fi
43165  fi
43166
43167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43170  # "foo.exe" is OK but "foo" is an error.
43171  #
43172  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43173  # It is also a way to make sure we got the proper file name for the real test later on.
43174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43175  if test "x$test_shortpath" = x; then
43176    # Short path failed, file does not exist as specified.
43177    # Try adding .exe or .cmd
43178    if test -f "${new_path}.exe"; then
43179      input_to_shortpath="${new_path}.exe"
43180    elif test -f "${new_path}.cmd"; then
43181      input_to_shortpath="${new_path}.cmd"
43182    else
43183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43184$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43187      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43188    fi
43189  else
43190    input_to_shortpath="$new_path"
43191  fi
43192
43193  # Call helper function which possibly converts this using DOS-style short mode.
43194  # If so, the updated path is stored in $new_path.
43195  new_path="$input_to_shortpath"
43196
43197  input_path="$input_to_shortpath"
43198  # Check if we need to convert this using DOS-style short mode. If the path
43199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43200  # take no chances and rewrite it.
43201  # Note: m4 eats our [], so we need to use [ and ] instead.
43202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43203  if test "x$has_forbidden_chars" != x; then
43204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43208      # Going to short mode and back again did indeed matter. Since short mode is
43209      # case insensitive, let's make it lowercase to improve readability.
43210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43211      # Now convert it back to Unix-style (cygpath)
43212      input_path=`$CYGPATH -u "$shortmode_path"`
43213      new_path="$input_path"
43214    fi
43215  fi
43216
43217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43218  if test "x$test_cygdrive_prefix" = x; then
43219    # As a simple fix, exclude /usr/bin since it's not a real path.
43220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43222      # a path prefixed by /cygdrive for fixpath to work.
43223      new_path="$CYGWIN_ROOT_PATH$input_path"
43224    fi
43225  fi
43226
43227  # remove trailing .exe if any
43228  new_path="${new_path/%.exe/}"
43229
43230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43231
43232  # First separate the path from the arguments. This will split at the first
43233  # space.
43234  complete="$BUILD_CXX"
43235  path="${complete%% *}"
43236  tmp="$complete EOL"
43237  arguments="${tmp#* }"
43238
43239  # Input might be given as Windows format, start by converting to
43240  # unix format.
43241  new_path="$path"
43242
43243  windows_path="$new_path"
43244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43245    unix_path=`$CYGPATH -u "$windows_path"`
43246    new_path="$unix_path"
43247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43249    new_path="$unix_path"
43250  fi
43251
43252
43253  # Now try to locate executable using which
43254  new_path=`$WHICH "$new_path" 2> /dev/null`
43255
43256  if test "x$new_path" = x; then
43257    # Oops. Which didn't find the executable.
43258    # The splitting of arguments from the executable at a space might have been incorrect,
43259    # since paths with space are more likely in Windows. Give it another try with the whole
43260    # argument.
43261    path="$complete"
43262    arguments="EOL"
43263    new_path="$path"
43264
43265  windows_path="$new_path"
43266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43267    unix_path=`$CYGPATH -u "$windows_path"`
43268    new_path="$unix_path"
43269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43271    new_path="$unix_path"
43272  fi
43273
43274
43275    new_path=`$WHICH "$new_path" 2> /dev/null`
43276    # bat and cmd files are not always considered executable in MSYS causing which
43277    # to not find them
43278    if test "x$new_path" = x \
43279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43281      new_path="$path"
43282
43283  windows_path="$new_path"
43284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43285    unix_path=`$CYGPATH -u "$windows_path"`
43286    new_path="$unix_path"
43287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43289    new_path="$unix_path"
43290  fi
43291
43292    fi
43293
43294    if test "x$new_path" = x; then
43295      # It's still not found. Now this is an unrecoverable error.
43296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43297$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43298      has_space=`$ECHO "$complete" | $GREP " "`
43299      if test "x$has_space" != x; then
43300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43302      fi
43303      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43304    fi
43305  fi
43306
43307  # Now new_path has a complete unix path to the binary
43308  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43309    # Keep paths in /bin as-is, but remove trailing .exe if any
43310    new_path="${new_path/%.exe/}"
43311    # Do not save /bin paths to all_fixpath_prefixes!
43312  else
43313    # Not in mixed or Windows style, start by that.
43314    new_path=`cmd //c echo $new_path`
43315
43316  input_path="$new_path"
43317  # Check if we need to convert this using DOS-style short mode. If the path
43318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43319  # take no chances and rewrite it.
43320  # Note: m4 eats our [], so we need to use [ and ] instead.
43321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43322  if test "x$has_forbidden_chars" != x; then
43323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43325  fi
43326
43327    # Output is in $new_path
43328
43329  windows_path="$new_path"
43330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43331    unix_path=`$CYGPATH -u "$windows_path"`
43332    new_path="$unix_path"
43333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43335    new_path="$unix_path"
43336  fi
43337
43338    # remove trailing .exe if any
43339    new_path="${new_path/%.exe/}"
43340
43341    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43342    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43343  fi
43344
43345    else
43346      # We're on a unix platform. Hooray! :)
43347      # First separate the path from the arguments. This will split at the first
43348      # space.
43349      complete="$BUILD_CXX"
43350      path="${complete%% *}"
43351      tmp="$complete EOL"
43352      arguments="${tmp#* }"
43353
43354      # Cannot rely on the command "which" here since it doesn't always work.
43355      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43356      if test -z "$is_absolute_path"; then
43357        # Path to executable is not absolute. Find it.
43358        IFS_save="$IFS"
43359        IFS=:
43360        for p in $PATH; do
43361          if test -f "$p/$path" && test -x "$p/$path"; then
43362            new_path="$p/$path"
43363            break
43364          fi
43365        done
43366        IFS="$IFS_save"
43367      else
43368        # This is an absolute path, we can use it without further modifications.
43369        new_path="$path"
43370      fi
43371
43372      if test "x$new_path" = x; then
43373        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43374$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43375        has_space=`$ECHO "$complete" | $GREP " "`
43376        if test "x$has_space" != x; then
43377          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43378$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43379        fi
43380        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43381      fi
43382    fi
43383
43384    # Now join together the path and the arguments once again
43385    if test "x$arguments" != xEOL; then
43386      new_complete="$new_path ${arguments% *}"
43387    else
43388      new_complete="$new_path"
43389    fi
43390
43391    if test "x$complete" != "x$new_complete"; then
43392      BUILD_CXX="$new_complete"
43393      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43394$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43395    fi
43396  fi
43397
43398
43399
43400  # Publish this variable in the help.
43401
43402
43403  if [ -z "${BUILD_NM+x}" ]; then
43404    # The variable is not set by user, try to locate tool using the code snippet
43405    for ac_prog in nm gcc-nm
43406do
43407  # Extract the first word of "$ac_prog", so it can be a program name with args.
43408set dummy $ac_prog; ac_word=$2
43409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43410$as_echo_n "checking for $ac_word... " >&6; }
43411if ${ac_cv_path_BUILD_NM+:} false; then :
43412  $as_echo_n "(cached) " >&6
43413else
43414  case $BUILD_NM in
43415  [\\/]* | ?:[\\/]*)
43416  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43417  ;;
43418  *)
43419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43420for as_dir in $PATH
43421do
43422  IFS=$as_save_IFS
43423  test -z "$as_dir" && as_dir=.
43424    for ac_exec_ext in '' $ac_executable_extensions; do
43425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43426    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43428    break 2
43429  fi
43430done
43431  done
43432IFS=$as_save_IFS
43433
43434  ;;
43435esac
43436fi
43437BUILD_NM=$ac_cv_path_BUILD_NM
43438if test -n "$BUILD_NM"; then
43439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43440$as_echo "$BUILD_NM" >&6; }
43441else
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43443$as_echo "no" >&6; }
43444fi
43445
43446
43447  test -n "$BUILD_NM" && break
43448done
43449
43450  else
43451    # The variable is set, but is it from the command line or the environment?
43452
43453    # Try to remove the string !BUILD_NM! from our list.
43454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43456      # If it failed, the variable was not from the command line. Ignore it,
43457      # but warn the user (except for BASH, which is always set by the calling BASH).
43458      if test "xBUILD_NM" != xBASH; then
43459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43460$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43461      fi
43462      # Try to locate tool using the code snippet
43463      for ac_prog in nm gcc-nm
43464do
43465  # Extract the first word of "$ac_prog", so it can be a program name with args.
43466set dummy $ac_prog; ac_word=$2
43467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43468$as_echo_n "checking for $ac_word... " >&6; }
43469if ${ac_cv_path_BUILD_NM+:} false; then :
43470  $as_echo_n "(cached) " >&6
43471else
43472  case $BUILD_NM in
43473  [\\/]* | ?:[\\/]*)
43474  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43475  ;;
43476  *)
43477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43478for as_dir in $PATH
43479do
43480  IFS=$as_save_IFS
43481  test -z "$as_dir" && as_dir=.
43482    for ac_exec_ext in '' $ac_executable_extensions; do
43483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43484    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43486    break 2
43487  fi
43488done
43489  done
43490IFS=$as_save_IFS
43491
43492  ;;
43493esac
43494fi
43495BUILD_NM=$ac_cv_path_BUILD_NM
43496if test -n "$BUILD_NM"; then
43497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43498$as_echo "$BUILD_NM" >&6; }
43499else
43500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43501$as_echo "no" >&6; }
43502fi
43503
43504
43505  test -n "$BUILD_NM" && break
43506done
43507
43508    else
43509      # If it succeeded, then it was overridden by the user. We will use it
43510      # for the tool.
43511
43512      # First remove it from the list of overridden variables, so we can test
43513      # for unknown variables in the end.
43514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43515
43516      # Check if we try to supply an empty value
43517      if test "x$BUILD_NM" = x; then
43518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43519$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43521$as_echo_n "checking for BUILD_NM... " >&6; }
43522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43523$as_echo "disabled" >&6; }
43524      else
43525        # Check if the provided tool contains a complete path.
43526        tool_specified="$BUILD_NM"
43527        tool_basename="${tool_specified##*/}"
43528        if test "x$tool_basename" = "x$tool_specified"; then
43529          # A command without a complete path is provided, search $PATH.
43530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43531$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43532          # Extract the first word of "$tool_basename", so it can be a program name with args.
43533set dummy $tool_basename; ac_word=$2
43534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43535$as_echo_n "checking for $ac_word... " >&6; }
43536if ${ac_cv_path_BUILD_NM+:} false; then :
43537  $as_echo_n "(cached) " >&6
43538else
43539  case $BUILD_NM in
43540  [\\/]* | ?:[\\/]*)
43541  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43542  ;;
43543  *)
43544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43545for as_dir in $PATH
43546do
43547  IFS=$as_save_IFS
43548  test -z "$as_dir" && as_dir=.
43549    for ac_exec_ext in '' $ac_executable_extensions; do
43550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43551    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43553    break 2
43554  fi
43555done
43556  done
43557IFS=$as_save_IFS
43558
43559  ;;
43560esac
43561fi
43562BUILD_NM=$ac_cv_path_BUILD_NM
43563if test -n "$BUILD_NM"; then
43564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43565$as_echo "$BUILD_NM" >&6; }
43566else
43567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43568$as_echo "no" >&6; }
43569fi
43570
43571
43572          if test "x$BUILD_NM" = x; then
43573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43574          fi
43575        else
43576          # Otherwise we believe it is a complete path. Use it as it is.
43577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43578$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43580$as_echo_n "checking for BUILD_NM... " >&6; }
43581          if test ! -x "$tool_specified"; then
43582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43583$as_echo "not found" >&6; }
43584            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43585          fi
43586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43587$as_echo "$tool_specified" >&6; }
43588        fi
43589      fi
43590    fi
43591
43592  fi
43593
43594
43595
43596  # Only process if variable expands to non-empty
43597
43598  if test "x$BUILD_NM" != x; then
43599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43600
43601  # First separate the path from the arguments. This will split at the first
43602  # space.
43603  complete="$BUILD_NM"
43604  path="${complete%% *}"
43605  tmp="$complete EOL"
43606  arguments="${tmp#* }"
43607
43608  # Input might be given as Windows format, start by converting to
43609  # unix format.
43610  new_path=`$CYGPATH -u "$path"`
43611
43612  # Now try to locate executable using which
43613  new_path=`$WHICH "$new_path" 2> /dev/null`
43614  # bat and cmd files are not always considered executable in cygwin causing which
43615  # to not find them
43616  if test "x$new_path" = x \
43617      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43618      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43619    new_path=`$CYGPATH -u "$path"`
43620  fi
43621  if test "x$new_path" = x; then
43622    # Oops. Which didn't find the executable.
43623    # The splitting of arguments from the executable at a space might have been incorrect,
43624    # since paths with space are more likely in Windows. Give it another try with the whole
43625    # argument.
43626    path="$complete"
43627    arguments="EOL"
43628    new_path=`$CYGPATH -u "$path"`
43629    new_path=`$WHICH "$new_path" 2> /dev/null`
43630    # bat and cmd files are not always considered executable in cygwin causing which
43631    # to not find them
43632    if test "x$new_path" = x \
43633        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43634        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43635      new_path=`$CYGPATH -u "$path"`
43636    fi
43637    if test "x$new_path" = x; then
43638      # It's still not found. Now this is an unrecoverable error.
43639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43640$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43641      has_space=`$ECHO "$complete" | $GREP " "`
43642      if test "x$has_space" != x; then
43643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43645      fi
43646      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43647    fi
43648  fi
43649
43650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43653  # "foo.exe" is OK but "foo" is an error.
43654  #
43655  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43656  # It is also a way to make sure we got the proper file name for the real test later on.
43657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43658  if test "x$test_shortpath" = x; then
43659    # Short path failed, file does not exist as specified.
43660    # Try adding .exe or .cmd
43661    if test -f "${new_path}.exe"; then
43662      input_to_shortpath="${new_path}.exe"
43663    elif test -f "${new_path}.cmd"; then
43664      input_to_shortpath="${new_path}.cmd"
43665    else
43666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43667$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43668      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43669$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43670      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43671    fi
43672  else
43673    input_to_shortpath="$new_path"
43674  fi
43675
43676  # Call helper function which possibly converts this using DOS-style short mode.
43677  # If so, the updated path is stored in $new_path.
43678  new_path="$input_to_shortpath"
43679
43680  input_path="$input_to_shortpath"
43681  # Check if we need to convert this using DOS-style short mode. If the path
43682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43683  # take no chances and rewrite it.
43684  # Note: m4 eats our [], so we need to use [ and ] instead.
43685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43686  if test "x$has_forbidden_chars" != x; then
43687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43691      # Going to short mode and back again did indeed matter. Since short mode is
43692      # case insensitive, let's make it lowercase to improve readability.
43693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43694      # Now convert it back to Unix-style (cygpath)
43695      input_path=`$CYGPATH -u "$shortmode_path"`
43696      new_path="$input_path"
43697    fi
43698  fi
43699
43700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43701  if test "x$test_cygdrive_prefix" = x; then
43702    # As a simple fix, exclude /usr/bin since it's not a real path.
43703    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43705      # a path prefixed by /cygdrive for fixpath to work.
43706      new_path="$CYGWIN_ROOT_PATH$input_path"
43707    fi
43708  fi
43709
43710  # remove trailing .exe if any
43711  new_path="${new_path/%.exe/}"
43712
43713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43714
43715  # First separate the path from the arguments. This will split at the first
43716  # space.
43717  complete="$BUILD_NM"
43718  path="${complete%% *}"
43719  tmp="$complete EOL"
43720  arguments="${tmp#* }"
43721
43722  # Input might be given as Windows format, start by converting to
43723  # unix format.
43724  new_path="$path"
43725
43726  windows_path="$new_path"
43727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43728    unix_path=`$CYGPATH -u "$windows_path"`
43729    new_path="$unix_path"
43730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43732    new_path="$unix_path"
43733  fi
43734
43735
43736  # Now try to locate executable using which
43737  new_path=`$WHICH "$new_path" 2> /dev/null`
43738
43739  if test "x$new_path" = x; then
43740    # Oops. Which didn't find the executable.
43741    # The splitting of arguments from the executable at a space might have been incorrect,
43742    # since paths with space are more likely in Windows. Give it another try with the whole
43743    # argument.
43744    path="$complete"
43745    arguments="EOL"
43746    new_path="$path"
43747
43748  windows_path="$new_path"
43749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43750    unix_path=`$CYGPATH -u "$windows_path"`
43751    new_path="$unix_path"
43752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43754    new_path="$unix_path"
43755  fi
43756
43757
43758    new_path=`$WHICH "$new_path" 2> /dev/null`
43759    # bat and cmd files are not always considered executable in MSYS causing which
43760    # to not find them
43761    if test "x$new_path" = x \
43762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43764      new_path="$path"
43765
43766  windows_path="$new_path"
43767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43768    unix_path=`$CYGPATH -u "$windows_path"`
43769    new_path="$unix_path"
43770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43772    new_path="$unix_path"
43773  fi
43774
43775    fi
43776
43777    if test "x$new_path" = x; then
43778      # It's still not found. Now this is an unrecoverable error.
43779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43780$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43781      has_space=`$ECHO "$complete" | $GREP " "`
43782      if test "x$has_space" != x; then
43783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43785      fi
43786      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43787    fi
43788  fi
43789
43790  # Now new_path has a complete unix path to the binary
43791  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43792    # Keep paths in /bin as-is, but remove trailing .exe if any
43793    new_path="${new_path/%.exe/}"
43794    # Do not save /bin paths to all_fixpath_prefixes!
43795  else
43796    # Not in mixed or Windows style, start by that.
43797    new_path=`cmd //c echo $new_path`
43798
43799  input_path="$new_path"
43800  # Check if we need to convert this using DOS-style short mode. If the path
43801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43802  # take no chances and rewrite it.
43803  # Note: m4 eats our [], so we need to use [ and ] instead.
43804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43805  if test "x$has_forbidden_chars" != x; then
43806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43808  fi
43809
43810    # Output is in $new_path
43811
43812  windows_path="$new_path"
43813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43814    unix_path=`$CYGPATH -u "$windows_path"`
43815    new_path="$unix_path"
43816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43818    new_path="$unix_path"
43819  fi
43820
43821    # remove trailing .exe if any
43822    new_path="${new_path/%.exe/}"
43823
43824    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43825    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43826  fi
43827
43828    else
43829      # We're on a unix platform. Hooray! :)
43830      # First separate the path from the arguments. This will split at the first
43831      # space.
43832      complete="$BUILD_NM"
43833      path="${complete%% *}"
43834      tmp="$complete EOL"
43835      arguments="${tmp#* }"
43836
43837      # Cannot rely on the command "which" here since it doesn't always work.
43838      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43839      if test -z "$is_absolute_path"; then
43840        # Path to executable is not absolute. Find it.
43841        IFS_save="$IFS"
43842        IFS=:
43843        for p in $PATH; do
43844          if test -f "$p/$path" && test -x "$p/$path"; then
43845            new_path="$p/$path"
43846            break
43847          fi
43848        done
43849        IFS="$IFS_save"
43850      else
43851        # This is an absolute path, we can use it without further modifications.
43852        new_path="$path"
43853      fi
43854
43855      if test "x$new_path" = x; then
43856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43857$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43858        has_space=`$ECHO "$complete" | $GREP " "`
43859        if test "x$has_space" != x; then
43860          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43861$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43862        fi
43863        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43864      fi
43865    fi
43866
43867    # Now join together the path and the arguments once again
43868    if test "x$arguments" != xEOL; then
43869      new_complete="$new_path ${arguments% *}"
43870    else
43871      new_complete="$new_path"
43872    fi
43873
43874    if test "x$complete" != "x$new_complete"; then
43875      BUILD_NM="$new_complete"
43876      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
43877$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
43878    fi
43879  fi
43880
43881
43882
43883  # Publish this variable in the help.
43884
43885
43886  if [ -z "${BUILD_AR+x}" ]; then
43887    # The variable is not set by user, try to locate tool using the code snippet
43888    for ac_prog in ar gcc-ar
43889do
43890  # Extract the first word of "$ac_prog", so it can be a program name with args.
43891set dummy $ac_prog; ac_word=$2
43892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43893$as_echo_n "checking for $ac_word... " >&6; }
43894if ${ac_cv_path_BUILD_AR+:} false; then :
43895  $as_echo_n "(cached) " >&6
43896else
43897  case $BUILD_AR in
43898  [\\/]* | ?:[\\/]*)
43899  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
43900  ;;
43901  *)
43902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43903for as_dir in $PATH
43904do
43905  IFS=$as_save_IFS
43906  test -z "$as_dir" && as_dir=.
43907    for ac_exec_ext in '' $ac_executable_extensions; do
43908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43909    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
43910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43911    break 2
43912  fi
43913done
43914  done
43915IFS=$as_save_IFS
43916
43917  ;;
43918esac
43919fi
43920BUILD_AR=$ac_cv_path_BUILD_AR
43921if test -n "$BUILD_AR"; then
43922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
43923$as_echo "$BUILD_AR" >&6; }
43924else
43925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43926$as_echo "no" >&6; }
43927fi
43928
43929
43930  test -n "$BUILD_AR" && break
43931done
43932
43933  else
43934    # The variable is set, but is it from the command line or the environment?
43935
43936    # Try to remove the string !BUILD_AR! from our list.
43937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
43938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43939      # If it failed, the variable was not from the command line. Ignore it,
43940      # but warn the user (except for BASH, which is always set by the calling BASH).
43941      if test "xBUILD_AR" != xBASH; then
43942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
43943$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
43944      fi
43945      # Try to locate tool using the code snippet
43946      for ac_prog in ar gcc-ar
43947do
43948  # Extract the first word of "$ac_prog", so it can be a program name with args.
43949set dummy $ac_prog; ac_word=$2
43950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43951$as_echo_n "checking for $ac_word... " >&6; }
43952if ${ac_cv_path_BUILD_AR+:} false; then :
43953  $as_echo_n "(cached) " >&6
43954else
43955  case $BUILD_AR in
43956  [\\/]* | ?:[\\/]*)
43957  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
43958  ;;
43959  *)
43960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43961for as_dir in $PATH
43962do
43963  IFS=$as_save_IFS
43964  test -z "$as_dir" && as_dir=.
43965    for ac_exec_ext in '' $ac_executable_extensions; do
43966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43967    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
43968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43969    break 2
43970  fi
43971done
43972  done
43973IFS=$as_save_IFS
43974
43975  ;;
43976esac
43977fi
43978BUILD_AR=$ac_cv_path_BUILD_AR
43979if test -n "$BUILD_AR"; then
43980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
43981$as_echo "$BUILD_AR" >&6; }
43982else
43983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43984$as_echo "no" >&6; }
43985fi
43986
43987
43988  test -n "$BUILD_AR" && break
43989done
43990
43991    else
43992      # If it succeeded, then it was overridden by the user. We will use it
43993      # for the tool.
43994
43995      # First remove it from the list of overridden variables, so we can test
43996      # for unknown variables in the end.
43997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43998
43999      # Check if we try to supply an empty value
44000      if test "x$BUILD_AR" = x; then
44001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44002$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44004$as_echo_n "checking for BUILD_AR... " >&6; }
44005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44006$as_echo "disabled" >&6; }
44007      else
44008        # Check if the provided tool contains a complete path.
44009        tool_specified="$BUILD_AR"
44010        tool_basename="${tool_specified##*/}"
44011        if test "x$tool_basename" = "x$tool_specified"; then
44012          # A command without a complete path is provided, search $PATH.
44013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44014$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44015          # Extract the first word of "$tool_basename", so it can be a program name with args.
44016set dummy $tool_basename; ac_word=$2
44017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44018$as_echo_n "checking for $ac_word... " >&6; }
44019if ${ac_cv_path_BUILD_AR+:} false; then :
44020  $as_echo_n "(cached) " >&6
44021else
44022  case $BUILD_AR in
44023  [\\/]* | ?:[\\/]*)
44024  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44025  ;;
44026  *)
44027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44028for as_dir in $PATH
44029do
44030  IFS=$as_save_IFS
44031  test -z "$as_dir" && as_dir=.
44032    for ac_exec_ext in '' $ac_executable_extensions; do
44033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44034    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44036    break 2
44037  fi
44038done
44039  done
44040IFS=$as_save_IFS
44041
44042  ;;
44043esac
44044fi
44045BUILD_AR=$ac_cv_path_BUILD_AR
44046if test -n "$BUILD_AR"; then
44047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44048$as_echo "$BUILD_AR" >&6; }
44049else
44050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44051$as_echo "no" >&6; }
44052fi
44053
44054
44055          if test "x$BUILD_AR" = x; then
44056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44057          fi
44058        else
44059          # Otherwise we believe it is a complete path. Use it as it is.
44060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44061$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44063$as_echo_n "checking for BUILD_AR... " >&6; }
44064          if test ! -x "$tool_specified"; then
44065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44066$as_echo "not found" >&6; }
44067            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44068          fi
44069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44070$as_echo "$tool_specified" >&6; }
44071        fi
44072      fi
44073    fi
44074
44075  fi
44076
44077
44078
44079  # Only process if variable expands to non-empty
44080
44081  if test "x$BUILD_AR" != x; then
44082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44083
44084  # First separate the path from the arguments. This will split at the first
44085  # space.
44086  complete="$BUILD_AR"
44087  path="${complete%% *}"
44088  tmp="$complete EOL"
44089  arguments="${tmp#* }"
44090
44091  # Input might be given as Windows format, start by converting to
44092  # unix format.
44093  new_path=`$CYGPATH -u "$path"`
44094
44095  # Now try to locate executable using which
44096  new_path=`$WHICH "$new_path" 2> /dev/null`
44097  # bat and cmd files are not always considered executable in cygwin causing which
44098  # to not find them
44099  if test "x$new_path" = x \
44100      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44101      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44102    new_path=`$CYGPATH -u "$path"`
44103  fi
44104  if test "x$new_path" = x; then
44105    # Oops. Which didn't find the executable.
44106    # The splitting of arguments from the executable at a space might have been incorrect,
44107    # since paths with space are more likely in Windows. Give it another try with the whole
44108    # argument.
44109    path="$complete"
44110    arguments="EOL"
44111    new_path=`$CYGPATH -u "$path"`
44112    new_path=`$WHICH "$new_path" 2> /dev/null`
44113    # bat and cmd files are not always considered executable in cygwin causing which
44114    # to not find them
44115    if test "x$new_path" = x \
44116        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44117        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44118      new_path=`$CYGPATH -u "$path"`
44119    fi
44120    if test "x$new_path" = x; then
44121      # It's still not found. Now this is an unrecoverable error.
44122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44123$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44124      has_space=`$ECHO "$complete" | $GREP " "`
44125      if test "x$has_space" != x; then
44126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44128      fi
44129      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44130    fi
44131  fi
44132
44133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44136  # "foo.exe" is OK but "foo" is an error.
44137  #
44138  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44139  # It is also a way to make sure we got the proper file name for the real test later on.
44140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44141  if test "x$test_shortpath" = x; then
44142    # Short path failed, file does not exist as specified.
44143    # Try adding .exe or .cmd
44144    if test -f "${new_path}.exe"; then
44145      input_to_shortpath="${new_path}.exe"
44146    elif test -f "${new_path}.cmd"; then
44147      input_to_shortpath="${new_path}.cmd"
44148    else
44149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44150$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44151      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44152$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44153      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44154    fi
44155  else
44156    input_to_shortpath="$new_path"
44157  fi
44158
44159  # Call helper function which possibly converts this using DOS-style short mode.
44160  # If so, the updated path is stored in $new_path.
44161  new_path="$input_to_shortpath"
44162
44163  input_path="$input_to_shortpath"
44164  # Check if we need to convert this using DOS-style short mode. If the path
44165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44166  # take no chances and rewrite it.
44167  # Note: m4 eats our [], so we need to use [ and ] instead.
44168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44169  if test "x$has_forbidden_chars" != x; then
44170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44174      # Going to short mode and back again did indeed matter. Since short mode is
44175      # case insensitive, let's make it lowercase to improve readability.
44176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44177      # Now convert it back to Unix-style (cygpath)
44178      input_path=`$CYGPATH -u "$shortmode_path"`
44179      new_path="$input_path"
44180    fi
44181  fi
44182
44183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44184  if test "x$test_cygdrive_prefix" = x; then
44185    # As a simple fix, exclude /usr/bin since it's not a real path.
44186    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44188      # a path prefixed by /cygdrive for fixpath to work.
44189      new_path="$CYGWIN_ROOT_PATH$input_path"
44190    fi
44191  fi
44192
44193  # remove trailing .exe if any
44194  new_path="${new_path/%.exe/}"
44195
44196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44197
44198  # First separate the path from the arguments. This will split at the first
44199  # space.
44200  complete="$BUILD_AR"
44201  path="${complete%% *}"
44202  tmp="$complete EOL"
44203  arguments="${tmp#* }"
44204
44205  # Input might be given as Windows format, start by converting to
44206  # unix format.
44207  new_path="$path"
44208
44209  windows_path="$new_path"
44210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44211    unix_path=`$CYGPATH -u "$windows_path"`
44212    new_path="$unix_path"
44213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44215    new_path="$unix_path"
44216  fi
44217
44218
44219  # Now try to locate executable using which
44220  new_path=`$WHICH "$new_path" 2> /dev/null`
44221
44222  if test "x$new_path" = x; then
44223    # Oops. Which didn't find the executable.
44224    # The splitting of arguments from the executable at a space might have been incorrect,
44225    # since paths with space are more likely in Windows. Give it another try with the whole
44226    # argument.
44227    path="$complete"
44228    arguments="EOL"
44229    new_path="$path"
44230
44231  windows_path="$new_path"
44232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44233    unix_path=`$CYGPATH -u "$windows_path"`
44234    new_path="$unix_path"
44235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44237    new_path="$unix_path"
44238  fi
44239
44240
44241    new_path=`$WHICH "$new_path" 2> /dev/null`
44242    # bat and cmd files are not always considered executable in MSYS causing which
44243    # to not find them
44244    if test "x$new_path" = x \
44245        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44246        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44247      new_path="$path"
44248
44249  windows_path="$new_path"
44250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44251    unix_path=`$CYGPATH -u "$windows_path"`
44252    new_path="$unix_path"
44253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44255    new_path="$unix_path"
44256  fi
44257
44258    fi
44259
44260    if test "x$new_path" = x; then
44261      # It's still not found. Now this is an unrecoverable error.
44262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44263$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44264      has_space=`$ECHO "$complete" | $GREP " "`
44265      if test "x$has_space" != x; then
44266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44268      fi
44269      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44270    fi
44271  fi
44272
44273  # Now new_path has a complete unix path to the binary
44274  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44275    # Keep paths in /bin as-is, but remove trailing .exe if any
44276    new_path="${new_path/%.exe/}"
44277    # Do not save /bin paths to all_fixpath_prefixes!
44278  else
44279    # Not in mixed or Windows style, start by that.
44280    new_path=`cmd //c echo $new_path`
44281
44282  input_path="$new_path"
44283  # Check if we need to convert this using DOS-style short mode. If the path
44284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44285  # take no chances and rewrite it.
44286  # Note: m4 eats our [], so we need to use [ and ] instead.
44287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44288  if test "x$has_forbidden_chars" != x; then
44289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44291  fi
44292
44293    # Output is in $new_path
44294
44295  windows_path="$new_path"
44296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44297    unix_path=`$CYGPATH -u "$windows_path"`
44298    new_path="$unix_path"
44299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44301    new_path="$unix_path"
44302  fi
44303
44304    # remove trailing .exe if any
44305    new_path="${new_path/%.exe/}"
44306
44307    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44308    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44309  fi
44310
44311    else
44312      # We're on a unix platform. Hooray! :)
44313      # First separate the path from the arguments. This will split at the first
44314      # space.
44315      complete="$BUILD_AR"
44316      path="${complete%% *}"
44317      tmp="$complete EOL"
44318      arguments="${tmp#* }"
44319
44320      # Cannot rely on the command "which" here since it doesn't always work.
44321      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44322      if test -z "$is_absolute_path"; then
44323        # Path to executable is not absolute. Find it.
44324        IFS_save="$IFS"
44325        IFS=:
44326        for p in $PATH; do
44327          if test -f "$p/$path" && test -x "$p/$path"; then
44328            new_path="$p/$path"
44329            break
44330          fi
44331        done
44332        IFS="$IFS_save"
44333      else
44334        # This is an absolute path, we can use it without further modifications.
44335        new_path="$path"
44336      fi
44337
44338      if test "x$new_path" = x; then
44339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44340$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44341        has_space=`$ECHO "$complete" | $GREP " "`
44342        if test "x$has_space" != x; then
44343          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44344$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44345        fi
44346        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44347      fi
44348    fi
44349
44350    # Now join together the path and the arguments once again
44351    if test "x$arguments" != xEOL; then
44352      new_complete="$new_path ${arguments% *}"
44353    else
44354      new_complete="$new_path"
44355    fi
44356
44357    if test "x$complete" != "x$new_complete"; then
44358      BUILD_AR="$new_complete"
44359      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44360$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44361    fi
44362  fi
44363
44364    # Assume the C compiler is the assembler
44365    BUILD_AS="$BUILD_CC -c"
44366    # Just like for the target compiler, use the compiler as linker
44367    BUILD_LD="$BUILD_CC"
44368    BUILD_LDCXX="$BUILD_CXX"
44369
44370    PATH="$OLDPATH"
44371  else
44372    # If we are not cross compiling, use the normal target compilers for
44373    # building the build platform executables.
44374    BUILD_CC="$CC"
44375    BUILD_CXX="$CXX"
44376    BUILD_LD="$LD"
44377    BUILD_LDCXX="$LDCXX"
44378    BUILD_NM="$NM"
44379    BUILD_AS="$AS"
44380    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44381    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44382    BUILD_AR="$AR"
44383  fi
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44397    # For hotspot, we need these in Windows mixed path,
44398    # so rewrite them all. Need added .exe suffix.
44399    HOTSPOT_CXX="$CXX.exe"
44400    HOTSPOT_LD="$LD.exe"
44401    HOTSPOT_MT="$MT.exe"
44402    HOTSPOT_RC="$RC.exe"
44403
44404  unix_path="$HOTSPOT_CXX"
44405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44406    windows_path=`$CYGPATH -m "$unix_path"`
44407    HOTSPOT_CXX="$windows_path"
44408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44409    windows_path=`cmd //c echo $unix_path`
44410    HOTSPOT_CXX="$windows_path"
44411  fi
44412
44413
44414  unix_path="$HOTSPOT_LD"
44415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44416    windows_path=`$CYGPATH -m "$unix_path"`
44417    HOTSPOT_LD="$windows_path"
44418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44419    windows_path=`cmd //c echo $unix_path`
44420    HOTSPOT_LD="$windows_path"
44421  fi
44422
44423
44424  unix_path="$HOTSPOT_MT"
44425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426    windows_path=`$CYGPATH -m "$unix_path"`
44427    HOTSPOT_MT="$windows_path"
44428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44429    windows_path=`cmd //c echo $unix_path`
44430    HOTSPOT_MT="$windows_path"
44431  fi
44432
44433
44434  unix_path="$HOTSPOT_RC"
44435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44436    windows_path=`$CYGPATH -m "$unix_path"`
44437    HOTSPOT_RC="$windows_path"
44438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44439    windows_path=`cmd //c echo $unix_path`
44440    HOTSPOT_RC="$windows_path"
44441  fi
44442
44443
44444
44445  else
44446    HOTSPOT_CXX="$CXX"
44447    HOTSPOT_LD="$LD"
44448  fi
44449
44450
44451
44452  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44453    USE_CLANG=true
44454  fi
44455
44456
44457
44458
44459
44460  # The package path is used only on macosx?
44461  # FIXME: clean this up, and/or move it elsewhere.
44462  PACKAGE_PATH=/opt/local
44463
44464
44465  # Check for extra potential brokenness.
44466  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44467    # On Windows, double-check that we got the right compiler.
44468    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44469    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44470    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44471      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44472        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
44473      fi
44474    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44475      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44476        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44477      fi
44478    fi
44479  fi
44480
44481  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44482    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44483    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44484    # This is later checked when setting flags.
44485
44486    # "-Og" suppported for GCC 4.8 and later
44487    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535    # Execute function body
44536
44537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44538$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44539  supports=yes
44540
44541  saved_cflags="$CFLAGS"
44542  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44543  ac_ext=c
44544ac_cpp='$CPP $CPPFLAGS'
44545ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44546ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44547ac_compiler_gnu=$ac_cv_c_compiler_gnu
44548
44549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44550/* end confdefs.h.  */
44551int i;
44552_ACEOF
44553if ac_fn_c_try_compile "$LINENO"; then :
44554
44555else
44556  supports=no
44557fi
44558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44559  ac_ext=cpp
44560ac_cpp='$CXXCPP $CPPFLAGS'
44561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44564
44565  CFLAGS="$saved_cflags"
44566
44567  saved_cxxflags="$CXXFLAGS"
44568  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44569  ac_ext=cpp
44570ac_cpp='$CXXCPP $CPPFLAGS'
44571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44574
44575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44576/* end confdefs.h.  */
44577int i;
44578_ACEOF
44579if ac_fn_cxx_try_compile "$LINENO"; then :
44580
44581else
44582  supports=no
44583fi
44584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44585  ac_ext=cpp
44586ac_cpp='$CXXCPP $CPPFLAGS'
44587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44590
44591  CXXFLAGS="$saved_cxxflags"
44592
44593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44594$as_echo "$supports" >&6; }
44595  if test "x$supports" = "xyes" ; then
44596    :
44597    HAS_CFLAG_OPTIMIZE_DEBUG=true
44598  else
44599    :
44600    HAS_CFLAG_OPTIMIZE_DEBUG=false
44601  fi
44602
44603
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615    # "-z relro" supported in GNU binutils 2.17 and later
44616    LINKER_RELRO_FLAG="-Wl,-z,relro"
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664    # Execute function body
44665
44666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44667$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44668  supports=yes
44669
44670  saved_ldflags="$LDFLAGS"
44671  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44672  ac_ext=c
44673ac_cpp='$CPP $CPPFLAGS'
44674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44676ac_compiler_gnu=$ac_cv_c_compiler_gnu
44677
44678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44679/* end confdefs.h.  */
44680
44681int
44682main ()
44683{
44684
44685  ;
44686  return 0;
44687}
44688_ACEOF
44689if ac_fn_c_try_link "$LINENO"; then :
44690
44691else
44692  supports=no
44693fi
44694rm -f core conftest.err conftest.$ac_objext \
44695    conftest$ac_exeext conftest.$ac_ext
44696  ac_ext=cpp
44697ac_cpp='$CXXCPP $CPPFLAGS'
44698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44701
44702  LDFLAGS="$saved_ldflags"
44703
44704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44705$as_echo "$supports" >&6; }
44706  if test "x$supports" = "xyes" ; then
44707    :
44708    HAS_LINKER_RELRO=true
44709  else
44710    :
44711    HAS_LINKER_RELRO=false
44712  fi
44713
44714
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726    # "-z now" supported in GNU binutils 2.11 and later
44727    LINKER_NOW_FLAG="-Wl,-z,now"
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775    # Execute function body
44776
44777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44778$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44779  supports=yes
44780
44781  saved_ldflags="$LDFLAGS"
44782  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44783  ac_ext=c
44784ac_cpp='$CPP $CPPFLAGS'
44785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44787ac_compiler_gnu=$ac_cv_c_compiler_gnu
44788
44789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44790/* end confdefs.h.  */
44791
44792int
44793main ()
44794{
44795
44796  ;
44797  return 0;
44798}
44799_ACEOF
44800if ac_fn_c_try_link "$LINENO"; then :
44801
44802else
44803  supports=no
44804fi
44805rm -f core conftest.err conftest.$ac_objext \
44806    conftest$ac_exeext conftest.$ac_ext
44807  ac_ext=cpp
44808ac_cpp='$CXXCPP $CPPFLAGS'
44809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44812
44813  LDFLAGS="$saved_ldflags"
44814
44815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44816$as_echo "$supports" >&6; }
44817  if test "x$supports" = "xyes" ; then
44818    :
44819    HAS_LINKER_NOW=true
44820  else
44821    :
44822    HAS_LINKER_NOW=false
44823  fi
44824
44825
44826
44827
44828
44829
44830
44831
44832
44833
44834
44835
44836  fi
44837
44838  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44839  # in executable.'
44840  USING_BROKEN_SUSE_LD=no
44841  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44843$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44844    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44845    $ECHO "int main() { }" > main.c
44846    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
44847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44848$as_echo "no" >&6; }
44849      USING_BROKEN_SUSE_LD=no
44850    else
44851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44852$as_echo "yes" >&6; }
44853      USING_BROKEN_SUSE_LD=yes
44854    fi
44855    rm -rf version-script.map main.c a.out
44856  fi
44857
44858
44859
44860# Setup the JTReg Regression Test Harness.
44861
44862
44863# Check whether --with-jtreg was given.
44864if test "${with_jtreg+set}" = set; then :
44865  withval=$with_jtreg;
44866else
44867  with_jtreg=no
44868fi
44869
44870
44871  if test "x$with_jtreg" = xno; then
44872    # jtreg disabled
44873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44874$as_echo_n "checking for jtreg... " >&6; }
44875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44876$as_echo "no" >&6; }
44877  else
44878    if test "x$with_jtreg" != xyes; then
44879      # with path specified.
44880      JT_HOME="$with_jtreg"
44881    fi
44882
44883    if test "x$JT_HOME" != x; then
44884      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44885$as_echo_n "checking for jtreg... " >&6; }
44886
44887      # use JT_HOME enviroment var.
44888
44889  # Only process if variable expands to non-empty
44890
44891  if test "x$JT_HOME" != x; then
44892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44893
44894  # Input might be given as Windows format, start by converting to
44895  # unix format.
44896  path="$JT_HOME"
44897  new_path=`$CYGPATH -u "$path"`
44898
44899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44902  # "foo.exe" is OK but "foo" is an error.
44903  #
44904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44905  # It is also a way to make sure we got the proper file name for the real test later on.
44906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44907  if test "x$test_shortpath" = x; then
44908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44909$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44910    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44911  fi
44912
44913  # Call helper function which possibly converts this using DOS-style short mode.
44914  # If so, the updated path is stored in $new_path.
44915
44916  input_path="$new_path"
44917  # Check if we need to convert this using DOS-style short mode. If the path
44918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44919  # take no chances and rewrite it.
44920  # Note: m4 eats our [], so we need to use [ and ] instead.
44921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44922  if test "x$has_forbidden_chars" != x; then
44923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44927      # Going to short mode and back again did indeed matter. Since short mode is
44928      # case insensitive, let's make it lowercase to improve readability.
44929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44930      # Now convert it back to Unix-style (cygpath)
44931      input_path=`$CYGPATH -u "$shortmode_path"`
44932      new_path="$input_path"
44933    fi
44934  fi
44935
44936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44937  if test "x$test_cygdrive_prefix" = x; then
44938    # As a simple fix, exclude /usr/bin since it's not a real path.
44939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44941      # a path prefixed by /cygdrive for fixpath to work.
44942      new_path="$CYGWIN_ROOT_PATH$input_path"
44943    fi
44944  fi
44945
44946
44947  if test "x$path" != "x$new_path"; then
44948    JT_HOME="$new_path"
44949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44950$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44951  fi
44952
44953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44954
44955  path="$JT_HOME"
44956  has_colon=`$ECHO $path | $GREP ^.:`
44957  new_path="$path"
44958  if test "x$has_colon" = x; then
44959    # Not in mixed or Windows style, start by that.
44960    new_path=`cmd //c echo $path`
44961  fi
44962
44963
44964  input_path="$new_path"
44965  # Check if we need to convert this using DOS-style short mode. If the path
44966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44967  # take no chances and rewrite it.
44968  # Note: m4 eats our [], so we need to use [ and ] instead.
44969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44970  if test "x$has_forbidden_chars" != x; then
44971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44973  fi
44974
44975
44976  windows_path="$new_path"
44977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44978    unix_path=`$CYGPATH -u "$windows_path"`
44979    new_path="$unix_path"
44980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44982    new_path="$unix_path"
44983  fi
44984
44985  if test "x$path" != "x$new_path"; then
44986    JT_HOME="$new_path"
44987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44988$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44989  fi
44990
44991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44993
44994    else
44995      # We're on a unix platform. Hooray! :)
44996      path="$JT_HOME"
44997      has_space=`$ECHO "$path" | $GREP " "`
44998      if test "x$has_space" != x; then
44999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45000$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45002      fi
45003
45004      # Use eval to expand a potential ~
45005      eval path="$path"
45006      if test ! -f "$path" && test ! -d "$path"; then
45007        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45008      fi
45009
45010      if test -d "$path"; then
45011        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45012      else
45013        dir="`$DIRNAME "$path"`"
45014        base="`$BASENAME "$path"`"
45015        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45016      fi
45017    fi
45018  fi
45019
45020
45021      # jtreg win32 script works for everybody
45022      JTREGEXE="$JT_HOME/bin/jtreg"
45023
45024      if test ! -f "$JTREGEXE"; then
45025        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45026      fi
45027
45028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45029$as_echo "$JTREGEXE" >&6; }
45030    else
45031      # try to find jtreg on path
45032
45033
45034
45035  # Publish this variable in the help.
45036
45037
45038  if [ -z "${JTREGEXE+x}" ]; then
45039    # The variable is not set by user, try to locate tool using the code snippet
45040    for ac_prog in jtreg
45041do
45042  # Extract the first word of "$ac_prog", so it can be a program name with args.
45043set dummy $ac_prog; ac_word=$2
45044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45045$as_echo_n "checking for $ac_word... " >&6; }
45046if ${ac_cv_path_JTREGEXE+:} false; then :
45047  $as_echo_n "(cached) " >&6
45048else
45049  case $JTREGEXE in
45050  [\\/]* | ?:[\\/]*)
45051  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45052  ;;
45053  *)
45054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45055for as_dir in $PATH
45056do
45057  IFS=$as_save_IFS
45058  test -z "$as_dir" && as_dir=.
45059    for ac_exec_ext in '' $ac_executable_extensions; do
45060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45061    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45063    break 2
45064  fi
45065done
45066  done
45067IFS=$as_save_IFS
45068
45069  ;;
45070esac
45071fi
45072JTREGEXE=$ac_cv_path_JTREGEXE
45073if test -n "$JTREGEXE"; then
45074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45075$as_echo "$JTREGEXE" >&6; }
45076else
45077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45078$as_echo "no" >&6; }
45079fi
45080
45081
45082  test -n "$JTREGEXE" && break
45083done
45084
45085  else
45086    # The variable is set, but is it from the command line or the environment?
45087
45088    # Try to remove the string !JTREGEXE! from our list.
45089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45091      # If it failed, the variable was not from the command line. Ignore it,
45092      # but warn the user (except for BASH, which is always set by the calling BASH).
45093      if test "xJTREGEXE" != xBASH; then
45094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45095$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45096      fi
45097      # Try to locate tool using the code snippet
45098      for ac_prog in jtreg
45099do
45100  # Extract the first word of "$ac_prog", so it can be a program name with args.
45101set dummy $ac_prog; ac_word=$2
45102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45103$as_echo_n "checking for $ac_word... " >&6; }
45104if ${ac_cv_path_JTREGEXE+:} false; then :
45105  $as_echo_n "(cached) " >&6
45106else
45107  case $JTREGEXE in
45108  [\\/]* | ?:[\\/]*)
45109  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45110  ;;
45111  *)
45112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45113for as_dir in $PATH
45114do
45115  IFS=$as_save_IFS
45116  test -z "$as_dir" && as_dir=.
45117    for ac_exec_ext in '' $ac_executable_extensions; do
45118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45119    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45121    break 2
45122  fi
45123done
45124  done
45125IFS=$as_save_IFS
45126
45127  ;;
45128esac
45129fi
45130JTREGEXE=$ac_cv_path_JTREGEXE
45131if test -n "$JTREGEXE"; then
45132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45133$as_echo "$JTREGEXE" >&6; }
45134else
45135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45136$as_echo "no" >&6; }
45137fi
45138
45139
45140  test -n "$JTREGEXE" && break
45141done
45142
45143    else
45144      # If it succeeded, then it was overridden by the user. We will use it
45145      # for the tool.
45146
45147      # First remove it from the list of overridden variables, so we can test
45148      # for unknown variables in the end.
45149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45150
45151      # Check if we try to supply an empty value
45152      if test "x$JTREGEXE" = x; then
45153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45154$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45156$as_echo_n "checking for JTREGEXE... " >&6; }
45157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45158$as_echo "disabled" >&6; }
45159      else
45160        # Check if the provided tool contains a complete path.
45161        tool_specified="$JTREGEXE"
45162        tool_basename="${tool_specified##*/}"
45163        if test "x$tool_basename" = "x$tool_specified"; then
45164          # A command without a complete path is provided, search $PATH.
45165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45166$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45167          # Extract the first word of "$tool_basename", so it can be a program name with args.
45168set dummy $tool_basename; ac_word=$2
45169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45170$as_echo_n "checking for $ac_word... " >&6; }
45171if ${ac_cv_path_JTREGEXE+:} false; then :
45172  $as_echo_n "(cached) " >&6
45173else
45174  case $JTREGEXE in
45175  [\\/]* | ?:[\\/]*)
45176  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45177  ;;
45178  *)
45179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45180for as_dir in $PATH
45181do
45182  IFS=$as_save_IFS
45183  test -z "$as_dir" && as_dir=.
45184    for ac_exec_ext in '' $ac_executable_extensions; do
45185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45186    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45188    break 2
45189  fi
45190done
45191  done
45192IFS=$as_save_IFS
45193
45194  ;;
45195esac
45196fi
45197JTREGEXE=$ac_cv_path_JTREGEXE
45198if test -n "$JTREGEXE"; then
45199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45200$as_echo "$JTREGEXE" >&6; }
45201else
45202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45203$as_echo "no" >&6; }
45204fi
45205
45206
45207          if test "x$JTREGEXE" = x; then
45208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45209          fi
45210        else
45211          # Otherwise we believe it is a complete path. Use it as it is.
45212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45213$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45215$as_echo_n "checking for JTREGEXE... " >&6; }
45216          if test ! -x "$tool_specified"; then
45217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45218$as_echo "not found" >&6; }
45219            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45220          fi
45221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45222$as_echo "$tool_specified" >&6; }
45223        fi
45224      fi
45225    fi
45226
45227  fi
45228
45229
45230
45231  if test "x$JTREGEXE" = x; then
45232    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45233  fi
45234
45235
45236      JT_HOME="`$DIRNAME $JTREGEXE`"
45237    fi
45238  fi
45239
45240
45241
45242
45243
45244
45245  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45246  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45247  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45248    COMPILER_TARGET_BITS_FLAG="-q"
45249    COMPILER_COMMAND_FILE_FLAG="-f"
45250  else
45251    COMPILER_TARGET_BITS_FLAG="-m"
45252    COMPILER_COMMAND_FILE_FLAG="@"
45253
45254    # The solstudio linker does not support @-files.
45255    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45256      COMPILER_COMMAND_FILE_FLAG=
45257    fi
45258
45259    # Check if @file is supported by gcc
45260    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45262$as_echo_n "checking if @file is supported by gcc... " >&6; }
45263      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45264      $ECHO "" "--version" > command.file
45265      if $CXX @command.file 2>&5 >&5; then
45266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45267$as_echo "yes" >&6; }
45268        COMPILER_COMMAND_FILE_FLAG="@"
45269      else
45270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45271$as_echo "no" >&6; }
45272        COMPILER_COMMAND_FILE_FLAG=
45273      fi
45274      rm -rf command.file
45275    fi
45276  fi
45277
45278
45279
45280  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45281  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45282    ARFLAGS="-r"
45283  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45284    ARFLAGS="-X64"
45285  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45286    # lib.exe is used as AR to create static libraries.
45287    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45288  else
45289    ARFLAGS=""
45290  fi
45291
45292
45293  ## Setup strip.
45294  # FIXME: should this really be per platform, or should it be per toolchain type?
45295  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45296  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45297  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45298    STRIPFLAGS="-g"
45299  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45300    STRIPFLAGS="-x"
45301  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45302    STRIPFLAGS="-S"
45303  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45304    STRIPFLAGS="-X32_64"
45305  fi
45306
45307
45308
45309  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45310    CC_OUT_OPTION=-Fo
45311    EXE_OUT_OPTION=-out:
45312    LD_OUT_OPTION=-out:
45313    AR_OUT_OPTION=-out:
45314  else
45315    # The option used to specify the target .o,.a or .so file.
45316    # When compiling, how to specify the to be created object file.
45317    CC_OUT_OPTION='-o$(SPACE)'
45318    # When linking, how to specify the to be created executable.
45319    EXE_OUT_OPTION='-o$(SPACE)'
45320    # When linking, how to specify the to be created dynamically linkable library.
45321    LD_OUT_OPTION='-o$(SPACE)'
45322    # When archiving, how to specify the to be create static archive for object files.
45323    AR_OUT_OPTION='rcs$(SPACE)'
45324  fi
45325
45326
45327
45328
45329
45330  # On Windows, we need to set RC flags.
45331  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45332    RC_FLAGS="-nologo -l0x409"
45333    if test "x$VARIANT" = xOPT; then
45334      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45335    fi
45336
45337    # The version variables used to create RC_FLAGS may be overridden
45338    # in a custom configure script, or possibly the command line.
45339    # Let those variables be expanded at make time in spec.gmk.
45340    # The \$ are escaped to the shell, and the $(...) variables
45341    # are evaluated by make.
45342    RC_FLAGS="$RC_FLAGS \
45343        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45344        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45345        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45346        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45347        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45348        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45349        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45350  fi
45351
45352
45353  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45354    # silence copyright notice and other headers.
45355    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45356  fi
45357
45358
45359# FIXME: Currently we must test this after toolchain but before flags. Fix!
45360
45361# Now we can test some aspects on the target using configure macros.
45362
45363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45364$as_echo_n "checking for ANSI C header files... " >&6; }
45365if ${ac_cv_header_stdc+:} false; then :
45366  $as_echo_n "(cached) " >&6
45367else
45368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45369/* end confdefs.h.  */
45370#include <stdlib.h>
45371#include <stdarg.h>
45372#include <string.h>
45373#include <float.h>
45374
45375int
45376main ()
45377{
45378
45379  ;
45380  return 0;
45381}
45382_ACEOF
45383if ac_fn_cxx_try_compile "$LINENO"; then :
45384  ac_cv_header_stdc=yes
45385else
45386  ac_cv_header_stdc=no
45387fi
45388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45389
45390if test $ac_cv_header_stdc = yes; then
45391  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45393/* end confdefs.h.  */
45394#include <string.h>
45395
45396_ACEOF
45397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45398  $EGREP "memchr" >/dev/null 2>&1; then :
45399
45400else
45401  ac_cv_header_stdc=no
45402fi
45403rm -f conftest*
45404
45405fi
45406
45407if test $ac_cv_header_stdc = yes; then
45408  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45410/* end confdefs.h.  */
45411#include <stdlib.h>
45412
45413_ACEOF
45414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45415  $EGREP "free" >/dev/null 2>&1; then :
45416
45417else
45418  ac_cv_header_stdc=no
45419fi
45420rm -f conftest*
45421
45422fi
45423
45424if test $ac_cv_header_stdc = yes; then
45425  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45426  if test "$cross_compiling" = yes; then :
45427  :
45428else
45429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45430/* end confdefs.h.  */
45431#include <ctype.h>
45432#include <stdlib.h>
45433#if ((' ' & 0x0FF) == 0x020)
45434# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45435# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45436#else
45437# define ISLOWER(c) \
45438		   (('a' <= (c) && (c) <= 'i') \
45439		     || ('j' <= (c) && (c) <= 'r') \
45440		     || ('s' <= (c) && (c) <= 'z'))
45441# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45442#endif
45443
45444#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45445int
45446main ()
45447{
45448  int i;
45449  for (i = 0; i < 256; i++)
45450    if (XOR (islower (i), ISLOWER (i))
45451	|| toupper (i) != TOUPPER (i))
45452      return 2;
45453  return 0;
45454}
45455_ACEOF
45456if ac_fn_cxx_try_run "$LINENO"; then :
45457
45458else
45459  ac_cv_header_stdc=no
45460fi
45461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45462  conftest.$ac_objext conftest.beam conftest.$ac_ext
45463fi
45464
45465fi
45466fi
45467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45468$as_echo "$ac_cv_header_stdc" >&6; }
45469if test $ac_cv_header_stdc = yes; then
45470
45471$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45472
45473fi
45474
45475# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45476for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45477		  inttypes.h stdint.h unistd.h
45478do :
45479  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45480ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45481"
45482if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45483  cat >>confdefs.h <<_ACEOF
45484#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45485_ACEOF
45486
45487fi
45488
45489done
45490
45491
45492
45493  ###############################################################################
45494  #
45495  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45496  # (The JVM can use 32 or 64 bit Java pointers but that decision
45497  # is made at runtime.)
45498  #
45499
45500  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45501    # Always specify -m flag on Solaris
45502    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45503
45504  # When we add flags to the "official" CFLAGS etc, we need to
45505  # keep track of these additions in ADDED_CFLAGS etc. These
45506  # will later be checked to make sure only controlled additions
45507  # have been made to CFLAGS etc.
45508  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45509  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45510  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45511
45512  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45513  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45514  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45515
45516  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45517  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45518  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45519
45520  elif test "x$COMPILE_TYPE" = xreduced; then
45521    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45522      # Specify -m if running reduced on unix platforms
45523
45524  # When we add flags to the "official" CFLAGS etc, we need to
45525  # keep track of these additions in ADDED_CFLAGS etc. These
45526  # will later be checked to make sure only controlled additions
45527  # have been made to CFLAGS etc.
45528  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45529  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45530  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45531
45532  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45533  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45534  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45535
45536  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45537  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45538  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45539
45540    fi
45541  fi
45542
45543  # Make compilation sanity check
45544  for ac_header in stdio.h
45545do :
45546  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45547if test "x$ac_cv_header_stdio_h" = xyes; then :
45548  cat >>confdefs.h <<_ACEOF
45549#define HAVE_STDIO_H 1
45550_ACEOF
45551
45552else
45553
45554    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45555$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45556    if test "x$COMPILE_TYPE" = xreduced; then
45557
45558  # Print a helpful message on how to acquire the necessary build dependency.
45559  # reduced is the help tag: freetype, cups, alsa etc
45560  MISSING_DEPENDENCY=reduced
45561
45562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45563    cygwin_help $MISSING_DEPENDENCY
45564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45565    msys_help $MISSING_DEPENDENCY
45566  else
45567    PKGHANDLER_COMMAND=
45568
45569    case $PKGHANDLER in
45570      apt-get)
45571        apt_help     $MISSING_DEPENDENCY ;;
45572      yum)
45573        yum_help     $MISSING_DEPENDENCY ;;
45574      port)
45575        port_help    $MISSING_DEPENDENCY ;;
45576      pkgutil)
45577        pkgutil_help $MISSING_DEPENDENCY ;;
45578      pkgadd)
45579        pkgadd_help  $MISSING_DEPENDENCY ;;
45580    esac
45581
45582    if test "x$PKGHANDLER_COMMAND" != x; then
45583      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45584    fi
45585  fi
45586
45587      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45588$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45589    elif test "x$COMPILE_TYPE" = xcross; then
45590      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45591$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45592    fi
45593    as_fn_error $? "Cannot continue." "$LINENO" 5
45594
45595fi
45596
45597done
45598
45599
45600  # The cast to long int works around a bug in the HP C Compiler
45601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45603# This bug is HP SR number 8606223364.
45604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45605$as_echo_n "checking size of int *... " >&6; }
45606if ${ac_cv_sizeof_int_p+:} false; then :
45607  $as_echo_n "(cached) " >&6
45608else
45609  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45610
45611else
45612  if test "$ac_cv_type_int_p" = yes; then
45613     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45615as_fn_error 77 "cannot compute sizeof (int *)
45616See \`config.log' for more details" "$LINENO" 5; }
45617   else
45618     ac_cv_sizeof_int_p=0
45619   fi
45620fi
45621
45622fi
45623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45624$as_echo "$ac_cv_sizeof_int_p" >&6; }
45625
45626
45627
45628cat >>confdefs.h <<_ACEOF
45629#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45630_ACEOF
45631
45632
45633
45634  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45635  if test "x$ac_cv_sizeof_int_p" = x; then
45636    # The test failed, lets stick to the assumed value.
45637    { $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
45638$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45639  else
45640    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45641
45642    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45643      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45644      # Let's try to implicitely set the compilers target architecture and retry the test
45645      { $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
45646$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;}
45647      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45648$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45649
45650  # When we add flags to the "official" CFLAGS etc, we need to
45651  # keep track of these additions in ADDED_CFLAGS etc. These
45652  # will later be checked to make sure only controlled additions
45653  # have been made to CFLAGS etc.
45654  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45655  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45656  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45657
45658  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45659  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45660  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45661
45662  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45663  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45664  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45665
45666
45667      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45668      unset ac_cv_sizeof_int_p
45669      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45670      cat >>confdefs.h <<_ACEOF
45671#undef SIZEOF_INT_P
45672_ACEOF
45673
45674      # The cast to long int works around a bug in the HP C Compiler
45675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45677# This bug is HP SR number 8606223364.
45678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45679$as_echo_n "checking size of int *... " >&6; }
45680if ${ac_cv_sizeof_int_p+:} false; then :
45681  $as_echo_n "(cached) " >&6
45682else
45683  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45684
45685else
45686  if test "$ac_cv_type_int_p" = yes; then
45687     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45689as_fn_error 77 "cannot compute sizeof (int *)
45690See \`config.log' for more details" "$LINENO" 5; }
45691   else
45692     ac_cv_sizeof_int_p=0
45693   fi
45694fi
45695
45696fi
45697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45698$as_echo "$ac_cv_sizeof_int_p" >&6; }
45699
45700
45701
45702cat >>confdefs.h <<_ACEOF
45703#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45704_ACEOF
45705
45706
45707
45708      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45709
45710      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45711        { $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
45712$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;}
45713        if test "x$COMPILE_TYPE" = xreduced; then
45714
45715  # Print a helpful message on how to acquire the necessary build dependency.
45716  # reduced is the help tag: freetype, cups, alsa etc
45717  MISSING_DEPENDENCY=reduced
45718
45719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45720    cygwin_help $MISSING_DEPENDENCY
45721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45722    msys_help $MISSING_DEPENDENCY
45723  else
45724    PKGHANDLER_COMMAND=
45725
45726    case $PKGHANDLER in
45727      apt-get)
45728        apt_help     $MISSING_DEPENDENCY ;;
45729      yum)
45730        yum_help     $MISSING_DEPENDENCY ;;
45731      port)
45732        port_help    $MISSING_DEPENDENCY ;;
45733      pkgutil)
45734        pkgutil_help $MISSING_DEPENDENCY ;;
45735      pkgadd)
45736        pkgadd_help  $MISSING_DEPENDENCY ;;
45737    esac
45738
45739    if test "x$PKGHANDLER_COMMAND" != x; then
45740      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45741    fi
45742  fi
45743
45744          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45745$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45746        elif test "x$COMPILE_TYPE" = xcross; then
45747          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45748$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45749        fi
45750        as_fn_error $? "Cannot continue." "$LINENO" 5
45751      fi
45752    fi
45753  fi
45754
45755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45756$as_echo_n "checking for target address size... " >&6; }
45757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45758$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45759
45760
45761  ###############################################################################
45762  #
45763  # Is the target little of big endian?
45764  #
45765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45766$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45767if ${ac_cv_c_bigendian+:} false; then :
45768  $as_echo_n "(cached) " >&6
45769else
45770  ac_cv_c_bigendian=unknown
45771    # See if we're dealing with a universal compiler.
45772    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45773/* end confdefs.h.  */
45774#ifndef __APPLE_CC__
45775	       not a universal capable compiler
45776	     #endif
45777	     typedef int dummy;
45778
45779_ACEOF
45780if ac_fn_cxx_try_compile "$LINENO"; then :
45781
45782	# Check for potential -arch flags.  It is not universal unless
45783	# there are at least two -arch flags with different values.
45784	ac_arch=
45785	ac_prev=
45786	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45787	 if test -n "$ac_prev"; then
45788	   case $ac_word in
45789	     i?86 | x86_64 | ppc | ppc64)
45790	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45791		 ac_arch=$ac_word
45792	       else
45793		 ac_cv_c_bigendian=universal
45794		 break
45795	       fi
45796	       ;;
45797	   esac
45798	   ac_prev=
45799	 elif test "x$ac_word" = "x-arch"; then
45800	   ac_prev=arch
45801	 fi
45802       done
45803fi
45804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45805    if test $ac_cv_c_bigendian = unknown; then
45806      # See if sys/param.h defines the BYTE_ORDER macro.
45807      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45808/* end confdefs.h.  */
45809#include <sys/types.h>
45810	     #include <sys/param.h>
45811
45812int
45813main ()
45814{
45815#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45816		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45817		     && LITTLE_ENDIAN)
45818	      bogus endian macros
45819	     #endif
45820
45821  ;
45822  return 0;
45823}
45824_ACEOF
45825if ac_fn_cxx_try_compile "$LINENO"; then :
45826  # It does; now see whether it defined to BIG_ENDIAN or not.
45827	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45828/* end confdefs.h.  */
45829#include <sys/types.h>
45830		#include <sys/param.h>
45831
45832int
45833main ()
45834{
45835#if BYTE_ORDER != BIG_ENDIAN
45836		 not big endian
45837		#endif
45838
45839  ;
45840  return 0;
45841}
45842_ACEOF
45843if ac_fn_cxx_try_compile "$LINENO"; then :
45844  ac_cv_c_bigendian=yes
45845else
45846  ac_cv_c_bigendian=no
45847fi
45848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45849fi
45850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45851    fi
45852    if test $ac_cv_c_bigendian = unknown; then
45853      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45854      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45855/* end confdefs.h.  */
45856#include <limits.h>
45857
45858int
45859main ()
45860{
45861#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45862	      bogus endian macros
45863	     #endif
45864
45865  ;
45866  return 0;
45867}
45868_ACEOF
45869if ac_fn_cxx_try_compile "$LINENO"; then :
45870  # It does; now see whether it defined to _BIG_ENDIAN or not.
45871	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45872/* end confdefs.h.  */
45873#include <limits.h>
45874
45875int
45876main ()
45877{
45878#ifndef _BIG_ENDIAN
45879		 not big endian
45880		#endif
45881
45882  ;
45883  return 0;
45884}
45885_ACEOF
45886if ac_fn_cxx_try_compile "$LINENO"; then :
45887  ac_cv_c_bigendian=yes
45888else
45889  ac_cv_c_bigendian=no
45890fi
45891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45892fi
45893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45894    fi
45895    if test $ac_cv_c_bigendian = unknown; then
45896      # Compile a test program.
45897      if test "$cross_compiling" = yes; then :
45898  # Try to guess by grepping values from an object file.
45899	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45900/* end confdefs.h.  */
45901short int ascii_mm[] =
45902		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45903		short int ascii_ii[] =
45904		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45905		int use_ascii (int i) {
45906		  return ascii_mm[i] + ascii_ii[i];
45907		}
45908		short int ebcdic_ii[] =
45909		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45910		short int ebcdic_mm[] =
45911		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45912		int use_ebcdic (int i) {
45913		  return ebcdic_mm[i] + ebcdic_ii[i];
45914		}
45915		extern int foo;
45916
45917int
45918main ()
45919{
45920return use_ascii (foo) == use_ebcdic (foo);
45921  ;
45922  return 0;
45923}
45924_ACEOF
45925if ac_fn_cxx_try_compile "$LINENO"; then :
45926  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45927	      ac_cv_c_bigendian=yes
45928	    fi
45929	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45930	      if test "$ac_cv_c_bigendian" = unknown; then
45931		ac_cv_c_bigendian=no
45932	      else
45933		# finding both strings is unlikely to happen, but who knows?
45934		ac_cv_c_bigendian=unknown
45935	      fi
45936	    fi
45937fi
45938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45939else
45940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45941/* end confdefs.h.  */
45942$ac_includes_default
45943int
45944main ()
45945{
45946
45947	     /* Are we little or big endian?  From Harbison&Steele.  */
45948	     union
45949	     {
45950	       long int l;
45951	       char c[sizeof (long int)];
45952	     } u;
45953	     u.l = 1;
45954	     return u.c[sizeof (long int) - 1] == 1;
45955
45956  ;
45957  return 0;
45958}
45959_ACEOF
45960if ac_fn_cxx_try_run "$LINENO"; then :
45961  ac_cv_c_bigendian=no
45962else
45963  ac_cv_c_bigendian=yes
45964fi
45965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45966  conftest.$ac_objext conftest.beam conftest.$ac_ext
45967fi
45968
45969    fi
45970fi
45971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45972$as_echo "$ac_cv_c_bigendian" >&6; }
45973 case $ac_cv_c_bigendian in #(
45974   yes)
45975     ENDIAN="big";; #(
45976   no)
45977     ENDIAN="little" ;; #(
45978   universal)
45979     ENDIAN="universal_endianness"
45980     ;; #(
45981   *)
45982     ENDIAN="unknown" ;;
45983 esac
45984
45985
45986  if test "x$ENDIAN" = xuniversal_endianness; then
45987    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45988  fi
45989  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45990    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
45991  fi
45992
45993
45994# Configure flags for the tools
45995
45996  ###############################################################################
45997  #
45998  # How to compile shared libraries.
45999  #
46000
46001  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46002    PICFLAG="-fPIC"
46003    C_FLAG_REORDER=''
46004    CXX_FLAG_REORDER=''
46005
46006    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46007      # Linking is different on MacOSX
46008      if test "x$STATIC_BUILD" = xtrue; then
46009        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46010      else
46011        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46012      fi
46013      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46014      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46015      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46016      SET_SHARED_LIBRARY_MAPFILE=''
46017    else
46018      # Default works for linux, might work on other platforms as well.
46019      SHARED_LIBRARY_FLAGS='-shared'
46020      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46021      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46022      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46023      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46024    fi
46025  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46026    C_FLAG_REORDER=''
46027    CXX_FLAG_REORDER=''
46028
46029    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46030      # Linking is different on MacOSX
46031      PICFLAG=''
46032      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46033      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46034      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46035      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46036      SET_SHARED_LIBRARY_MAPFILE=''
46037    else
46038      # Default works for linux, might work on other platforms as well.
46039      PICFLAG='-fPIC'
46040      SHARED_LIBRARY_FLAGS='-shared'
46041      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46042      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46043      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46044      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46045    fi
46046  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46047    PICFLAG="-KPIC"
46048    C_FLAG_REORDER='-xF'
46049    CXX_FLAG_REORDER='-xF'
46050    SHARED_LIBRARY_FLAGS="-G"
46051    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46052    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46053    SET_SHARED_LIBRARY_NAME='-h $1'
46054    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46055  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46056    PICFLAG="-qpic=large"
46057    C_FLAG_REORDER=''
46058    CXX_FLAG_REORDER=''
46059    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46060    SET_EXECUTABLE_ORIGIN=""
46061    SET_SHARED_LIBRARY_ORIGIN=''
46062    SET_SHARED_LIBRARY_NAME=''
46063    SET_SHARED_LIBRARY_MAPFILE=''
46064  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46065    PICFLAG=""
46066    C_FLAG_REORDER=''
46067    CXX_FLAG_REORDER=''
46068    SHARED_LIBRARY_FLAGS="-dll"
46069    SET_EXECUTABLE_ORIGIN=''
46070    SET_SHARED_LIBRARY_ORIGIN=''
46071    SET_SHARED_LIBRARY_NAME=''
46072    SET_SHARED_LIBRARY_MAPFILE=''
46073  fi
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46084    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46085    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46086    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46087  fi
46088  # The (cross) compiler is now configured, we can now test capabilities
46089  # of the target platform.
46090
46091
46092
46093  ###############################################################################
46094  #
46095  # Setup the opt flags for different compilers
46096  # and different operating systems.
46097  #
46098
46099  # FIXME: this was indirectly the old default, but just inherited.
46100  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46101  #   C_FLAG_DEPS="-MMD -MF"
46102  # fi
46103
46104  # Generate make dependency files
46105  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46106    C_FLAG_DEPS="-MMD -MF"
46107  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46108    C_FLAG_DEPS="-MMD -MF"
46109  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46110    C_FLAG_DEPS="-xMMD -xMF"
46111  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46112    C_FLAG_DEPS="-qmakedep=gcc -MF"
46113  fi
46114  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46115
46116
46117
46118  # Debug symbols
46119  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46120    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46121      # reduce from default "-g2" option to save space
46122      CFLAGS_DEBUG_SYMBOLS="-g1"
46123      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46124    else
46125      CFLAGS_DEBUG_SYMBOLS="-g"
46126      CXXFLAGS_DEBUG_SYMBOLS="-g"
46127    fi
46128  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46129    CFLAGS_DEBUG_SYMBOLS="-g"
46130    CXXFLAGS_DEBUG_SYMBOLS="-g"
46131  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46132    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46133    # -g0 enables debug symbols without disabling inlining.
46134    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46135  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46136    CFLAGS_DEBUG_SYMBOLS="-g"
46137    CXXFLAGS_DEBUG_SYMBOLS="-g"
46138  fi
46139
46140
46141
46142  # bounds, memory and behavior checking options
46143  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46144    case $DEBUG_LEVEL in
46145    release )
46146      # no adjustment
46147      ;;
46148    fastdebug )
46149      # no adjustment
46150      ;;
46151    slowdebug )
46152      # Add runtime stack smashing and undefined behavior checks.
46153      # Not all versions of gcc support -fstack-protector
46154      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192
46193
46194
46195
46196
46197    # Execute function body
46198
46199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46200$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46201  supports=yes
46202
46203  saved_cflags="$CFLAGS"
46204  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46205  ac_ext=c
46206ac_cpp='$CPP $CPPFLAGS'
46207ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46208ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46209ac_compiler_gnu=$ac_cv_c_compiler_gnu
46210
46211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46212/* end confdefs.h.  */
46213int i;
46214_ACEOF
46215if ac_fn_c_try_compile "$LINENO"; then :
46216
46217else
46218  supports=no
46219fi
46220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46221  ac_ext=cpp
46222ac_cpp='$CXXCPP $CPPFLAGS'
46223ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46224ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46225ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46226
46227  CFLAGS="$saved_cflags"
46228
46229  saved_cxxflags="$CXXFLAGS"
46230  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46231  ac_ext=cpp
46232ac_cpp='$CXXCPP $CPPFLAGS'
46233ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46234ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46235ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46236
46237  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46238/* end confdefs.h.  */
46239int i;
46240_ACEOF
46241if ac_fn_cxx_try_compile "$LINENO"; then :
46242
46243else
46244  supports=no
46245fi
46246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46247  ac_ext=cpp
46248ac_cpp='$CXXCPP $CPPFLAGS'
46249ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46250ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46251ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46252
46253  CXXFLAGS="$saved_cxxflags"
46254
46255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46256$as_echo "$supports" >&6; }
46257  if test "x$supports" = "xyes" ; then
46258    :
46259
46260  else
46261    :
46262    STACK_PROTECTOR_CFLAG=""
46263  fi
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46278      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46279      ;;
46280    esac
46281  fi
46282
46283  # Optimization levels
46284  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46285    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46286
46287    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46288      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46289      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46290      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46291      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46292      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46293      C_O_FLAG_NONE="-xregs=no%frameptr"
46294      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46295      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46296      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46297      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46298      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46299      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46300        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46301        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46302      fi
46303    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46304      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46305      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46306      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46307      C_O_FLAG_DEBUG=""
46308      C_O_FLAG_NONE=""
46309      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46310      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46311      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46312      C_O_FLAG_DEBUG=""
46313      CXX_O_FLAG_NONE=""
46314    fi
46315  else
46316    # The remaining toolchains share opt flags between CC and CXX;
46317    # setup for C and duplicate afterwards.
46318    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46319      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46320        # On MacOSX we optimize for size, something
46321        # we should do for all platforms?
46322        C_O_FLAG_HIGHEST="-Os"
46323        C_O_FLAG_HI="-Os"
46324        C_O_FLAG_NORM="-Os"
46325      else
46326        C_O_FLAG_HIGHEST="-O3"
46327        C_O_FLAG_HI="-O3"
46328        C_O_FLAG_NORM="-O2"
46329      fi
46330      C_O_FLAG_DEBUG="-O0"
46331      C_O_FLAG_NONE="-O0"
46332    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46333      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46334        # On MacOSX we optimize for size, something
46335        # we should do for all platforms?
46336        C_O_FLAG_HIGHEST="-Os"
46337        C_O_FLAG_HI="-Os"
46338        C_O_FLAG_NORM="-Os"
46339      else
46340        C_O_FLAG_HIGHEST="-O3"
46341        C_O_FLAG_HI="-O3"
46342        C_O_FLAG_NORM="-O2"
46343      fi
46344      C_O_FLAG_DEBUG="-O0"
46345      C_O_FLAG_NONE="-O0"
46346    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46347      C_O_FLAG_HIGHEST="-O3"
46348      C_O_FLAG_HI="-O3 -qstrict"
46349      C_O_FLAG_NORM="-O2"
46350      C_O_FLAG_DEBUG="-qnoopt"
46351      C_O_FLAG_NONE="-qnoopt"
46352    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46353      C_O_FLAG_HIGHEST="-O2"
46354      C_O_FLAG_HI="-O1"
46355      C_O_FLAG_NORM="-O1"
46356      C_O_FLAG_DEBUG="-Od"
46357      C_O_FLAG_NONE="-Od"
46358    fi
46359    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46360    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46361    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46362    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46363    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46364  fi
46365
46366  # Adjust optimization flags according to debug level.
46367  case $DEBUG_LEVEL in
46368    release )
46369      # no adjustment
46370      ;;
46371    fastdebug )
46372      # Not quite so much optimization
46373      C_O_FLAG_HI="$C_O_FLAG_NORM"
46374      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46375      ;;
46376    slowdebug )
46377      # Disable optimization
46378      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46379      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46380      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46381      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46382      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46383      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46384      ;;
46385  esac
46386
46387
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399  # Special extras...
46400  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46401    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46402      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46403      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46404    fi
46405    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46406    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46407  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46408    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46409    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46410  fi
46411
46412  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46413  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46414  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46415
46416  ###############################################################################
46417  #
46418  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46419  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46420  #
46421
46422  # Setup compiler/platform specific flags into
46423  #    CFLAGS_JDK    - C Compiler flags
46424  #    CXXFLAGS_JDK  - C++ Compiler flags
46425  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46426  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46427    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46428      # Force compatibility with i586 on 32 bit intel platforms.
46429      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46430    fi
46431    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46432        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46433    case $OPENJDK_TARGET_CPU_ARCH in
46434      arm )
46435        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46436        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46437        ;;
46438      ppc )
46439        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46440        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46441        ;;
46442      * )
46443        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46444        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46445        ;;
46446    esac
46447  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46448    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46449      if test "x$OPENJDK_TARGET_CPU" = xx86; then
46450        # Force compatibility with i586 on 32 bit intel platforms.
46451        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46452      fi
46453      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46454          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46455      case $OPENJDK_TARGET_CPU_ARCH in
46456        ppc )
46457          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46458          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46459          ;;
46460        * )
46461          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46462          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46463          ;;
46464      esac
46465    fi
46466  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46467    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46468    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46469      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46470    fi
46471
46472    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46473    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46474  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46475    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46476    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46477  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46478    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46479        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46480        -DWIN32_LEAN_AND_MEAN \
46481        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46482        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46483        -DWIN32 -DIAL"
46484    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46485      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46486    else
46487      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46488    fi
46489    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46490    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46491    # studio.
46492    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46493      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46494          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46495    fi
46496  fi
46497
46498  ###############################################################################
46499
46500  # Adjust flags according to debug level.
46501  case $DEBUG_LEVEL in
46502    fastdebug | slowdebug )
46503      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46504      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46505      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46506      ;;
46507    release )
46508      ;;
46509    * )
46510      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46511      ;;
46512  esac
46513
46514  # Setup LP64
46515  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46516
46517  # Set some common defines. These works for all compilers, but assume
46518  # -D is universally accepted.
46519
46520  # Setup endianness
46521  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46522    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46523    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46524    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46525    #   Note: -Dmacro         is the same as    #define macro 1
46526    #         -Dmacro=        is the same as    #define macro
46527    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46528      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46529    else
46530      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46531    fi
46532  else
46533    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46534    # are defined in the system?
46535    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46536      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46537    else
46538      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46539    fi
46540  fi
46541
46542  # Setup target OS define. Use OS target name but in upper case.
46543  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46544  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46545
46546  # Setup target CPU
46547  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46548
46549  # Setup debug/release defines
46550  if test "x$DEBUG_LEVEL" = xrelease; then
46551    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46552    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46553      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46554    fi
46555  else
46556    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46557  fi
46558
46559  # Set some additional per-OS defines.
46560  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46561    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46562  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46563    # FIXME: PPC64 should not be here.
46564    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46565  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46566    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46567  fi
46568
46569  # Additional macosx handling
46570  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46571    # Setting these parameters makes it an error to link to macosx APIs that are
46572    # newer than the given OS version and makes the linked binaries compatible
46573    # even if built on a newer version of the OS.
46574    # The expected format is X.Y.Z
46575    MACOSX_VERSION_MIN=10.7.0
46576
46577
46578    # The macro takes the version with no dots, ex: 1070
46579    # Let the flags variables get resolved in make for easier override on make
46580    # command line.
46581    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46582    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46583  fi
46584
46585  # Setup some hard coded includes
46586  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46587      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46588      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46589      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46590      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46591      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46592
46593  # The shared libraries are compiled using the picflag.
46594  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46595  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46596
46597  # Executable flags
46598  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46599  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46600
46601
46602
46603
46604
46605
46606  # Flags for compiling test libraries
46607  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46608  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46609
46610  # Flags for compiling test executables
46611  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46612  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46613
46614
46615
46616
46617
46618
46619  # Setup LDFLAGS et al.
46620  #
46621
46622  # Now this is odd. The JDK native libraries have to link against libjvm.so
46623  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46624  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46625  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46626  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46627  # libraries will link to whatever is in memory. Yuck.
46628  #
46629  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46630  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46631    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46632    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46633      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46634    fi
46635    # TODO: make -debug optional "--disable-full-debug-symbols"
46636    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46637  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46638    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46639    # We have previously set HAS_GNU_HASH if this is the case
46640    if test -n "$HAS_GNU_HASH"; then
46641      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
46642    fi
46643    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46644      # And since we now know that the linker is gnu, then add -z defs, to forbid
46645      # undefined symbols in object files.
46646      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
46647      case $DEBUG_LEVEL in
46648        release )
46649          # tell linker to optimize libraries.
46650          # Should this be supplied to the OSS linker as well?
46651          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
46652          ;;
46653        slowdebug )
46654          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46655            # do relocations at load
46656            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46657            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46658          fi
46659          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46660            # mark relocations read only
46661            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46662            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46663          fi
46664          ;;
46665        fastdebug )
46666          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46667            # mark relocations read only
46668            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46669            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46670          fi
46671          ;;
46672        * )
46673          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46674          ;;
46675        esac
46676    fi
46677  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46678    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
46679    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46680  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46681    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46682  fi
46683
46684  # Customize LDFLAGS for executables
46685
46686  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46687
46688  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46689    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46690      LDFLAGS_STACK_SIZE=1048576
46691    else
46692      LDFLAGS_STACK_SIZE=327680
46693    fi
46694    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46695  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46696    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
46697  fi
46698
46699  # Customize LDFLAGS for libs
46700  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46701
46702  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
46703  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46704    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46705        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46706    JDKLIB_LIBS=""
46707  else
46708    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46709        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46710
46711    # On some platforms (mac) the linker warns about non existing -L dirs.
46712    # Add server first if available. Linking aginst client does not always produce the same results.
46713    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46714    # Default to server for other variants.
46715    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46716      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46717    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46718      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46719    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46720      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46721    else
46722      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46723    fi
46724
46725    JDKLIB_LIBS="-ljava -ljvm"
46726    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46727      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46728    fi
46729  fi
46730
46731
46732
46733
46734
46735
46736
46737  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46738  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46739
46740
46741
46742
46743
46744  # Some Zero and Shark settings.
46745  # ZERO_ARCHFLAG tells the compiler which mode to build for
46746  case "${OPENJDK_TARGET_CPU}" in
46747    s390)
46748      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46749      ;;
46750    *)
46751      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46752  esac
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790
46791
46792
46793
46794
46795    # Execute function body
46796
46797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46798$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46799  supports=yes
46800
46801  saved_cflags="$CFLAGS"
46802  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46803  ac_ext=c
46804ac_cpp='$CPP $CPPFLAGS'
46805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46807ac_compiler_gnu=$ac_cv_c_compiler_gnu
46808
46809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46810/* end confdefs.h.  */
46811int i;
46812_ACEOF
46813if ac_fn_c_try_compile "$LINENO"; then :
46814
46815else
46816  supports=no
46817fi
46818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46819  ac_ext=cpp
46820ac_cpp='$CXXCPP $CPPFLAGS'
46821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46824
46825  CFLAGS="$saved_cflags"
46826
46827  saved_cxxflags="$CXXFLAGS"
46828  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46829  ac_ext=cpp
46830ac_cpp='$CXXCPP $CPPFLAGS'
46831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46834
46835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46836/* end confdefs.h.  */
46837int i;
46838_ACEOF
46839if ac_fn_cxx_try_compile "$LINENO"; then :
46840
46841else
46842  supports=no
46843fi
46844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46845  ac_ext=cpp
46846ac_cpp='$CXXCPP $CPPFLAGS'
46847ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46848ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46849ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46850
46851  CXXFLAGS="$saved_cxxflags"
46852
46853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46854$as_echo "$supports" >&6; }
46855  if test "x$supports" = "xyes" ; then
46856    :
46857
46858  else
46859    :
46860    ZERO_ARCHFLAG=""
46861  fi
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876  # Check that the compiler supports -mX (or -qX on AIX) flags
46877  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920
46921
46922
46923
46924
46925    # Execute function body
46926
46927  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46928$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46929  supports=yes
46930
46931  saved_cflags="$CFLAGS"
46932  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46933  ac_ext=c
46934ac_cpp='$CPP $CPPFLAGS'
46935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46937ac_compiler_gnu=$ac_cv_c_compiler_gnu
46938
46939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46940/* end confdefs.h.  */
46941int i;
46942_ACEOF
46943if ac_fn_c_try_compile "$LINENO"; then :
46944
46945else
46946  supports=no
46947fi
46948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46949  ac_ext=cpp
46950ac_cpp='$CXXCPP $CPPFLAGS'
46951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46954
46955  CFLAGS="$saved_cflags"
46956
46957  saved_cxxflags="$CXXFLAGS"
46958  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46959  ac_ext=cpp
46960ac_cpp='$CXXCPP $CPPFLAGS'
46961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46964
46965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46966/* end confdefs.h.  */
46967int i;
46968_ACEOF
46969if ac_fn_cxx_try_compile "$LINENO"; then :
46970
46971else
46972  supports=no
46973fi
46974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46975  ac_ext=cpp
46976ac_cpp='$CXXCPP $CPPFLAGS'
46977ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46978ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46979ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46980
46981  CXXFLAGS="$saved_cxxflags"
46982
46983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46984$as_echo "$supports" >&6; }
46985  if test "x$supports" = "xyes" ; then
46986    :
46987    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46988  else
46989    :
46990    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46991  fi
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006  # Check whether --enable-warnings-as-errors was given.
47007if test "${enable_warnings_as_errors+set}" = set; then :
47008  enableval=$enable_warnings_as_errors;
47009fi
47010
47011
47012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47013$as_echo_n "checking if native warnings are errors... " >&6; }
47014  if test "x$enable_warnings_as_errors" = "xyes"; then
47015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47016$as_echo "yes (explicitely set)" >&6; }
47017    WARNINGS_AS_ERRORS=true
47018  elif test "x$enable_warnings_as_errors" = "xno"; then
47019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47020$as_echo "no" >&6; }
47021    WARNINGS_AS_ERRORS=false
47022  elif test "x$enable_warnings_as_errors" = "x"; then
47023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47024$as_echo "yes (default)" >&6; }
47025    WARNINGS_AS_ERRORS=true
47026  else
47027    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47028  fi
47029
47030  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47031    # Set legacy hotspot variable
47032    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47033  else
47034    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47035  fi
47036
47037
47038
47039
47040  case "${TOOLCHAIN_TYPE}" in
47041    microsoft)
47042      DISABLE_WARNING_PREFIX="-wd"
47043      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47044      ;;
47045    solstudio)
47046      DISABLE_WARNING_PREFIX="-erroff="
47047      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47048      ;;
47049    gcc)
47050      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
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    # Execute function body
47099
47100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47101$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47102  supports=yes
47103
47104  saved_cflags="$CFLAGS"
47105  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47106  ac_ext=c
47107ac_cpp='$CPP $CPPFLAGS'
47108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47110ac_compiler_gnu=$ac_cv_c_compiler_gnu
47111
47112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47113/* end confdefs.h.  */
47114int i;
47115_ACEOF
47116if ac_fn_c_try_compile "$LINENO"; then :
47117
47118else
47119  supports=no
47120fi
47121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47122  ac_ext=cpp
47123ac_cpp='$CXXCPP $CPPFLAGS'
47124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47127
47128  CFLAGS="$saved_cflags"
47129
47130  saved_cxxflags="$CXXFLAGS"
47131  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47139/* end confdefs.h.  */
47140int i;
47141_ACEOF
47142if ac_fn_cxx_try_compile "$LINENO"; then :
47143
47144else
47145  supports=no
47146fi
47147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47148  ac_ext=cpp
47149ac_cpp='$CXXCPP $CPPFLAGS'
47150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47153
47154  CXXFLAGS="$saved_cxxflags"
47155
47156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47157$as_echo "$supports" >&6; }
47158  if test "x$supports" = "xyes" ; then
47159    :
47160    GCC_CAN_DISABLE_WARNINGS=true
47161  else
47162    :
47163    GCC_CAN_DISABLE_WARNINGS=false
47164
47165  fi
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47179        DISABLE_WARNING_PREFIX="-Wno-"
47180      else
47181        DISABLE_WARNING_PREFIX=
47182      fi
47183      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47184      # Repeate the check for the BUILD_CC
47185      CC_OLD="$CC"
47186      CC="$BUILD_CC"
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234    # Execute function body
47235
47236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47237$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47238  supports=yes
47239
47240  saved_cflags="$CFLAGS"
47241  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47242  ac_ext=c
47243ac_cpp='$CPP $CPPFLAGS'
47244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47246ac_compiler_gnu=$ac_cv_c_compiler_gnu
47247
47248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47249/* end confdefs.h.  */
47250int i;
47251_ACEOF
47252if ac_fn_c_try_compile "$LINENO"; then :
47253
47254else
47255  supports=no
47256fi
47257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47258  ac_ext=cpp
47259ac_cpp='$CXXCPP $CPPFLAGS'
47260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47263
47264  CFLAGS="$saved_cflags"
47265
47266  saved_cxxflags="$CXXFLAGS"
47267  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47268  ac_ext=cpp
47269ac_cpp='$CXXCPP $CPPFLAGS'
47270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47273
47274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47275/* end confdefs.h.  */
47276int i;
47277_ACEOF
47278if ac_fn_cxx_try_compile "$LINENO"; then :
47279
47280else
47281  supports=no
47282fi
47283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47284  ac_ext=cpp
47285ac_cpp='$CXXCPP $CPPFLAGS'
47286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47289
47290  CXXFLAGS="$saved_cxxflags"
47291
47292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47293$as_echo "$supports" >&6; }
47294  if test "x$supports" = "xyes" ; then
47295    :
47296    BUILD_CC_CAN_DISABLE_WARNINGS=true
47297  else
47298    :
47299    BUILD_CC_CAN_DISABLE_WARNINGS=false
47300
47301  fi
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47315        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47316      else
47317        BUILD_CC_DISABLE_WARNING_PREFIX=
47318      fi
47319      CC="$CC_OLD"
47320      ;;
47321    clang)
47322      DISABLE_WARNING_PREFIX="-Wno-"
47323      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47324      ;;
47325  esac
47326
47327
47328
47329
47330# Setup debug symbols (need objcopy from the toolchain for that)
47331
47332  #
47333  # NATIVE_DEBUG_SYMBOLS
47334  # This must be done after the toolchain is setup, since we're looking at objcopy.
47335  #
47336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47337$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47338
47339# Check whether --with-native-debug-symbols was given.
47340if test "${with_native_debug_symbols+set}" = set; then :
47341  withval=$with_native_debug_symbols;
47342        if test "x$OPENJDK_TARGET_OS" = xaix; then
47343          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
47344            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
47345          fi
47346        fi
47347
47348else
47349
47350        if test "x$OPENJDK_TARGET_OS" = xaix; then
47351          # AIX doesn't support 'zipped' so use 'internal' as default
47352          with_native_debug_symbols="internal"
47353        else
47354          with_native_debug_symbols="zipped"
47355        fi
47356
47357fi
47358
47359  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47361$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47362
47363  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47364
47365    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47366      if test "x$OBJCOPY" = x; then
47367        # enabling of enable-debug-symbols and can't find objcopy
47368        # this is an error
47369        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47370      fi
47371    fi
47372
47373    COMPILE_WITH_DEBUG_SYMBOLS=true
47374    COPY_DEBUG_SYMBOLS=true
47375    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
47376
47377    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47378    DEBUG_BINARIES=false
47379    STRIP_POLICY=min_strip
47380
47381  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47382    COMPILE_WITH_DEBUG_SYMBOLS=false
47383    COPY_DEBUG_SYMBOLS=false
47384    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47385
47386    DEBUG_BINARIES=false
47387    STRIP_POLICY=no_strip
47388  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47389    COMPILE_WITH_DEBUG_SYMBOLS=true
47390    COPY_DEBUG_SYMBOLS=false
47391    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47392
47393    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
47394    DEBUG_BINARIES=true
47395    STRIP_POLICY=no_strip
47396    STRIP=""
47397
47398  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47399
47400    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47401      if test "x$OBJCOPY" = x; then
47402        # enabling of enable-debug-symbols and can't find objcopy
47403        # this is an error
47404        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47405      fi
47406    fi
47407
47408    COMPILE_WITH_DEBUG_SYMBOLS=true
47409    COPY_DEBUG_SYMBOLS=true
47410    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47411
47412    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47413    DEBUG_BINARIES=false
47414    STRIP_POLICY=min_strip
47415  else
47416    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47417  fi
47418
47419  # --enable-debug-symbols is deprecated.
47420  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47421
47422  # Check whether --enable-debug-symbols was given.
47423if test "${enable_debug_symbols+set}" = set; then :
47424  enableval=$enable_debug_symbols;
47425fi
47426
47427  if test "x$enable_debug_symbols" != x; then
47428    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47429$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47430
47431    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47432      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47433$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47434    fi
47435
47436  fi
47437
47438
47439  # --enable-zip-debug-info is deprecated.
47440  # Please use --with-native-debug-symbols=zipped .
47441
47442  # Check whether --enable-zip-debug-info was given.
47443if test "${enable_zip_debug_info+set}" = set; then :
47444  enableval=$enable_zip_debug_info;
47445fi
47446
47447  if test "x$enable_zip_debug_info" != x; then
47448    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47449$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47450
47451    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47452      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47453$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47454    fi
47455
47456  fi
47457
47458
47459
47460
47461
47462
47463  # Legacy values
47464
47465
47466
47467
47468  # Check whether --enable-native-coverage was given.
47469if test "${enable_native_coverage+set}" = set; then :
47470  enableval=$enable_native_coverage;
47471fi
47472
47473  GCOV_ENABLED="false"
47474  if test "x$enable_native_coverage" = "xyes"; then
47475    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47477$as_echo_n "checking if native coverage is enabled... " >&6; }
47478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47479$as_echo "yes" >&6; }
47480      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47481      GCOV_LDFLAGS="-fprofile-arcs"
47482      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47483      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47484      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47485      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47486      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47487      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47488      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47489      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47490      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47491      GCOV_ENABLED="true"
47492    else
47493      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47494    fi
47495  elif test "x$enable_native_coverage" = "xno"; then
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47497$as_echo_n "checking if native coverage is enabled... " >&6; }
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47499$as_echo "no" >&6; }
47500  elif test "x$enable_native_coverage" != "x"; then
47501    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47502  fi
47503
47504
47505
47506
47507###############################################################################
47508#
47509# Check dependencies for external and internal libraries.
47510#
47511###############################################################################
47512
47513# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47514
47515  # When using cygwin or msys, we need a wrapper binary that renames
47516  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47517  # @files and rewrites these too! This wrapper binary is
47518  # called fixpath.
47519  FIXPATH=
47520  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47522$as_echo_n "checking if fixpath can be created... " >&6; }
47523    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47524    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47525    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47526    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47527      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47528      FIXPATH="$FIXPATH_BIN -c"
47529    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47530      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47531      # @ was chosen as separator to minimize risk of other tools messing around with it
47532      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47533          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47534      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47535      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47536    fi
47537    FIXPATH_SRC_W="$FIXPATH_SRC"
47538    FIXPATH_BIN_W="$FIXPATH_BIN"
47539
47540  unix_path="$FIXPATH_SRC_W"
47541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47542    windows_path=`$CYGPATH -m "$unix_path"`
47543    FIXPATH_SRC_W="$windows_path"
47544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47545    windows_path=`cmd //c echo $unix_path`
47546    FIXPATH_SRC_W="$windows_path"
47547  fi
47548
47549
47550  unix_path="$FIXPATH_BIN_W"
47551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47552    windows_path=`$CYGPATH -m "$unix_path"`
47553    FIXPATH_BIN_W="$windows_path"
47554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47555    windows_path=`cmd //c echo $unix_path`
47556    FIXPATH_BIN_W="$windows_path"
47557  fi
47558
47559    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47560    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47561    cd $FIXPATH_DIR
47562    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47563    cd $CURDIR
47564
47565    if test ! -x $FIXPATH_BIN; then
47566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47567$as_echo "no" >&6; }
47568      cat $FIXPATH_DIR/fixpath1.log
47569      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47570    fi
47571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47572$as_echo "yes" >&6; }
47573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47574$as_echo_n "checking if fixpath.exe works... " >&6; }
47575    cd $FIXPATH_DIR
47576    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47577        > $FIXPATH_DIR/fixpath2.log 2>&1
47578    cd $CURDIR
47579    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47581$as_echo "no" >&6; }
47582      cat $FIXPATH_DIR/fixpath2.log
47583      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47584    fi
47585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47586$as_echo "yes" >&6; }
47587
47588    FIXPATH_DETACH_FLAG="--detach"
47589  fi
47590
47591
47592
47593
47594
47595
47596  # Check if X11 is needed
47597  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47598    # No X11 support on windows or macosx
47599    NEEDS_LIB_X11=false
47600  else
47601    if test "x$SUPPORT_HEADFUL" = xno; then
47602      # No X11 support if building headless-only
47603      NEEDS_LIB_X11=false
47604    else
47605      # All other instances need X11
47606      NEEDS_LIB_X11=true
47607    fi
47608  fi
47609
47610  # Check if cups is needed
47611  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47612    # Windows have a separate print system
47613    NEEDS_LIB_CUPS=false
47614  else
47615    NEEDS_LIB_CUPS=true
47616  fi
47617
47618  # Check if freetype is needed
47619  if test "x$OPENJDK" = "xtrue"; then
47620    NEEDS_LIB_FREETYPE=true
47621  else
47622    NEEDS_LIB_FREETYPE=false
47623  fi
47624
47625  # Check if alsa is needed
47626  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47627    NEEDS_LIB_ALSA=true
47628  else
47629    NEEDS_LIB_ALSA=false
47630  fi
47631
47632  # Check if ffi is needed
47633  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47634    NEEDS_LIB_FFI=true
47635  else
47636    NEEDS_LIB_FFI=false
47637  fi
47638
47639
47640  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47641  # dynamic build is configured on command line.
47642
47643# Check whether --with-stdc++lib was given.
47644if test "${with_stdc__lib+set}" = set; then :
47645  withval=$with_stdc__lib;
47646        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47647                && test "x$with_stdc__lib" != xdefault; then
47648          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47649        fi
47650
47651else
47652  with_stdc__lib=default
47653
47654fi
47655
47656
47657  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47658    # Test if -lstdc++ works.
47659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47660$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47661    ac_ext=cpp
47662ac_cpp='$CXXCPP $CPPFLAGS'
47663ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47664ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47665ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47666
47667    OLD_CXXFLAGS="$CXXFLAGS"
47668    CXXFLAGS="$CXXFLAGS -lstdc++"
47669    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47670/* end confdefs.h.  */
47671
47672int
47673main ()
47674{
47675return 0;
47676  ;
47677  return 0;
47678}
47679_ACEOF
47680if ac_fn_cxx_try_link "$LINENO"; then :
47681  has_dynamic_libstdcxx=yes
47682else
47683  has_dynamic_libstdcxx=no
47684fi
47685rm -f core conftest.err conftest.$ac_objext \
47686    conftest$ac_exeext conftest.$ac_ext
47687    CXXFLAGS="$OLD_CXXFLAGS"
47688    ac_ext=cpp
47689ac_cpp='$CXXCPP $CPPFLAGS'
47690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47693
47694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47695$as_echo "$has_dynamic_libstdcxx" >&6; }
47696
47697    # Test if stdc++ can be linked statically.
47698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47699$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47700    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47701    ac_ext=cpp
47702ac_cpp='$CXXCPP $CPPFLAGS'
47703ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47704ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47705ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47706
47707    OLD_LIBS="$LIBS"
47708    OLD_CXX="$CXX"
47709    LIBS="$STATIC_STDCXX_FLAGS"
47710    CXX="$CC"
47711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47712/* end confdefs.h.  */
47713
47714int
47715main ()
47716{
47717return 0;
47718  ;
47719  return 0;
47720}
47721_ACEOF
47722if ac_fn_cxx_try_link "$LINENO"; then :
47723  has_static_libstdcxx=yes
47724else
47725  has_static_libstdcxx=no
47726fi
47727rm -f core conftest.err conftest.$ac_objext \
47728    conftest$ac_exeext conftest.$ac_ext
47729    LIBS="$OLD_LIBS"
47730    CXX="$OLD_CXX"
47731    ac_ext=cpp
47732ac_cpp='$CXXCPP $CPPFLAGS'
47733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47736
47737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47738$as_echo "$has_static_libstdcxx" >&6; }
47739
47740    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47741      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47742    fi
47743
47744    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47745      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47746    fi
47747
47748    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47749      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47750    fi
47751
47752    # If dynamic was requested, it's available since it would fail above otherwise.
47753    # If dynamic wasn't requested, go with static unless it isn't available.
47754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47755$as_echo_n "checking how to link with libstdc++... " >&6; }
47756    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47757      LIBCXX="$LIBCXX -lstdc++"
47758      LDCXX="$CXX"
47759      STATIC_CXX_SETTING="STATIC_CXX=false"
47760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47761$as_echo "dynamic" >&6; }
47762    else
47763      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47764      LDCXX="$CC"
47765      STATIC_CXX_SETTING="STATIC_CXX=true"
47766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47767$as_echo "static" >&6; }
47768    fi
47769  fi
47770
47771
47772  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47773  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47774    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47775  fi
47776
47777  # TODO better (platform agnostic) test
47778  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47779    LIBCXX="-lstdc++"
47780  fi
47781
47782
47783  # Setup Windows runtime dlls
47784  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47785
47786
47787# Check whether --with-msvcr-dll was given.
47788if test "${with_msvcr_dll+set}" = set; then :
47789  withval=$with_msvcr_dll;
47790fi
47791
47792
47793  if test "x$with_msvcr_dll" != x; then
47794    # If given explicitely by user, do not probe. If not present, fail directly.
47795
47796  DLL_NAME="$MSVCR_NAME"
47797  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47798  METHOD="--with-msvcr-dll"
47799  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47801$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47802
47803    # Need to check if the found msvcr is correct architecture
47804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47805$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47806    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47808      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47809      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47810      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47811        CORRECT_MSVCR_ARCH="PE32 executable"
47812      else
47813        CORRECT_MSVCR_ARCH="PE32+ executable"
47814      fi
47815    else
47816      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47817        CORRECT_MSVCR_ARCH=386
47818      else
47819        CORRECT_MSVCR_ARCH=x86-64
47820      fi
47821    fi
47822    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47824$as_echo "ok" >&6; }
47825      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47826
47827  # Only process if variable expands to non-empty
47828
47829  if test "x$MSVC_DLL" != x; then
47830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47831
47832  # Input might be given as Windows format, start by converting to
47833  # unix format.
47834  path="$MSVC_DLL"
47835  new_path=`$CYGPATH -u "$path"`
47836
47837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47840  # "foo.exe" is OK but "foo" is an error.
47841  #
47842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47843  # It is also a way to make sure we got the proper file name for the real test later on.
47844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47845  if test "x$test_shortpath" = x; then
47846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47848    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47849  fi
47850
47851  # Call helper function which possibly converts this using DOS-style short mode.
47852  # If so, the updated path is stored in $new_path.
47853
47854  input_path="$new_path"
47855  # Check if we need to convert this using DOS-style short mode. If the path
47856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47857  # take no chances and rewrite it.
47858  # Note: m4 eats our [], so we need to use [ and ] instead.
47859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47860  if test "x$has_forbidden_chars" != x; then
47861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47865      # Going to short mode and back again did indeed matter. Since short mode is
47866      # case insensitive, let's make it lowercase to improve readability.
47867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47868      # Now convert it back to Unix-style (cygpath)
47869      input_path=`$CYGPATH -u "$shortmode_path"`
47870      new_path="$input_path"
47871    fi
47872  fi
47873
47874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47875  if test "x$test_cygdrive_prefix" = x; then
47876    # As a simple fix, exclude /usr/bin since it's not a real path.
47877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47879      # a path prefixed by /cygdrive for fixpath to work.
47880      new_path="$CYGWIN_ROOT_PATH$input_path"
47881    fi
47882  fi
47883
47884
47885  if test "x$path" != "x$new_path"; then
47886    MSVC_DLL="$new_path"
47887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47888$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47889  fi
47890
47891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47892
47893  path="$MSVC_DLL"
47894  has_colon=`$ECHO $path | $GREP ^.:`
47895  new_path="$path"
47896  if test "x$has_colon" = x; then
47897    # Not in mixed or Windows style, start by that.
47898    new_path=`cmd //c echo $path`
47899  fi
47900
47901
47902  input_path="$new_path"
47903  # Check if we need to convert this using DOS-style short mode. If the path
47904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47905  # take no chances and rewrite it.
47906  # Note: m4 eats our [], so we need to use [ and ] instead.
47907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47908  if test "x$has_forbidden_chars" != x; then
47909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47911  fi
47912
47913
47914  windows_path="$new_path"
47915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47916    unix_path=`$CYGPATH -u "$windows_path"`
47917    new_path="$unix_path"
47918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47920    new_path="$unix_path"
47921  fi
47922
47923  if test "x$path" != "x$new_path"; then
47924    MSVC_DLL="$new_path"
47925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47926$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47927  fi
47928
47929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47931
47932    else
47933      # We're on a unix platform. Hooray! :)
47934      path="$MSVC_DLL"
47935      has_space=`$ECHO "$path" | $GREP " "`
47936      if test "x$has_space" != x; then
47937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47938$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47940      fi
47941
47942      # Use eval to expand a potential ~
47943      eval path="$path"
47944      if test ! -f "$path" && test ! -d "$path"; then
47945        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47946      fi
47947
47948      if test -d "$path"; then
47949        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47950      else
47951        dir="`$DIRNAME "$path"`"
47952        base="`$BASENAME "$path"`"
47953        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
47954      fi
47955    fi
47956  fi
47957
47958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47959$as_echo_n "checking for $DLL_NAME... " >&6; }
47960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47961$as_echo "$MSVC_DLL" >&6; }
47962    else
47963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47964$as_echo "incorrect, ignoring" >&6; }
47965      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47966$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47967    fi
47968  fi
47969
47970    if test "x$MSVC_DLL" = x; then
47971      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47972    fi
47973    MSVCR_DLL="$MSVC_DLL"
47974  elif test "x$DEVKIT_MSVCR_DLL" != x; then
47975
47976  DLL_NAME="$MSVCR_NAME"
47977  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47978  METHOD="devkit"
47979  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47981$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47982
47983    # Need to check if the found msvcr is correct architecture
47984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47985$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47986    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47988      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47989      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47990      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47991        CORRECT_MSVCR_ARCH="PE32 executable"
47992      else
47993        CORRECT_MSVCR_ARCH="PE32+ executable"
47994      fi
47995    else
47996      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47997        CORRECT_MSVCR_ARCH=386
47998      else
47999        CORRECT_MSVCR_ARCH=x86-64
48000      fi
48001    fi
48002    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48004$as_echo "ok" >&6; }
48005      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48006
48007  # Only process if variable expands to non-empty
48008
48009  if test "x$MSVC_DLL" != x; then
48010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48011
48012  # Input might be given as Windows format, start by converting to
48013  # unix format.
48014  path="$MSVC_DLL"
48015  new_path=`$CYGPATH -u "$path"`
48016
48017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48020  # "foo.exe" is OK but "foo" is an error.
48021  #
48022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48023  # It is also a way to make sure we got the proper file name for the real test later on.
48024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48025  if test "x$test_shortpath" = x; then
48026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48027$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48028    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48029  fi
48030
48031  # Call helper function which possibly converts this using DOS-style short mode.
48032  # If so, the updated path is stored in $new_path.
48033
48034  input_path="$new_path"
48035  # Check if we need to convert this using DOS-style short mode. If the path
48036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48037  # take no chances and rewrite it.
48038  # Note: m4 eats our [], so we need to use [ and ] instead.
48039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48040  if test "x$has_forbidden_chars" != x; then
48041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48045      # Going to short mode and back again did indeed matter. Since short mode is
48046      # case insensitive, let's make it lowercase to improve readability.
48047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48048      # Now convert it back to Unix-style (cygpath)
48049      input_path=`$CYGPATH -u "$shortmode_path"`
48050      new_path="$input_path"
48051    fi
48052  fi
48053
48054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48055  if test "x$test_cygdrive_prefix" = x; then
48056    # As a simple fix, exclude /usr/bin since it's not a real path.
48057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48059      # a path prefixed by /cygdrive for fixpath to work.
48060      new_path="$CYGWIN_ROOT_PATH$input_path"
48061    fi
48062  fi
48063
48064
48065  if test "x$path" != "x$new_path"; then
48066    MSVC_DLL="$new_path"
48067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48068$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48069  fi
48070
48071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48072
48073  path="$MSVC_DLL"
48074  has_colon=`$ECHO $path | $GREP ^.:`
48075  new_path="$path"
48076  if test "x$has_colon" = x; then
48077    # Not in mixed or Windows style, start by that.
48078    new_path=`cmd //c echo $path`
48079  fi
48080
48081
48082  input_path="$new_path"
48083  # Check if we need to convert this using DOS-style short mode. If the path
48084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48085  # take no chances and rewrite it.
48086  # Note: m4 eats our [], so we need to use [ and ] instead.
48087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48088  if test "x$has_forbidden_chars" != x; then
48089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48091  fi
48092
48093
48094  windows_path="$new_path"
48095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48096    unix_path=`$CYGPATH -u "$windows_path"`
48097    new_path="$unix_path"
48098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48100    new_path="$unix_path"
48101  fi
48102
48103  if test "x$path" != "x$new_path"; then
48104    MSVC_DLL="$new_path"
48105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48106$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48107  fi
48108
48109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48111
48112    else
48113      # We're on a unix platform. Hooray! :)
48114      path="$MSVC_DLL"
48115      has_space=`$ECHO "$path" | $GREP " "`
48116      if test "x$has_space" != x; then
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48118$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48120      fi
48121
48122      # Use eval to expand a potential ~
48123      eval path="$path"
48124      if test ! -f "$path" && test ! -d "$path"; then
48125        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48126      fi
48127
48128      if test -d "$path"; then
48129        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48130      else
48131        dir="`$DIRNAME "$path"`"
48132        base="`$BASENAME "$path"`"
48133        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48134      fi
48135    fi
48136  fi
48137
48138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48139$as_echo_n "checking for $DLL_NAME... " >&6; }
48140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48141$as_echo "$MSVC_DLL" >&6; }
48142    else
48143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48144$as_echo "incorrect, ignoring" >&6; }
48145      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48146$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48147    fi
48148  fi
48149
48150    if test "x$MSVC_DLL" = x; then
48151      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48152    fi
48153    MSVCR_DLL="$MSVC_DLL"
48154  else
48155
48156  DLL_NAME="${MSVCR_NAME}"
48157  MSVC_DLL=
48158
48159  if test "x$MSVC_DLL" = x; then
48160    # Probe: Using well-known location from Visual Studio 10.0
48161    if test "x$VCINSTALLDIR" != x; then
48162      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48163
48164  windows_path="$CYGWIN_VC_INSTALL_DIR"
48165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48166    unix_path=`$CYGPATH -u "$windows_path"`
48167    CYGWIN_VC_INSTALL_DIR="$unix_path"
48168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48170    CYGWIN_VC_INSTALL_DIR="$unix_path"
48171  fi
48172
48173      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48174        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48175      else
48176        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48177      fi
48178      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48179
48180  DLL_NAME="$DLL_NAME"
48181  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48182  METHOD="well-known location in VCINSTALLDIR"
48183  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48185$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48186
48187    # Need to check if the found msvcr is correct architecture
48188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48189$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48190    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48192      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48193      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48194      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48195        CORRECT_MSVCR_ARCH="PE32 executable"
48196      else
48197        CORRECT_MSVCR_ARCH="PE32+ executable"
48198      fi
48199    else
48200      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48201        CORRECT_MSVCR_ARCH=386
48202      else
48203        CORRECT_MSVCR_ARCH=x86-64
48204      fi
48205    fi
48206    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48208$as_echo "ok" >&6; }
48209      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48210
48211  # Only process if variable expands to non-empty
48212
48213  if test "x$MSVC_DLL" != x; then
48214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48215
48216  # Input might be given as Windows format, start by converting to
48217  # unix format.
48218  path="$MSVC_DLL"
48219  new_path=`$CYGPATH -u "$path"`
48220
48221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48224  # "foo.exe" is OK but "foo" is an error.
48225  #
48226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48227  # It is also a way to make sure we got the proper file name for the real test later on.
48228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48229  if test "x$test_shortpath" = x; then
48230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48231$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48232    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48233  fi
48234
48235  # Call helper function which possibly converts this using DOS-style short mode.
48236  # If so, the updated path is stored in $new_path.
48237
48238  input_path="$new_path"
48239  # Check if we need to convert this using DOS-style short mode. If the path
48240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48241  # take no chances and rewrite it.
48242  # Note: m4 eats our [], so we need to use [ and ] instead.
48243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48244  if test "x$has_forbidden_chars" != x; then
48245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48249      # Going to short mode and back again did indeed matter. Since short mode is
48250      # case insensitive, let's make it lowercase to improve readability.
48251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48252      # Now convert it back to Unix-style (cygpath)
48253      input_path=`$CYGPATH -u "$shortmode_path"`
48254      new_path="$input_path"
48255    fi
48256  fi
48257
48258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48259  if test "x$test_cygdrive_prefix" = x; then
48260    # As a simple fix, exclude /usr/bin since it's not a real path.
48261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48263      # a path prefixed by /cygdrive for fixpath to work.
48264      new_path="$CYGWIN_ROOT_PATH$input_path"
48265    fi
48266  fi
48267
48268
48269  if test "x$path" != "x$new_path"; then
48270    MSVC_DLL="$new_path"
48271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48272$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48273  fi
48274
48275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48276
48277  path="$MSVC_DLL"
48278  has_colon=`$ECHO $path | $GREP ^.:`
48279  new_path="$path"
48280  if test "x$has_colon" = x; then
48281    # Not in mixed or Windows style, start by that.
48282    new_path=`cmd //c echo $path`
48283  fi
48284
48285
48286  input_path="$new_path"
48287  # Check if we need to convert this using DOS-style short mode. If the path
48288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48289  # take no chances and rewrite it.
48290  # Note: m4 eats our [], so we need to use [ and ] instead.
48291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48292  if test "x$has_forbidden_chars" != x; then
48293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48295  fi
48296
48297
48298  windows_path="$new_path"
48299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48300    unix_path=`$CYGPATH -u "$windows_path"`
48301    new_path="$unix_path"
48302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48304    new_path="$unix_path"
48305  fi
48306
48307  if test "x$path" != "x$new_path"; then
48308    MSVC_DLL="$new_path"
48309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48310$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48311  fi
48312
48313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48315
48316    else
48317      # We're on a unix platform. Hooray! :)
48318      path="$MSVC_DLL"
48319      has_space=`$ECHO "$path" | $GREP " "`
48320      if test "x$has_space" != x; then
48321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48322$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48324      fi
48325
48326      # Use eval to expand a potential ~
48327      eval path="$path"
48328      if test ! -f "$path" && test ! -d "$path"; then
48329        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48330      fi
48331
48332      if test -d "$path"; then
48333        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48334      else
48335        dir="`$DIRNAME "$path"`"
48336        base="`$BASENAME "$path"`"
48337        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48338      fi
48339    fi
48340  fi
48341
48342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48343$as_echo_n "checking for $DLL_NAME... " >&6; }
48344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48345$as_echo "$MSVC_DLL" >&6; }
48346    else
48347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48348$as_echo "incorrect, ignoring" >&6; }
48349      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48350$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48351    fi
48352  fi
48353
48354    fi
48355  fi
48356
48357  if test "x$MSVC_DLL" = x; then
48358    # Probe: Check in the Boot JDK directory.
48359    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48360
48361  DLL_NAME="$DLL_NAME"
48362  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48363  METHOD="well-known location in Boot JDK"
48364  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48365    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48366$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48367
48368    # Need to check if the found msvcr is correct architecture
48369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48370$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48371    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48373      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48374      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48375      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48376        CORRECT_MSVCR_ARCH="PE32 executable"
48377      else
48378        CORRECT_MSVCR_ARCH="PE32+ executable"
48379      fi
48380    else
48381      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48382        CORRECT_MSVCR_ARCH=386
48383      else
48384        CORRECT_MSVCR_ARCH=x86-64
48385      fi
48386    fi
48387    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48389$as_echo "ok" >&6; }
48390      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48391
48392  # Only process if variable expands to non-empty
48393
48394  if test "x$MSVC_DLL" != x; then
48395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48396
48397  # Input might be given as Windows format, start by converting to
48398  # unix format.
48399  path="$MSVC_DLL"
48400  new_path=`$CYGPATH -u "$path"`
48401
48402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48405  # "foo.exe" is OK but "foo" is an error.
48406  #
48407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48408  # It is also a way to make sure we got the proper file name for the real test later on.
48409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48410  if test "x$test_shortpath" = x; then
48411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48412$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48413    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48414  fi
48415
48416  # Call helper function which possibly converts this using DOS-style short mode.
48417  # If so, the updated path is stored in $new_path.
48418
48419  input_path="$new_path"
48420  # Check if we need to convert this using DOS-style short mode. If the path
48421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48422  # take no chances and rewrite it.
48423  # Note: m4 eats our [], so we need to use [ and ] instead.
48424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48425  if test "x$has_forbidden_chars" != x; then
48426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48430      # Going to short mode and back again did indeed matter. Since short mode is
48431      # case insensitive, let's make it lowercase to improve readability.
48432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48433      # Now convert it back to Unix-style (cygpath)
48434      input_path=`$CYGPATH -u "$shortmode_path"`
48435      new_path="$input_path"
48436    fi
48437  fi
48438
48439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48440  if test "x$test_cygdrive_prefix" = x; then
48441    # As a simple fix, exclude /usr/bin since it's not a real path.
48442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48444      # a path prefixed by /cygdrive for fixpath to work.
48445      new_path="$CYGWIN_ROOT_PATH$input_path"
48446    fi
48447  fi
48448
48449
48450  if test "x$path" != "x$new_path"; then
48451    MSVC_DLL="$new_path"
48452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48453$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48454  fi
48455
48456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48457
48458  path="$MSVC_DLL"
48459  has_colon=`$ECHO $path | $GREP ^.:`
48460  new_path="$path"
48461  if test "x$has_colon" = x; then
48462    # Not in mixed or Windows style, start by that.
48463    new_path=`cmd //c echo $path`
48464  fi
48465
48466
48467  input_path="$new_path"
48468  # Check if we need to convert this using DOS-style short mode. If the path
48469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48470  # take no chances and rewrite it.
48471  # Note: m4 eats our [], so we need to use [ and ] instead.
48472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48473  if test "x$has_forbidden_chars" != x; then
48474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48476  fi
48477
48478
48479  windows_path="$new_path"
48480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48481    unix_path=`$CYGPATH -u "$windows_path"`
48482    new_path="$unix_path"
48483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48485    new_path="$unix_path"
48486  fi
48487
48488  if test "x$path" != "x$new_path"; then
48489    MSVC_DLL="$new_path"
48490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48491$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48492  fi
48493
48494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48496
48497    else
48498      # We're on a unix platform. Hooray! :)
48499      path="$MSVC_DLL"
48500      has_space=`$ECHO "$path" | $GREP " "`
48501      if test "x$has_space" != x; then
48502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48503$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48505      fi
48506
48507      # Use eval to expand a potential ~
48508      eval path="$path"
48509      if test ! -f "$path" && test ! -d "$path"; then
48510        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48511      fi
48512
48513      if test -d "$path"; then
48514        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48515      else
48516        dir="`$DIRNAME "$path"`"
48517        base="`$BASENAME "$path"`"
48518        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48519      fi
48520    fi
48521  fi
48522
48523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48524$as_echo_n "checking for $DLL_NAME... " >&6; }
48525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48526$as_echo "$MSVC_DLL" >&6; }
48527    else
48528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48529$as_echo "incorrect, ignoring" >&6; }
48530      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48531$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48532    fi
48533  fi
48534
48535  fi
48536
48537  if test "x$MSVC_DLL" = x; then
48538    # Probe: Look in the Windows system32 directory
48539    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48540
48541  windows_path="$CYGWIN_SYSTEMROOT"
48542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48543    unix_path=`$CYGPATH -u "$windows_path"`
48544    CYGWIN_SYSTEMROOT="$unix_path"
48545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48547    CYGWIN_SYSTEMROOT="$unix_path"
48548  fi
48549
48550    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48551
48552  DLL_NAME="$DLL_NAME"
48553  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48554  METHOD="well-known location in SYSTEMROOT"
48555  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48556    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48557$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48558
48559    # Need to check if the found msvcr is correct architecture
48560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48561$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48562    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48564      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48565      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48566      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48567        CORRECT_MSVCR_ARCH="PE32 executable"
48568      else
48569        CORRECT_MSVCR_ARCH="PE32+ executable"
48570      fi
48571    else
48572      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48573        CORRECT_MSVCR_ARCH=386
48574      else
48575        CORRECT_MSVCR_ARCH=x86-64
48576      fi
48577    fi
48578    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48580$as_echo "ok" >&6; }
48581      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48582
48583  # Only process if variable expands to non-empty
48584
48585  if test "x$MSVC_DLL" != x; then
48586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48587
48588  # Input might be given as Windows format, start by converting to
48589  # unix format.
48590  path="$MSVC_DLL"
48591  new_path=`$CYGPATH -u "$path"`
48592
48593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48596  # "foo.exe" is OK but "foo" is an error.
48597  #
48598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48599  # It is also a way to make sure we got the proper file name for the real test later on.
48600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48601  if test "x$test_shortpath" = x; then
48602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48603$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48604    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48605  fi
48606
48607  # Call helper function which possibly converts this using DOS-style short mode.
48608  # If so, the updated path is stored in $new_path.
48609
48610  input_path="$new_path"
48611  # Check if we need to convert this using DOS-style short mode. If the path
48612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48613  # take no chances and rewrite it.
48614  # Note: m4 eats our [], so we need to use [ and ] instead.
48615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48616  if test "x$has_forbidden_chars" != x; then
48617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48621      # Going to short mode and back again did indeed matter. Since short mode is
48622      # case insensitive, let's make it lowercase to improve readability.
48623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48624      # Now convert it back to Unix-style (cygpath)
48625      input_path=`$CYGPATH -u "$shortmode_path"`
48626      new_path="$input_path"
48627    fi
48628  fi
48629
48630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48631  if test "x$test_cygdrive_prefix" = x; then
48632    # As a simple fix, exclude /usr/bin since it's not a real path.
48633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48635      # a path prefixed by /cygdrive for fixpath to work.
48636      new_path="$CYGWIN_ROOT_PATH$input_path"
48637    fi
48638  fi
48639
48640
48641  if test "x$path" != "x$new_path"; then
48642    MSVC_DLL="$new_path"
48643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48644$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48645  fi
48646
48647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48648
48649  path="$MSVC_DLL"
48650  has_colon=`$ECHO $path | $GREP ^.:`
48651  new_path="$path"
48652  if test "x$has_colon" = x; then
48653    # Not in mixed or Windows style, start by that.
48654    new_path=`cmd //c echo $path`
48655  fi
48656
48657
48658  input_path="$new_path"
48659  # Check if we need to convert this using DOS-style short mode. If the path
48660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48661  # take no chances and rewrite it.
48662  # Note: m4 eats our [], so we need to use [ and ] instead.
48663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48664  if test "x$has_forbidden_chars" != x; then
48665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48667  fi
48668
48669
48670  windows_path="$new_path"
48671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48672    unix_path=`$CYGPATH -u "$windows_path"`
48673    new_path="$unix_path"
48674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48676    new_path="$unix_path"
48677  fi
48678
48679  if test "x$path" != "x$new_path"; then
48680    MSVC_DLL="$new_path"
48681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48682$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48683  fi
48684
48685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48687
48688    else
48689      # We're on a unix platform. Hooray! :)
48690      path="$MSVC_DLL"
48691      has_space=`$ECHO "$path" | $GREP " "`
48692      if test "x$has_space" != x; then
48693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48694$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48696      fi
48697
48698      # Use eval to expand a potential ~
48699      eval path="$path"
48700      if test ! -f "$path" && test ! -d "$path"; then
48701        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48702      fi
48703
48704      if test -d "$path"; then
48705        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48706      else
48707        dir="`$DIRNAME "$path"`"
48708        base="`$BASENAME "$path"`"
48709        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48710      fi
48711    fi
48712  fi
48713
48714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48715$as_echo_n "checking for $DLL_NAME... " >&6; }
48716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48717$as_echo "$MSVC_DLL" >&6; }
48718    else
48719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48720$as_echo "incorrect, ignoring" >&6; }
48721      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48722$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48723    fi
48724  fi
48725
48726  fi
48727
48728  if test "x$MSVC_DLL" = x; then
48729    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48730    if test "x$VS100COMNTOOLS" != x; then
48731      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48732
48733  windows_path="$CYGWIN_VS_TOOLS_DIR"
48734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48735    unix_path=`$CYGPATH -u "$windows_path"`
48736    CYGWIN_VS_TOOLS_DIR="$unix_path"
48737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48739    CYGWIN_VS_TOOLS_DIR="$unix_path"
48740  fi
48741
48742      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48743        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48744	    | $GREP -i /x64/ | $HEAD --lines 1`
48745      else
48746        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48747	    | $GREP -i /x86/ | $HEAD --lines 1`
48748      fi
48749
48750  DLL_NAME="$DLL_NAME"
48751  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48752  METHOD="search of VS100COMNTOOLS"
48753  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48754    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48755$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48756
48757    # Need to check if the found msvcr is correct architecture
48758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48759$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48760    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48762      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48763      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48764      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48765        CORRECT_MSVCR_ARCH="PE32 executable"
48766      else
48767        CORRECT_MSVCR_ARCH="PE32+ executable"
48768      fi
48769    else
48770      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48771        CORRECT_MSVCR_ARCH=386
48772      else
48773        CORRECT_MSVCR_ARCH=x86-64
48774      fi
48775    fi
48776    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48778$as_echo "ok" >&6; }
48779      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48780
48781  # Only process if variable expands to non-empty
48782
48783  if test "x$MSVC_DLL" != x; then
48784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48785
48786  # Input might be given as Windows format, start by converting to
48787  # unix format.
48788  path="$MSVC_DLL"
48789  new_path=`$CYGPATH -u "$path"`
48790
48791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48794  # "foo.exe" is OK but "foo" is an error.
48795  #
48796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48797  # It is also a way to make sure we got the proper file name for the real test later on.
48798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48799  if test "x$test_shortpath" = x; then
48800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48801$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48802    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48803  fi
48804
48805  # Call helper function which possibly converts this using DOS-style short mode.
48806  # If so, the updated path is stored in $new_path.
48807
48808  input_path="$new_path"
48809  # Check if we need to convert this using DOS-style short mode. If the path
48810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48811  # take no chances and rewrite it.
48812  # Note: m4 eats our [], so we need to use [ and ] instead.
48813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48814  if test "x$has_forbidden_chars" != x; then
48815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48819      # Going to short mode and back again did indeed matter. Since short mode is
48820      # case insensitive, let's make it lowercase to improve readability.
48821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48822      # Now convert it back to Unix-style (cygpath)
48823      input_path=`$CYGPATH -u "$shortmode_path"`
48824      new_path="$input_path"
48825    fi
48826  fi
48827
48828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48829  if test "x$test_cygdrive_prefix" = x; then
48830    # As a simple fix, exclude /usr/bin since it's not a real path.
48831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48833      # a path prefixed by /cygdrive for fixpath to work.
48834      new_path="$CYGWIN_ROOT_PATH$input_path"
48835    fi
48836  fi
48837
48838
48839  if test "x$path" != "x$new_path"; then
48840    MSVC_DLL="$new_path"
48841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48842$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48843  fi
48844
48845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48846
48847  path="$MSVC_DLL"
48848  has_colon=`$ECHO $path | $GREP ^.:`
48849  new_path="$path"
48850  if test "x$has_colon" = x; then
48851    # Not in mixed or Windows style, start by that.
48852    new_path=`cmd //c echo $path`
48853  fi
48854
48855
48856  input_path="$new_path"
48857  # Check if we need to convert this using DOS-style short mode. If the path
48858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48859  # take no chances and rewrite it.
48860  # Note: m4 eats our [], so we need to use [ and ] instead.
48861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48862  if test "x$has_forbidden_chars" != x; then
48863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48865  fi
48866
48867
48868  windows_path="$new_path"
48869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48870    unix_path=`$CYGPATH -u "$windows_path"`
48871    new_path="$unix_path"
48872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48874    new_path="$unix_path"
48875  fi
48876
48877  if test "x$path" != "x$new_path"; then
48878    MSVC_DLL="$new_path"
48879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48880$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48881  fi
48882
48883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48885
48886    else
48887      # We're on a unix platform. Hooray! :)
48888      path="$MSVC_DLL"
48889      has_space=`$ECHO "$path" | $GREP " "`
48890      if test "x$has_space" != x; then
48891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48892$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48894      fi
48895
48896      # Use eval to expand a potential ~
48897      eval path="$path"
48898      if test ! -f "$path" && test ! -d "$path"; then
48899        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48900      fi
48901
48902      if test -d "$path"; then
48903        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48904      else
48905        dir="`$DIRNAME "$path"`"
48906        base="`$BASENAME "$path"`"
48907        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48908      fi
48909    fi
48910  fi
48911
48912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48913$as_echo_n "checking for $DLL_NAME... " >&6; }
48914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48915$as_echo "$MSVC_DLL" >&6; }
48916    else
48917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48918$as_echo "incorrect, ignoring" >&6; }
48919      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48920$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48921    fi
48922  fi
48923
48924    fi
48925  fi
48926
48927  if test "x$MSVC_DLL" = x; then
48928    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48929    # (This was the original behaviour; kept since it might turn something up)
48930    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48931      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48932        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48933	    | $GREP x64 | $HEAD --lines 1`
48934      else
48935        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48936	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48937        if test "x$POSSIBLE_MSVC_DLL" = x; then
48938          # We're grasping at straws now...
48939          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48940	      | $HEAD --lines 1`
48941        fi
48942      fi
48943
48944
48945  DLL_NAME="$DLL_NAME"
48946  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48947  METHOD="search of VCINSTALLDIR"
48948  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48950$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48951
48952    # Need to check if the found msvcr is correct architecture
48953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48954$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48955    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48957      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48958      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48959      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48960        CORRECT_MSVCR_ARCH="PE32 executable"
48961      else
48962        CORRECT_MSVCR_ARCH="PE32+ executable"
48963      fi
48964    else
48965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48966        CORRECT_MSVCR_ARCH=386
48967      else
48968        CORRECT_MSVCR_ARCH=x86-64
48969      fi
48970    fi
48971    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48973$as_echo "ok" >&6; }
48974      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48975
48976  # Only process if variable expands to non-empty
48977
48978  if test "x$MSVC_DLL" != x; then
48979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48980
48981  # Input might be given as Windows format, start by converting to
48982  # unix format.
48983  path="$MSVC_DLL"
48984  new_path=`$CYGPATH -u "$path"`
48985
48986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48989  # "foo.exe" is OK but "foo" is an error.
48990  #
48991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48992  # It is also a way to make sure we got the proper file name for the real test later on.
48993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48994  if test "x$test_shortpath" = x; then
48995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48997    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48998  fi
48999
49000  # Call helper function which possibly converts this using DOS-style short mode.
49001  # If so, the updated path is stored in $new_path.
49002
49003  input_path="$new_path"
49004  # Check if we need to convert this using DOS-style short mode. If the path
49005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49006  # take no chances and rewrite it.
49007  # Note: m4 eats our [], so we need to use [ and ] instead.
49008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49009  if test "x$has_forbidden_chars" != x; then
49010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49014      # Going to short mode and back again did indeed matter. Since short mode is
49015      # case insensitive, let's make it lowercase to improve readability.
49016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49017      # Now convert it back to Unix-style (cygpath)
49018      input_path=`$CYGPATH -u "$shortmode_path"`
49019      new_path="$input_path"
49020    fi
49021  fi
49022
49023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49024  if test "x$test_cygdrive_prefix" = x; then
49025    # As a simple fix, exclude /usr/bin since it's not a real path.
49026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49028      # a path prefixed by /cygdrive for fixpath to work.
49029      new_path="$CYGWIN_ROOT_PATH$input_path"
49030    fi
49031  fi
49032
49033
49034  if test "x$path" != "x$new_path"; then
49035    MSVC_DLL="$new_path"
49036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49038  fi
49039
49040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49041
49042  path="$MSVC_DLL"
49043  has_colon=`$ECHO $path | $GREP ^.:`
49044  new_path="$path"
49045  if test "x$has_colon" = x; then
49046    # Not in mixed or Windows style, start by that.
49047    new_path=`cmd //c echo $path`
49048  fi
49049
49050
49051  input_path="$new_path"
49052  # Check if we need to convert this using DOS-style short mode. If the path
49053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49054  # take no chances and rewrite it.
49055  # Note: m4 eats our [], so we need to use [ and ] instead.
49056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49057  if test "x$has_forbidden_chars" != x; then
49058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49060  fi
49061
49062
49063  windows_path="$new_path"
49064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49065    unix_path=`$CYGPATH -u "$windows_path"`
49066    new_path="$unix_path"
49067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49069    new_path="$unix_path"
49070  fi
49071
49072  if test "x$path" != "x$new_path"; then
49073    MSVC_DLL="$new_path"
49074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49076  fi
49077
49078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49080
49081    else
49082      # We're on a unix platform. Hooray! :)
49083      path="$MSVC_DLL"
49084      has_space=`$ECHO "$path" | $GREP " "`
49085      if test "x$has_space" != x; then
49086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49087$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49089      fi
49090
49091      # Use eval to expand a potential ~
49092      eval path="$path"
49093      if test ! -f "$path" && test ! -d "$path"; then
49094        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49095      fi
49096
49097      if test -d "$path"; then
49098        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49099      else
49100        dir="`$DIRNAME "$path"`"
49101        base="`$BASENAME "$path"`"
49102        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49103      fi
49104    fi
49105  fi
49106
49107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49108$as_echo_n "checking for $DLL_NAME... " >&6; }
49109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49110$as_echo "$MSVC_DLL" >&6; }
49111    else
49112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49113$as_echo "incorrect, ignoring" >&6; }
49114      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49115$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49116    fi
49117  fi
49118
49119    fi
49120  fi
49121
49122  if test "x$MSVC_DLL" = x; then
49123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49124$as_echo_n "checking for $DLL_NAME... " >&6; }
49125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49126$as_echo "no" >&6; }
49127    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49128  fi
49129
49130    MSVCR_DLL="$MSVC_DLL"
49131  fi
49132
49133
49134
49135# Check whether --with-msvcp-dll was given.
49136if test "${with_msvcp_dll+set}" = set; then :
49137  withval=$with_msvcp_dll;
49138fi
49139
49140
49141  if test "x$MSVCP_NAME" != "x"; then
49142    if test "x$with_msvcp_dll" != x; then
49143      # If given explicitely by user, do not probe. If not present, fail directly.
49144
49145  DLL_NAME="$MSVCP_NAME"
49146  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49147  METHOD="--with-msvcp-dll"
49148  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49150$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49151
49152    # Need to check if the found msvcr is correct architecture
49153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49154$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49155    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49157      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49158      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49159      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49160        CORRECT_MSVCR_ARCH="PE32 executable"
49161      else
49162        CORRECT_MSVCR_ARCH="PE32+ executable"
49163      fi
49164    else
49165      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49166        CORRECT_MSVCR_ARCH=386
49167      else
49168        CORRECT_MSVCR_ARCH=x86-64
49169      fi
49170    fi
49171    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49173$as_echo "ok" >&6; }
49174      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49175
49176  # Only process if variable expands to non-empty
49177
49178  if test "x$MSVC_DLL" != x; then
49179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49180
49181  # Input might be given as Windows format, start by converting to
49182  # unix format.
49183  path="$MSVC_DLL"
49184  new_path=`$CYGPATH -u "$path"`
49185
49186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49189  # "foo.exe" is OK but "foo" is an error.
49190  #
49191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49192  # It is also a way to make sure we got the proper file name for the real test later on.
49193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49194  if test "x$test_shortpath" = x; then
49195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49196$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49197    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49198  fi
49199
49200  # Call helper function which possibly converts this using DOS-style short mode.
49201  # If so, the updated path is stored in $new_path.
49202
49203  input_path="$new_path"
49204  # Check if we need to convert this using DOS-style short mode. If the path
49205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49206  # take no chances and rewrite it.
49207  # Note: m4 eats our [], so we need to use [ and ] instead.
49208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49209  if test "x$has_forbidden_chars" != x; then
49210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49214      # Going to short mode and back again did indeed matter. Since short mode is
49215      # case insensitive, let's make it lowercase to improve readability.
49216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49217      # Now convert it back to Unix-style (cygpath)
49218      input_path=`$CYGPATH -u "$shortmode_path"`
49219      new_path="$input_path"
49220    fi
49221  fi
49222
49223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49224  if test "x$test_cygdrive_prefix" = x; then
49225    # As a simple fix, exclude /usr/bin since it's not a real path.
49226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49228      # a path prefixed by /cygdrive for fixpath to work.
49229      new_path="$CYGWIN_ROOT_PATH$input_path"
49230    fi
49231  fi
49232
49233
49234  if test "x$path" != "x$new_path"; then
49235    MSVC_DLL="$new_path"
49236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49237$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49238  fi
49239
49240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49241
49242  path="$MSVC_DLL"
49243  has_colon=`$ECHO $path | $GREP ^.:`
49244  new_path="$path"
49245  if test "x$has_colon" = x; then
49246    # Not in mixed or Windows style, start by that.
49247    new_path=`cmd //c echo $path`
49248  fi
49249
49250
49251  input_path="$new_path"
49252  # Check if we need to convert this using DOS-style short mode. If the path
49253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49254  # take no chances and rewrite it.
49255  # Note: m4 eats our [], so we need to use [ and ] instead.
49256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49257  if test "x$has_forbidden_chars" != x; then
49258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49260  fi
49261
49262
49263  windows_path="$new_path"
49264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49265    unix_path=`$CYGPATH -u "$windows_path"`
49266    new_path="$unix_path"
49267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49269    new_path="$unix_path"
49270  fi
49271
49272  if test "x$path" != "x$new_path"; then
49273    MSVC_DLL="$new_path"
49274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49275$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49276  fi
49277
49278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49280
49281    else
49282      # We're on a unix platform. Hooray! :)
49283      path="$MSVC_DLL"
49284      has_space=`$ECHO "$path" | $GREP " "`
49285      if test "x$has_space" != x; then
49286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49287$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49289      fi
49290
49291      # Use eval to expand a potential ~
49292      eval path="$path"
49293      if test ! -f "$path" && test ! -d "$path"; then
49294        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49295      fi
49296
49297      if test -d "$path"; then
49298        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49299      else
49300        dir="`$DIRNAME "$path"`"
49301        base="`$BASENAME "$path"`"
49302        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49303      fi
49304    fi
49305  fi
49306
49307      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49308$as_echo_n "checking for $DLL_NAME... " >&6; }
49309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49310$as_echo "$MSVC_DLL" >&6; }
49311    else
49312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49313$as_echo "incorrect, ignoring" >&6; }
49314      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49315$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49316    fi
49317  fi
49318
49319      if test "x$MSVC_DLL" = x; then
49320        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49321      fi
49322      MSVCP_DLL="$MSVC_DLL"
49323    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49324
49325  DLL_NAME="$MSVCP_NAME"
49326  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49327  METHOD="devkit"
49328  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49329    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49330$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49331
49332    # Need to check if the found msvcr is correct architecture
49333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49334$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49335    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49337      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49338      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49339      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49340        CORRECT_MSVCR_ARCH="PE32 executable"
49341      else
49342        CORRECT_MSVCR_ARCH="PE32+ executable"
49343      fi
49344    else
49345      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49346        CORRECT_MSVCR_ARCH=386
49347      else
49348        CORRECT_MSVCR_ARCH=x86-64
49349      fi
49350    fi
49351    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49353$as_echo "ok" >&6; }
49354      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49355
49356  # Only process if variable expands to non-empty
49357
49358  if test "x$MSVC_DLL" != x; then
49359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49360
49361  # Input might be given as Windows format, start by converting to
49362  # unix format.
49363  path="$MSVC_DLL"
49364  new_path=`$CYGPATH -u "$path"`
49365
49366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49369  # "foo.exe" is OK but "foo" is an error.
49370  #
49371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49372  # It is also a way to make sure we got the proper file name for the real test later on.
49373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49374  if test "x$test_shortpath" = x; then
49375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49376$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49377    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49378  fi
49379
49380  # Call helper function which possibly converts this using DOS-style short mode.
49381  # If so, the updated path is stored in $new_path.
49382
49383  input_path="$new_path"
49384  # Check if we need to convert this using DOS-style short mode. If the path
49385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49386  # take no chances and rewrite it.
49387  # Note: m4 eats our [], so we need to use [ and ] instead.
49388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49389  if test "x$has_forbidden_chars" != x; then
49390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49394      # Going to short mode and back again did indeed matter. Since short mode is
49395      # case insensitive, let's make it lowercase to improve readability.
49396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49397      # Now convert it back to Unix-style (cygpath)
49398      input_path=`$CYGPATH -u "$shortmode_path"`
49399      new_path="$input_path"
49400    fi
49401  fi
49402
49403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49404  if test "x$test_cygdrive_prefix" = x; then
49405    # As a simple fix, exclude /usr/bin since it's not a real path.
49406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49408      # a path prefixed by /cygdrive for fixpath to work.
49409      new_path="$CYGWIN_ROOT_PATH$input_path"
49410    fi
49411  fi
49412
49413
49414  if test "x$path" != "x$new_path"; then
49415    MSVC_DLL="$new_path"
49416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49417$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49418  fi
49419
49420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49421
49422  path="$MSVC_DLL"
49423  has_colon=`$ECHO $path | $GREP ^.:`
49424  new_path="$path"
49425  if test "x$has_colon" = x; then
49426    # Not in mixed or Windows style, start by that.
49427    new_path=`cmd //c echo $path`
49428  fi
49429
49430
49431  input_path="$new_path"
49432  # Check if we need to convert this using DOS-style short mode. If the path
49433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49434  # take no chances and rewrite it.
49435  # Note: m4 eats our [], so we need to use [ and ] instead.
49436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49437  if test "x$has_forbidden_chars" != x; then
49438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49440  fi
49441
49442
49443  windows_path="$new_path"
49444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49445    unix_path=`$CYGPATH -u "$windows_path"`
49446    new_path="$unix_path"
49447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49449    new_path="$unix_path"
49450  fi
49451
49452  if test "x$path" != "x$new_path"; then
49453    MSVC_DLL="$new_path"
49454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49455$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49456  fi
49457
49458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49460
49461    else
49462      # We're on a unix platform. Hooray! :)
49463      path="$MSVC_DLL"
49464      has_space=`$ECHO "$path" | $GREP " "`
49465      if test "x$has_space" != x; then
49466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49467$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49469      fi
49470
49471      # Use eval to expand a potential ~
49472      eval path="$path"
49473      if test ! -f "$path" && test ! -d "$path"; then
49474        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49475      fi
49476
49477      if test -d "$path"; then
49478        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49479      else
49480        dir="`$DIRNAME "$path"`"
49481        base="`$BASENAME "$path"`"
49482        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49483      fi
49484    fi
49485  fi
49486
49487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49488$as_echo_n "checking for $DLL_NAME... " >&6; }
49489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49490$as_echo "$MSVC_DLL" >&6; }
49491    else
49492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49493$as_echo "incorrect, ignoring" >&6; }
49494      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49495$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49496    fi
49497  fi
49498
49499      if test "x$MSVC_DLL" = x; then
49500        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49501      fi
49502      MSVCP_DLL="$MSVC_DLL"
49503    else
49504
49505  DLL_NAME="${MSVCP_NAME}"
49506  MSVC_DLL=
49507
49508  if test "x$MSVC_DLL" = x; then
49509    # Probe: Using well-known location from Visual Studio 10.0
49510    if test "x$VCINSTALLDIR" != x; then
49511      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49512
49513  windows_path="$CYGWIN_VC_INSTALL_DIR"
49514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49515    unix_path=`$CYGPATH -u "$windows_path"`
49516    CYGWIN_VC_INSTALL_DIR="$unix_path"
49517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49519    CYGWIN_VC_INSTALL_DIR="$unix_path"
49520  fi
49521
49522      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49523        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49524      else
49525        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49526      fi
49527      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49528
49529  DLL_NAME="$DLL_NAME"
49530  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49531  METHOD="well-known location in VCINSTALLDIR"
49532  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49533    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49534$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49535
49536    # Need to check if the found msvcr is correct architecture
49537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49538$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49539    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49541      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49542      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49543      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49544        CORRECT_MSVCR_ARCH="PE32 executable"
49545      else
49546        CORRECT_MSVCR_ARCH="PE32+ executable"
49547      fi
49548    else
49549      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49550        CORRECT_MSVCR_ARCH=386
49551      else
49552        CORRECT_MSVCR_ARCH=x86-64
49553      fi
49554    fi
49555    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49557$as_echo "ok" >&6; }
49558      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49559
49560  # Only process if variable expands to non-empty
49561
49562  if test "x$MSVC_DLL" != x; then
49563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49564
49565  # Input might be given as Windows format, start by converting to
49566  # unix format.
49567  path="$MSVC_DLL"
49568  new_path=`$CYGPATH -u "$path"`
49569
49570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49573  # "foo.exe" is OK but "foo" is an error.
49574  #
49575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49576  # It is also a way to make sure we got the proper file name for the real test later on.
49577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49578  if test "x$test_shortpath" = x; then
49579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49580$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49581    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49582  fi
49583
49584  # Call helper function which possibly converts this using DOS-style short mode.
49585  # If so, the updated path is stored in $new_path.
49586
49587  input_path="$new_path"
49588  # Check if we need to convert this using DOS-style short mode. If the path
49589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49590  # take no chances and rewrite it.
49591  # Note: m4 eats our [], so we need to use [ and ] instead.
49592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49593  if test "x$has_forbidden_chars" != x; then
49594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49598      # Going to short mode and back again did indeed matter. Since short mode is
49599      # case insensitive, let's make it lowercase to improve readability.
49600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49601      # Now convert it back to Unix-style (cygpath)
49602      input_path=`$CYGPATH -u "$shortmode_path"`
49603      new_path="$input_path"
49604    fi
49605  fi
49606
49607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49608  if test "x$test_cygdrive_prefix" = x; then
49609    # As a simple fix, exclude /usr/bin since it's not a real path.
49610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49612      # a path prefixed by /cygdrive for fixpath to work.
49613      new_path="$CYGWIN_ROOT_PATH$input_path"
49614    fi
49615  fi
49616
49617
49618  if test "x$path" != "x$new_path"; then
49619    MSVC_DLL="$new_path"
49620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49621$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49622  fi
49623
49624    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49625
49626  path="$MSVC_DLL"
49627  has_colon=`$ECHO $path | $GREP ^.:`
49628  new_path="$path"
49629  if test "x$has_colon" = x; then
49630    # Not in mixed or Windows style, start by that.
49631    new_path=`cmd //c echo $path`
49632  fi
49633
49634
49635  input_path="$new_path"
49636  # Check if we need to convert this using DOS-style short mode. If the path
49637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49638  # take no chances and rewrite it.
49639  # Note: m4 eats our [], so we need to use [ and ] instead.
49640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49641  if test "x$has_forbidden_chars" != x; then
49642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49644  fi
49645
49646
49647  windows_path="$new_path"
49648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49649    unix_path=`$CYGPATH -u "$windows_path"`
49650    new_path="$unix_path"
49651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49653    new_path="$unix_path"
49654  fi
49655
49656  if test "x$path" != "x$new_path"; then
49657    MSVC_DLL="$new_path"
49658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49659$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49660  fi
49661
49662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49664
49665    else
49666      # We're on a unix platform. Hooray! :)
49667      path="$MSVC_DLL"
49668      has_space=`$ECHO "$path" | $GREP " "`
49669      if test "x$has_space" != x; then
49670        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49671$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49672        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49673      fi
49674
49675      # Use eval to expand a potential ~
49676      eval path="$path"
49677      if test ! -f "$path" && test ! -d "$path"; then
49678        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49679      fi
49680
49681      if test -d "$path"; then
49682        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49683      else
49684        dir="`$DIRNAME "$path"`"
49685        base="`$BASENAME "$path"`"
49686        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49687      fi
49688    fi
49689  fi
49690
49691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49692$as_echo_n "checking for $DLL_NAME... " >&6; }
49693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49694$as_echo "$MSVC_DLL" >&6; }
49695    else
49696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49697$as_echo "incorrect, ignoring" >&6; }
49698      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49699$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49700    fi
49701  fi
49702
49703    fi
49704  fi
49705
49706  if test "x$MSVC_DLL" = x; then
49707    # Probe: Check in the Boot JDK directory.
49708    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49709
49710  DLL_NAME="$DLL_NAME"
49711  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49712  METHOD="well-known location in Boot JDK"
49713  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49714    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49715$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49716
49717    # Need to check if the found msvcr is correct architecture
49718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49719$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49720    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49722      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49723      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49724      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49725        CORRECT_MSVCR_ARCH="PE32 executable"
49726      else
49727        CORRECT_MSVCR_ARCH="PE32+ executable"
49728      fi
49729    else
49730      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49731        CORRECT_MSVCR_ARCH=386
49732      else
49733        CORRECT_MSVCR_ARCH=x86-64
49734      fi
49735    fi
49736    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49738$as_echo "ok" >&6; }
49739      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49740
49741  # Only process if variable expands to non-empty
49742
49743  if test "x$MSVC_DLL" != x; then
49744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49745
49746  # Input might be given as Windows format, start by converting to
49747  # unix format.
49748  path="$MSVC_DLL"
49749  new_path=`$CYGPATH -u "$path"`
49750
49751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49754  # "foo.exe" is OK but "foo" is an error.
49755  #
49756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49757  # It is also a way to make sure we got the proper file name for the real test later on.
49758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49759  if test "x$test_shortpath" = x; then
49760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49761$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49762    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49763  fi
49764
49765  # Call helper function which possibly converts this using DOS-style short mode.
49766  # If so, the updated path is stored in $new_path.
49767
49768  input_path="$new_path"
49769  # Check if we need to convert this using DOS-style short mode. If the path
49770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49771  # take no chances and rewrite it.
49772  # Note: m4 eats our [], so we need to use [ and ] instead.
49773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49774  if test "x$has_forbidden_chars" != x; then
49775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49779      # Going to short mode and back again did indeed matter. Since short mode is
49780      # case insensitive, let's make it lowercase to improve readability.
49781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49782      # Now convert it back to Unix-style (cygpath)
49783      input_path=`$CYGPATH -u "$shortmode_path"`
49784      new_path="$input_path"
49785    fi
49786  fi
49787
49788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49789  if test "x$test_cygdrive_prefix" = x; then
49790    # As a simple fix, exclude /usr/bin since it's not a real path.
49791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49793      # a path prefixed by /cygdrive for fixpath to work.
49794      new_path="$CYGWIN_ROOT_PATH$input_path"
49795    fi
49796  fi
49797
49798
49799  if test "x$path" != "x$new_path"; then
49800    MSVC_DLL="$new_path"
49801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49802$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49803  fi
49804
49805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49806
49807  path="$MSVC_DLL"
49808  has_colon=`$ECHO $path | $GREP ^.:`
49809  new_path="$path"
49810  if test "x$has_colon" = x; then
49811    # Not in mixed or Windows style, start by that.
49812    new_path=`cmd //c echo $path`
49813  fi
49814
49815
49816  input_path="$new_path"
49817  # Check if we need to convert this using DOS-style short mode. If the path
49818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49819  # take no chances and rewrite it.
49820  # Note: m4 eats our [], so we need to use [ and ] instead.
49821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49822  if test "x$has_forbidden_chars" != x; then
49823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49825  fi
49826
49827
49828  windows_path="$new_path"
49829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49830    unix_path=`$CYGPATH -u "$windows_path"`
49831    new_path="$unix_path"
49832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49834    new_path="$unix_path"
49835  fi
49836
49837  if test "x$path" != "x$new_path"; then
49838    MSVC_DLL="$new_path"
49839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49840$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49841  fi
49842
49843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49845
49846    else
49847      # We're on a unix platform. Hooray! :)
49848      path="$MSVC_DLL"
49849      has_space=`$ECHO "$path" | $GREP " "`
49850      if test "x$has_space" != x; then
49851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49852$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49854      fi
49855
49856      # Use eval to expand a potential ~
49857      eval path="$path"
49858      if test ! -f "$path" && test ! -d "$path"; then
49859        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49860      fi
49861
49862      if test -d "$path"; then
49863        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49864      else
49865        dir="`$DIRNAME "$path"`"
49866        base="`$BASENAME "$path"`"
49867        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49868      fi
49869    fi
49870  fi
49871
49872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49873$as_echo_n "checking for $DLL_NAME... " >&6; }
49874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49875$as_echo "$MSVC_DLL" >&6; }
49876    else
49877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49878$as_echo "incorrect, ignoring" >&6; }
49879      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49880$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49881    fi
49882  fi
49883
49884  fi
49885
49886  if test "x$MSVC_DLL" = x; then
49887    # Probe: Look in the Windows system32 directory
49888    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49889
49890  windows_path="$CYGWIN_SYSTEMROOT"
49891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49892    unix_path=`$CYGPATH -u "$windows_path"`
49893    CYGWIN_SYSTEMROOT="$unix_path"
49894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49896    CYGWIN_SYSTEMROOT="$unix_path"
49897  fi
49898
49899    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49900
49901  DLL_NAME="$DLL_NAME"
49902  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49903  METHOD="well-known location in SYSTEMROOT"
49904  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49905    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49906$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49907
49908    # Need to check if the found msvcr is correct architecture
49909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49910$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49911    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49913      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49914      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49915      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49916        CORRECT_MSVCR_ARCH="PE32 executable"
49917      else
49918        CORRECT_MSVCR_ARCH="PE32+ executable"
49919      fi
49920    else
49921      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49922        CORRECT_MSVCR_ARCH=386
49923      else
49924        CORRECT_MSVCR_ARCH=x86-64
49925      fi
49926    fi
49927    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49929$as_echo "ok" >&6; }
49930      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49931
49932  # Only process if variable expands to non-empty
49933
49934  if test "x$MSVC_DLL" != x; then
49935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49936
49937  # Input might be given as Windows format, start by converting to
49938  # unix format.
49939  path="$MSVC_DLL"
49940  new_path=`$CYGPATH -u "$path"`
49941
49942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49945  # "foo.exe" is OK but "foo" is an error.
49946  #
49947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49948  # It is also a way to make sure we got the proper file name for the real test later on.
49949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49950  if test "x$test_shortpath" = x; then
49951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49952$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49953    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49954  fi
49955
49956  # Call helper function which possibly converts this using DOS-style short mode.
49957  # If so, the updated path is stored in $new_path.
49958
49959  input_path="$new_path"
49960  # Check if we need to convert this using DOS-style short mode. If the path
49961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49962  # take no chances and rewrite it.
49963  # Note: m4 eats our [], so we need to use [ and ] instead.
49964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49965  if test "x$has_forbidden_chars" != x; then
49966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49970      # Going to short mode and back again did indeed matter. Since short mode is
49971      # case insensitive, let's make it lowercase to improve readability.
49972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49973      # Now convert it back to Unix-style (cygpath)
49974      input_path=`$CYGPATH -u "$shortmode_path"`
49975      new_path="$input_path"
49976    fi
49977  fi
49978
49979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49980  if test "x$test_cygdrive_prefix" = x; then
49981    # As a simple fix, exclude /usr/bin since it's not a real path.
49982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49984      # a path prefixed by /cygdrive for fixpath to work.
49985      new_path="$CYGWIN_ROOT_PATH$input_path"
49986    fi
49987  fi
49988
49989
49990  if test "x$path" != "x$new_path"; then
49991    MSVC_DLL="$new_path"
49992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49993$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49994  fi
49995
49996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49997
49998  path="$MSVC_DLL"
49999  has_colon=`$ECHO $path | $GREP ^.:`
50000  new_path="$path"
50001  if test "x$has_colon" = x; then
50002    # Not in mixed or Windows style, start by that.
50003    new_path=`cmd //c echo $path`
50004  fi
50005
50006
50007  input_path="$new_path"
50008  # Check if we need to convert this using DOS-style short mode. If the path
50009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50010  # take no chances and rewrite it.
50011  # Note: m4 eats our [], so we need to use [ and ] instead.
50012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50013  if test "x$has_forbidden_chars" != x; then
50014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50016  fi
50017
50018
50019  windows_path="$new_path"
50020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50021    unix_path=`$CYGPATH -u "$windows_path"`
50022    new_path="$unix_path"
50023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50025    new_path="$unix_path"
50026  fi
50027
50028  if test "x$path" != "x$new_path"; then
50029    MSVC_DLL="$new_path"
50030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50031$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50032  fi
50033
50034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50036
50037    else
50038      # We're on a unix platform. Hooray! :)
50039      path="$MSVC_DLL"
50040      has_space=`$ECHO "$path" | $GREP " "`
50041      if test "x$has_space" != x; then
50042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50043$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50044        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50045      fi
50046
50047      # Use eval to expand a potential ~
50048      eval path="$path"
50049      if test ! -f "$path" && test ! -d "$path"; then
50050        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50051      fi
50052
50053      if test -d "$path"; then
50054        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50055      else
50056        dir="`$DIRNAME "$path"`"
50057        base="`$BASENAME "$path"`"
50058        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50059      fi
50060    fi
50061  fi
50062
50063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50064$as_echo_n "checking for $DLL_NAME... " >&6; }
50065      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50066$as_echo "$MSVC_DLL" >&6; }
50067    else
50068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50069$as_echo "incorrect, ignoring" >&6; }
50070      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50071$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50072    fi
50073  fi
50074
50075  fi
50076
50077  if test "x$MSVC_DLL" = x; then
50078    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50079    if test "x$VS100COMNTOOLS" != x; then
50080      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50081
50082  windows_path="$CYGWIN_VS_TOOLS_DIR"
50083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50084    unix_path=`$CYGPATH -u "$windows_path"`
50085    CYGWIN_VS_TOOLS_DIR="$unix_path"
50086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50088    CYGWIN_VS_TOOLS_DIR="$unix_path"
50089  fi
50090
50091      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50092        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50093	    | $GREP -i /x64/ | $HEAD --lines 1`
50094      else
50095        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50096	    | $GREP -i /x86/ | $HEAD --lines 1`
50097      fi
50098
50099  DLL_NAME="$DLL_NAME"
50100  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50101  METHOD="search of VS100COMNTOOLS"
50102  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50103    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50104$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50105
50106    # Need to check if the found msvcr is correct architecture
50107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50108$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50109    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50111      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50112      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50113      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50114        CORRECT_MSVCR_ARCH="PE32 executable"
50115      else
50116        CORRECT_MSVCR_ARCH="PE32+ executable"
50117      fi
50118    else
50119      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50120        CORRECT_MSVCR_ARCH=386
50121      else
50122        CORRECT_MSVCR_ARCH=x86-64
50123      fi
50124    fi
50125    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50127$as_echo "ok" >&6; }
50128      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50129
50130  # Only process if variable expands to non-empty
50131
50132  if test "x$MSVC_DLL" != x; then
50133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50134
50135  # Input might be given as Windows format, start by converting to
50136  # unix format.
50137  path="$MSVC_DLL"
50138  new_path=`$CYGPATH -u "$path"`
50139
50140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50143  # "foo.exe" is OK but "foo" is an error.
50144  #
50145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50146  # It is also a way to make sure we got the proper file name for the real test later on.
50147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50148  if test "x$test_shortpath" = x; then
50149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50150$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50151    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50152  fi
50153
50154  # Call helper function which possibly converts this using DOS-style short mode.
50155  # If so, the updated path is stored in $new_path.
50156
50157  input_path="$new_path"
50158  # Check if we need to convert this using DOS-style short mode. If the path
50159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50160  # take no chances and rewrite it.
50161  # Note: m4 eats our [], so we need to use [ and ] instead.
50162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50163  if test "x$has_forbidden_chars" != x; then
50164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50168      # Going to short mode and back again did indeed matter. Since short mode is
50169      # case insensitive, let's make it lowercase to improve readability.
50170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50171      # Now convert it back to Unix-style (cygpath)
50172      input_path=`$CYGPATH -u "$shortmode_path"`
50173      new_path="$input_path"
50174    fi
50175  fi
50176
50177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50178  if test "x$test_cygdrive_prefix" = x; then
50179    # As a simple fix, exclude /usr/bin since it's not a real path.
50180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50182      # a path prefixed by /cygdrive for fixpath to work.
50183      new_path="$CYGWIN_ROOT_PATH$input_path"
50184    fi
50185  fi
50186
50187
50188  if test "x$path" != "x$new_path"; then
50189    MSVC_DLL="$new_path"
50190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50191$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50192  fi
50193
50194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50195
50196  path="$MSVC_DLL"
50197  has_colon=`$ECHO $path | $GREP ^.:`
50198  new_path="$path"
50199  if test "x$has_colon" = x; then
50200    # Not in mixed or Windows style, start by that.
50201    new_path=`cmd //c echo $path`
50202  fi
50203
50204
50205  input_path="$new_path"
50206  # Check if we need to convert this using DOS-style short mode. If the path
50207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50208  # take no chances and rewrite it.
50209  # Note: m4 eats our [], so we need to use [ and ] instead.
50210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50211  if test "x$has_forbidden_chars" != x; then
50212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50214  fi
50215
50216
50217  windows_path="$new_path"
50218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50219    unix_path=`$CYGPATH -u "$windows_path"`
50220    new_path="$unix_path"
50221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50223    new_path="$unix_path"
50224  fi
50225
50226  if test "x$path" != "x$new_path"; then
50227    MSVC_DLL="$new_path"
50228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50229$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50230  fi
50231
50232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50234
50235    else
50236      # We're on a unix platform. Hooray! :)
50237      path="$MSVC_DLL"
50238      has_space=`$ECHO "$path" | $GREP " "`
50239      if test "x$has_space" != x; then
50240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50241$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50243      fi
50244
50245      # Use eval to expand a potential ~
50246      eval path="$path"
50247      if test ! -f "$path" && test ! -d "$path"; then
50248        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50249      fi
50250
50251      if test -d "$path"; then
50252        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50253      else
50254        dir="`$DIRNAME "$path"`"
50255        base="`$BASENAME "$path"`"
50256        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50257      fi
50258    fi
50259  fi
50260
50261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50262$as_echo_n "checking for $DLL_NAME... " >&6; }
50263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50264$as_echo "$MSVC_DLL" >&6; }
50265    else
50266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50267$as_echo "incorrect, ignoring" >&6; }
50268      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50269$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50270    fi
50271  fi
50272
50273    fi
50274  fi
50275
50276  if test "x$MSVC_DLL" = x; then
50277    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50278    # (This was the original behaviour; kept since it might turn something up)
50279    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50280      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50281        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50282	    | $GREP x64 | $HEAD --lines 1`
50283      else
50284        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50285	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50286        if test "x$POSSIBLE_MSVC_DLL" = x; then
50287          # We're grasping at straws now...
50288          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50289	      | $HEAD --lines 1`
50290        fi
50291      fi
50292
50293
50294  DLL_NAME="$DLL_NAME"
50295  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50296  METHOD="search of VCINSTALLDIR"
50297  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50298    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50299$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50300
50301    # Need to check if the found msvcr is correct architecture
50302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50303$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50304    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50306      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50307      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50308      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50309        CORRECT_MSVCR_ARCH="PE32 executable"
50310      else
50311        CORRECT_MSVCR_ARCH="PE32+ executable"
50312      fi
50313    else
50314      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50315        CORRECT_MSVCR_ARCH=386
50316      else
50317        CORRECT_MSVCR_ARCH=x86-64
50318      fi
50319    fi
50320    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50322$as_echo "ok" >&6; }
50323      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50324
50325  # Only process if variable expands to non-empty
50326
50327  if test "x$MSVC_DLL" != x; then
50328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50329
50330  # Input might be given as Windows format, start by converting to
50331  # unix format.
50332  path="$MSVC_DLL"
50333  new_path=`$CYGPATH -u "$path"`
50334
50335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50338  # "foo.exe" is OK but "foo" is an error.
50339  #
50340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50341  # It is also a way to make sure we got the proper file name for the real test later on.
50342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50343  if test "x$test_shortpath" = x; then
50344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50345$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50346    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50347  fi
50348
50349  # Call helper function which possibly converts this using DOS-style short mode.
50350  # If so, the updated path is stored in $new_path.
50351
50352  input_path="$new_path"
50353  # Check if we need to convert this using DOS-style short mode. If the path
50354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50355  # take no chances and rewrite it.
50356  # Note: m4 eats our [], so we need to use [ and ] instead.
50357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50358  if test "x$has_forbidden_chars" != x; then
50359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50363      # Going to short mode and back again did indeed matter. Since short mode is
50364      # case insensitive, let's make it lowercase to improve readability.
50365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50366      # Now convert it back to Unix-style (cygpath)
50367      input_path=`$CYGPATH -u "$shortmode_path"`
50368      new_path="$input_path"
50369    fi
50370  fi
50371
50372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50373  if test "x$test_cygdrive_prefix" = x; then
50374    # As a simple fix, exclude /usr/bin since it's not a real path.
50375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50377      # a path prefixed by /cygdrive for fixpath to work.
50378      new_path="$CYGWIN_ROOT_PATH$input_path"
50379    fi
50380  fi
50381
50382
50383  if test "x$path" != "x$new_path"; then
50384    MSVC_DLL="$new_path"
50385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50387  fi
50388
50389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50390
50391  path="$MSVC_DLL"
50392  has_colon=`$ECHO $path | $GREP ^.:`
50393  new_path="$path"
50394  if test "x$has_colon" = x; then
50395    # Not in mixed or Windows style, start by that.
50396    new_path=`cmd //c echo $path`
50397  fi
50398
50399
50400  input_path="$new_path"
50401  # Check if we need to convert this using DOS-style short mode. If the path
50402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50403  # take no chances and rewrite it.
50404  # Note: m4 eats our [], so we need to use [ and ] instead.
50405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50406  if test "x$has_forbidden_chars" != x; then
50407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50409  fi
50410
50411
50412  windows_path="$new_path"
50413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50414    unix_path=`$CYGPATH -u "$windows_path"`
50415    new_path="$unix_path"
50416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50418    new_path="$unix_path"
50419  fi
50420
50421  if test "x$path" != "x$new_path"; then
50422    MSVC_DLL="$new_path"
50423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50424$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50425  fi
50426
50427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50429
50430    else
50431      # We're on a unix platform. Hooray! :)
50432      path="$MSVC_DLL"
50433      has_space=`$ECHO "$path" | $GREP " "`
50434      if test "x$has_space" != x; then
50435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50436$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50438      fi
50439
50440      # Use eval to expand a potential ~
50441      eval path="$path"
50442      if test ! -f "$path" && test ! -d "$path"; then
50443        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50444      fi
50445
50446      if test -d "$path"; then
50447        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50448      else
50449        dir="`$DIRNAME "$path"`"
50450        base="`$BASENAME "$path"`"
50451        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50452      fi
50453    fi
50454  fi
50455
50456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50457$as_echo_n "checking for $DLL_NAME... " >&6; }
50458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50459$as_echo "$MSVC_DLL" >&6; }
50460    else
50461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50462$as_echo "incorrect, ignoring" >&6; }
50463      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50464$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50465    fi
50466  fi
50467
50468    fi
50469  fi
50470
50471  if test "x$MSVC_DLL" = x; then
50472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50473$as_echo_n "checking for $DLL_NAME... " >&6; }
50474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50475$as_echo "no" >&6; }
50476    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50477  fi
50478
50479      MSVCP_DLL="$MSVC_DLL"
50480    fi
50481
50482  fi
50483
50484  fi
50485
50486
50487  if test "x$NEEDS_LIB_X11" = xfalse; then
50488    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50489      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50490$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50491    fi
50492    X_CFLAGS=
50493    X_LIBS=
50494  else
50495
50496    if test "x${with_x}" = xno; then
50497      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50498    fi
50499
50500    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50501      # The user has specified a X11 base directory. Use it for includes and
50502      # libraries, unless explicitely overridden.
50503      if test "x$x_includes" = xNONE; then
50504        x_includes="${with_x}/include"
50505      fi
50506      if test "x$x_libraries" = xNONE; then
50507        x_libraries="${with_x}/lib"
50508      fi
50509    else
50510      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50511      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50512      # --x-libraries for the sysroot, if that seems to be correct.
50513      if test "x$SYSROOT" != "x"; then
50514        if test "x$x_includes" = xNONE; then
50515          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50516            x_includes="$SYSROOT/usr/X11R6/include"
50517          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50518            x_includes="$SYSROOT/usr/include"
50519          fi
50520        fi
50521        if test "x$x_libraries" = xNONE; then
50522          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50523            x_libraries="$SYSROOT/usr/X11R6/lib"
50524          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50525            x_libraries="$SYSROOT/usr/lib64"
50526          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50527            x_libraries="$SYSROOT/usr/lib"
50528          fi
50529        fi
50530      fi
50531    fi
50532
50533    # Now let autoconf do it's magic
50534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50535$as_echo_n "checking for X... " >&6; }
50536
50537
50538# Check whether --with-x was given.
50539if test "${with_x+set}" = set; then :
50540  withval=$with_x;
50541fi
50542
50543# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50544if test "x$with_x" = xno; then
50545  # The user explicitly disabled X.
50546  have_x=disabled
50547else
50548  case $x_includes,$x_libraries in #(
50549    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50550    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50551  $as_echo_n "(cached) " >&6
50552else
50553  # One or both of the vars are not set, and there is no cached value.
50554ac_x_includes=no ac_x_libraries=no
50555rm -f -r conftest.dir
50556if mkdir conftest.dir; then
50557  cd conftest.dir
50558  cat >Imakefile <<'_ACEOF'
50559incroot:
50560	@echo incroot='${INCROOT}'
50561usrlibdir:
50562	@echo usrlibdir='${USRLIBDIR}'
50563libdir:
50564	@echo libdir='${LIBDIR}'
50565_ACEOF
50566  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50567    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50568    for ac_var in incroot usrlibdir libdir; do
50569      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50570    done
50571    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50572    for ac_extension in a so sl dylib la dll; do
50573      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50574	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50575	ac_im_usrlibdir=$ac_im_libdir; break
50576      fi
50577    done
50578    # Screen out bogus values from the imake configuration.  They are
50579    # bogus both because they are the default anyway, and because
50580    # using them would break gcc on systems where it needs fixed includes.
50581    case $ac_im_incroot in
50582	/usr/include) ac_x_includes= ;;
50583	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50584    esac
50585    case $ac_im_usrlibdir in
50586	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50587	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50588    esac
50589  fi
50590  cd ..
50591  rm -f -r conftest.dir
50592fi
50593
50594# Standard set of common directories for X headers.
50595# Check X11 before X11Rn because it is often a symlink to the current release.
50596ac_x_header_dirs='
50597/usr/X11/include
50598/usr/X11R7/include
50599/usr/X11R6/include
50600/usr/X11R5/include
50601/usr/X11R4/include
50602
50603/usr/include/X11
50604/usr/include/X11R7
50605/usr/include/X11R6
50606/usr/include/X11R5
50607/usr/include/X11R4
50608
50609/usr/local/X11/include
50610/usr/local/X11R7/include
50611/usr/local/X11R6/include
50612/usr/local/X11R5/include
50613/usr/local/X11R4/include
50614
50615/usr/local/include/X11
50616/usr/local/include/X11R7
50617/usr/local/include/X11R6
50618/usr/local/include/X11R5
50619/usr/local/include/X11R4
50620
50621/usr/X386/include
50622/usr/x386/include
50623/usr/XFree86/include/X11
50624
50625/usr/include
50626/usr/local/include
50627/usr/unsupported/include
50628/usr/athena/include
50629/usr/local/x11r5/include
50630/usr/lpp/Xamples/include
50631
50632/usr/openwin/include
50633/usr/openwin/share/include'
50634
50635if test "$ac_x_includes" = no; then
50636  # Guess where to find include files, by looking for Xlib.h.
50637  # First, try using that file with no special directory specified.
50638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50639/* end confdefs.h.  */
50640#include <X11/Xlib.h>
50641_ACEOF
50642if ac_fn_cxx_try_cpp "$LINENO"; then :
50643  # We can compile using X headers with no special include directory.
50644ac_x_includes=
50645else
50646  for ac_dir in $ac_x_header_dirs; do
50647  if test -r "$ac_dir/X11/Xlib.h"; then
50648    ac_x_includes=$ac_dir
50649    break
50650  fi
50651done
50652fi
50653rm -f conftest.err conftest.i conftest.$ac_ext
50654fi # $ac_x_includes = no
50655
50656if test "$ac_x_libraries" = no; then
50657  # Check for the libraries.
50658  # See if we find them without any special options.
50659  # Don't add to $LIBS permanently.
50660  ac_save_LIBS=$LIBS
50661  LIBS="-lX11 $LIBS"
50662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50663/* end confdefs.h.  */
50664#include <X11/Xlib.h>
50665int
50666main ()
50667{
50668XrmInitialize ()
50669  ;
50670  return 0;
50671}
50672_ACEOF
50673if ac_fn_cxx_try_link "$LINENO"; then :
50674  LIBS=$ac_save_LIBS
50675# We can link X programs with no special library path.
50676ac_x_libraries=
50677else
50678  LIBS=$ac_save_LIBS
50679for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50680do
50681  # Don't even attempt the hair of trying to link an X program!
50682  for ac_extension in a so sl dylib la dll; do
50683    if test -r "$ac_dir/libX11.$ac_extension"; then
50684      ac_x_libraries=$ac_dir
50685      break 2
50686    fi
50687  done
50688done
50689fi
50690rm -f core conftest.err conftest.$ac_objext \
50691    conftest$ac_exeext conftest.$ac_ext
50692fi # $ac_x_libraries = no
50693
50694case $ac_x_includes,$ac_x_libraries in #(
50695  no,* | *,no | *\'*)
50696    # Didn't find X, or a directory has "'" in its name.
50697    ac_cv_have_x="have_x=no";; #(
50698  *)
50699    # Record where we found X for the cache.
50700    ac_cv_have_x="have_x=yes\
50701	ac_x_includes='$ac_x_includes'\
50702	ac_x_libraries='$ac_x_libraries'"
50703esac
50704fi
50705;; #(
50706    *) have_x=yes;;
50707  esac
50708  eval "$ac_cv_have_x"
50709fi # $with_x != no
50710
50711if test "$have_x" != yes; then
50712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50713$as_echo "$have_x" >&6; }
50714  no_x=yes
50715else
50716  # If each of the values was on the command line, it overrides each guess.
50717  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50718  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50719  # Update the cache value to reflect the command line values.
50720  ac_cv_have_x="have_x=yes\
50721	ac_x_includes='$x_includes'\
50722	ac_x_libraries='$x_libraries'"
50723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50724$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50725fi
50726
50727    if test "$no_x" = yes; then
50728  # Not all programs may use this symbol, but it does not hurt to define it.
50729
50730$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50731
50732  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50733else
50734  if test -n "$x_includes"; then
50735    X_CFLAGS="$X_CFLAGS -I$x_includes"
50736  fi
50737
50738  # It would also be nice to do this for all -L options, not just this one.
50739  if test -n "$x_libraries"; then
50740    X_LIBS="$X_LIBS -L$x_libraries"
50741    # For Solaris; some versions of Sun CC require a space after -R and
50742    # others require no space.  Words are not sufficient . . . .
50743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50744$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50745    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50746    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50747    ac_cxx_werror_flag=yes
50748    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50749/* end confdefs.h.  */
50750
50751int
50752main ()
50753{
50754
50755  ;
50756  return 0;
50757}
50758_ACEOF
50759if ac_fn_cxx_try_link "$LINENO"; then :
50760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50761$as_echo "no" >&6; }
50762       X_LIBS="$X_LIBS -R$x_libraries"
50763else
50764  LIBS="$ac_xsave_LIBS -R $x_libraries"
50765       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50766/* end confdefs.h.  */
50767
50768int
50769main ()
50770{
50771
50772  ;
50773  return 0;
50774}
50775_ACEOF
50776if ac_fn_cxx_try_link "$LINENO"; then :
50777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50778$as_echo "yes" >&6; }
50779	  X_LIBS="$X_LIBS -R $x_libraries"
50780else
50781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50782$as_echo "neither works" >&6; }
50783fi
50784rm -f core conftest.err conftest.$ac_objext \
50785    conftest$ac_exeext conftest.$ac_ext
50786fi
50787rm -f core conftest.err conftest.$ac_objext \
50788    conftest$ac_exeext conftest.$ac_ext
50789    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50790    LIBS=$ac_xsave_LIBS
50791  fi
50792
50793  # Check for system-dependent libraries X programs must link with.
50794  # Do this before checking for the system-independent R6 libraries
50795  # (-lICE), since we may need -lsocket or whatever for X linking.
50796
50797  if test "$ISC" = yes; then
50798    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50799  else
50800    # Martyn Johnson says this is needed for Ultrix, if the X
50801    # libraries were built with DECnet support.  And Karl Berry says
50802    # the Alpha needs dnet_stub (dnet does not exist).
50803    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50804    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50805/* end confdefs.h.  */
50806
50807/* Override any GCC internal prototype to avoid an error.
50808   Use char because int might match the return type of a GCC
50809   builtin and then its argument prototype would still apply.  */
50810#ifdef __cplusplus
50811extern "C"
50812#endif
50813char XOpenDisplay ();
50814int
50815main ()
50816{
50817return XOpenDisplay ();
50818  ;
50819  return 0;
50820}
50821_ACEOF
50822if ac_fn_cxx_try_link "$LINENO"; then :
50823
50824else
50825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50826$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50827if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50828  $as_echo_n "(cached) " >&6
50829else
50830  ac_check_lib_save_LIBS=$LIBS
50831LIBS="-ldnet  $LIBS"
50832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50833/* end confdefs.h.  */
50834
50835/* Override any GCC internal prototype to avoid an error.
50836   Use char because int might match the return type of a GCC
50837   builtin and then its argument prototype would still apply.  */
50838#ifdef __cplusplus
50839extern "C"
50840#endif
50841char dnet_ntoa ();
50842int
50843main ()
50844{
50845return dnet_ntoa ();
50846  ;
50847  return 0;
50848}
50849_ACEOF
50850if ac_fn_cxx_try_link "$LINENO"; then :
50851  ac_cv_lib_dnet_dnet_ntoa=yes
50852else
50853  ac_cv_lib_dnet_dnet_ntoa=no
50854fi
50855rm -f core conftest.err conftest.$ac_objext \
50856    conftest$ac_exeext conftest.$ac_ext
50857LIBS=$ac_check_lib_save_LIBS
50858fi
50859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50860$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50861if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50862  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50863fi
50864
50865    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50867$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50868if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50869  $as_echo_n "(cached) " >&6
50870else
50871  ac_check_lib_save_LIBS=$LIBS
50872LIBS="-ldnet_stub  $LIBS"
50873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50874/* end confdefs.h.  */
50875
50876/* Override any GCC internal prototype to avoid an error.
50877   Use char because int might match the return type of a GCC
50878   builtin and then its argument prototype would still apply.  */
50879#ifdef __cplusplus
50880extern "C"
50881#endif
50882char dnet_ntoa ();
50883int
50884main ()
50885{
50886return dnet_ntoa ();
50887  ;
50888  return 0;
50889}
50890_ACEOF
50891if ac_fn_cxx_try_link "$LINENO"; then :
50892  ac_cv_lib_dnet_stub_dnet_ntoa=yes
50893else
50894  ac_cv_lib_dnet_stub_dnet_ntoa=no
50895fi
50896rm -f core conftest.err conftest.$ac_objext \
50897    conftest$ac_exeext conftest.$ac_ext
50898LIBS=$ac_check_lib_save_LIBS
50899fi
50900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50901$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50902if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50903  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50904fi
50905
50906    fi
50907fi
50908rm -f core conftest.err conftest.$ac_objext \
50909    conftest$ac_exeext conftest.$ac_ext
50910    LIBS="$ac_xsave_LIBS"
50911
50912    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50913    # to get the SysV transport functions.
50914    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50915    # needs -lnsl.
50916    # The nsl library prevents programs from opening the X display
50917    # on Irix 5.2, according to T.E. Dickey.
50918    # The functions gethostbyname, getservbyname, and inet_addr are
50919    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50920    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50921if test "x$ac_cv_func_gethostbyname" = xyes; then :
50922
50923fi
50924
50925    if test $ac_cv_func_gethostbyname = no; then
50926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50927$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50928if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50929  $as_echo_n "(cached) " >&6
50930else
50931  ac_check_lib_save_LIBS=$LIBS
50932LIBS="-lnsl  $LIBS"
50933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50934/* end confdefs.h.  */
50935
50936/* Override any GCC internal prototype to avoid an error.
50937   Use char because int might match the return type of a GCC
50938   builtin and then its argument prototype would still apply.  */
50939#ifdef __cplusplus
50940extern "C"
50941#endif
50942char gethostbyname ();
50943int
50944main ()
50945{
50946return gethostbyname ();
50947  ;
50948  return 0;
50949}
50950_ACEOF
50951if ac_fn_cxx_try_link "$LINENO"; then :
50952  ac_cv_lib_nsl_gethostbyname=yes
50953else
50954  ac_cv_lib_nsl_gethostbyname=no
50955fi
50956rm -f core conftest.err conftest.$ac_objext \
50957    conftest$ac_exeext conftest.$ac_ext
50958LIBS=$ac_check_lib_save_LIBS
50959fi
50960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50961$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50962if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50963  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50964fi
50965
50966      if test $ac_cv_lib_nsl_gethostbyname = no; then
50967	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50968$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50969if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50970  $as_echo_n "(cached) " >&6
50971else
50972  ac_check_lib_save_LIBS=$LIBS
50973LIBS="-lbsd  $LIBS"
50974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50975/* end confdefs.h.  */
50976
50977/* Override any GCC internal prototype to avoid an error.
50978   Use char because int might match the return type of a GCC
50979   builtin and then its argument prototype would still apply.  */
50980#ifdef __cplusplus
50981extern "C"
50982#endif
50983char gethostbyname ();
50984int
50985main ()
50986{
50987return gethostbyname ();
50988  ;
50989  return 0;
50990}
50991_ACEOF
50992if ac_fn_cxx_try_link "$LINENO"; then :
50993  ac_cv_lib_bsd_gethostbyname=yes
50994else
50995  ac_cv_lib_bsd_gethostbyname=no
50996fi
50997rm -f core conftest.err conftest.$ac_objext \
50998    conftest$ac_exeext conftest.$ac_ext
50999LIBS=$ac_check_lib_save_LIBS
51000fi
51001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51002$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51003if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51004  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51005fi
51006
51007      fi
51008    fi
51009
51010    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51011    # socket/setsockopt and other routines are undefined under SCO ODT
51012    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51013    # on later versions), says Simon Leinen: it contains gethostby*
51014    # variants that don't use the name server (or something).  -lsocket
51015    # must be given before -lnsl if both are needed.  We assume that
51016    # if connect needs -lnsl, so does gethostbyname.
51017    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51018if test "x$ac_cv_func_connect" = xyes; then :
51019
51020fi
51021
51022    if test $ac_cv_func_connect = no; then
51023      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51024$as_echo_n "checking for connect in -lsocket... " >&6; }
51025if ${ac_cv_lib_socket_connect+:} false; then :
51026  $as_echo_n "(cached) " >&6
51027else
51028  ac_check_lib_save_LIBS=$LIBS
51029LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51031/* end confdefs.h.  */
51032
51033/* Override any GCC internal prototype to avoid an error.
51034   Use char because int might match the return type of a GCC
51035   builtin and then its argument prototype would still apply.  */
51036#ifdef __cplusplus
51037extern "C"
51038#endif
51039char connect ();
51040int
51041main ()
51042{
51043return connect ();
51044  ;
51045  return 0;
51046}
51047_ACEOF
51048if ac_fn_cxx_try_link "$LINENO"; then :
51049  ac_cv_lib_socket_connect=yes
51050else
51051  ac_cv_lib_socket_connect=no
51052fi
51053rm -f core conftest.err conftest.$ac_objext \
51054    conftest$ac_exeext conftest.$ac_ext
51055LIBS=$ac_check_lib_save_LIBS
51056fi
51057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51058$as_echo "$ac_cv_lib_socket_connect" >&6; }
51059if test "x$ac_cv_lib_socket_connect" = xyes; then :
51060  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51061fi
51062
51063    fi
51064
51065    # Guillermo Gomez says -lposix is necessary on A/UX.
51066    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51067if test "x$ac_cv_func_remove" = xyes; then :
51068
51069fi
51070
51071    if test $ac_cv_func_remove = no; then
51072      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51073$as_echo_n "checking for remove in -lposix... " >&6; }
51074if ${ac_cv_lib_posix_remove+:} false; then :
51075  $as_echo_n "(cached) " >&6
51076else
51077  ac_check_lib_save_LIBS=$LIBS
51078LIBS="-lposix  $LIBS"
51079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51080/* end confdefs.h.  */
51081
51082/* Override any GCC internal prototype to avoid an error.
51083   Use char because int might match the return type of a GCC
51084   builtin and then its argument prototype would still apply.  */
51085#ifdef __cplusplus
51086extern "C"
51087#endif
51088char remove ();
51089int
51090main ()
51091{
51092return remove ();
51093  ;
51094  return 0;
51095}
51096_ACEOF
51097if ac_fn_cxx_try_link "$LINENO"; then :
51098  ac_cv_lib_posix_remove=yes
51099else
51100  ac_cv_lib_posix_remove=no
51101fi
51102rm -f core conftest.err conftest.$ac_objext \
51103    conftest$ac_exeext conftest.$ac_ext
51104LIBS=$ac_check_lib_save_LIBS
51105fi
51106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51107$as_echo "$ac_cv_lib_posix_remove" >&6; }
51108if test "x$ac_cv_lib_posix_remove" = xyes; then :
51109  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51110fi
51111
51112    fi
51113
51114    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51115    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51116if test "x$ac_cv_func_shmat" = xyes; then :
51117
51118fi
51119
51120    if test $ac_cv_func_shmat = no; then
51121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51122$as_echo_n "checking for shmat in -lipc... " >&6; }
51123if ${ac_cv_lib_ipc_shmat+:} false; then :
51124  $as_echo_n "(cached) " >&6
51125else
51126  ac_check_lib_save_LIBS=$LIBS
51127LIBS="-lipc  $LIBS"
51128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51129/* end confdefs.h.  */
51130
51131/* Override any GCC internal prototype to avoid an error.
51132   Use char because int might match the return type of a GCC
51133   builtin and then its argument prototype would still apply.  */
51134#ifdef __cplusplus
51135extern "C"
51136#endif
51137char shmat ();
51138int
51139main ()
51140{
51141return shmat ();
51142  ;
51143  return 0;
51144}
51145_ACEOF
51146if ac_fn_cxx_try_link "$LINENO"; then :
51147  ac_cv_lib_ipc_shmat=yes
51148else
51149  ac_cv_lib_ipc_shmat=no
51150fi
51151rm -f core conftest.err conftest.$ac_objext \
51152    conftest$ac_exeext conftest.$ac_ext
51153LIBS=$ac_check_lib_save_LIBS
51154fi
51155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51156$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51157if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51158  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51159fi
51160
51161    fi
51162  fi
51163
51164  # Check for libraries that X11R6 Xt/Xaw programs need.
51165  ac_save_LDFLAGS=$LDFLAGS
51166  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51167  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51168  # check for ICE first), but we must link in the order -lSM -lICE or
51169  # we get undefined symbols.  So assume we have SM if we have ICE.
51170  # These have to be linked with before -lX11, unlike the other
51171  # libraries we check for below, so use a different variable.
51172  # John Interrante, Karl Berry
51173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51174$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51175if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51176  $as_echo_n "(cached) " >&6
51177else
51178  ac_check_lib_save_LIBS=$LIBS
51179LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51181/* end confdefs.h.  */
51182
51183/* Override any GCC internal prototype to avoid an error.
51184   Use char because int might match the return type of a GCC
51185   builtin and then its argument prototype would still apply.  */
51186#ifdef __cplusplus
51187extern "C"
51188#endif
51189char IceConnectionNumber ();
51190int
51191main ()
51192{
51193return IceConnectionNumber ();
51194  ;
51195  return 0;
51196}
51197_ACEOF
51198if ac_fn_cxx_try_link "$LINENO"; then :
51199  ac_cv_lib_ICE_IceConnectionNumber=yes
51200else
51201  ac_cv_lib_ICE_IceConnectionNumber=no
51202fi
51203rm -f core conftest.err conftest.$ac_objext \
51204    conftest$ac_exeext conftest.$ac_ext
51205LIBS=$ac_check_lib_save_LIBS
51206fi
51207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51208$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51209if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51210  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51211fi
51212
51213  LDFLAGS=$ac_save_LDFLAGS
51214
51215fi
51216
51217
51218    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51219    # this doesn't make sense so we remove it.
51220    if test "x$COMPILE_TYPE" = xcross; then
51221      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51222    fi
51223
51224    if test "x$no_x" = xyes; then
51225
51226  # Print a helpful message on how to acquire the necessary build dependency.
51227  # x11 is the help tag: freetype, cups, alsa etc
51228  MISSING_DEPENDENCY=x11
51229
51230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51231    cygwin_help $MISSING_DEPENDENCY
51232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51233    msys_help $MISSING_DEPENDENCY
51234  else
51235    PKGHANDLER_COMMAND=
51236
51237    case $PKGHANDLER in
51238      apt-get)
51239        apt_help     $MISSING_DEPENDENCY ;;
51240      yum)
51241        yum_help     $MISSING_DEPENDENCY ;;
51242      port)
51243        port_help    $MISSING_DEPENDENCY ;;
51244      pkgutil)
51245        pkgutil_help $MISSING_DEPENDENCY ;;
51246      pkgadd)
51247        pkgadd_help  $MISSING_DEPENDENCY ;;
51248    esac
51249
51250    if test "x$PKGHANDLER_COMMAND" != x; then
51251      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51252    fi
51253  fi
51254
51255      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51256    fi
51257
51258    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51259      OPENWIN_HOME="/usr/openwin"
51260      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51261      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51262          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51263          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51264          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51265    fi
51266
51267    ac_ext=c
51268ac_cpp='$CPP $CPPFLAGS'
51269ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51270ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51271ac_compiler_gnu=$ac_cv_c_compiler_gnu
51272
51273    OLD_CFLAGS="$CFLAGS"
51274    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51275
51276    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51277    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51278do :
51279  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51280ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51281          # include <X11/Xlib.h>
51282          # include <X11/Xutil.h>
51283
51284
51285"
51286if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51287  cat >>confdefs.h <<_ACEOF
51288#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51289_ACEOF
51290 X11_HEADERS_OK=yes
51291else
51292  X11_HEADERS_OK=no; break
51293fi
51294
51295done
51296
51297
51298    if test "x$X11_HEADERS_OK" = xno; then
51299
51300  # Print a helpful message on how to acquire the necessary build dependency.
51301  # x11 is the help tag: freetype, cups, alsa etc
51302  MISSING_DEPENDENCY=x11
51303
51304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51305    cygwin_help $MISSING_DEPENDENCY
51306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51307    msys_help $MISSING_DEPENDENCY
51308  else
51309    PKGHANDLER_COMMAND=
51310
51311    case $PKGHANDLER in
51312      apt-get)
51313        apt_help     $MISSING_DEPENDENCY ;;
51314      yum)
51315        yum_help     $MISSING_DEPENDENCY ;;
51316      port)
51317        port_help    $MISSING_DEPENDENCY ;;
51318      pkgutil)
51319        pkgutil_help $MISSING_DEPENDENCY ;;
51320      pkgadd)
51321        pkgadd_help  $MISSING_DEPENDENCY ;;
51322    esac
51323
51324    if test "x$PKGHANDLER_COMMAND" != x; then
51325      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51326    fi
51327  fi
51328
51329      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51330    fi
51331
51332    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51333    # defined in libawt_xawt.
51334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51335$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51336    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51337/* end confdefs.h.  */
51338#include <X11/extensions/Xrender.h>
51339int
51340main ()
51341{
51342XLinearGradient x;
51343  ;
51344  return 0;
51345}
51346_ACEOF
51347if ac_fn_c_try_compile "$LINENO"; then :
51348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51349$as_echo "yes" >&6; }
51350else
51351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51352$as_echo "no" >&6; }
51353         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51354fi
51355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51356
51357    CFLAGS="$OLD_CFLAGS"
51358    ac_ext=cpp
51359ac_cpp='$CXXCPP $CPPFLAGS'
51360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51363
51364  fi # NEEDS_LIB_X11
51365
51366
51367
51368
51369
51370
51371# Check whether --with-cups was given.
51372if test "${with_cups+set}" = set; then :
51373  withval=$with_cups;
51374fi
51375
51376
51377# Check whether --with-cups-include was given.
51378if test "${with_cups_include+set}" = set; then :
51379  withval=$with_cups_include;
51380fi
51381
51382
51383  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51384    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51385        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51386      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51387$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51388    fi
51389    CUPS_CFLAGS=
51390  else
51391    CUPS_FOUND=no
51392
51393    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51394      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51395    fi
51396
51397    if test "x${with_cups}" != x; then
51398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51399$as_echo_n "checking for cups headers... " >&6; }
51400      if test -s "${with_cups}/include/cups/cups.h"; then
51401        CUPS_CFLAGS="-I${with_cups}/include"
51402        CUPS_FOUND=yes
51403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51404$as_echo "$CUPS_FOUND" >&6; }
51405      else
51406        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
51407      fi
51408    fi
51409    if test "x${with_cups_include}" != x; then
51410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51411$as_echo_n "checking for cups headers... " >&6; }
51412      if test -s "${with_cups_include}/cups/cups.h"; then
51413        CUPS_CFLAGS="-I${with_cups_include}"
51414        CUPS_FOUND=yes
51415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51416$as_echo "$CUPS_FOUND" >&6; }
51417      else
51418        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
51419      fi
51420    fi
51421    if test "x$CUPS_FOUND" = xno; then
51422      # Are the cups headers installed in the default /usr/include location?
51423      for ac_header in cups/cups.h cups/ppd.h
51424do :
51425  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51426ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51427if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51428  cat >>confdefs.h <<_ACEOF
51429#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51430_ACEOF
51431
51432          CUPS_FOUND=yes
51433          CUPS_CFLAGS=
51434          DEFAULT_CUPS=yes
51435
51436fi
51437
51438done
51439
51440    fi
51441    if test "x$CUPS_FOUND" = xno; then
51442      # Getting nervous now? Lets poke around for standard Solaris third-party
51443      # package installation locations.
51444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51445$as_echo_n "checking for cups headers... " >&6; }
51446      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51447        # An SFW package seems to be installed!
51448        CUPS_FOUND=yes
51449        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51450      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51451        # A CSW package seems to be installed!
51452        CUPS_FOUND=yes
51453        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51454      fi
51455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51456$as_echo "$CUPS_FOUND" >&6; }
51457    fi
51458    if test "x$CUPS_FOUND" = xno; then
51459
51460  # Print a helpful message on how to acquire the necessary build dependency.
51461  # cups is the help tag: freetype, cups, alsa etc
51462  MISSING_DEPENDENCY=cups
51463
51464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51465    cygwin_help $MISSING_DEPENDENCY
51466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51467    msys_help $MISSING_DEPENDENCY
51468  else
51469    PKGHANDLER_COMMAND=
51470
51471    case $PKGHANDLER in
51472      apt-get)
51473        apt_help     $MISSING_DEPENDENCY ;;
51474      yum)
51475        yum_help     $MISSING_DEPENDENCY ;;
51476      port)
51477        port_help    $MISSING_DEPENDENCY ;;
51478      pkgutil)
51479        pkgutil_help $MISSING_DEPENDENCY ;;
51480      pkgadd)
51481        pkgadd_help  $MISSING_DEPENDENCY ;;
51482    esac
51483
51484    if test "x$PKGHANDLER_COMMAND" != x; then
51485      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51486    fi
51487  fi
51488
51489      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51490    fi
51491  fi
51492
51493
51494
51495
51496
51497# Check whether --with-freetype was given.
51498if test "${with_freetype+set}" = set; then :
51499  withval=$with_freetype;
51500fi
51501
51502
51503# Check whether --with-freetype-include was given.
51504if test "${with_freetype_include+set}" = set; then :
51505  withval=$with_freetype_include;
51506fi
51507
51508
51509# Check whether --with-freetype-lib was given.
51510if test "${with_freetype_lib+set}" = set; then :
51511  withval=$with_freetype_lib;
51512fi
51513
51514
51515# Check whether --with-freetype-src was given.
51516if test "${with_freetype_src+set}" = set; then :
51517  withval=$with_freetype_src;
51518fi
51519
51520  # Check whether --enable-freetype-bundling was given.
51521if test "${enable_freetype_bundling+set}" = set; then :
51522  enableval=$enable_freetype_bundling;
51523fi
51524
51525
51526  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51527  FREETYPE_BASE_NAME=freetype
51528  FREETYPE_CFLAGS=
51529  FREETYPE_LIBS=
51530  FREETYPE_BUNDLE_LIB_PATH=
51531
51532  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51533    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51534        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51535        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51536        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51537      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51538$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51539    fi
51540    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51541      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51542$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51543    fi
51544  else
51545    # freetype is needed to build; go get it!
51546
51547    BUNDLE_FREETYPE="$enable_freetype_bundling"
51548
51549    if  test "x$with_freetype_src" != x; then
51550      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51551        # Try to build freetype if --with-freetype-src was given on Windows
51552
51553  FREETYPE_SRC_PATH="$with_freetype_src"
51554  BUILD_FREETYPE=yes
51555
51556  # Check if the freetype sources are acessible..
51557  if ! test -d $FREETYPE_SRC_PATH; then
51558    { $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
51559$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51560    BUILD_FREETYPE=no
51561  fi
51562  # ..and contain a vc2010 project file
51563  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51564  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51565    { $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
51566$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51567    BUILD_FREETYPE=no
51568  fi
51569  # Now check if configure found a version of 'msbuild.exe'
51570  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51571    { $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
51572$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;}
51573    BUILD_FREETYPE=no
51574  fi
51575
51576  # Ready to go..
51577  if test "x$BUILD_FREETYPE" = xyes; then
51578    # msbuild requires trailing slashes for output directories
51579    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51580    freetype_lib_path_unix="$freetype_lib_path"
51581    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51582
51583  unix_path="$vcxproj_path"
51584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51585    windows_path=`$CYGPATH -m "$unix_path"`
51586    vcxproj_path="$windows_path"
51587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51588    windows_path=`cmd //c echo $unix_path`
51589    vcxproj_path="$windows_path"
51590  fi
51591
51592
51593  unix_path="$freetype_lib_path"
51594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51595    windows_path=`$CYGPATH -m "$unix_path"`
51596    freetype_lib_path="$windows_path"
51597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51598    windows_path=`cmd //c echo $unix_path`
51599    freetype_lib_path="$windows_path"
51600  fi
51601
51602
51603  unix_path="$freetype_obj_path"
51604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51605    windows_path=`$CYGPATH -m "$unix_path"`
51606    freetype_obj_path="$windows_path"
51607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51608    windows_path=`cmd //c echo $unix_path`
51609    freetype_obj_path="$windows_path"
51610  fi
51611
51612    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51613      freetype_platform=x64
51614    else
51615      freetype_platform=win32
51616    fi
51617
51618    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51619    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51620    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51621    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51622    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51623$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51624
51625    # First we try to build the freetype.dll
51626    $ECHO -e "@echo off\n"\
51627        "$MSBUILD $vcxproj_path "\
51628        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51629        "/p:Configuration=\"Release Multithreaded\" "\
51630        "/p:Platform=$freetype_platform "\
51631        "/p:ConfigurationType=DynamicLibrary "\
51632        "/p:TargetName=freetype "\
51633        "/p:OutDir=\"$freetype_lib_path\" "\
51634        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51635    cmd /c freetype.bat
51636
51637    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51638      # If that succeeds we also build freetype.lib
51639      $ECHO -e "@echo off\n"\
51640          "$MSBUILD $vcxproj_path "\
51641          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51642          "/p:Configuration=\"Release Multithreaded\" "\
51643          "/p:Platform=$freetype_platform "\
51644          "/p:ConfigurationType=StaticLibrary "\
51645          "/p:TargetName=freetype "\
51646          "/p:OutDir=\"$freetype_lib_path\" "\
51647          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51648      cmd /c freetype.bat
51649
51650      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51651        # Once we build both, lib and dll, set freetype lib and include path appropriately
51652        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51653        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51654        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51655$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51656      else
51657        BUILD_FREETYPE=no
51658      fi
51659    else
51660      BUILD_FREETYPE=no
51661    fi
51662  fi
51663
51664        if test "x$BUILD_FREETYPE" = xyes; then
51665          # Okay, we built it. Check that it works.
51666
51667  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51668  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51669  METHOD="--with-freetype-src"
51670
51671  # Let's start with an optimistic view of the world :-)
51672  FOUND_FREETYPE=yes
51673
51674  # First look for the canonical freetype main include file ft2build.h.
51675  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51676    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51677    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51678    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51679      # Fail.
51680      FOUND_FREETYPE=no
51681    fi
51682  fi
51683
51684  if test "x$FOUND_FREETYPE" = xyes; then
51685    # Include file found, let's continue the sanity check.
51686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51687$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51688
51689    # Reset to default value
51690    FREETYPE_BASE_NAME=freetype
51691    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51692    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51693      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51694          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51695        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51696        # for the .6 version explicitly.
51697        FREETYPE_BASE_NAME=freetype.6
51698        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51699        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51700$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51701      else
51702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51703$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51704        FOUND_FREETYPE=no
51705      fi
51706    else
51707      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51708        # On Windows, we will need both .lib and .dll file.
51709        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51710          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51711$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51712          FOUND_FREETYPE=no
51713        fi
51714      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51716        # Found lib in isa dir, use that instead.
51717        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51718        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51719$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51720      fi
51721    fi
51722  fi
51723
51724  if test "x$FOUND_FREETYPE" = xyes; then
51725
51726  # Only process if variable expands to non-empty
51727
51728  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51730
51731  # Input might be given as Windows format, start by converting to
51732  # unix format.
51733  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51734  new_path=`$CYGPATH -u "$path"`
51735
51736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51739  # "foo.exe" is OK but "foo" is an error.
51740  #
51741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51742  # It is also a way to make sure we got the proper file name for the real test later on.
51743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51744  if test "x$test_shortpath" = x; then
51745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51747    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51748  fi
51749
51750  # Call helper function which possibly converts this using DOS-style short mode.
51751  # If so, the updated path is stored in $new_path.
51752
51753  input_path="$new_path"
51754  # Check if we need to convert this using DOS-style short mode. If the path
51755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51756  # take no chances and rewrite it.
51757  # Note: m4 eats our [], so we need to use [ and ] instead.
51758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51759  if test "x$has_forbidden_chars" != x; then
51760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51764      # Going to short mode and back again did indeed matter. Since short mode is
51765      # case insensitive, let's make it lowercase to improve readability.
51766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51767      # Now convert it back to Unix-style (cygpath)
51768      input_path=`$CYGPATH -u "$shortmode_path"`
51769      new_path="$input_path"
51770    fi
51771  fi
51772
51773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51774  if test "x$test_cygdrive_prefix" = x; then
51775    # As a simple fix, exclude /usr/bin since it's not a real path.
51776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51778      # a path prefixed by /cygdrive for fixpath to work.
51779      new_path="$CYGWIN_ROOT_PATH$input_path"
51780    fi
51781  fi
51782
51783
51784  if test "x$path" != "x$new_path"; then
51785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51788  fi
51789
51790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51791
51792  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51793  has_colon=`$ECHO $path | $GREP ^.:`
51794  new_path="$path"
51795  if test "x$has_colon" = x; then
51796    # Not in mixed or Windows style, start by that.
51797    new_path=`cmd //c echo $path`
51798  fi
51799
51800
51801  input_path="$new_path"
51802  # Check if we need to convert this using DOS-style short mode. If the path
51803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51804  # take no chances and rewrite it.
51805  # Note: m4 eats our [], so we need to use [ and ] instead.
51806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51807  if test "x$has_forbidden_chars" != x; then
51808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51810  fi
51811
51812
51813  windows_path="$new_path"
51814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51815    unix_path=`$CYGPATH -u "$windows_path"`
51816    new_path="$unix_path"
51817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51819    new_path="$unix_path"
51820  fi
51821
51822  if test "x$path" != "x$new_path"; then
51823    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51826  fi
51827
51828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51830
51831    else
51832      # We're on a unix platform. Hooray! :)
51833      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51834      has_space=`$ECHO "$path" | $GREP " "`
51835      if test "x$has_space" != x; then
51836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51839      fi
51840
51841      # Use eval to expand a potential ~
51842      eval path="$path"
51843      if test ! -f "$path" && test ! -d "$path"; then
51844        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51845      fi
51846
51847      if test -d "$path"; then
51848        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51849      else
51850        dir="`$DIRNAME "$path"`"
51851        base="`$BASENAME "$path"`"
51852        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
51853      fi
51854    fi
51855  fi
51856
51857
51858  # Only process if variable expands to non-empty
51859
51860  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51862
51863  # Input might be given as Windows format, start by converting to
51864  # unix format.
51865  path="$POTENTIAL_FREETYPE_LIB_PATH"
51866  new_path=`$CYGPATH -u "$path"`
51867
51868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51871  # "foo.exe" is OK but "foo" is an error.
51872  #
51873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51874  # It is also a way to make sure we got the proper file name for the real test later on.
51875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51876  if test "x$test_shortpath" = x; then
51877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51879    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51880  fi
51881
51882  # Call helper function which possibly converts this using DOS-style short mode.
51883  # If so, the updated path is stored in $new_path.
51884
51885  input_path="$new_path"
51886  # Check if we need to convert this using DOS-style short mode. If the path
51887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51888  # take no chances and rewrite it.
51889  # Note: m4 eats our [], so we need to use [ and ] instead.
51890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51891  if test "x$has_forbidden_chars" != x; then
51892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51896      # Going to short mode and back again did indeed matter. Since short mode is
51897      # case insensitive, let's make it lowercase to improve readability.
51898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51899      # Now convert it back to Unix-style (cygpath)
51900      input_path=`$CYGPATH -u "$shortmode_path"`
51901      new_path="$input_path"
51902    fi
51903  fi
51904
51905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51906  if test "x$test_cygdrive_prefix" = x; then
51907    # As a simple fix, exclude /usr/bin since it's not a real path.
51908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51910      # a path prefixed by /cygdrive for fixpath to work.
51911      new_path="$CYGWIN_ROOT_PATH$input_path"
51912    fi
51913  fi
51914
51915
51916  if test "x$path" != "x$new_path"; then
51917    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51920  fi
51921
51922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51923
51924  path="$POTENTIAL_FREETYPE_LIB_PATH"
51925  has_colon=`$ECHO $path | $GREP ^.:`
51926  new_path="$path"
51927  if test "x$has_colon" = x; then
51928    # Not in mixed or Windows style, start by that.
51929    new_path=`cmd //c echo $path`
51930  fi
51931
51932
51933  input_path="$new_path"
51934  # Check if we need to convert this using DOS-style short mode. If the path
51935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51936  # take no chances and rewrite it.
51937  # Note: m4 eats our [], so we need to use [ and ] instead.
51938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51939  if test "x$has_forbidden_chars" != x; then
51940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51942  fi
51943
51944
51945  windows_path="$new_path"
51946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51947    unix_path=`$CYGPATH -u "$windows_path"`
51948    new_path="$unix_path"
51949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51951    new_path="$unix_path"
51952  fi
51953
51954  if test "x$path" != "x$new_path"; then
51955    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51957$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51958  fi
51959
51960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51962
51963    else
51964      # We're on a unix platform. Hooray! :)
51965      path="$POTENTIAL_FREETYPE_LIB_PATH"
51966      has_space=`$ECHO "$path" | $GREP " "`
51967      if test "x$has_space" != x; then
51968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51969$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51971      fi
51972
51973      # Use eval to expand a potential ~
51974      eval path="$path"
51975      if test ! -f "$path" && test ! -d "$path"; then
51976        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51977      fi
51978
51979      if test -d "$path"; then
51980        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51981      else
51982        dir="`$DIRNAME "$path"`"
51983        base="`$BASENAME "$path"`"
51984        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
51985      fi
51986    fi
51987  fi
51988
51989
51990    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51992$as_echo_n "checking for freetype includes... " >&6; }
51993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51994$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51995    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51997$as_echo_n "checking for freetype libraries... " >&6; }
51998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51999$as_echo "$FREETYPE_LIB_PATH" >&6; }
52000  fi
52001
52002          if test "x$FOUND_FREETYPE" != xyes; then
52003            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52004          fi
52005        else
52006          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52007$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52008          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52009        fi
52010      else
52011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52012$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52013      fi
52014    fi
52015
52016    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52017      # User has specified settings
52018
52019      if test "x$BUNDLE_FREETYPE" = x; then
52020        # If not specified, default is to bundle freetype
52021        BUNDLE_FREETYPE=yes
52022      fi
52023
52024      if test "x$with_freetype" != x; then
52025        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52026        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52027      fi
52028
52029      # Allow --with-freetype-lib and --with-freetype-include to override
52030      if test "x$with_freetype_include" != x; then
52031        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52032      fi
52033      if test "x$with_freetype_lib" != x; then
52034        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52035      fi
52036
52037      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52038        # Okay, we got it. Check that it works.
52039
52040  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52041  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52042  METHOD="--with-freetype"
52043
52044  # Let's start with an optimistic view of the world :-)
52045  FOUND_FREETYPE=yes
52046
52047  # First look for the canonical freetype main include file ft2build.h.
52048  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52049    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52050    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52051    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52052      # Fail.
52053      FOUND_FREETYPE=no
52054    fi
52055  fi
52056
52057  if test "x$FOUND_FREETYPE" = xyes; then
52058    # Include file found, let's continue the sanity check.
52059    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52060$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52061
52062    # Reset to default value
52063    FREETYPE_BASE_NAME=freetype
52064    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52065    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52066      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52067          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52068        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52069        # for the .6 version explicitly.
52070        FREETYPE_BASE_NAME=freetype.6
52071        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52072        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52073$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52074      else
52075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52077        FOUND_FREETYPE=no
52078      fi
52079    else
52080      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52081        # On Windows, we will need both .lib and .dll file.
52082        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52083          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52085          FOUND_FREETYPE=no
52086        fi
52087      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52088          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52089        # Found lib in isa dir, use that instead.
52090        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52091        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52092$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52093      fi
52094    fi
52095  fi
52096
52097  if test "x$FOUND_FREETYPE" = xyes; then
52098
52099  # Only process if variable expands to non-empty
52100
52101  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52103
52104  # Input might be given as Windows format, start by converting to
52105  # unix format.
52106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52107  new_path=`$CYGPATH -u "$path"`
52108
52109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52112  # "foo.exe" is OK but "foo" is an error.
52113  #
52114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52115  # It is also a way to make sure we got the proper file name for the real test later on.
52116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52117  if test "x$test_shortpath" = x; then
52118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52120    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52121  fi
52122
52123  # Call helper function which possibly converts this using DOS-style short mode.
52124  # If so, the updated path is stored in $new_path.
52125
52126  input_path="$new_path"
52127  # Check if we need to convert this using DOS-style short mode. If the path
52128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52129  # take no chances and rewrite it.
52130  # Note: m4 eats our [], so we need to use [ and ] instead.
52131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52132  if test "x$has_forbidden_chars" != x; then
52133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52137      # Going to short mode and back again did indeed matter. Since short mode is
52138      # case insensitive, let's make it lowercase to improve readability.
52139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52140      # Now convert it back to Unix-style (cygpath)
52141      input_path=`$CYGPATH -u "$shortmode_path"`
52142      new_path="$input_path"
52143    fi
52144  fi
52145
52146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52147  if test "x$test_cygdrive_prefix" = x; then
52148    # As a simple fix, exclude /usr/bin since it's not a real path.
52149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52151      # a path prefixed by /cygdrive for fixpath to work.
52152      new_path="$CYGWIN_ROOT_PATH$input_path"
52153    fi
52154  fi
52155
52156
52157  if test "x$path" != "x$new_path"; then
52158    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52161  fi
52162
52163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52164
52165  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52166  has_colon=`$ECHO $path | $GREP ^.:`
52167  new_path="$path"
52168  if test "x$has_colon" = x; then
52169    # Not in mixed or Windows style, start by that.
52170    new_path=`cmd //c echo $path`
52171  fi
52172
52173
52174  input_path="$new_path"
52175  # Check if we need to convert this using DOS-style short mode. If the path
52176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52177  # take no chances and rewrite it.
52178  # Note: m4 eats our [], so we need to use [ and ] instead.
52179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52180  if test "x$has_forbidden_chars" != x; then
52181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52183  fi
52184
52185
52186  windows_path="$new_path"
52187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52188    unix_path=`$CYGPATH -u "$windows_path"`
52189    new_path="$unix_path"
52190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52192    new_path="$unix_path"
52193  fi
52194
52195  if test "x$path" != "x$new_path"; then
52196    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52199  fi
52200
52201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52203
52204    else
52205      # We're on a unix platform. Hooray! :)
52206      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52207      has_space=`$ECHO "$path" | $GREP " "`
52208      if test "x$has_space" != x; then
52209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52210$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52212      fi
52213
52214      # Use eval to expand a potential ~
52215      eval path="$path"
52216      if test ! -f "$path" && test ! -d "$path"; then
52217        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52218      fi
52219
52220      if test -d "$path"; then
52221        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52222      else
52223        dir="`$DIRNAME "$path"`"
52224        base="`$BASENAME "$path"`"
52225        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52226      fi
52227    fi
52228  fi
52229
52230
52231  # Only process if variable expands to non-empty
52232
52233  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52235
52236  # Input might be given as Windows format, start by converting to
52237  # unix format.
52238  path="$POTENTIAL_FREETYPE_LIB_PATH"
52239  new_path=`$CYGPATH -u "$path"`
52240
52241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52244  # "foo.exe" is OK but "foo" is an error.
52245  #
52246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52247  # It is also a way to make sure we got the proper file name for the real test later on.
52248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52249  if test "x$test_shortpath" = x; then
52250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52252    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52253  fi
52254
52255  # Call helper function which possibly converts this using DOS-style short mode.
52256  # If so, the updated path is stored in $new_path.
52257
52258  input_path="$new_path"
52259  # Check if we need to convert this using DOS-style short mode. If the path
52260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52261  # take no chances and rewrite it.
52262  # Note: m4 eats our [], so we need to use [ and ] instead.
52263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52264  if test "x$has_forbidden_chars" != x; then
52265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52269      # Going to short mode and back again did indeed matter. Since short mode is
52270      # case insensitive, let's make it lowercase to improve readability.
52271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52272      # Now convert it back to Unix-style (cygpath)
52273      input_path=`$CYGPATH -u "$shortmode_path"`
52274      new_path="$input_path"
52275    fi
52276  fi
52277
52278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52279  if test "x$test_cygdrive_prefix" = x; then
52280    # As a simple fix, exclude /usr/bin since it's not a real path.
52281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52283      # a path prefixed by /cygdrive for fixpath to work.
52284      new_path="$CYGWIN_ROOT_PATH$input_path"
52285    fi
52286  fi
52287
52288
52289  if test "x$path" != "x$new_path"; then
52290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52293  fi
52294
52295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52296
52297  path="$POTENTIAL_FREETYPE_LIB_PATH"
52298  has_colon=`$ECHO $path | $GREP ^.:`
52299  new_path="$path"
52300  if test "x$has_colon" = x; then
52301    # Not in mixed or Windows style, start by that.
52302    new_path=`cmd //c echo $path`
52303  fi
52304
52305
52306  input_path="$new_path"
52307  # Check if we need to convert this using DOS-style short mode. If the path
52308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52309  # take no chances and rewrite it.
52310  # Note: m4 eats our [], so we need to use [ and ] instead.
52311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52312  if test "x$has_forbidden_chars" != x; then
52313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52315  fi
52316
52317
52318  windows_path="$new_path"
52319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52320    unix_path=`$CYGPATH -u "$windows_path"`
52321    new_path="$unix_path"
52322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52324    new_path="$unix_path"
52325  fi
52326
52327  if test "x$path" != "x$new_path"; then
52328    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52331  fi
52332
52333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52335
52336    else
52337      # We're on a unix platform. Hooray! :)
52338      path="$POTENTIAL_FREETYPE_LIB_PATH"
52339      has_space=`$ECHO "$path" | $GREP " "`
52340      if test "x$has_space" != x; then
52341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52344      fi
52345
52346      # Use eval to expand a potential ~
52347      eval path="$path"
52348      if test ! -f "$path" && test ! -d "$path"; then
52349        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52350      fi
52351
52352      if test -d "$path"; then
52353        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52354      else
52355        dir="`$DIRNAME "$path"`"
52356        base="`$BASENAME "$path"`"
52357        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52358      fi
52359    fi
52360  fi
52361
52362
52363    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52365$as_echo_n "checking for freetype includes... " >&6; }
52366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52367$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52368    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52370$as_echo_n "checking for freetype libraries... " >&6; }
52371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52372$as_echo "$FREETYPE_LIB_PATH" >&6; }
52373  fi
52374
52375        if test "x$FOUND_FREETYPE" != xyes; then
52376          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52377        fi
52378      else
52379        # User specified only one of lib or include. This is an error.
52380        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52381          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52382$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52383          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52384        else
52385          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52386$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52387          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52388        fi
52389      fi
52390    else
52391      # User did not specify settings, but we need freetype. Try to locate it.
52392
52393      if test "x$BUNDLE_FREETYPE" = x; then
52394        # If not specified, default is to bundle freetype only on windows
52395        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52396          BUNDLE_FREETYPE=yes
52397        else
52398          BUNDLE_FREETYPE=no
52399        fi
52400      fi
52401
52402      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52403      if test "x$SYSROOT" = x; then
52404        if test "x$FOUND_FREETYPE" != xyes; then
52405          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52406          if test "x$PKG_CONFIG" != x; then
52407
52408pkg_failed=no
52409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52410$as_echo_n "checking for FREETYPE... " >&6; }
52411
52412if test -n "$FREETYPE_CFLAGS"; then
52413    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52414 elif test -n "$PKG_CONFIG"; then
52415    if test -n "$PKG_CONFIG" && \
52416    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52417  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52418  ac_status=$?
52419  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52420  test $ac_status = 0; }; then
52421  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52422else
52423  pkg_failed=yes
52424fi
52425 else
52426    pkg_failed=untried
52427fi
52428if test -n "$FREETYPE_LIBS"; then
52429    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52430 elif test -n "$PKG_CONFIG"; then
52431    if test -n "$PKG_CONFIG" && \
52432    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52433  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52434  ac_status=$?
52435  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52436  test $ac_status = 0; }; then
52437  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52438else
52439  pkg_failed=yes
52440fi
52441 else
52442    pkg_failed=untried
52443fi
52444
52445
52446
52447if test $pkg_failed = yes; then
52448
52449if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52450        _pkg_short_errors_supported=yes
52451else
52452        _pkg_short_errors_supported=no
52453fi
52454        if test $_pkg_short_errors_supported = yes; then
52455	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52456        else
52457	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52458        fi
52459	# Put the nasty error message in config.log where it belongs
52460	echo "$FREETYPE_PKG_ERRORS" >&5
52461
52462	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52463$as_echo "no" >&6; }
52464                FOUND_FREETYPE=no
52465elif test $pkg_failed = untried; then
52466	FOUND_FREETYPE=no
52467else
52468	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52469	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52471$as_echo "yes" >&6; }
52472	FOUND_FREETYPE=yes
52473fi
52474            if test "x$FOUND_FREETYPE" = xyes; then
52475              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52476              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52477              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52478              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52479                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52480              fi
52481              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52482              if test "x$BUNDLE_FREETYPE" = xyes; then
52483                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52484$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52485                FOUND_FREETYPE=no
52486              else
52487                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52488$as_echo_n "checking for freetype... " >&6; }
52489                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52490$as_echo "yes (using pkg-config)" >&6; }
52491              fi
52492            fi
52493          fi
52494        fi
52495      fi
52496
52497      if test "x$FOUND_FREETYPE" != xyes; then
52498        # Check in well-known locations
52499        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52500          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52501
52502  windows_path="$FREETYPE_BASE_DIR"
52503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52504    unix_path=`$CYGPATH -u "$windows_path"`
52505    FREETYPE_BASE_DIR="$unix_path"
52506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52508    FREETYPE_BASE_DIR="$unix_path"
52509  fi
52510
52511
52512  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52513  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52514  METHOD="well-known location"
52515
52516  # Let's start with an optimistic view of the world :-)
52517  FOUND_FREETYPE=yes
52518
52519  # First look for the canonical freetype main include file ft2build.h.
52520  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52521    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52522    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52523    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52524      # Fail.
52525      FOUND_FREETYPE=no
52526    fi
52527  fi
52528
52529  if test "x$FOUND_FREETYPE" = xyes; then
52530    # Include file found, let's continue the sanity check.
52531    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52532$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52533
52534    # Reset to default value
52535    FREETYPE_BASE_NAME=freetype
52536    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52537    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52538      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52539          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52540        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52541        # for the .6 version explicitly.
52542        FREETYPE_BASE_NAME=freetype.6
52543        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52544        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52545$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52546      else
52547        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52548$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52549        FOUND_FREETYPE=no
52550      fi
52551    else
52552      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52553        # On Windows, we will need both .lib and .dll file.
52554        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52555          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52556$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52557          FOUND_FREETYPE=no
52558        fi
52559      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52560          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52561        # Found lib in isa dir, use that instead.
52562        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52563        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52564$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52565      fi
52566    fi
52567  fi
52568
52569  if test "x$FOUND_FREETYPE" = xyes; then
52570
52571  # Only process if variable expands to non-empty
52572
52573  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52575
52576  # Input might be given as Windows format, start by converting to
52577  # unix format.
52578  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52579  new_path=`$CYGPATH -u "$path"`
52580
52581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52584  # "foo.exe" is OK but "foo" is an error.
52585  #
52586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52587  # It is also a way to make sure we got the proper file name for the real test later on.
52588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52589  if test "x$test_shortpath" = x; then
52590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52592    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52593  fi
52594
52595  # Call helper function which possibly converts this using DOS-style short mode.
52596  # If so, the updated path is stored in $new_path.
52597
52598  input_path="$new_path"
52599  # Check if we need to convert this using DOS-style short mode. If the path
52600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52601  # take no chances and rewrite it.
52602  # Note: m4 eats our [], so we need to use [ and ] instead.
52603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52604  if test "x$has_forbidden_chars" != x; then
52605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52609      # Going to short mode and back again did indeed matter. Since short mode is
52610      # case insensitive, let's make it lowercase to improve readability.
52611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52612      # Now convert it back to Unix-style (cygpath)
52613      input_path=`$CYGPATH -u "$shortmode_path"`
52614      new_path="$input_path"
52615    fi
52616  fi
52617
52618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52619  if test "x$test_cygdrive_prefix" = x; then
52620    # As a simple fix, exclude /usr/bin since it's not a real path.
52621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52623      # a path prefixed by /cygdrive for fixpath to work.
52624      new_path="$CYGWIN_ROOT_PATH$input_path"
52625    fi
52626  fi
52627
52628
52629  if test "x$path" != "x$new_path"; then
52630    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52633  fi
52634
52635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52636
52637  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52638  has_colon=`$ECHO $path | $GREP ^.:`
52639  new_path="$path"
52640  if test "x$has_colon" = x; then
52641    # Not in mixed or Windows style, start by that.
52642    new_path=`cmd //c echo $path`
52643  fi
52644
52645
52646  input_path="$new_path"
52647  # Check if we need to convert this using DOS-style short mode. If the path
52648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52649  # take no chances and rewrite it.
52650  # Note: m4 eats our [], so we need to use [ and ] instead.
52651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52652  if test "x$has_forbidden_chars" != x; then
52653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52655  fi
52656
52657
52658  windows_path="$new_path"
52659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52660    unix_path=`$CYGPATH -u "$windows_path"`
52661    new_path="$unix_path"
52662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52664    new_path="$unix_path"
52665  fi
52666
52667  if test "x$path" != "x$new_path"; then
52668    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52671  fi
52672
52673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52675
52676    else
52677      # We're on a unix platform. Hooray! :)
52678      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52679      has_space=`$ECHO "$path" | $GREP " "`
52680      if test "x$has_space" != x; then
52681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52684      fi
52685
52686      # Use eval to expand a potential ~
52687      eval path="$path"
52688      if test ! -f "$path" && test ! -d "$path"; then
52689        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52690      fi
52691
52692      if test -d "$path"; then
52693        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52694      else
52695        dir="`$DIRNAME "$path"`"
52696        base="`$BASENAME "$path"`"
52697        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52698      fi
52699    fi
52700  fi
52701
52702
52703  # Only process if variable expands to non-empty
52704
52705  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52707
52708  # Input might be given as Windows format, start by converting to
52709  # unix format.
52710  path="$POTENTIAL_FREETYPE_LIB_PATH"
52711  new_path=`$CYGPATH -u "$path"`
52712
52713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52716  # "foo.exe" is OK but "foo" is an error.
52717  #
52718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52719  # It is also a way to make sure we got the proper file name for the real test later on.
52720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52721  if test "x$test_shortpath" = x; then
52722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52723$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52724    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52725  fi
52726
52727  # Call helper function which possibly converts this using DOS-style short mode.
52728  # If so, the updated path is stored in $new_path.
52729
52730  input_path="$new_path"
52731  # Check if we need to convert this using DOS-style short mode. If the path
52732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52733  # take no chances and rewrite it.
52734  # Note: m4 eats our [], so we need to use [ and ] instead.
52735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52736  if test "x$has_forbidden_chars" != x; then
52737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52741      # Going to short mode and back again did indeed matter. Since short mode is
52742      # case insensitive, let's make it lowercase to improve readability.
52743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52744      # Now convert it back to Unix-style (cygpath)
52745      input_path=`$CYGPATH -u "$shortmode_path"`
52746      new_path="$input_path"
52747    fi
52748  fi
52749
52750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52751  if test "x$test_cygdrive_prefix" = x; then
52752    # As a simple fix, exclude /usr/bin since it's not a real path.
52753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52755      # a path prefixed by /cygdrive for fixpath to work.
52756      new_path="$CYGWIN_ROOT_PATH$input_path"
52757    fi
52758  fi
52759
52760
52761  if test "x$path" != "x$new_path"; then
52762    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52765  fi
52766
52767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52768
52769  path="$POTENTIAL_FREETYPE_LIB_PATH"
52770  has_colon=`$ECHO $path | $GREP ^.:`
52771  new_path="$path"
52772  if test "x$has_colon" = x; then
52773    # Not in mixed or Windows style, start by that.
52774    new_path=`cmd //c echo $path`
52775  fi
52776
52777
52778  input_path="$new_path"
52779  # Check if we need to convert this using DOS-style short mode. If the path
52780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52781  # take no chances and rewrite it.
52782  # Note: m4 eats our [], so we need to use [ and ] instead.
52783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52784  if test "x$has_forbidden_chars" != x; then
52785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52787  fi
52788
52789
52790  windows_path="$new_path"
52791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52792    unix_path=`$CYGPATH -u "$windows_path"`
52793    new_path="$unix_path"
52794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52796    new_path="$unix_path"
52797  fi
52798
52799  if test "x$path" != "x$new_path"; then
52800    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52803  fi
52804
52805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52807
52808    else
52809      # We're on a unix platform. Hooray! :)
52810      path="$POTENTIAL_FREETYPE_LIB_PATH"
52811      has_space=`$ECHO "$path" | $GREP " "`
52812      if test "x$has_space" != x; then
52813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52816      fi
52817
52818      # Use eval to expand a potential ~
52819      eval path="$path"
52820      if test ! -f "$path" && test ! -d "$path"; then
52821        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52822      fi
52823
52824      if test -d "$path"; then
52825        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52826      else
52827        dir="`$DIRNAME "$path"`"
52828        base="`$BASENAME "$path"`"
52829        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52830      fi
52831    fi
52832  fi
52833
52834
52835    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52837$as_echo_n "checking for freetype includes... " >&6; }
52838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52839$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52840    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52842$as_echo_n "checking for freetype libraries... " >&6; }
52843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52844$as_echo "$FREETYPE_LIB_PATH" >&6; }
52845  fi
52846
52847          if test "x$FOUND_FREETYPE" != xyes; then
52848            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52849
52850  windows_path="$FREETYPE_BASE_DIR"
52851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52852    unix_path=`$CYGPATH -u "$windows_path"`
52853    FREETYPE_BASE_DIR="$unix_path"
52854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52856    FREETYPE_BASE_DIR="$unix_path"
52857  fi
52858
52859
52860  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52861  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52862  METHOD="well-known location"
52863
52864  # Let's start with an optimistic view of the world :-)
52865  FOUND_FREETYPE=yes
52866
52867  # First look for the canonical freetype main include file ft2build.h.
52868  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52869    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52870    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52871    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52872      # Fail.
52873      FOUND_FREETYPE=no
52874    fi
52875  fi
52876
52877  if test "x$FOUND_FREETYPE" = xyes; then
52878    # Include file found, let's continue the sanity check.
52879    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52880$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52881
52882    # Reset to default value
52883    FREETYPE_BASE_NAME=freetype
52884    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52885    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52886      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52887          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52888        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52889        # for the .6 version explicitly.
52890        FREETYPE_BASE_NAME=freetype.6
52891        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52892        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52893$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52894      else
52895        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52896$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52897        FOUND_FREETYPE=no
52898      fi
52899    else
52900      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52901        # On Windows, we will need both .lib and .dll file.
52902        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52903          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52904$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52905          FOUND_FREETYPE=no
52906        fi
52907      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52908          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52909        # Found lib in isa dir, use that instead.
52910        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52911        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52912$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52913      fi
52914    fi
52915  fi
52916
52917  if test "x$FOUND_FREETYPE" = xyes; then
52918
52919  # Only process if variable expands to non-empty
52920
52921  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52923
52924  # Input might be given as Windows format, start by converting to
52925  # unix format.
52926  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52927  new_path=`$CYGPATH -u "$path"`
52928
52929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52932  # "foo.exe" is OK but "foo" is an error.
52933  #
52934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52935  # It is also a way to make sure we got the proper file name for the real test later on.
52936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52937  if test "x$test_shortpath" = x; then
52938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52940    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52941  fi
52942
52943  # Call helper function which possibly converts this using DOS-style short mode.
52944  # If so, the updated path is stored in $new_path.
52945
52946  input_path="$new_path"
52947  # Check if we need to convert this using DOS-style short mode. If the path
52948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52949  # take no chances and rewrite it.
52950  # Note: m4 eats our [], so we need to use [ and ] instead.
52951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52952  if test "x$has_forbidden_chars" != x; then
52953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52957      # Going to short mode and back again did indeed matter. Since short mode is
52958      # case insensitive, let's make it lowercase to improve readability.
52959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52960      # Now convert it back to Unix-style (cygpath)
52961      input_path=`$CYGPATH -u "$shortmode_path"`
52962      new_path="$input_path"
52963    fi
52964  fi
52965
52966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52967  if test "x$test_cygdrive_prefix" = x; then
52968    # As a simple fix, exclude /usr/bin since it's not a real path.
52969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52971      # a path prefixed by /cygdrive for fixpath to work.
52972      new_path="$CYGWIN_ROOT_PATH$input_path"
52973    fi
52974  fi
52975
52976
52977  if test "x$path" != "x$new_path"; then
52978    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52981  fi
52982
52983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52984
52985  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52986  has_colon=`$ECHO $path | $GREP ^.:`
52987  new_path="$path"
52988  if test "x$has_colon" = x; then
52989    # Not in mixed or Windows style, start by that.
52990    new_path=`cmd //c echo $path`
52991  fi
52992
52993
52994  input_path="$new_path"
52995  # Check if we need to convert this using DOS-style short mode. If the path
52996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52997  # take no chances and rewrite it.
52998  # Note: m4 eats our [], so we need to use [ and ] instead.
52999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53000  if test "x$has_forbidden_chars" != x; then
53001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53003  fi
53004
53005
53006  windows_path="$new_path"
53007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53008    unix_path=`$CYGPATH -u "$windows_path"`
53009    new_path="$unix_path"
53010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53012    new_path="$unix_path"
53013  fi
53014
53015  if test "x$path" != "x$new_path"; then
53016    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53019  fi
53020
53021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53023
53024    else
53025      # We're on a unix platform. Hooray! :)
53026      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53027      has_space=`$ECHO "$path" | $GREP " "`
53028      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
53032      fi
53033
53034      # Use eval to expand a potential ~
53035      eval path="$path"
53036      if test ! -f "$path" && test ! -d "$path"; then
53037        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53038      fi
53039
53040      if test -d "$path"; then
53041        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53042      else
53043        dir="`$DIRNAME "$path"`"
53044        base="`$BASENAME "$path"`"
53045        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53046      fi
53047    fi
53048  fi
53049
53050
53051  # Only process if variable expands to non-empty
53052
53053  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53055
53056  # Input might be given as Windows format, start by converting to
53057  # unix format.
53058  path="$POTENTIAL_FREETYPE_LIB_PATH"
53059  new_path=`$CYGPATH -u "$path"`
53060
53061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53064  # "foo.exe" is OK but "foo" is an error.
53065  #
53066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53067  # It is also a way to make sure we got the proper file name for the real test later on.
53068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53069  if test "x$test_shortpath" = x; then
53070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53072    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53073  fi
53074
53075  # Call helper function which possibly converts this using DOS-style short mode.
53076  # If so, the updated path is stored in $new_path.
53077
53078  input_path="$new_path"
53079  # Check if we need to convert this using DOS-style short mode. If the path
53080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53081  # take no chances and rewrite it.
53082  # Note: m4 eats our [], so we need to use [ and ] instead.
53083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53084  if test "x$has_forbidden_chars" != x; then
53085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53089      # Going to short mode and back again did indeed matter. Since short mode is
53090      # case insensitive, let's make it lowercase to improve readability.
53091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53092      # Now convert it back to Unix-style (cygpath)
53093      input_path=`$CYGPATH -u "$shortmode_path"`
53094      new_path="$input_path"
53095    fi
53096  fi
53097
53098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53099  if test "x$test_cygdrive_prefix" = x; then
53100    # As a simple fix, exclude /usr/bin since it's not a real path.
53101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53103      # a path prefixed by /cygdrive for fixpath to work.
53104      new_path="$CYGWIN_ROOT_PATH$input_path"
53105    fi
53106  fi
53107
53108
53109  if test "x$path" != "x$new_path"; then
53110    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53113  fi
53114
53115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53116
53117  path="$POTENTIAL_FREETYPE_LIB_PATH"
53118  has_colon=`$ECHO $path | $GREP ^.:`
53119  new_path="$path"
53120  if test "x$has_colon" = x; then
53121    # Not in mixed or Windows style, start by that.
53122    new_path=`cmd //c echo $path`
53123  fi
53124
53125
53126  input_path="$new_path"
53127  # Check if we need to convert this using DOS-style short mode. If the path
53128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53129  # take no chances and rewrite it.
53130  # Note: m4 eats our [], so we need to use [ and ] instead.
53131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53132  if test "x$has_forbidden_chars" != x; then
53133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53135  fi
53136
53137
53138  windows_path="$new_path"
53139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53140    unix_path=`$CYGPATH -u "$windows_path"`
53141    new_path="$unix_path"
53142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53144    new_path="$unix_path"
53145  fi
53146
53147  if test "x$path" != "x$new_path"; then
53148    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53151  fi
53152
53153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53155
53156    else
53157      # We're on a unix platform. Hooray! :)
53158      path="$POTENTIAL_FREETYPE_LIB_PATH"
53159      has_space=`$ECHO "$path" | $GREP " "`
53160      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
53164      fi
53165
53166      # Use eval to expand a potential ~
53167      eval path="$path"
53168      if test ! -f "$path" && test ! -d "$path"; then
53169        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53170      fi
53171
53172      if test -d "$path"; then
53173        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53174      else
53175        dir="`$DIRNAME "$path"`"
53176        base="`$BASENAME "$path"`"
53177        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53178      fi
53179    fi
53180  fi
53181
53182
53183    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53185$as_echo_n "checking for freetype includes... " >&6; }
53186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53187$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53188    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53190$as_echo_n "checking for freetype libraries... " >&6; }
53191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53192$as_echo "$FREETYPE_LIB_PATH" >&6; }
53193  fi
53194
53195          fi
53196          if test "x$FOUND_FREETYPE" != xyes; then
53197            FREETYPE_BASE_DIR="$HOME/freetype"
53198
53199  windows_path="$FREETYPE_BASE_DIR"
53200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53201    unix_path=`$CYGPATH -u "$windows_path"`
53202    FREETYPE_BASE_DIR="$unix_path"
53203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53205    FREETYPE_BASE_DIR="$unix_path"
53206  fi
53207
53208            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53209
53210  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53211  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53212  METHOD="well-known location"
53213
53214  # Let's start with an optimistic view of the world :-)
53215  FOUND_FREETYPE=yes
53216
53217  # First look for the canonical freetype main include file ft2build.h.
53218  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53219    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53220    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53221    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53222      # Fail.
53223      FOUND_FREETYPE=no
53224    fi
53225  fi
53226
53227  if test "x$FOUND_FREETYPE" = xyes; then
53228    # Include file found, let's continue the sanity check.
53229    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53230$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53231
53232    # Reset to default value
53233    FREETYPE_BASE_NAME=freetype
53234    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53235    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53236      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53237          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53238        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53239        # for the .6 version explicitly.
53240        FREETYPE_BASE_NAME=freetype.6
53241        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53242        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53243$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53244      else
53245        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53246$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53247        FOUND_FREETYPE=no
53248      fi
53249    else
53250      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53251        # On Windows, we will need both .lib and .dll file.
53252        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53253          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53254$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53255          FOUND_FREETYPE=no
53256        fi
53257      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53258          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53259        # Found lib in isa dir, use that instead.
53260        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53261        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53262$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53263      fi
53264    fi
53265  fi
53266
53267  if test "x$FOUND_FREETYPE" = xyes; then
53268
53269  # Only process if variable expands to non-empty
53270
53271  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53273
53274  # Input might be given as Windows format, start by converting to
53275  # unix format.
53276  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53277  new_path=`$CYGPATH -u "$path"`
53278
53279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53282  # "foo.exe" is OK but "foo" is an error.
53283  #
53284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53285  # It is also a way to make sure we got the proper file name for the real test later on.
53286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53287  if test "x$test_shortpath" = x; then
53288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53290    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53291  fi
53292
53293  # Call helper function which possibly converts this using DOS-style short mode.
53294  # If so, the updated path is stored in $new_path.
53295
53296  input_path="$new_path"
53297  # Check if we need to convert this using DOS-style short mode. If the path
53298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53299  # take no chances and rewrite it.
53300  # Note: m4 eats our [], so we need to use [ and ] instead.
53301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53302  if test "x$has_forbidden_chars" != x; then
53303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53307      # Going to short mode and back again did indeed matter. Since short mode is
53308      # case insensitive, let's make it lowercase to improve readability.
53309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53310      # Now convert it back to Unix-style (cygpath)
53311      input_path=`$CYGPATH -u "$shortmode_path"`
53312      new_path="$input_path"
53313    fi
53314  fi
53315
53316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53317  if test "x$test_cygdrive_prefix" = x; then
53318    # As a simple fix, exclude /usr/bin since it's not a real path.
53319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53321      # a path prefixed by /cygdrive for fixpath to work.
53322      new_path="$CYGWIN_ROOT_PATH$input_path"
53323    fi
53324  fi
53325
53326
53327  if test "x$path" != "x$new_path"; then
53328    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53331  fi
53332
53333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53334
53335  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53336  has_colon=`$ECHO $path | $GREP ^.:`
53337  new_path="$path"
53338  if test "x$has_colon" = x; then
53339    # Not in mixed or Windows style, start by that.
53340    new_path=`cmd //c echo $path`
53341  fi
53342
53343
53344  input_path="$new_path"
53345  # Check if we need to convert this using DOS-style short mode. If the path
53346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53347  # take no chances and rewrite it.
53348  # Note: m4 eats our [], so we need to use [ and ] instead.
53349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53350  if test "x$has_forbidden_chars" != x; then
53351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53353  fi
53354
53355
53356  windows_path="$new_path"
53357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53358    unix_path=`$CYGPATH -u "$windows_path"`
53359    new_path="$unix_path"
53360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53362    new_path="$unix_path"
53363  fi
53364
53365  if test "x$path" != "x$new_path"; then
53366    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53368$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53369  fi
53370
53371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53373
53374    else
53375      # We're on a unix platform. Hooray! :)
53376      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53377      has_space=`$ECHO "$path" | $GREP " "`
53378      if test "x$has_space" != x; then
53379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53380$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53382      fi
53383
53384      # Use eval to expand a potential ~
53385      eval path="$path"
53386      if test ! -f "$path" && test ! -d "$path"; then
53387        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53388      fi
53389
53390      if test -d "$path"; then
53391        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53392      else
53393        dir="`$DIRNAME "$path"`"
53394        base="`$BASENAME "$path"`"
53395        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53396      fi
53397    fi
53398  fi
53399
53400
53401  # Only process if variable expands to non-empty
53402
53403  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53405
53406  # Input might be given as Windows format, start by converting to
53407  # unix format.
53408  path="$POTENTIAL_FREETYPE_LIB_PATH"
53409  new_path=`$CYGPATH -u "$path"`
53410
53411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53414  # "foo.exe" is OK but "foo" is an error.
53415  #
53416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53417  # It is also a way to make sure we got the proper file name for the real test later on.
53418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53419  if test "x$test_shortpath" = x; then
53420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53422    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53423  fi
53424
53425  # Call helper function which possibly converts this using DOS-style short mode.
53426  # If so, the updated path is stored in $new_path.
53427
53428  input_path="$new_path"
53429  # Check if we need to convert this using DOS-style short mode. If the path
53430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53431  # take no chances and rewrite it.
53432  # Note: m4 eats our [], so we need to use [ and ] instead.
53433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53434  if test "x$has_forbidden_chars" != x; then
53435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53439      # Going to short mode and back again did indeed matter. Since short mode is
53440      # case insensitive, let's make it lowercase to improve readability.
53441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53442      # Now convert it back to Unix-style (cygpath)
53443      input_path=`$CYGPATH -u "$shortmode_path"`
53444      new_path="$input_path"
53445    fi
53446  fi
53447
53448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53449  if test "x$test_cygdrive_prefix" = x; then
53450    # As a simple fix, exclude /usr/bin since it's not a real path.
53451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53453      # a path prefixed by /cygdrive for fixpath to work.
53454      new_path="$CYGWIN_ROOT_PATH$input_path"
53455    fi
53456  fi
53457
53458
53459  if test "x$path" != "x$new_path"; then
53460    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53463  fi
53464
53465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53466
53467  path="$POTENTIAL_FREETYPE_LIB_PATH"
53468  has_colon=`$ECHO $path | $GREP ^.:`
53469  new_path="$path"
53470  if test "x$has_colon" = x; then
53471    # Not in mixed or Windows style, start by that.
53472    new_path=`cmd //c echo $path`
53473  fi
53474
53475
53476  input_path="$new_path"
53477  # Check if we need to convert this using DOS-style short mode. If the path
53478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53479  # take no chances and rewrite it.
53480  # Note: m4 eats our [], so we need to use [ and ] instead.
53481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53482  if test "x$has_forbidden_chars" != x; then
53483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53485  fi
53486
53487
53488  windows_path="$new_path"
53489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53490    unix_path=`$CYGPATH -u "$windows_path"`
53491    new_path="$unix_path"
53492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53494    new_path="$unix_path"
53495  fi
53496
53497  if test "x$path" != "x$new_path"; then
53498    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53501  fi
53502
53503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53505
53506    else
53507      # We're on a unix platform. Hooray! :)
53508      path="$POTENTIAL_FREETYPE_LIB_PATH"
53509      has_space=`$ECHO "$path" | $GREP " "`
53510      if test "x$has_space" != x; then
53511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53514      fi
53515
53516      # Use eval to expand a potential ~
53517      eval path="$path"
53518      if test ! -f "$path" && test ! -d "$path"; then
53519        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53520      fi
53521
53522      if test -d "$path"; then
53523        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53524      else
53525        dir="`$DIRNAME "$path"`"
53526        base="`$BASENAME "$path"`"
53527        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53528      fi
53529    fi
53530  fi
53531
53532
53533    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53535$as_echo_n "checking for freetype includes... " >&6; }
53536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53537$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53538    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53540$as_echo_n "checking for freetype libraries... " >&6; }
53541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53542$as_echo "$FREETYPE_LIB_PATH" >&6; }
53543  fi
53544
53545            else
53546
53547  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53548  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53549  METHOD="well-known location"
53550
53551  # Let's start with an optimistic view of the world :-)
53552  FOUND_FREETYPE=yes
53553
53554  # First look for the canonical freetype main include file ft2build.h.
53555  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53556    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53557    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53558    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53559      # Fail.
53560      FOUND_FREETYPE=no
53561    fi
53562  fi
53563
53564  if test "x$FOUND_FREETYPE" = xyes; then
53565    # Include file found, let's continue the sanity check.
53566    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53567$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53568
53569    # Reset to default value
53570    FREETYPE_BASE_NAME=freetype
53571    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53572    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53573      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53574          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53575        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53576        # for the .6 version explicitly.
53577        FREETYPE_BASE_NAME=freetype.6
53578        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53579        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53580$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53581      else
53582        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53583$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53584        FOUND_FREETYPE=no
53585      fi
53586    else
53587      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53588        # On Windows, we will need both .lib and .dll file.
53589        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53590          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53591$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53592          FOUND_FREETYPE=no
53593        fi
53594      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53595          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53596        # Found lib in isa dir, use that instead.
53597        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53598        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53599$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53600      fi
53601    fi
53602  fi
53603
53604  if test "x$FOUND_FREETYPE" = xyes; then
53605
53606  # Only process if variable expands to non-empty
53607
53608  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53610
53611  # Input might be given as Windows format, start by converting to
53612  # unix format.
53613  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53614  new_path=`$CYGPATH -u "$path"`
53615
53616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53619  # "foo.exe" is OK but "foo" is an error.
53620  #
53621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53622  # It is also a way to make sure we got the proper file name for the real test later on.
53623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53624  if test "x$test_shortpath" = x; then
53625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53627    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53628  fi
53629
53630  # Call helper function which possibly converts this using DOS-style short mode.
53631  # If so, the updated path is stored in $new_path.
53632
53633  input_path="$new_path"
53634  # Check if we need to convert this using DOS-style short mode. If the path
53635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53636  # take no chances and rewrite it.
53637  # Note: m4 eats our [], so we need to use [ and ] instead.
53638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53639  if test "x$has_forbidden_chars" != x; then
53640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53644      # Going to short mode and back again did indeed matter. Since short mode is
53645      # case insensitive, let's make it lowercase to improve readability.
53646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53647      # Now convert it back to Unix-style (cygpath)
53648      input_path=`$CYGPATH -u "$shortmode_path"`
53649      new_path="$input_path"
53650    fi
53651  fi
53652
53653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53654  if test "x$test_cygdrive_prefix" = x; then
53655    # As a simple fix, exclude /usr/bin since it's not a real path.
53656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53658      # a path prefixed by /cygdrive for fixpath to work.
53659      new_path="$CYGWIN_ROOT_PATH$input_path"
53660    fi
53661  fi
53662
53663
53664  if test "x$path" != "x$new_path"; then
53665    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53667$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53668  fi
53669
53670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53671
53672  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53673  has_colon=`$ECHO $path | $GREP ^.:`
53674  new_path="$path"
53675  if test "x$has_colon" = x; then
53676    # Not in mixed or Windows style, start by that.
53677    new_path=`cmd //c echo $path`
53678  fi
53679
53680
53681  input_path="$new_path"
53682  # Check if we need to convert this using DOS-style short mode. If the path
53683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53684  # take no chances and rewrite it.
53685  # Note: m4 eats our [], so we need to use [ and ] instead.
53686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53687  if test "x$has_forbidden_chars" != x; then
53688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53690  fi
53691
53692
53693  windows_path="$new_path"
53694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53695    unix_path=`$CYGPATH -u "$windows_path"`
53696    new_path="$unix_path"
53697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53699    new_path="$unix_path"
53700  fi
53701
53702  if test "x$path" != "x$new_path"; then
53703    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53705$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53706  fi
53707
53708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53710
53711    else
53712      # We're on a unix platform. Hooray! :)
53713      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53714      has_space=`$ECHO "$path" | $GREP " "`
53715      if test "x$has_space" != x; then
53716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53717$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53719      fi
53720
53721      # Use eval to expand a potential ~
53722      eval path="$path"
53723      if test ! -f "$path" && test ! -d "$path"; then
53724        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53725      fi
53726
53727      if test -d "$path"; then
53728        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53729      else
53730        dir="`$DIRNAME "$path"`"
53731        base="`$BASENAME "$path"`"
53732        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53733      fi
53734    fi
53735  fi
53736
53737
53738  # Only process if variable expands to non-empty
53739
53740  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53742
53743  # Input might be given as Windows format, start by converting to
53744  # unix format.
53745  path="$POTENTIAL_FREETYPE_LIB_PATH"
53746  new_path=`$CYGPATH -u "$path"`
53747
53748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53751  # "foo.exe" is OK but "foo" is an error.
53752  #
53753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53754  # It is also a way to make sure we got the proper file name for the real test later on.
53755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53756  if test "x$test_shortpath" = x; then
53757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53759    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53760  fi
53761
53762  # Call helper function which possibly converts this using DOS-style short mode.
53763  # If so, the updated path is stored in $new_path.
53764
53765  input_path="$new_path"
53766  # Check if we need to convert this using DOS-style short mode. If the path
53767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53768  # take no chances and rewrite it.
53769  # Note: m4 eats our [], so we need to use [ and ] instead.
53770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53771  if test "x$has_forbidden_chars" != x; then
53772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53776      # Going to short mode and back again did indeed matter. Since short mode is
53777      # case insensitive, let's make it lowercase to improve readability.
53778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53779      # Now convert it back to Unix-style (cygpath)
53780      input_path=`$CYGPATH -u "$shortmode_path"`
53781      new_path="$input_path"
53782    fi
53783  fi
53784
53785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53786  if test "x$test_cygdrive_prefix" = x; then
53787    # As a simple fix, exclude /usr/bin since it's not a real path.
53788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53790      # a path prefixed by /cygdrive for fixpath to work.
53791      new_path="$CYGWIN_ROOT_PATH$input_path"
53792    fi
53793  fi
53794
53795
53796  if test "x$path" != "x$new_path"; then
53797    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53800  fi
53801
53802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53803
53804  path="$POTENTIAL_FREETYPE_LIB_PATH"
53805  has_colon=`$ECHO $path | $GREP ^.:`
53806  new_path="$path"
53807  if test "x$has_colon" = x; then
53808    # Not in mixed or Windows style, start by that.
53809    new_path=`cmd //c echo $path`
53810  fi
53811
53812
53813  input_path="$new_path"
53814  # Check if we need to convert this using DOS-style short mode. If the path
53815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53816  # take no chances and rewrite it.
53817  # Note: m4 eats our [], so we need to use [ and ] instead.
53818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53819  if test "x$has_forbidden_chars" != x; then
53820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53822  fi
53823
53824
53825  windows_path="$new_path"
53826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53827    unix_path=`$CYGPATH -u "$windows_path"`
53828    new_path="$unix_path"
53829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53831    new_path="$unix_path"
53832  fi
53833
53834  if test "x$path" != "x$new_path"; then
53835    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53838  fi
53839
53840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53842
53843    else
53844      # We're on a unix platform. Hooray! :)
53845      path="$POTENTIAL_FREETYPE_LIB_PATH"
53846      has_space=`$ECHO "$path" | $GREP " "`
53847      if test "x$has_space" != x; then
53848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53851      fi
53852
53853      # Use eval to expand a potential ~
53854      eval path="$path"
53855      if test ! -f "$path" && test ! -d "$path"; then
53856        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53857      fi
53858
53859      if test -d "$path"; then
53860        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53861      else
53862        dir="`$DIRNAME "$path"`"
53863        base="`$BASENAME "$path"`"
53864        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53865      fi
53866    fi
53867  fi
53868
53869
53870    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53872$as_echo_n "checking for freetype includes... " >&6; }
53873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53874$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53875    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53877$as_echo_n "checking for freetype libraries... " >&6; }
53878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53879$as_echo "$FREETYPE_LIB_PATH" >&6; }
53880  fi
53881
53882            fi
53883            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
53884                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
53885              # Source is available, as a last resort try to build freetype in default location
53886
53887  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
53888  BUILD_FREETYPE=yes
53889
53890  # Check if the freetype sources are acessible..
53891  if ! test -d $FREETYPE_SRC_PATH; then
53892    { $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
53893$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
53894    BUILD_FREETYPE=no
53895  fi
53896  # ..and contain a vc2010 project file
53897  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
53898  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
53899    { $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
53900$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
53901    BUILD_FREETYPE=no
53902  fi
53903  # Now check if configure found a version of 'msbuild.exe'
53904  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
53905    { $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
53906$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;}
53907    BUILD_FREETYPE=no
53908  fi
53909
53910  # Ready to go..
53911  if test "x$BUILD_FREETYPE" = xyes; then
53912    # msbuild requires trailing slashes for output directories
53913    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
53914    freetype_lib_path_unix="$freetype_lib_path"
53915    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
53916
53917  unix_path="$vcxproj_path"
53918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53919    windows_path=`$CYGPATH -m "$unix_path"`
53920    vcxproj_path="$windows_path"
53921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53922    windows_path=`cmd //c echo $unix_path`
53923    vcxproj_path="$windows_path"
53924  fi
53925
53926
53927  unix_path="$freetype_lib_path"
53928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53929    windows_path=`$CYGPATH -m "$unix_path"`
53930    freetype_lib_path="$windows_path"
53931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53932    windows_path=`cmd //c echo $unix_path`
53933    freetype_lib_path="$windows_path"
53934  fi
53935
53936
53937  unix_path="$freetype_obj_path"
53938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53939    windows_path=`$CYGPATH -m "$unix_path"`
53940    freetype_obj_path="$windows_path"
53941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53942    windows_path=`cmd //c echo $unix_path`
53943    freetype_obj_path="$windows_path"
53944  fi
53945
53946    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53947      freetype_platform=x64
53948    else
53949      freetype_platform=win32
53950    fi
53951
53952    # The original freetype project file is for VS 2010 (i.e. 'v100'),
53953    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
53954    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
53955    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
53956    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
53957$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
53958
53959    # First we try to build the freetype.dll
53960    $ECHO -e "@echo off\n"\
53961        "$MSBUILD $vcxproj_path "\
53962        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53963        "/p:Configuration=\"Release Multithreaded\" "\
53964        "/p:Platform=$freetype_platform "\
53965        "/p:ConfigurationType=DynamicLibrary "\
53966        "/p:TargetName=freetype "\
53967        "/p:OutDir=\"$freetype_lib_path\" "\
53968        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
53969    cmd /c freetype.bat
53970
53971    if test -s "$freetype_lib_path_unix/freetype.dll"; then
53972      # If that succeeds we also build freetype.lib
53973      $ECHO -e "@echo off\n"\
53974          "$MSBUILD $vcxproj_path "\
53975          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53976          "/p:Configuration=\"Release Multithreaded\" "\
53977          "/p:Platform=$freetype_platform "\
53978          "/p:ConfigurationType=StaticLibrary "\
53979          "/p:TargetName=freetype "\
53980          "/p:OutDir=\"$freetype_lib_path\" "\
53981          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
53982      cmd /c freetype.bat
53983
53984      if test -s "$freetype_lib_path_unix/freetype.lib"; then
53985        # Once we build both, lib and dll, set freetype lib and include path appropriately
53986        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
53987        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
53988        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
53989$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
53990      else
53991        BUILD_FREETYPE=no
53992      fi
53993    else
53994      BUILD_FREETYPE=no
53995    fi
53996  fi
53997
53998              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53999
54000  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54001  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54002  METHOD="well-known location"
54003
54004  # Let's start with an optimistic view of the world :-)
54005  FOUND_FREETYPE=yes
54006
54007  # First look for the canonical freetype main include file ft2build.h.
54008  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54009    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54010    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54011    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54012      # Fail.
54013      FOUND_FREETYPE=no
54014    fi
54015  fi
54016
54017  if test "x$FOUND_FREETYPE" = xyes; then
54018    # Include file found, let's continue the sanity check.
54019    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54020$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54021
54022    # Reset to default value
54023    FREETYPE_BASE_NAME=freetype
54024    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54025    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54026      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54027          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54028        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54029        # for the .6 version explicitly.
54030        FREETYPE_BASE_NAME=freetype.6
54031        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54032        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54033$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54034      else
54035        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54036$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54037        FOUND_FREETYPE=no
54038      fi
54039    else
54040      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54041        # On Windows, we will need both .lib and .dll file.
54042        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54043          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54044$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54045          FOUND_FREETYPE=no
54046        fi
54047      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54048          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54049        # Found lib in isa dir, use that instead.
54050        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54051        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54052$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54053      fi
54054    fi
54055  fi
54056
54057  if test "x$FOUND_FREETYPE" = xyes; then
54058
54059  # Only process if variable expands to non-empty
54060
54061  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54063
54064  # Input might be given as Windows format, start by converting to
54065  # unix format.
54066  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54067  new_path=`$CYGPATH -u "$path"`
54068
54069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54072  # "foo.exe" is OK but "foo" is an error.
54073  #
54074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54075  # It is also a way to make sure we got the proper file name for the real test later on.
54076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54077  if test "x$test_shortpath" = x; then
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54080    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54081  fi
54082
54083  # Call helper function which possibly converts this using DOS-style short mode.
54084  # If so, the updated path is stored in $new_path.
54085
54086  input_path="$new_path"
54087  # Check if we need to convert this using DOS-style short mode. If the path
54088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54089  # take no chances and rewrite it.
54090  # Note: m4 eats our [], so we need to use [ and ] instead.
54091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54092  if test "x$has_forbidden_chars" != x; then
54093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54097      # Going to short mode and back again did indeed matter. Since short mode is
54098      # case insensitive, let's make it lowercase to improve readability.
54099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54100      # Now convert it back to Unix-style (cygpath)
54101      input_path=`$CYGPATH -u "$shortmode_path"`
54102      new_path="$input_path"
54103    fi
54104  fi
54105
54106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54107  if test "x$test_cygdrive_prefix" = x; then
54108    # As a simple fix, exclude /usr/bin since it's not a real path.
54109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54111      # a path prefixed by /cygdrive for fixpath to work.
54112      new_path="$CYGWIN_ROOT_PATH$input_path"
54113    fi
54114  fi
54115
54116
54117  if test "x$path" != "x$new_path"; then
54118    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54121  fi
54122
54123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54124
54125  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54126  has_colon=`$ECHO $path | $GREP ^.:`
54127  new_path="$path"
54128  if test "x$has_colon" = x; then
54129    # Not in mixed or Windows style, start by that.
54130    new_path=`cmd //c echo $path`
54131  fi
54132
54133
54134  input_path="$new_path"
54135  # Check if we need to convert this using DOS-style short mode. If the path
54136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54137  # take no chances and rewrite it.
54138  # Note: m4 eats our [], so we need to use [ and ] instead.
54139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54140  if test "x$has_forbidden_chars" != x; then
54141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54143  fi
54144
54145
54146  windows_path="$new_path"
54147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54148    unix_path=`$CYGPATH -u "$windows_path"`
54149    new_path="$unix_path"
54150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54152    new_path="$unix_path"
54153  fi
54154
54155  if test "x$path" != "x$new_path"; then
54156    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54159  fi
54160
54161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54163
54164    else
54165      # We're on a unix platform. Hooray! :)
54166      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54167      has_space=`$ECHO "$path" | $GREP " "`
54168      if test "x$has_space" != x; then
54169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54172      fi
54173
54174      # Use eval to expand a potential ~
54175      eval path="$path"
54176      if test ! -f "$path" && test ! -d "$path"; then
54177        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54178      fi
54179
54180      if test -d "$path"; then
54181        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54182      else
54183        dir="`$DIRNAME "$path"`"
54184        base="`$BASENAME "$path"`"
54185        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54186      fi
54187    fi
54188  fi
54189
54190
54191  # Only process if variable expands to non-empty
54192
54193  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54195
54196  # Input might be given as Windows format, start by converting to
54197  # unix format.
54198  path="$POTENTIAL_FREETYPE_LIB_PATH"
54199  new_path=`$CYGPATH -u "$path"`
54200
54201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54204  # "foo.exe" is OK but "foo" is an error.
54205  #
54206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54207  # It is also a way to make sure we got the proper file name for the real test later on.
54208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54209  if test "x$test_shortpath" = x; then
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54211$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54212    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54213  fi
54214
54215  # Call helper function which possibly converts this using DOS-style short mode.
54216  # If so, the updated path is stored in $new_path.
54217
54218  input_path="$new_path"
54219  # Check if we need to convert this using DOS-style short mode. If the path
54220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54221  # take no chances and rewrite it.
54222  # Note: m4 eats our [], so we need to use [ and ] instead.
54223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54224  if test "x$has_forbidden_chars" != x; then
54225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54229      # Going to short mode and back again did indeed matter. Since short mode is
54230      # case insensitive, let's make it lowercase to improve readability.
54231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54232      # Now convert it back to Unix-style (cygpath)
54233      input_path=`$CYGPATH -u "$shortmode_path"`
54234      new_path="$input_path"
54235    fi
54236  fi
54237
54238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54239  if test "x$test_cygdrive_prefix" = x; then
54240    # As a simple fix, exclude /usr/bin since it's not a real path.
54241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54243      # a path prefixed by /cygdrive for fixpath to work.
54244      new_path="$CYGWIN_ROOT_PATH$input_path"
54245    fi
54246  fi
54247
54248
54249  if test "x$path" != "x$new_path"; then
54250    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54252$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54253  fi
54254
54255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54256
54257  path="$POTENTIAL_FREETYPE_LIB_PATH"
54258  has_colon=`$ECHO $path | $GREP ^.:`
54259  new_path="$path"
54260  if test "x$has_colon" = x; then
54261    # Not in mixed or Windows style, start by that.
54262    new_path=`cmd //c echo $path`
54263  fi
54264
54265
54266  input_path="$new_path"
54267  # Check if we need to convert this using DOS-style short mode. If the path
54268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54269  # take no chances and rewrite it.
54270  # Note: m4 eats our [], so we need to use [ and ] instead.
54271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54272  if test "x$has_forbidden_chars" != x; then
54273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54275  fi
54276
54277
54278  windows_path="$new_path"
54279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54280    unix_path=`$CYGPATH -u "$windows_path"`
54281    new_path="$unix_path"
54282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54284    new_path="$unix_path"
54285  fi
54286
54287  if test "x$path" != "x$new_path"; then
54288    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54290$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54291  fi
54292
54293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54295
54296    else
54297      # We're on a unix platform. Hooray! :)
54298      path="$POTENTIAL_FREETYPE_LIB_PATH"
54299      has_space=`$ECHO "$path" | $GREP " "`
54300      if test "x$has_space" != x; then
54301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54304      fi
54305
54306      # Use eval to expand a potential ~
54307      eval path="$path"
54308      if test ! -f "$path" && test ! -d "$path"; then
54309        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54310      fi
54311
54312      if test -d "$path"; then
54313        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54314      else
54315        dir="`$DIRNAME "$path"`"
54316        base="`$BASENAME "$path"`"
54317        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54318      fi
54319    fi
54320  fi
54321
54322
54323    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54325$as_echo_n "checking for freetype includes... " >&6; }
54326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54327$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54328    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54330$as_echo_n "checking for freetype libraries... " >&6; }
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54332$as_echo "$FREETYPE_LIB_PATH" >&6; }
54333  fi
54334
54335              else
54336
54337  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54338  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54339  METHOD="well-known location"
54340
54341  # Let's start with an optimistic view of the world :-)
54342  FOUND_FREETYPE=yes
54343
54344  # First look for the canonical freetype main include file ft2build.h.
54345  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54346    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54347    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54348    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54349      # Fail.
54350      FOUND_FREETYPE=no
54351    fi
54352  fi
54353
54354  if test "x$FOUND_FREETYPE" = xyes; then
54355    # Include file found, let's continue the sanity check.
54356    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54357$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54358
54359    # Reset to default value
54360    FREETYPE_BASE_NAME=freetype
54361    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54362    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54363      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54364          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54365        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54366        # for the .6 version explicitly.
54367        FREETYPE_BASE_NAME=freetype.6
54368        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54369        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54370$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54371      else
54372        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54373$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54374        FOUND_FREETYPE=no
54375      fi
54376    else
54377      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54378        # On Windows, we will need both .lib and .dll file.
54379        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54380          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54381$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54382          FOUND_FREETYPE=no
54383        fi
54384      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54385          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54386        # Found lib in isa dir, use that instead.
54387        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54388        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54389$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54390      fi
54391    fi
54392  fi
54393
54394  if test "x$FOUND_FREETYPE" = xyes; then
54395
54396  # Only process if variable expands to non-empty
54397
54398  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54400
54401  # Input might be given as Windows format, start by converting to
54402  # unix format.
54403  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54404  new_path=`$CYGPATH -u "$path"`
54405
54406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54409  # "foo.exe" is OK but "foo" is an error.
54410  #
54411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54412  # It is also a way to make sure we got the proper file name for the real test later on.
54413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54414  if test "x$test_shortpath" = x; then
54415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54417    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54418  fi
54419
54420  # Call helper function which possibly converts this using DOS-style short mode.
54421  # If so, the updated path is stored in $new_path.
54422
54423  input_path="$new_path"
54424  # Check if we need to convert this using DOS-style short mode. If the path
54425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54426  # take no chances and rewrite it.
54427  # Note: m4 eats our [], so we need to use [ and ] instead.
54428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54429  if test "x$has_forbidden_chars" != x; then
54430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54434      # Going to short mode and back again did indeed matter. Since short mode is
54435      # case insensitive, let's make it lowercase to improve readability.
54436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54437      # Now convert it back to Unix-style (cygpath)
54438      input_path=`$CYGPATH -u "$shortmode_path"`
54439      new_path="$input_path"
54440    fi
54441  fi
54442
54443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54444  if test "x$test_cygdrive_prefix" = x; then
54445    # As a simple fix, exclude /usr/bin since it's not a real path.
54446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54448      # a path prefixed by /cygdrive for fixpath to work.
54449      new_path="$CYGWIN_ROOT_PATH$input_path"
54450    fi
54451  fi
54452
54453
54454  if test "x$path" != "x$new_path"; then
54455    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54458  fi
54459
54460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54461
54462  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54463  has_colon=`$ECHO $path | $GREP ^.:`
54464  new_path="$path"
54465  if test "x$has_colon" = x; then
54466    # Not in mixed or Windows style, start by that.
54467    new_path=`cmd //c echo $path`
54468  fi
54469
54470
54471  input_path="$new_path"
54472  # Check if we need to convert this using DOS-style short mode. If the path
54473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54474  # take no chances and rewrite it.
54475  # Note: m4 eats our [], so we need to use [ and ] instead.
54476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54477  if test "x$has_forbidden_chars" != x; then
54478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54480  fi
54481
54482
54483  windows_path="$new_path"
54484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54485    unix_path=`$CYGPATH -u "$windows_path"`
54486    new_path="$unix_path"
54487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54489    new_path="$unix_path"
54490  fi
54491
54492  if test "x$path" != "x$new_path"; then
54493    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54495$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54496  fi
54497
54498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54500
54501    else
54502      # We're on a unix platform. Hooray! :)
54503      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54504      has_space=`$ECHO "$path" | $GREP " "`
54505      if test "x$has_space" != x; then
54506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54509      fi
54510
54511      # Use eval to expand a potential ~
54512      eval path="$path"
54513      if test ! -f "$path" && test ! -d "$path"; then
54514        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54515      fi
54516
54517      if test -d "$path"; then
54518        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54519      else
54520        dir="`$DIRNAME "$path"`"
54521        base="`$BASENAME "$path"`"
54522        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54523      fi
54524    fi
54525  fi
54526
54527
54528  # Only process if variable expands to non-empty
54529
54530  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54532
54533  # Input might be given as Windows format, start by converting to
54534  # unix format.
54535  path="$POTENTIAL_FREETYPE_LIB_PATH"
54536  new_path=`$CYGPATH -u "$path"`
54537
54538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54541  # "foo.exe" is OK but "foo" is an error.
54542  #
54543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54544  # It is also a way to make sure we got the proper file name for the real test later on.
54545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54546  if test "x$test_shortpath" = x; then
54547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54548$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54549    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54550  fi
54551
54552  # Call helper function which possibly converts this using DOS-style short mode.
54553  # If so, the updated path is stored in $new_path.
54554
54555  input_path="$new_path"
54556  # Check if we need to convert this using DOS-style short mode. If the path
54557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54558  # take no chances and rewrite it.
54559  # Note: m4 eats our [], so we need to use [ and ] instead.
54560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54561  if test "x$has_forbidden_chars" != x; then
54562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54566      # Going to short mode and back again did indeed matter. Since short mode is
54567      # case insensitive, let's make it lowercase to improve readability.
54568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54569      # Now convert it back to Unix-style (cygpath)
54570      input_path=`$CYGPATH -u "$shortmode_path"`
54571      new_path="$input_path"
54572    fi
54573  fi
54574
54575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54576  if test "x$test_cygdrive_prefix" = x; then
54577    # As a simple fix, exclude /usr/bin since it's not a real path.
54578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54580      # a path prefixed by /cygdrive for fixpath to work.
54581      new_path="$CYGWIN_ROOT_PATH$input_path"
54582    fi
54583  fi
54584
54585
54586  if test "x$path" != "x$new_path"; then
54587    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54590  fi
54591
54592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54593
54594  path="$POTENTIAL_FREETYPE_LIB_PATH"
54595  has_colon=`$ECHO $path | $GREP ^.:`
54596  new_path="$path"
54597  if test "x$has_colon" = x; then
54598    # Not in mixed or Windows style, start by that.
54599    new_path=`cmd //c echo $path`
54600  fi
54601
54602
54603  input_path="$new_path"
54604  # Check if we need to convert this using DOS-style short mode. If the path
54605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54606  # take no chances and rewrite it.
54607  # Note: m4 eats our [], so we need to use [ and ] instead.
54608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54609  if test "x$has_forbidden_chars" != x; then
54610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54612  fi
54613
54614
54615  windows_path="$new_path"
54616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54617    unix_path=`$CYGPATH -u "$windows_path"`
54618    new_path="$unix_path"
54619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54621    new_path="$unix_path"
54622  fi
54623
54624  if test "x$path" != "x$new_path"; then
54625    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54627$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54628  fi
54629
54630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54632
54633    else
54634      # We're on a unix platform. Hooray! :)
54635      path="$POTENTIAL_FREETYPE_LIB_PATH"
54636      has_space=`$ECHO "$path" | $GREP " "`
54637      if test "x$has_space" != x; then
54638        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54639$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54640        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54641      fi
54642
54643      # Use eval to expand a potential ~
54644      eval path="$path"
54645      if test ! -f "$path" && test ! -d "$path"; then
54646        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54647      fi
54648
54649      if test -d "$path"; then
54650        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54651      else
54652        dir="`$DIRNAME "$path"`"
54653        base="`$BASENAME "$path"`"
54654        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54655      fi
54656    fi
54657  fi
54658
54659
54660    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54662$as_echo_n "checking for freetype includes... " >&6; }
54663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54664$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54665    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54667$as_echo_n "checking for freetype libraries... " >&6; }
54668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54669$as_echo "$FREETYPE_LIB_PATH" >&6; }
54670  fi
54671
54672              fi
54673            fi
54674          fi
54675        else
54676          FREETYPE_BASE_DIR="$SYSROOT/usr"
54677
54678  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54679  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54680  METHOD="well-known location"
54681
54682  # Let's start with an optimistic view of the world :-)
54683  FOUND_FREETYPE=yes
54684
54685  # First look for the canonical freetype main include file ft2build.h.
54686  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54687    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54688    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54689    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54690      # Fail.
54691      FOUND_FREETYPE=no
54692    fi
54693  fi
54694
54695  if test "x$FOUND_FREETYPE" = xyes; then
54696    # Include file found, let's continue the sanity check.
54697    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54698$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54699
54700    # Reset to default value
54701    FREETYPE_BASE_NAME=freetype
54702    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54703    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54704      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54705          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54706        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54707        # for the .6 version explicitly.
54708        FREETYPE_BASE_NAME=freetype.6
54709        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54710        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54711$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54712      else
54713        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54715        FOUND_FREETYPE=no
54716      fi
54717    else
54718      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54719        # On Windows, we will need both .lib and .dll file.
54720        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54721          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54722$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54723          FOUND_FREETYPE=no
54724        fi
54725      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54726          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54727        # Found lib in isa dir, use that instead.
54728        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54729        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54730$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54731      fi
54732    fi
54733  fi
54734
54735  if test "x$FOUND_FREETYPE" = xyes; then
54736
54737  # Only process if variable expands to non-empty
54738
54739  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54741
54742  # Input might be given as Windows format, start by converting to
54743  # unix format.
54744  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54745  new_path=`$CYGPATH -u "$path"`
54746
54747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54750  # "foo.exe" is OK but "foo" is an error.
54751  #
54752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54753  # It is also a way to make sure we got the proper file name for the real test later on.
54754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54755  if test "x$test_shortpath" = x; then
54756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54758    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54759  fi
54760
54761  # Call helper function which possibly converts this using DOS-style short mode.
54762  # If so, the updated path is stored in $new_path.
54763
54764  input_path="$new_path"
54765  # Check if we need to convert this using DOS-style short mode. If the path
54766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54767  # take no chances and rewrite it.
54768  # Note: m4 eats our [], so we need to use [ and ] instead.
54769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54770  if test "x$has_forbidden_chars" != x; then
54771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54775      # Going to short mode and back again did indeed matter. Since short mode is
54776      # case insensitive, let's make it lowercase to improve readability.
54777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54778      # Now convert it back to Unix-style (cygpath)
54779      input_path=`$CYGPATH -u "$shortmode_path"`
54780      new_path="$input_path"
54781    fi
54782  fi
54783
54784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54785  if test "x$test_cygdrive_prefix" = x; then
54786    # As a simple fix, exclude /usr/bin since it's not a real path.
54787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54789      # a path prefixed by /cygdrive for fixpath to work.
54790      new_path="$CYGWIN_ROOT_PATH$input_path"
54791    fi
54792  fi
54793
54794
54795  if test "x$path" != "x$new_path"; then
54796    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54799  fi
54800
54801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54802
54803  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54804  has_colon=`$ECHO $path | $GREP ^.:`
54805  new_path="$path"
54806  if test "x$has_colon" = x; then
54807    # Not in mixed or Windows style, start by that.
54808    new_path=`cmd //c echo $path`
54809  fi
54810
54811
54812  input_path="$new_path"
54813  # Check if we need to convert this using DOS-style short mode. If the path
54814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54815  # take no chances and rewrite it.
54816  # Note: m4 eats our [], so we need to use [ and ] instead.
54817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54818  if test "x$has_forbidden_chars" != x; then
54819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54821  fi
54822
54823
54824  windows_path="$new_path"
54825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54826    unix_path=`$CYGPATH -u "$windows_path"`
54827    new_path="$unix_path"
54828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54830    new_path="$unix_path"
54831  fi
54832
54833  if test "x$path" != "x$new_path"; then
54834    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54836$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54837  fi
54838
54839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54841
54842    else
54843      # We're on a unix platform. Hooray! :)
54844      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54845      has_space=`$ECHO "$path" | $GREP " "`
54846      if test "x$has_space" != x; then
54847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54850      fi
54851
54852      # Use eval to expand a potential ~
54853      eval path="$path"
54854      if test ! -f "$path" && test ! -d "$path"; then
54855        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54856      fi
54857
54858      if test -d "$path"; then
54859        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54860      else
54861        dir="`$DIRNAME "$path"`"
54862        base="`$BASENAME "$path"`"
54863        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54864      fi
54865    fi
54866  fi
54867
54868
54869  # Only process if variable expands to non-empty
54870
54871  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54873
54874  # Input might be given as Windows format, start by converting to
54875  # unix format.
54876  path="$POTENTIAL_FREETYPE_LIB_PATH"
54877  new_path=`$CYGPATH -u "$path"`
54878
54879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54882  # "foo.exe" is OK but "foo" is an error.
54883  #
54884  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54885  # It is also a way to make sure we got the proper file name for the real test later on.
54886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54887  if test "x$test_shortpath" = x; then
54888    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54890    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54891  fi
54892
54893  # Call helper function which possibly converts this using DOS-style short mode.
54894  # If so, the updated path is stored in $new_path.
54895
54896  input_path="$new_path"
54897  # Check if we need to convert this using DOS-style short mode. If the path
54898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54899  # take no chances and rewrite it.
54900  # Note: m4 eats our [], so we need to use [ and ] instead.
54901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54902  if test "x$has_forbidden_chars" != x; then
54903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54907      # Going to short mode and back again did indeed matter. Since short mode is
54908      # case insensitive, let's make it lowercase to improve readability.
54909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54910      # Now convert it back to Unix-style (cygpath)
54911      input_path=`$CYGPATH -u "$shortmode_path"`
54912      new_path="$input_path"
54913    fi
54914  fi
54915
54916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54917  if test "x$test_cygdrive_prefix" = x; then
54918    # As a simple fix, exclude /usr/bin since it's not a real path.
54919    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54921      # a path prefixed by /cygdrive for fixpath to work.
54922      new_path="$CYGWIN_ROOT_PATH$input_path"
54923    fi
54924  fi
54925
54926
54927  if test "x$path" != "x$new_path"; then
54928    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54931  fi
54932
54933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54934
54935  path="$POTENTIAL_FREETYPE_LIB_PATH"
54936  has_colon=`$ECHO $path | $GREP ^.:`
54937  new_path="$path"
54938  if test "x$has_colon" = x; then
54939    # Not in mixed or Windows style, start by that.
54940    new_path=`cmd //c echo $path`
54941  fi
54942
54943
54944  input_path="$new_path"
54945  # Check if we need to convert this using DOS-style short mode. If the path
54946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54947  # take no chances and rewrite it.
54948  # Note: m4 eats our [], so we need to use [ and ] instead.
54949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54950  if test "x$has_forbidden_chars" != x; then
54951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54953  fi
54954
54955
54956  windows_path="$new_path"
54957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54958    unix_path=`$CYGPATH -u "$windows_path"`
54959    new_path="$unix_path"
54960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54962    new_path="$unix_path"
54963  fi
54964
54965  if test "x$path" != "x$new_path"; then
54966    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54968$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54969  fi
54970
54971  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54972  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54973
54974    else
54975      # We're on a unix platform. Hooray! :)
54976      path="$POTENTIAL_FREETYPE_LIB_PATH"
54977      has_space=`$ECHO "$path" | $GREP " "`
54978      if test "x$has_space" != x; then
54979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54980$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54981        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54982      fi
54983
54984      # Use eval to expand a potential ~
54985      eval path="$path"
54986      if test ! -f "$path" && test ! -d "$path"; then
54987        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54988      fi
54989
54990      if test -d "$path"; then
54991        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54992      else
54993        dir="`$DIRNAME "$path"`"
54994        base="`$BASENAME "$path"`"
54995        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54996      fi
54997    fi
54998  fi
54999
55000
55001    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55003$as_echo_n "checking for freetype includes... " >&6; }
55004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55005$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55006    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55008$as_echo_n "checking for freetype libraries... " >&6; }
55009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55010$as_echo "$FREETYPE_LIB_PATH" >&6; }
55011  fi
55012
55013
55014          if test "x$FOUND_FREETYPE" != xyes; then
55015            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55016
55017  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55018  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55019  METHOD="well-known location"
55020
55021  # Let's start with an optimistic view of the world :-)
55022  FOUND_FREETYPE=yes
55023
55024  # First look for the canonical freetype main include file ft2build.h.
55025  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55026    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55027    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55028    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55029      # Fail.
55030      FOUND_FREETYPE=no
55031    fi
55032  fi
55033
55034  if test "x$FOUND_FREETYPE" = xyes; then
55035    # Include file found, let's continue the sanity check.
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55037$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55038
55039    # Reset to default value
55040    FREETYPE_BASE_NAME=freetype
55041    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55042    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55043      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55044          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55045        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55046        # for the .6 version explicitly.
55047        FREETYPE_BASE_NAME=freetype.6
55048        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55049        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55050$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55051      else
55052        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55053$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55054        FOUND_FREETYPE=no
55055      fi
55056    else
55057      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55058        # On Windows, we will need both .lib and .dll file.
55059        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55060          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55061$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55062          FOUND_FREETYPE=no
55063        fi
55064      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55065          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55066        # Found lib in isa dir, use that instead.
55067        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55068        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55069$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55070      fi
55071    fi
55072  fi
55073
55074  if test "x$FOUND_FREETYPE" = xyes; then
55075
55076  # Only process if variable expands to non-empty
55077
55078  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55080
55081  # Input might be given as Windows format, start by converting to
55082  # unix format.
55083  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55084  new_path=`$CYGPATH -u "$path"`
55085
55086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55089  # "foo.exe" is OK but "foo" is an error.
55090  #
55091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55092  # It is also a way to make sure we got the proper file name for the real test later on.
55093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55094  if test "x$test_shortpath" = x; then
55095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55098  fi
55099
55100  # Call helper function which possibly converts this using DOS-style short mode.
55101  # If so, the updated path is stored in $new_path.
55102
55103  input_path="$new_path"
55104  # Check if we need to convert this using DOS-style short mode. If the path
55105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55106  # take no chances and rewrite it.
55107  # Note: m4 eats our [], so we need to use [ and ] instead.
55108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55109  if test "x$has_forbidden_chars" != x; then
55110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55114      # Going to short mode and back again did indeed matter. Since short mode is
55115      # case insensitive, let's make it lowercase to improve readability.
55116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55117      # Now convert it back to Unix-style (cygpath)
55118      input_path=`$CYGPATH -u "$shortmode_path"`
55119      new_path="$input_path"
55120    fi
55121  fi
55122
55123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55124  if test "x$test_cygdrive_prefix" = x; then
55125    # As a simple fix, exclude /usr/bin since it's not a real path.
55126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55128      # a path prefixed by /cygdrive for fixpath to work.
55129      new_path="$CYGWIN_ROOT_PATH$input_path"
55130    fi
55131  fi
55132
55133
55134  if test "x$path" != "x$new_path"; then
55135    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55138  fi
55139
55140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55141
55142  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55143  has_colon=`$ECHO $path | $GREP ^.:`
55144  new_path="$path"
55145  if test "x$has_colon" = x; then
55146    # Not in mixed or Windows style, start by that.
55147    new_path=`cmd //c echo $path`
55148  fi
55149
55150
55151  input_path="$new_path"
55152  # Check if we need to convert this using DOS-style short mode. If the path
55153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55154  # take no chances and rewrite it.
55155  # Note: m4 eats our [], so we need to use [ and ] instead.
55156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55157  if test "x$has_forbidden_chars" != x; then
55158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55160  fi
55161
55162
55163  windows_path="$new_path"
55164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55165    unix_path=`$CYGPATH -u "$windows_path"`
55166    new_path="$unix_path"
55167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55169    new_path="$unix_path"
55170  fi
55171
55172  if test "x$path" != "x$new_path"; then
55173    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55176  fi
55177
55178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55180
55181    else
55182      # We're on a unix platform. Hooray! :)
55183      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55184      has_space=`$ECHO "$path" | $GREP " "`
55185      if test "x$has_space" != x; then
55186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55189      fi
55190
55191      # Use eval to expand a potential ~
55192      eval path="$path"
55193      if test ! -f "$path" && test ! -d "$path"; then
55194        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55195      fi
55196
55197      if test -d "$path"; then
55198        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55199      else
55200        dir="`$DIRNAME "$path"`"
55201        base="`$BASENAME "$path"`"
55202        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55203      fi
55204    fi
55205  fi
55206
55207
55208  # Only process if variable expands to non-empty
55209
55210  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55212
55213  # Input might be given as Windows format, start by converting to
55214  # unix format.
55215  path="$POTENTIAL_FREETYPE_LIB_PATH"
55216  new_path=`$CYGPATH -u "$path"`
55217
55218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55221  # "foo.exe" is OK but "foo" is an error.
55222  #
55223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55224  # It is also a way to make sure we got the proper file name for the real test later on.
55225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55226  if test "x$test_shortpath" = x; then
55227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55229    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55230  fi
55231
55232  # Call helper function which possibly converts this using DOS-style short mode.
55233  # If so, the updated path is stored in $new_path.
55234
55235  input_path="$new_path"
55236  # Check if we need to convert this using DOS-style short mode. If the path
55237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55238  # take no chances and rewrite it.
55239  # Note: m4 eats our [], so we need to use [ and ] instead.
55240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55241  if test "x$has_forbidden_chars" != x; then
55242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55246      # Going to short mode and back again did indeed matter. Since short mode is
55247      # case insensitive, let's make it lowercase to improve readability.
55248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55249      # Now convert it back to Unix-style (cygpath)
55250      input_path=`$CYGPATH -u "$shortmode_path"`
55251      new_path="$input_path"
55252    fi
55253  fi
55254
55255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55256  if test "x$test_cygdrive_prefix" = x; then
55257    # As a simple fix, exclude /usr/bin since it's not a real path.
55258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55260      # a path prefixed by /cygdrive for fixpath to work.
55261      new_path="$CYGWIN_ROOT_PATH$input_path"
55262    fi
55263  fi
55264
55265
55266  if test "x$path" != "x$new_path"; then
55267    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55270  fi
55271
55272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55273
55274  path="$POTENTIAL_FREETYPE_LIB_PATH"
55275  has_colon=`$ECHO $path | $GREP ^.:`
55276  new_path="$path"
55277  if test "x$has_colon" = x; then
55278    # Not in mixed or Windows style, start by that.
55279    new_path=`cmd //c echo $path`
55280  fi
55281
55282
55283  input_path="$new_path"
55284  # Check if we need to convert this using DOS-style short mode. If the path
55285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55286  # take no chances and rewrite it.
55287  # Note: m4 eats our [], so we need to use [ and ] instead.
55288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55289  if test "x$has_forbidden_chars" != x; then
55290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55292  fi
55293
55294
55295  windows_path="$new_path"
55296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55297    unix_path=`$CYGPATH -u "$windows_path"`
55298    new_path="$unix_path"
55299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55301    new_path="$unix_path"
55302  fi
55303
55304  if test "x$path" != "x$new_path"; then
55305    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55308  fi
55309
55310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55312
55313    else
55314      # We're on a unix platform. Hooray! :)
55315      path="$POTENTIAL_FREETYPE_LIB_PATH"
55316      has_space=`$ECHO "$path" | $GREP " "`
55317      if test "x$has_space" != x; then
55318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55321      fi
55322
55323      # Use eval to expand a potential ~
55324      eval path="$path"
55325      if test ! -f "$path" && test ! -d "$path"; then
55326        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55327      fi
55328
55329      if test -d "$path"; then
55330        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55331      else
55332        dir="`$DIRNAME "$path"`"
55333        base="`$BASENAME "$path"`"
55334        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55335      fi
55336    fi
55337  fi
55338
55339
55340    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55342$as_echo_n "checking for freetype includes... " >&6; }
55343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55344$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55345    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55347$as_echo_n "checking for freetype libraries... " >&6; }
55348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55349$as_echo "$FREETYPE_LIB_PATH" >&6; }
55350  fi
55351
55352          fi
55353
55354          if test "x$FOUND_FREETYPE" != xyes; then
55355            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55356
55357  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55358  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55359  METHOD="well-known location"
55360
55361  # Let's start with an optimistic view of the world :-)
55362  FOUND_FREETYPE=yes
55363
55364  # First look for the canonical freetype main include file ft2build.h.
55365  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55366    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55367    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55368    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55369      # Fail.
55370      FOUND_FREETYPE=no
55371    fi
55372  fi
55373
55374  if test "x$FOUND_FREETYPE" = xyes; then
55375    # Include file found, let's continue the sanity check.
55376    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55377$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55378
55379    # Reset to default value
55380    FREETYPE_BASE_NAME=freetype
55381    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55382    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55383      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55384          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55385        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55386        # for the .6 version explicitly.
55387        FREETYPE_BASE_NAME=freetype.6
55388        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55389        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55390$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55391      else
55392        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55393$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55394        FOUND_FREETYPE=no
55395      fi
55396    else
55397      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55398        # On Windows, we will need both .lib and .dll file.
55399        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55400          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55401$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55402          FOUND_FREETYPE=no
55403        fi
55404      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55405          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55406        # Found lib in isa dir, use that instead.
55407        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55408        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55409$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55410      fi
55411    fi
55412  fi
55413
55414  if test "x$FOUND_FREETYPE" = xyes; then
55415
55416  # Only process if variable expands to non-empty
55417
55418  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55420
55421  # Input might be given as Windows format, start by converting to
55422  # unix format.
55423  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55424  new_path=`$CYGPATH -u "$path"`
55425
55426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55429  # "foo.exe" is OK but "foo" is an error.
55430  #
55431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55432  # It is also a way to make sure we got the proper file name for the real test later on.
55433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55434  if test "x$test_shortpath" = x; then
55435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55437    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55438  fi
55439
55440  # Call helper function which possibly converts this using DOS-style short mode.
55441  # If so, the updated path is stored in $new_path.
55442
55443  input_path="$new_path"
55444  # Check if we need to convert this using DOS-style short mode. If the path
55445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55446  # take no chances and rewrite it.
55447  # Note: m4 eats our [], so we need to use [ and ] instead.
55448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55449  if test "x$has_forbidden_chars" != x; then
55450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55454      # Going to short mode and back again did indeed matter. Since short mode is
55455      # case insensitive, let's make it lowercase to improve readability.
55456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55457      # Now convert it back to Unix-style (cygpath)
55458      input_path=`$CYGPATH -u "$shortmode_path"`
55459      new_path="$input_path"
55460    fi
55461  fi
55462
55463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55464  if test "x$test_cygdrive_prefix" = x; then
55465    # As a simple fix, exclude /usr/bin since it's not a real path.
55466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55468      # a path prefixed by /cygdrive for fixpath to work.
55469      new_path="$CYGWIN_ROOT_PATH$input_path"
55470    fi
55471  fi
55472
55473
55474  if test "x$path" != "x$new_path"; then
55475    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55478  fi
55479
55480    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55481
55482  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55483  has_colon=`$ECHO $path | $GREP ^.:`
55484  new_path="$path"
55485  if test "x$has_colon" = x; then
55486    # Not in mixed or Windows style, start by that.
55487    new_path=`cmd //c echo $path`
55488  fi
55489
55490
55491  input_path="$new_path"
55492  # Check if we need to convert this using DOS-style short mode. If the path
55493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55494  # take no chances and rewrite it.
55495  # Note: m4 eats our [], so we need to use [ and ] instead.
55496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55497  if test "x$has_forbidden_chars" != x; then
55498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55500  fi
55501
55502
55503  windows_path="$new_path"
55504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55505    unix_path=`$CYGPATH -u "$windows_path"`
55506    new_path="$unix_path"
55507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55509    new_path="$unix_path"
55510  fi
55511
55512  if test "x$path" != "x$new_path"; then
55513    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55515$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55516  fi
55517
55518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55520
55521    else
55522      # We're on a unix platform. Hooray! :)
55523      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55524      has_space=`$ECHO "$path" | $GREP " "`
55525      if test "x$has_space" != x; then
55526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55528        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55529      fi
55530
55531      # Use eval to expand a potential ~
55532      eval path="$path"
55533      if test ! -f "$path" && test ! -d "$path"; then
55534        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55535      fi
55536
55537      if test -d "$path"; then
55538        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55539      else
55540        dir="`$DIRNAME "$path"`"
55541        base="`$BASENAME "$path"`"
55542        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55543      fi
55544    fi
55545  fi
55546
55547
55548  # Only process if variable expands to non-empty
55549
55550  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55552
55553  # Input might be given as Windows format, start by converting to
55554  # unix format.
55555  path="$POTENTIAL_FREETYPE_LIB_PATH"
55556  new_path=`$CYGPATH -u "$path"`
55557
55558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55561  # "foo.exe" is OK but "foo" is an error.
55562  #
55563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55564  # It is also a way to make sure we got the proper file name for the real test later on.
55565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55566  if test "x$test_shortpath" = x; then
55567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55568$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55569    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55570  fi
55571
55572  # Call helper function which possibly converts this using DOS-style short mode.
55573  # If so, the updated path is stored in $new_path.
55574
55575  input_path="$new_path"
55576  # Check if we need to convert this using DOS-style short mode. If the path
55577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55578  # take no chances and rewrite it.
55579  # Note: m4 eats our [], so we need to use [ and ] instead.
55580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55581  if test "x$has_forbidden_chars" != x; then
55582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55586      # Going to short mode and back again did indeed matter. Since short mode is
55587      # case insensitive, let's make it lowercase to improve readability.
55588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55589      # Now convert it back to Unix-style (cygpath)
55590      input_path=`$CYGPATH -u "$shortmode_path"`
55591      new_path="$input_path"
55592    fi
55593  fi
55594
55595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55596  if test "x$test_cygdrive_prefix" = x; then
55597    # As a simple fix, exclude /usr/bin since it's not a real path.
55598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55600      # a path prefixed by /cygdrive for fixpath to work.
55601      new_path="$CYGWIN_ROOT_PATH$input_path"
55602    fi
55603  fi
55604
55605
55606  if test "x$path" != "x$new_path"; then
55607    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55609$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55610  fi
55611
55612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55613
55614  path="$POTENTIAL_FREETYPE_LIB_PATH"
55615  has_colon=`$ECHO $path | $GREP ^.:`
55616  new_path="$path"
55617  if test "x$has_colon" = x; then
55618    # Not in mixed or Windows style, start by that.
55619    new_path=`cmd //c echo $path`
55620  fi
55621
55622
55623  input_path="$new_path"
55624  # Check if we need to convert this using DOS-style short mode. If the path
55625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55626  # take no chances and rewrite it.
55627  # Note: m4 eats our [], so we need to use [ and ] instead.
55628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55629  if test "x$has_forbidden_chars" != x; then
55630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55632  fi
55633
55634
55635  windows_path="$new_path"
55636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55637    unix_path=`$CYGPATH -u "$windows_path"`
55638    new_path="$unix_path"
55639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55641    new_path="$unix_path"
55642  fi
55643
55644  if test "x$path" != "x$new_path"; then
55645    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55648  fi
55649
55650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55652
55653    else
55654      # We're on a unix platform. Hooray! :)
55655      path="$POTENTIAL_FREETYPE_LIB_PATH"
55656      has_space=`$ECHO "$path" | $GREP " "`
55657      if test "x$has_space" != x; then
55658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55661      fi
55662
55663      # Use eval to expand a potential ~
55664      eval path="$path"
55665      if test ! -f "$path" && test ! -d "$path"; then
55666        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55667      fi
55668
55669      if test -d "$path"; then
55670        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55671      else
55672        dir="`$DIRNAME "$path"`"
55673        base="`$BASENAME "$path"`"
55674        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55675      fi
55676    fi
55677  fi
55678
55679
55680    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55682$as_echo_n "checking for freetype includes... " >&6; }
55683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55684$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55685    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55687$as_echo_n "checking for freetype libraries... " >&6; }
55688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55689$as_echo "$FREETYPE_LIB_PATH" >&6; }
55690  fi
55691
55692          fi
55693
55694          if test "x$FOUND_FREETYPE" != xyes; then
55695            FREETYPE_BASE_DIR="$SYSROOT/usr"
55696            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55697
55698  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55699  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
55700  METHOD="well-known location"
55701
55702  # Let's start with an optimistic view of the world :-)
55703  FOUND_FREETYPE=yes
55704
55705  # First look for the canonical freetype main include file ft2build.h.
55706  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55707    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55708    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55709    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55710      # Fail.
55711      FOUND_FREETYPE=no
55712    fi
55713  fi
55714
55715  if test "x$FOUND_FREETYPE" = xyes; then
55716    # Include file found, let's continue the sanity check.
55717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55718$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55719
55720    # Reset to default value
55721    FREETYPE_BASE_NAME=freetype
55722    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55723    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55724      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55725          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55726        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55727        # for the .6 version explicitly.
55728        FREETYPE_BASE_NAME=freetype.6
55729        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55730        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55731$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55732      else
55733        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55734$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55735        FOUND_FREETYPE=no
55736      fi
55737    else
55738      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55739        # On Windows, we will need both .lib and .dll file.
55740        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55741          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55742$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55743          FOUND_FREETYPE=no
55744        fi
55745      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55747        # Found lib in isa dir, use that instead.
55748        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55749        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55750$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55751      fi
55752    fi
55753  fi
55754
55755  if test "x$FOUND_FREETYPE" = xyes; then
55756
55757  # Only process if variable expands to non-empty
55758
55759  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55761
55762  # Input might be given as Windows format, start by converting to
55763  # unix format.
55764  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55765  new_path=`$CYGPATH -u "$path"`
55766
55767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55770  # "foo.exe" is OK but "foo" is an error.
55771  #
55772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55773  # It is also a way to make sure we got the proper file name for the real test later on.
55774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55775  if test "x$test_shortpath" = x; then
55776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55778    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55779  fi
55780
55781  # Call helper function which possibly converts this using DOS-style short mode.
55782  # If so, the updated path is stored in $new_path.
55783
55784  input_path="$new_path"
55785  # Check if we need to convert this using DOS-style short mode. If the path
55786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55787  # take no chances and rewrite it.
55788  # Note: m4 eats our [], so we need to use [ and ] instead.
55789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55790  if test "x$has_forbidden_chars" != x; then
55791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55795      # Going to short mode and back again did indeed matter. Since short mode is
55796      # case insensitive, let's make it lowercase to improve readability.
55797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55798      # Now convert it back to Unix-style (cygpath)
55799      input_path=`$CYGPATH -u "$shortmode_path"`
55800      new_path="$input_path"
55801    fi
55802  fi
55803
55804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55805  if test "x$test_cygdrive_prefix" = x; then
55806    # As a simple fix, exclude /usr/bin since it's not a real path.
55807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55809      # a path prefixed by /cygdrive for fixpath to work.
55810      new_path="$CYGWIN_ROOT_PATH$input_path"
55811    fi
55812  fi
55813
55814
55815  if test "x$path" != "x$new_path"; then
55816    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55818$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55819  fi
55820
55821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55822
55823  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55824  has_colon=`$ECHO $path | $GREP ^.:`
55825  new_path="$path"
55826  if test "x$has_colon" = x; then
55827    # Not in mixed or Windows style, start by that.
55828    new_path=`cmd //c echo $path`
55829  fi
55830
55831
55832  input_path="$new_path"
55833  # Check if we need to convert this using DOS-style short mode. If the path
55834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55835  # take no chances and rewrite it.
55836  # Note: m4 eats our [], so we need to use [ and ] instead.
55837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55838  if test "x$has_forbidden_chars" != x; then
55839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55841  fi
55842
55843
55844  windows_path="$new_path"
55845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55846    unix_path=`$CYGPATH -u "$windows_path"`
55847    new_path="$unix_path"
55848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55850    new_path="$unix_path"
55851  fi
55852
55853  if test "x$path" != "x$new_path"; then
55854    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55856$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55857  fi
55858
55859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55861
55862    else
55863      # We're on a unix platform. Hooray! :)
55864      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55865      has_space=`$ECHO "$path" | $GREP " "`
55866      if test "x$has_space" != x; then
55867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55870      fi
55871
55872      # Use eval to expand a potential ~
55873      eval path="$path"
55874      if test ! -f "$path" && test ! -d "$path"; then
55875        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55876      fi
55877
55878      if test -d "$path"; then
55879        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55880      else
55881        dir="`$DIRNAME "$path"`"
55882        base="`$BASENAME "$path"`"
55883        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55884      fi
55885    fi
55886  fi
55887
55888
55889  # Only process if variable expands to non-empty
55890
55891  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55893
55894  # Input might be given as Windows format, start by converting to
55895  # unix format.
55896  path="$POTENTIAL_FREETYPE_LIB_PATH"
55897  new_path=`$CYGPATH -u "$path"`
55898
55899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55902  # "foo.exe" is OK but "foo" is an error.
55903  #
55904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55905  # It is also a way to make sure we got the proper file name for the real test later on.
55906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55907  if test "x$test_shortpath" = x; then
55908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55911  fi
55912
55913  # Call helper function which possibly converts this using DOS-style short mode.
55914  # If so, the updated path is stored in $new_path.
55915
55916  input_path="$new_path"
55917  # Check if we need to convert this using DOS-style short mode. If the path
55918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55919  # take no chances and rewrite it.
55920  # Note: m4 eats our [], so we need to use [ and ] instead.
55921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55922  if test "x$has_forbidden_chars" != x; then
55923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55927      # Going to short mode and back again did indeed matter. Since short mode is
55928      # case insensitive, let's make it lowercase to improve readability.
55929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55930      # Now convert it back to Unix-style (cygpath)
55931      input_path=`$CYGPATH -u "$shortmode_path"`
55932      new_path="$input_path"
55933    fi
55934  fi
55935
55936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55937  if test "x$test_cygdrive_prefix" = x; then
55938    # As a simple fix, exclude /usr/bin since it's not a real path.
55939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55941      # a path prefixed by /cygdrive for fixpath to work.
55942      new_path="$CYGWIN_ROOT_PATH$input_path"
55943    fi
55944  fi
55945
55946
55947  if test "x$path" != "x$new_path"; then
55948    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55951  fi
55952
55953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55954
55955  path="$POTENTIAL_FREETYPE_LIB_PATH"
55956  has_colon=`$ECHO $path | $GREP ^.:`
55957  new_path="$path"
55958  if test "x$has_colon" = x; then
55959    # Not in mixed or Windows style, start by that.
55960    new_path=`cmd //c echo $path`
55961  fi
55962
55963
55964  input_path="$new_path"
55965  # Check if we need to convert this using DOS-style short mode. If the path
55966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55967  # take no chances and rewrite it.
55968  # Note: m4 eats our [], so we need to use [ and ] instead.
55969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55970  if test "x$has_forbidden_chars" != x; then
55971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55973  fi
55974
55975
55976  windows_path="$new_path"
55977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55978    unix_path=`$CYGPATH -u "$windows_path"`
55979    new_path="$unix_path"
55980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55982    new_path="$unix_path"
55983  fi
55984
55985  if test "x$path" != "x$new_path"; then
55986    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55989  fi
55990
55991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55993
55994    else
55995      # We're on a unix platform. Hooray! :)
55996      path="$POTENTIAL_FREETYPE_LIB_PATH"
55997      has_space=`$ECHO "$path" | $GREP " "`
55998      if test "x$has_space" != x; then
55999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56002      fi
56003
56004      # Use eval to expand a potential ~
56005      eval path="$path"
56006      if test ! -f "$path" && test ! -d "$path"; then
56007        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56008      fi
56009
56010      if test -d "$path"; then
56011        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56012      else
56013        dir="`$DIRNAME "$path"`"
56014        base="`$BASENAME "$path"`"
56015        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56016      fi
56017    fi
56018  fi
56019
56020
56021    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56023$as_echo_n "checking for freetype includes... " >&6; }
56024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56025$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56026    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56028$as_echo_n "checking for freetype libraries... " >&6; }
56029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56030$as_echo "$FREETYPE_LIB_PATH" >&6; }
56031  fi
56032
56033            else
56034
56035  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56036  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56037  METHOD="well-known location"
56038
56039  # Let's start with an optimistic view of the world :-)
56040  FOUND_FREETYPE=yes
56041
56042  # First look for the canonical freetype main include file ft2build.h.
56043  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56044    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56045    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56046    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56047      # Fail.
56048      FOUND_FREETYPE=no
56049    fi
56050  fi
56051
56052  if test "x$FOUND_FREETYPE" = xyes; then
56053    # Include file found, let's continue the sanity check.
56054    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56055$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56056
56057    # Reset to default value
56058    FREETYPE_BASE_NAME=freetype
56059    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56060    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56061      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56063        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56064        # for the .6 version explicitly.
56065        FREETYPE_BASE_NAME=freetype.6
56066        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56067        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56068$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56069      else
56070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56071$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56072        FOUND_FREETYPE=no
56073      fi
56074    else
56075      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56076        # On Windows, we will need both .lib and .dll file.
56077        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56078          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56080          FOUND_FREETYPE=no
56081        fi
56082      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56084        # Found lib in isa dir, use that instead.
56085        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56086        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56087$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56088      fi
56089    fi
56090  fi
56091
56092  if test "x$FOUND_FREETYPE" = xyes; then
56093
56094  # Only process if variable expands to non-empty
56095
56096  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56098
56099  # Input might be given as Windows format, start by converting to
56100  # unix format.
56101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56102  new_path=`$CYGPATH -u "$path"`
56103
56104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56107  # "foo.exe" is OK but "foo" is an error.
56108  #
56109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56110  # It is also a way to make sure we got the proper file name for the real test later on.
56111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56112  if test "x$test_shortpath" = x; then
56113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56116  fi
56117
56118  # Call helper function which possibly converts this using DOS-style short mode.
56119  # If so, the updated path is stored in $new_path.
56120
56121  input_path="$new_path"
56122  # Check if we need to convert this using DOS-style short mode. If the path
56123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56124  # take no chances and rewrite it.
56125  # Note: m4 eats our [], so we need to use [ and ] instead.
56126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56127  if test "x$has_forbidden_chars" != x; then
56128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56132      # Going to short mode and back again did indeed matter. Since short mode is
56133      # case insensitive, let's make it lowercase to improve readability.
56134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56135      # Now convert it back to Unix-style (cygpath)
56136      input_path=`$CYGPATH -u "$shortmode_path"`
56137      new_path="$input_path"
56138    fi
56139  fi
56140
56141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56142  if test "x$test_cygdrive_prefix" = x; then
56143    # As a simple fix, exclude /usr/bin since it's not a real path.
56144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56146      # a path prefixed by /cygdrive for fixpath to work.
56147      new_path="$CYGWIN_ROOT_PATH$input_path"
56148    fi
56149  fi
56150
56151
56152  if test "x$path" != "x$new_path"; then
56153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56156  fi
56157
56158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56159
56160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56161  has_colon=`$ECHO $path | $GREP ^.:`
56162  new_path="$path"
56163  if test "x$has_colon" = x; then
56164    # Not in mixed or Windows style, start by that.
56165    new_path=`cmd //c echo $path`
56166  fi
56167
56168
56169  input_path="$new_path"
56170  # Check if we need to convert this using DOS-style short mode. If the path
56171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56172  # take no chances and rewrite it.
56173  # Note: m4 eats our [], so we need to use [ and ] instead.
56174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56175  if test "x$has_forbidden_chars" != x; then
56176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56178  fi
56179
56180
56181  windows_path="$new_path"
56182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56183    unix_path=`$CYGPATH -u "$windows_path"`
56184    new_path="$unix_path"
56185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56187    new_path="$unix_path"
56188  fi
56189
56190  if test "x$path" != "x$new_path"; then
56191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56194  fi
56195
56196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56198
56199    else
56200      # We're on a unix platform. Hooray! :)
56201      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56202      has_space=`$ECHO "$path" | $GREP " "`
56203      if test "x$has_space" != x; then
56204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56207      fi
56208
56209      # Use eval to expand a potential ~
56210      eval path="$path"
56211      if test ! -f "$path" && test ! -d "$path"; then
56212        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56213      fi
56214
56215      if test -d "$path"; then
56216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56217      else
56218        dir="`$DIRNAME "$path"`"
56219        base="`$BASENAME "$path"`"
56220        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56221      fi
56222    fi
56223  fi
56224
56225
56226  # Only process if variable expands to non-empty
56227
56228  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56230
56231  # Input might be given as Windows format, start by converting to
56232  # unix format.
56233  path="$POTENTIAL_FREETYPE_LIB_PATH"
56234  new_path=`$CYGPATH -u "$path"`
56235
56236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56239  # "foo.exe" is OK but "foo" is an error.
56240  #
56241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56242  # It is also a way to make sure we got the proper file name for the real test later on.
56243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56244  if test "x$test_shortpath" = x; then
56245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56247    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56248  fi
56249
56250  # Call helper function which possibly converts this using DOS-style short mode.
56251  # If so, the updated path is stored in $new_path.
56252
56253  input_path="$new_path"
56254  # Check if we need to convert this using DOS-style short mode. If the path
56255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56256  # take no chances and rewrite it.
56257  # Note: m4 eats our [], so we need to use [ and ] instead.
56258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56259  if test "x$has_forbidden_chars" != x; then
56260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56264      # Going to short mode and back again did indeed matter. Since short mode is
56265      # case insensitive, let's make it lowercase to improve readability.
56266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56267      # Now convert it back to Unix-style (cygpath)
56268      input_path=`$CYGPATH -u "$shortmode_path"`
56269      new_path="$input_path"
56270    fi
56271  fi
56272
56273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56274  if test "x$test_cygdrive_prefix" = x; then
56275    # As a simple fix, exclude /usr/bin since it's not a real path.
56276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56278      # a path prefixed by /cygdrive for fixpath to work.
56279      new_path="$CYGWIN_ROOT_PATH$input_path"
56280    fi
56281  fi
56282
56283
56284  if test "x$path" != "x$new_path"; then
56285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56288  fi
56289
56290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56291
56292  path="$POTENTIAL_FREETYPE_LIB_PATH"
56293  has_colon=`$ECHO $path | $GREP ^.:`
56294  new_path="$path"
56295  if test "x$has_colon" = x; then
56296    # Not in mixed or Windows style, start by that.
56297    new_path=`cmd //c echo $path`
56298  fi
56299
56300
56301  input_path="$new_path"
56302  # Check if we need to convert this using DOS-style short mode. If the path
56303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56304  # take no chances and rewrite it.
56305  # Note: m4 eats our [], so we need to use [ and ] instead.
56306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56307  if test "x$has_forbidden_chars" != x; then
56308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56310  fi
56311
56312
56313  windows_path="$new_path"
56314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56315    unix_path=`$CYGPATH -u "$windows_path"`
56316    new_path="$unix_path"
56317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56319    new_path="$unix_path"
56320  fi
56321
56322  if test "x$path" != "x$new_path"; then
56323    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56326  fi
56327
56328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56330
56331    else
56332      # We're on a unix platform. Hooray! :)
56333      path="$POTENTIAL_FREETYPE_LIB_PATH"
56334      has_space=`$ECHO "$path" | $GREP " "`
56335      if test "x$has_space" != x; then
56336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56339      fi
56340
56341      # Use eval to expand a potential ~
56342      eval path="$path"
56343      if test ! -f "$path" && test ! -d "$path"; then
56344        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56345      fi
56346
56347      if test -d "$path"; then
56348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56349      else
56350        dir="`$DIRNAME "$path"`"
56351        base="`$BASENAME "$path"`"
56352        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56353      fi
56354    fi
56355  fi
56356
56357
56358    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56360$as_echo_n "checking for freetype includes... " >&6; }
56361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56362$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56363    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56365$as_echo_n "checking for freetype libraries... " >&6; }
56366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56367$as_echo "$FREETYPE_LIB_PATH" >&6; }
56368  fi
56369
56370              if test "x$FOUND_FREETYPE" != xyes; then
56371
56372  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56373  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56374  METHOD="well-known location"
56375
56376  # Let's start with an optimistic view of the world :-)
56377  FOUND_FREETYPE=yes
56378
56379  # First look for the canonical freetype main include file ft2build.h.
56380  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56381    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56382    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56383    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56384      # Fail.
56385      FOUND_FREETYPE=no
56386    fi
56387  fi
56388
56389  if test "x$FOUND_FREETYPE" = xyes; then
56390    # Include file found, let's continue the sanity check.
56391    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56392$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56393
56394    # Reset to default value
56395    FREETYPE_BASE_NAME=freetype
56396    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56397    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56398      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56399          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56400        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56401        # for the .6 version explicitly.
56402        FREETYPE_BASE_NAME=freetype.6
56403        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56404        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56405$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56406      else
56407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56408$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56409        FOUND_FREETYPE=no
56410      fi
56411    else
56412      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56413        # On Windows, we will need both .lib and .dll file.
56414        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56415          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56417          FOUND_FREETYPE=no
56418        fi
56419      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56420          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56421        # Found lib in isa dir, use that instead.
56422        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56423        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56424$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56425      fi
56426    fi
56427  fi
56428
56429  if test "x$FOUND_FREETYPE" = xyes; then
56430
56431  # Only process if variable expands to non-empty
56432
56433  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56435
56436  # Input might be given as Windows format, start by converting to
56437  # unix format.
56438  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56439  new_path=`$CYGPATH -u "$path"`
56440
56441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56444  # "foo.exe" is OK but "foo" is an error.
56445  #
56446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56447  # It is also a way to make sure we got the proper file name for the real test later on.
56448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56449  if test "x$test_shortpath" = x; then
56450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56453  fi
56454
56455  # Call helper function which possibly converts this using DOS-style short mode.
56456  # If so, the updated path is stored in $new_path.
56457
56458  input_path="$new_path"
56459  # Check if we need to convert this using DOS-style short mode. If the path
56460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56461  # take no chances and rewrite it.
56462  # Note: m4 eats our [], so we need to use [ and ] instead.
56463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56464  if test "x$has_forbidden_chars" != x; then
56465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56469      # Going to short mode and back again did indeed matter. Since short mode is
56470      # case insensitive, let's make it lowercase to improve readability.
56471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56472      # Now convert it back to Unix-style (cygpath)
56473      input_path=`$CYGPATH -u "$shortmode_path"`
56474      new_path="$input_path"
56475    fi
56476  fi
56477
56478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56479  if test "x$test_cygdrive_prefix" = x; then
56480    # As a simple fix, exclude /usr/bin since it's not a real path.
56481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56483      # a path prefixed by /cygdrive for fixpath to work.
56484      new_path="$CYGWIN_ROOT_PATH$input_path"
56485    fi
56486  fi
56487
56488
56489  if test "x$path" != "x$new_path"; then
56490    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56493  fi
56494
56495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56496
56497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56498  has_colon=`$ECHO $path | $GREP ^.:`
56499  new_path="$path"
56500  if test "x$has_colon" = x; then
56501    # Not in mixed or Windows style, start by that.
56502    new_path=`cmd //c echo $path`
56503  fi
56504
56505
56506  input_path="$new_path"
56507  # Check if we need to convert this using DOS-style short mode. If the path
56508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56509  # take no chances and rewrite it.
56510  # Note: m4 eats our [], so we need to use [ and ] instead.
56511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56512  if test "x$has_forbidden_chars" != x; then
56513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56515  fi
56516
56517
56518  windows_path="$new_path"
56519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56520    unix_path=`$CYGPATH -u "$windows_path"`
56521    new_path="$unix_path"
56522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56524    new_path="$unix_path"
56525  fi
56526
56527  if test "x$path" != "x$new_path"; then
56528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56531  fi
56532
56533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56535
56536    else
56537      # We're on a unix platform. Hooray! :)
56538      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56539      has_space=`$ECHO "$path" | $GREP " "`
56540      if test "x$has_space" != x; then
56541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56544      fi
56545
56546      # Use eval to expand a potential ~
56547      eval path="$path"
56548      if test ! -f "$path" && test ! -d "$path"; then
56549        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56550      fi
56551
56552      if test -d "$path"; then
56553        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56554      else
56555        dir="`$DIRNAME "$path"`"
56556        base="`$BASENAME "$path"`"
56557        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56558      fi
56559    fi
56560  fi
56561
56562
56563  # Only process if variable expands to non-empty
56564
56565  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56567
56568  # Input might be given as Windows format, start by converting to
56569  # unix format.
56570  path="$POTENTIAL_FREETYPE_LIB_PATH"
56571  new_path=`$CYGPATH -u "$path"`
56572
56573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56576  # "foo.exe" is OK but "foo" is an error.
56577  #
56578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56579  # It is also a way to make sure we got the proper file name for the real test later on.
56580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56581  if test "x$test_shortpath" = x; then
56582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56584    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56585  fi
56586
56587  # Call helper function which possibly converts this using DOS-style short mode.
56588  # If so, the updated path is stored in $new_path.
56589
56590  input_path="$new_path"
56591  # Check if we need to convert this using DOS-style short mode. If the path
56592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56593  # take no chances and rewrite it.
56594  # Note: m4 eats our [], so we need to use [ and ] instead.
56595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56596  if test "x$has_forbidden_chars" != x; then
56597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56601      # Going to short mode and back again did indeed matter. Since short mode is
56602      # case insensitive, let's make it lowercase to improve readability.
56603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56604      # Now convert it back to Unix-style (cygpath)
56605      input_path=`$CYGPATH -u "$shortmode_path"`
56606      new_path="$input_path"
56607    fi
56608  fi
56609
56610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56611  if test "x$test_cygdrive_prefix" = x; then
56612    # As a simple fix, exclude /usr/bin since it's not a real path.
56613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56615      # a path prefixed by /cygdrive for fixpath to work.
56616      new_path="$CYGWIN_ROOT_PATH$input_path"
56617    fi
56618  fi
56619
56620
56621  if test "x$path" != "x$new_path"; then
56622    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56625  fi
56626
56627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56628
56629  path="$POTENTIAL_FREETYPE_LIB_PATH"
56630  has_colon=`$ECHO $path | $GREP ^.:`
56631  new_path="$path"
56632  if test "x$has_colon" = x; then
56633    # Not in mixed or Windows style, start by that.
56634    new_path=`cmd //c echo $path`
56635  fi
56636
56637
56638  input_path="$new_path"
56639  # Check if we need to convert this using DOS-style short mode. If the path
56640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56641  # take no chances and rewrite it.
56642  # Note: m4 eats our [], so we need to use [ and ] instead.
56643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56644  if test "x$has_forbidden_chars" != x; then
56645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56647  fi
56648
56649
56650  windows_path="$new_path"
56651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56652    unix_path=`$CYGPATH -u "$windows_path"`
56653    new_path="$unix_path"
56654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56656    new_path="$unix_path"
56657  fi
56658
56659  if test "x$path" != "x$new_path"; then
56660    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56663  fi
56664
56665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56667
56668    else
56669      # We're on a unix platform. Hooray! :)
56670      path="$POTENTIAL_FREETYPE_LIB_PATH"
56671      has_space=`$ECHO "$path" | $GREP " "`
56672      if test "x$has_space" != x; then
56673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56676      fi
56677
56678      # Use eval to expand a potential ~
56679      eval path="$path"
56680      if test ! -f "$path" && test ! -d "$path"; then
56681        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56682      fi
56683
56684      if test -d "$path"; then
56685        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56686      else
56687        dir="`$DIRNAME "$path"`"
56688        base="`$BASENAME "$path"`"
56689        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56690      fi
56691    fi
56692  fi
56693
56694
56695    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56697$as_echo_n "checking for freetype includes... " >&6; }
56698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56699$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56700    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56702$as_echo_n "checking for freetype libraries... " >&6; }
56703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56704$as_echo "$FREETYPE_LIB_PATH" >&6; }
56705  fi
56706
56707              fi
56708            fi
56709          fi
56710        fi
56711      fi # end check in well-known locations
56712
56713      if test "x$FOUND_FREETYPE" != xyes; then
56714
56715  # Print a helpful message on how to acquire the necessary build dependency.
56716  # freetype is the help tag: freetype, cups, alsa etc
56717  MISSING_DEPENDENCY=freetype
56718
56719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56720    cygwin_help $MISSING_DEPENDENCY
56721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56722    msys_help $MISSING_DEPENDENCY
56723  else
56724    PKGHANDLER_COMMAND=
56725
56726    case $PKGHANDLER in
56727      apt-get)
56728        apt_help     $MISSING_DEPENDENCY ;;
56729      yum)
56730        yum_help     $MISSING_DEPENDENCY ;;
56731      port)
56732        port_help    $MISSING_DEPENDENCY ;;
56733      pkgutil)
56734        pkgutil_help $MISSING_DEPENDENCY ;;
56735      pkgadd)
56736        pkgadd_help  $MISSING_DEPENDENCY ;;
56737    esac
56738
56739    if test "x$PKGHANDLER_COMMAND" != x; then
56740      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56741    fi
56742  fi
56743
56744        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
56745      fi
56746    fi # end user specified settings
56747
56748    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
56749    if test "x$FREETYPE_CFLAGS" = x; then
56750
56751  # Only process if variable expands to non-empty
56752
56753  if test "x$FREETYPE_INCLUDE_PATH" != x; then
56754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56755
56756  # Input might be given as Windows format, start by converting to
56757  # unix format.
56758  path="$FREETYPE_INCLUDE_PATH"
56759  new_path=`$CYGPATH -u "$path"`
56760
56761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56764  # "foo.exe" is OK but "foo" is an error.
56765  #
56766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56767  # It is also a way to make sure we got the proper file name for the real test later on.
56768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56769  if test "x$test_shortpath" = x; then
56770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56771$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56772    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
56773  fi
56774
56775  # Call helper function which possibly converts this using DOS-style short mode.
56776  # If so, the updated path is stored in $new_path.
56777
56778  input_path="$new_path"
56779  # Check if we need to convert this using DOS-style short mode. If the path
56780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56781  # take no chances and rewrite it.
56782  # Note: m4 eats our [], so we need to use [ and ] instead.
56783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56784  if test "x$has_forbidden_chars" != x; then
56785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56789      # Going to short mode and back again did indeed matter. Since short mode is
56790      # case insensitive, let's make it lowercase to improve readability.
56791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56792      # Now convert it back to Unix-style (cygpath)
56793      input_path=`$CYGPATH -u "$shortmode_path"`
56794      new_path="$input_path"
56795    fi
56796  fi
56797
56798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56799  if test "x$test_cygdrive_prefix" = x; then
56800    # As a simple fix, exclude /usr/bin since it's not a real path.
56801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56803      # a path prefixed by /cygdrive for fixpath to work.
56804      new_path="$CYGWIN_ROOT_PATH$input_path"
56805    fi
56806  fi
56807
56808
56809  if test "x$path" != "x$new_path"; then
56810    FREETYPE_INCLUDE_PATH="$new_path"
56811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56812$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56813  fi
56814
56815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56816
56817  path="$FREETYPE_INCLUDE_PATH"
56818  has_colon=`$ECHO $path | $GREP ^.:`
56819  new_path="$path"
56820  if test "x$has_colon" = x; then
56821    # Not in mixed or Windows style, start by that.
56822    new_path=`cmd //c echo $path`
56823  fi
56824
56825
56826  input_path="$new_path"
56827  # Check if we need to convert this using DOS-style short mode. If the path
56828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56829  # take no chances and rewrite it.
56830  # Note: m4 eats our [], so we need to use [ and ] instead.
56831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56832  if test "x$has_forbidden_chars" != x; then
56833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56835  fi
56836
56837
56838  windows_path="$new_path"
56839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56840    unix_path=`$CYGPATH -u "$windows_path"`
56841    new_path="$unix_path"
56842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56844    new_path="$unix_path"
56845  fi
56846
56847  if test "x$path" != "x$new_path"; then
56848    FREETYPE_INCLUDE_PATH="$new_path"
56849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56850$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56851  fi
56852
56853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56855
56856    else
56857      # We're on a unix platform. Hooray! :)
56858      path="$FREETYPE_INCLUDE_PATH"
56859      has_space=`$ECHO "$path" | $GREP " "`
56860      if test "x$has_space" != x; then
56861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56862$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56863        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56864      fi
56865
56866      # Use eval to expand a potential ~
56867      eval path="$path"
56868      if test ! -f "$path" && test ! -d "$path"; then
56869        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56870      fi
56871
56872      if test -d "$path"; then
56873        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56874      else
56875        dir="`$DIRNAME "$path"`"
56876        base="`$BASENAME "$path"`"
56877        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56878      fi
56879    fi
56880  fi
56881
56882      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
56883        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
56884      else
56885        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
56886      fi
56887    fi
56888
56889    if test "x$FREETYPE_LIBS" = x; then
56890
56891  # Only process if variable expands to non-empty
56892
56893  if test "x$FREETYPE_LIB_PATH" != x; then
56894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56895
56896  # Input might be given as Windows format, start by converting to
56897  # unix format.
56898  path="$FREETYPE_LIB_PATH"
56899  new_path=`$CYGPATH -u "$path"`
56900
56901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56904  # "foo.exe" is OK but "foo" is an error.
56905  #
56906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56907  # It is also a way to make sure we got the proper file name for the real test later on.
56908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56909  if test "x$test_shortpath" = x; then
56910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56911$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56912    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
56913  fi
56914
56915  # Call helper function which possibly converts this using DOS-style short mode.
56916  # If so, the updated path is stored in $new_path.
56917
56918  input_path="$new_path"
56919  # Check if we need to convert this using DOS-style short mode. If the path
56920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56921  # take no chances and rewrite it.
56922  # Note: m4 eats our [], so we need to use [ and ] instead.
56923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56924  if test "x$has_forbidden_chars" != x; then
56925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56929      # Going to short mode and back again did indeed matter. Since short mode is
56930      # case insensitive, let's make it lowercase to improve readability.
56931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56932      # Now convert it back to Unix-style (cygpath)
56933      input_path=`$CYGPATH -u "$shortmode_path"`
56934      new_path="$input_path"
56935    fi
56936  fi
56937
56938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56939  if test "x$test_cygdrive_prefix" = x; then
56940    # As a simple fix, exclude /usr/bin since it's not a real path.
56941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56943      # a path prefixed by /cygdrive for fixpath to work.
56944      new_path="$CYGWIN_ROOT_PATH$input_path"
56945    fi
56946  fi
56947
56948
56949  if test "x$path" != "x$new_path"; then
56950    FREETYPE_LIB_PATH="$new_path"
56951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
56952$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56953  fi
56954
56955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56956
56957  path="$FREETYPE_LIB_PATH"
56958  has_colon=`$ECHO $path | $GREP ^.:`
56959  new_path="$path"
56960  if test "x$has_colon" = x; then
56961    # Not in mixed or Windows style, start by that.
56962    new_path=`cmd //c echo $path`
56963  fi
56964
56965
56966  input_path="$new_path"
56967  # Check if we need to convert this using DOS-style short mode. If the path
56968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56969  # take no chances and rewrite it.
56970  # Note: m4 eats our [], so we need to use [ and ] instead.
56971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56972  if test "x$has_forbidden_chars" != x; then
56973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56975  fi
56976
56977
56978  windows_path="$new_path"
56979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56980    unix_path=`$CYGPATH -u "$windows_path"`
56981    new_path="$unix_path"
56982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56984    new_path="$unix_path"
56985  fi
56986
56987  if test "x$path" != "x$new_path"; then
56988    FREETYPE_LIB_PATH="$new_path"
56989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
56990$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56991  fi
56992
56993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56995
56996    else
56997      # We're on a unix platform. Hooray! :)
56998      path="$FREETYPE_LIB_PATH"
56999      has_space=`$ECHO "$path" | $GREP " "`
57000      if test "x$has_space" != x; then
57001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57002$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57004      fi
57005
57006      # Use eval to expand a potential ~
57007      eval path="$path"
57008      if test ! -f "$path" && test ! -d "$path"; then
57009        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57010      fi
57011
57012      if test -d "$path"; then
57013        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57014      else
57015        dir="`$DIRNAME "$path"`"
57016        base="`$BASENAME "$path"`"
57017        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57018      fi
57019    fi
57020  fi
57021
57022      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57023        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57024      else
57025        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57026      fi
57027    fi
57028
57029    # Try to compile it
57030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57031$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57032    ac_ext=cpp
57033ac_cpp='$CXXCPP $CPPFLAGS'
57034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57037
57038    PREV_CXXCFLAGS="$CXXFLAGS"
57039    PREV_LIBS="$LIBS"
57040    PREV_CXX="$CXX"
57041    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57042    LIBS="$LIBS $FREETYPE_LIBS"
57043    CXX="$FIXPATH $CXX"
57044    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57045/* end confdefs.h.  */
57046
57047          #include<ft2build.h>
57048          #include FT_FREETYPE_H
57049          int main () {
57050            FT_Init_FreeType(NULL);
57051            return 0;
57052          }
57053
57054_ACEOF
57055if ac_fn_cxx_try_link "$LINENO"; then :
57056
57057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57058$as_echo "yes" >&6; }
57059
57060else
57061
57062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57063$as_echo "no" >&6; }
57064          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57065$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57066          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57067$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57068
57069
57070  # Print a helpful message on how to acquire the necessary build dependency.
57071  # freetype is the help tag: freetype, cups, alsa etc
57072  MISSING_DEPENDENCY=freetype
57073
57074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57075    cygwin_help $MISSING_DEPENDENCY
57076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57077    msys_help $MISSING_DEPENDENCY
57078  else
57079    PKGHANDLER_COMMAND=
57080
57081    case $PKGHANDLER in
57082      apt-get)
57083        apt_help     $MISSING_DEPENDENCY ;;
57084      yum)
57085        yum_help     $MISSING_DEPENDENCY ;;
57086      port)
57087        port_help    $MISSING_DEPENDENCY ;;
57088      pkgutil)
57089        pkgutil_help $MISSING_DEPENDENCY ;;
57090      pkgadd)
57091        pkgadd_help  $MISSING_DEPENDENCY ;;
57092    esac
57093
57094    if test "x$PKGHANDLER_COMMAND" != x; then
57095      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57096    fi
57097  fi
57098
57099
57100          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57101
57102
57103fi
57104rm -f core conftest.err conftest.$ac_objext \
57105    conftest$ac_exeext conftest.$ac_ext
57106    CXXCFLAGS="$PREV_CXXFLAGS"
57107    LIBS="$PREV_LIBS"
57108    CXX="$PREV_CXX"
57109    ac_ext=cpp
57110ac_cpp='$CXXCPP $CPPFLAGS'
57111ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57112ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57113ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57114
57115
57116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57117$as_echo_n "checking if we should bundle freetype... " >&6; }
57118    if test "x$BUNDLE_FREETYPE" = xyes; then
57119      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57120    fi
57121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57122$as_echo "$BUNDLE_FREETYPE" >&6; }
57123
57124  fi # end freetype needed
57125
57126
57127
57128
57129
57130
57131
57132# Check whether --with-alsa was given.
57133if test "${with_alsa+set}" = set; then :
57134  withval=$with_alsa;
57135fi
57136
57137
57138# Check whether --with-alsa-include was given.
57139if test "${with_alsa_include+set}" = set; then :
57140  withval=$with_alsa_include;
57141fi
57142
57143
57144# Check whether --with-alsa-lib was given.
57145if test "${with_alsa_lib+set}" = set; then :
57146  withval=$with_alsa_lib;
57147fi
57148
57149
57150  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57151    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57152        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57153        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57154      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57155$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57156    fi
57157    ALSA_CFLAGS=
57158    ALSA_LIBS=
57159  else
57160    ALSA_FOUND=no
57161
57162    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57163      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57164    fi
57165
57166    if test "x${with_alsa}" != x; then
57167      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57168      ALSA_CFLAGS="-I${with_alsa}/include"
57169      ALSA_FOUND=yes
57170    fi
57171    if test "x${with_alsa_include}" != x; then
57172      ALSA_CFLAGS="-I${with_alsa_include}"
57173      ALSA_FOUND=yes
57174    fi
57175    if test "x${with_alsa_lib}" != x; then
57176      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57177      ALSA_FOUND=yes
57178    fi
57179    # Do not try pkg-config if we have a sysroot set.
57180    if test "x$SYSROOT" = x; then
57181      if test "x$ALSA_FOUND" = xno; then
57182
57183pkg_failed=no
57184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57185$as_echo_n "checking for ALSA... " >&6; }
57186
57187if test -n "$ALSA_CFLAGS"; then
57188    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57189 elif test -n "$PKG_CONFIG"; then
57190    if test -n "$PKG_CONFIG" && \
57191    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57192  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57193  ac_status=$?
57194  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57195  test $ac_status = 0; }; then
57196  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57197else
57198  pkg_failed=yes
57199fi
57200 else
57201    pkg_failed=untried
57202fi
57203if test -n "$ALSA_LIBS"; then
57204    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57205 elif test -n "$PKG_CONFIG"; then
57206    if test -n "$PKG_CONFIG" && \
57207    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57208  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57209  ac_status=$?
57210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57211  test $ac_status = 0; }; then
57212  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57213else
57214  pkg_failed=yes
57215fi
57216 else
57217    pkg_failed=untried
57218fi
57219
57220
57221
57222if test $pkg_failed = yes; then
57223
57224if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57225        _pkg_short_errors_supported=yes
57226else
57227        _pkg_short_errors_supported=no
57228fi
57229        if test $_pkg_short_errors_supported = yes; then
57230	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57231        else
57232	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57233        fi
57234	# Put the nasty error message in config.log where it belongs
57235	echo "$ALSA_PKG_ERRORS" >&5
57236
57237	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57238$as_echo "no" >&6; }
57239                ALSA_FOUND=no
57240elif test $pkg_failed = untried; then
57241	ALSA_FOUND=no
57242else
57243	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57244	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57246$as_echo "yes" >&6; }
57247	ALSA_FOUND=yes
57248fi
57249      fi
57250    fi
57251    if test "x$ALSA_FOUND" = xno; then
57252      for ac_header in alsa/asoundlib.h
57253do :
57254  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57255if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57256  cat >>confdefs.h <<_ACEOF
57257#define HAVE_ALSA_ASOUNDLIB_H 1
57258_ACEOF
57259
57260            ALSA_FOUND=yes
57261            ALSA_CFLAGS=-Iignoreme
57262            ALSA_LIBS=-lasound
57263            DEFAULT_ALSA=yes
57264
57265else
57266  ALSA_FOUND=no
57267
57268fi
57269
57270done
57271
57272    fi
57273    if test "x$ALSA_FOUND" = xno; then
57274
57275  # Print a helpful message on how to acquire the necessary build dependency.
57276  # alsa is the help tag: freetype, cups, alsa etc
57277  MISSING_DEPENDENCY=alsa
57278
57279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57280    cygwin_help $MISSING_DEPENDENCY
57281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57282    msys_help $MISSING_DEPENDENCY
57283  else
57284    PKGHANDLER_COMMAND=
57285
57286    case $PKGHANDLER in
57287      apt-get)
57288        apt_help     $MISSING_DEPENDENCY ;;
57289      yum)
57290        yum_help     $MISSING_DEPENDENCY ;;
57291      port)
57292        port_help    $MISSING_DEPENDENCY ;;
57293      pkgutil)
57294        pkgutil_help $MISSING_DEPENDENCY ;;
57295      pkgadd)
57296        pkgadd_help  $MISSING_DEPENDENCY ;;
57297    esac
57298
57299    if test "x$PKGHANDLER_COMMAND" != x; then
57300      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57301    fi
57302  fi
57303
57304      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57305    fi
57306  fi
57307
57308
57309
57310
57311
57312
57313# Check whether --with-libffi was given.
57314if test "${with_libffi+set}" = set; then :
57315  withval=$with_libffi;
57316fi
57317
57318
57319# Check whether --with-libffi-include was given.
57320if test "${with_libffi_include+set}" = set; then :
57321  withval=$with_libffi_include;
57322fi
57323
57324
57325# Check whether --with-libffi-lib was given.
57326if test "${with_libffi_lib+set}" = set; then :
57327  withval=$with_libffi_lib;
57328fi
57329
57330
57331  if test "x$NEEDS_LIB_FFI" = xfalse; then
57332    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57333        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57334        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57335      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57336$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57337    fi
57338    LIBFFI_CFLAGS=
57339    LIBFFI_LIBS=
57340  else
57341    LIBFFI_FOUND=no
57342
57343    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57344      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57345    fi
57346
57347    if test "x${with_libffi}" != x; then
57348      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57349      LIBFFI_CFLAGS="-I${with_libffi}/include"
57350      LIBFFI_FOUND=yes
57351    fi
57352    if test "x${with_libffi_include}" != x; then
57353      LIBFFI_CFLAGS="-I${with_libffi_include}"
57354      LIBFFI_FOUND=yes
57355    fi
57356    if test "x${with_libffi_lib}" != x; then
57357      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57358      LIBFFI_FOUND=yes
57359    fi
57360    # Do not try pkg-config if we have a sysroot set.
57361    if test "x$SYSROOT" = x; then
57362      if test "x$LIBFFI_FOUND" = xno; then
57363        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57364
57365pkg_failed=no
57366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57367$as_echo_n "checking for LIBFFI... " >&6; }
57368
57369if test -n "$LIBFFI_CFLAGS"; then
57370    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57371 elif test -n "$PKG_CONFIG"; then
57372    if test -n "$PKG_CONFIG" && \
57373    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57374  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57375  ac_status=$?
57376  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57377  test $ac_status = 0; }; then
57378  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57379else
57380  pkg_failed=yes
57381fi
57382 else
57383    pkg_failed=untried
57384fi
57385if test -n "$LIBFFI_LIBS"; then
57386    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57387 elif test -n "$PKG_CONFIG"; then
57388    if test -n "$PKG_CONFIG" && \
57389    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57390  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57391  ac_status=$?
57392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57393  test $ac_status = 0; }; then
57394  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57395else
57396  pkg_failed=yes
57397fi
57398 else
57399    pkg_failed=untried
57400fi
57401
57402
57403
57404if test $pkg_failed = yes; then
57405
57406if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57407        _pkg_short_errors_supported=yes
57408else
57409        _pkg_short_errors_supported=no
57410fi
57411        if test $_pkg_short_errors_supported = yes; then
57412	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57413        else
57414	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57415        fi
57416	# Put the nasty error message in config.log where it belongs
57417	echo "$LIBFFI_PKG_ERRORS" >&5
57418
57419	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57420$as_echo "no" >&6; }
57421                LIBFFI_FOUND=no
57422elif test $pkg_failed = untried; then
57423	LIBFFI_FOUND=no
57424else
57425	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57426	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57428$as_echo "yes" >&6; }
57429	LIBFFI_FOUND=yes
57430fi
57431      fi
57432    fi
57433    if test "x$LIBFFI_FOUND" = xno; then
57434      for ac_header in ffi.h
57435do :
57436  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57437if test "x$ac_cv_header_ffi_h" = xyes; then :
57438  cat >>confdefs.h <<_ACEOF
57439#define HAVE_FFI_H 1
57440_ACEOF
57441
57442            LIBFFI_FOUND=yes
57443            LIBFFI_CFLAGS=
57444            LIBFFI_LIBS=-lffi
57445
57446else
57447  LIBFFI_FOUND=no
57448
57449fi
57450
57451done
57452
57453    fi
57454    if test "x$LIBFFI_FOUND" = xno; then
57455
57456  # Print a helpful message on how to acquire the necessary build dependency.
57457  # ffi is the help tag: freetype, cups, alsa etc
57458  MISSING_DEPENDENCY=ffi
57459
57460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57461    cygwin_help $MISSING_DEPENDENCY
57462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57463    msys_help $MISSING_DEPENDENCY
57464  else
57465    PKGHANDLER_COMMAND=
57466
57467    case $PKGHANDLER in
57468      apt-get)
57469        apt_help     $MISSING_DEPENDENCY ;;
57470      yum)
57471        yum_help     $MISSING_DEPENDENCY ;;
57472      port)
57473        port_help    $MISSING_DEPENDENCY ;;
57474      pkgutil)
57475        pkgutil_help $MISSING_DEPENDENCY ;;
57476      pkgadd)
57477        pkgadd_help  $MISSING_DEPENDENCY ;;
57478    esac
57479
57480    if test "x$PKGHANDLER_COMMAND" != x; then
57481      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57482    fi
57483  fi
57484
57485      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
57486    fi
57487
57488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
57489$as_echo_n "checking if libffi works... " >&6; }
57490    ac_ext=c
57491ac_cpp='$CPP $CPPFLAGS'
57492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57494ac_compiler_gnu=$ac_cv_c_compiler_gnu
57495
57496    OLD_CFLAGS="$CFLAGS"
57497    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
57498    OLD_LIBS="$LIBS"
57499    LIBS="$LIBS $LIBFFI_LIBS"
57500    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57501/* end confdefs.h.  */
57502#include <ffi.h>
57503int
57504main ()
57505{
57506
57507          ffi_call(NULL, NULL, NULL, NULL);
57508          return 0;
57509
57510  ;
57511  return 0;
57512}
57513_ACEOF
57514if ac_fn_c_try_link "$LINENO"; then :
57515  LIBFFI_WORKS=yes
57516else
57517  LIBFFI_WORKS=no
57518
57519fi
57520rm -f core conftest.err conftest.$ac_objext \
57521    conftest$ac_exeext conftest.$ac_ext
57522    CFLAGS="$OLD_CFLAGS"
57523    LIBS="$OLD_LIBS"
57524    ac_ext=cpp
57525ac_cpp='$CXXCPP $CPPFLAGS'
57526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57529
57530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
57531$as_echo "$LIBFFI_WORKS" >&6; }
57532
57533    if test "x$LIBFFI_WORKS" = xno; then
57534
57535  # Print a helpful message on how to acquire the necessary build dependency.
57536  # ffi is the help tag: freetype, cups, alsa etc
57537  MISSING_DEPENDENCY=ffi
57538
57539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57540    cygwin_help $MISSING_DEPENDENCY
57541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57542    msys_help $MISSING_DEPENDENCY
57543  else
57544    PKGHANDLER_COMMAND=
57545
57546    case $PKGHANDLER in
57547      apt-get)
57548        apt_help     $MISSING_DEPENDENCY ;;
57549      yum)
57550        yum_help     $MISSING_DEPENDENCY ;;
57551      port)
57552        port_help    $MISSING_DEPENDENCY ;;
57553      pkgutil)
57554        pkgutil_help $MISSING_DEPENDENCY ;;
57555      pkgadd)
57556        pkgadd_help  $MISSING_DEPENDENCY ;;
57557    esac
57558
57559    if test "x$PKGHANDLER_COMMAND" != x; then
57560      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57561    fi
57562  fi
57563
57564      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
57565    fi
57566  fi
57567
57568
57569
57570
57571
57572  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
57573    # Extract the first word of "llvm-config", so it can be a program name with args.
57574set dummy llvm-config; ac_word=$2
57575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57576$as_echo_n "checking for $ac_word... " >&6; }
57577if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
57578  $as_echo_n "(cached) " >&6
57579else
57580  if test -n "$LLVM_CONFIG"; then
57581  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
57582else
57583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57584for as_dir in $PATH
57585do
57586  IFS=$as_save_IFS
57587  test -z "$as_dir" && as_dir=.
57588    for ac_exec_ext in '' $ac_executable_extensions; do
57589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57590    ac_cv_prog_LLVM_CONFIG="llvm-config"
57591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57592    break 2
57593  fi
57594done
57595  done
57596IFS=$as_save_IFS
57597
57598fi
57599fi
57600LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
57601if test -n "$LLVM_CONFIG"; then
57602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
57603$as_echo "$LLVM_CONFIG" >&6; }
57604else
57605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57606$as_echo "no" >&6; }
57607fi
57608
57609
57610
57611    if test "x$LLVM_CONFIG" != xllvm-config; then
57612      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
57613    fi
57614
57615    llvm_components="jit mcjit engine nativecodegen native"
57616    unset LLVM_CFLAGS
57617    for flag in $("$LLVM_CONFIG" --cxxflags); do
57618      if echo "${flag}" | grep -q '^-[ID]'; then
57619        if test "${flag}" != "-D_DEBUG" ; then
57620          if test "${LLVM_CFLAGS}" != "" ; then
57621            LLVM_CFLAGS="${LLVM_CFLAGS} "
57622          fi
57623          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
57624        fi
57625      fi
57626    done
57627    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
57628    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
57629
57630    unset LLVM_LDFLAGS
57631    for flag in $("${LLVM_CONFIG}" --ldflags); do
57632      if echo "${flag}" | grep -q '^-L'; then
57633        if test "${LLVM_LDFLAGS}" != ""; then
57634          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
57635        fi
57636        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
57637      fi
57638    done
57639
57640    unset LLVM_LIBS
57641    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
57642      if echo "${flag}" | grep -q '^-l'; then
57643        if test "${LLVM_LIBS}" != ""; then
57644          LLVM_LIBS="${LLVM_LIBS} "
57645        fi
57646        LLVM_LIBS="${LLVM_LIBS}${flag}"
57647      fi
57648    done
57649
57650    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
57651    # always properly detect -ltinfo
57652    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
57653
57654
57655
57656
57657  fi
57658
57659
57660
57661# Check whether --with-libjpeg was given.
57662if test "${with_libjpeg+set}" = set; then :
57663  withval=$with_libjpeg;
57664fi
57665
57666
57667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
57668$as_echo_n "checking for which libjpeg to use... " >&6; }
57669  # default is bundled
57670  DEFAULT_LIBJPEG=bundled
57671  # if user didn't specify, use DEFAULT_LIBJPEG
57672  if test "x${with_libjpeg}" = "x"; then
57673    with_libjpeg=${DEFAULT_LIBJPEG}
57674  fi
57675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
57676$as_echo "${with_libjpeg}" >&6; }
57677
57678  if test "x${with_libjpeg}" = "xbundled"; then
57679    USE_EXTERNAL_LIBJPEG=false
57680  elif test "x${with_libjpeg}" = "xsystem"; then
57681    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
57682if test "x$ac_cv_header_jpeglib_h" = xyes; then :
57683
57684else
57685   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
57686fi
57687
57688
57689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
57690$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
57691if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
57692  $as_echo_n "(cached) " >&6
57693else
57694  ac_check_lib_save_LIBS=$LIBS
57695LIBS="-ljpeg  $LIBS"
57696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57697/* end confdefs.h.  */
57698
57699/* Override any GCC internal prototype to avoid an error.
57700   Use char because int might match the return type of a GCC
57701   builtin and then its argument prototype would still apply.  */
57702#ifdef __cplusplus
57703extern "C"
57704#endif
57705char jpeg_CreateDecompress ();
57706int
57707main ()
57708{
57709return jpeg_CreateDecompress ();
57710  ;
57711  return 0;
57712}
57713_ACEOF
57714if ac_fn_cxx_try_link "$LINENO"; then :
57715  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
57716else
57717  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
57718fi
57719rm -f core conftest.err conftest.$ac_objext \
57720    conftest$ac_exeext conftest.$ac_ext
57721LIBS=$ac_check_lib_save_LIBS
57722fi
57723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
57724$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
57725if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
57726  cat >>confdefs.h <<_ACEOF
57727#define HAVE_LIBJPEG 1
57728_ACEOF
57729
57730  LIBS="-ljpeg $LIBS"
57731
57732else
57733   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
57734fi
57735
57736
57737    USE_EXTERNAL_LIBJPEG=true
57738  else
57739    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
57740  fi
57741
57742
57743
57744
57745
57746# Check whether --with-giflib was given.
57747if test "${with_giflib+set}" = set; then :
57748  withval=$with_giflib;
57749fi
57750
57751
57752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
57753$as_echo_n "checking for which giflib to use... " >&6; }
57754  # default is bundled
57755  DEFAULT_GIFLIB=bundled
57756  # if user didn't specify, use DEFAULT_GIFLIB
57757  if test "x${with_giflib}" = "x"; then
57758    with_giflib=${DEFAULT_GIFLIB}
57759  fi
57760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
57761$as_echo "${with_giflib}" >&6; }
57762
57763  if test "x${with_giflib}" = "xbundled"; then
57764    USE_EXTERNAL_LIBGIF=false
57765  elif test "x${with_giflib}" = "xsystem"; then
57766    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
57767if test "x$ac_cv_header_gif_lib_h" = xyes; then :
57768
57769else
57770   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
57771fi
57772
57773
57774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
57775$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
57776if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
57777  $as_echo_n "(cached) " >&6
57778else
57779  ac_check_lib_save_LIBS=$LIBS
57780LIBS="-lgif  $LIBS"
57781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57782/* end confdefs.h.  */
57783
57784/* Override any GCC internal prototype to avoid an error.
57785   Use char because int might match the return type of a GCC
57786   builtin and then its argument prototype would still apply.  */
57787#ifdef __cplusplus
57788extern "C"
57789#endif
57790char DGifGetCode ();
57791int
57792main ()
57793{
57794return DGifGetCode ();
57795  ;
57796  return 0;
57797}
57798_ACEOF
57799if ac_fn_cxx_try_link "$LINENO"; then :
57800  ac_cv_lib_gif_DGifGetCode=yes
57801else
57802  ac_cv_lib_gif_DGifGetCode=no
57803fi
57804rm -f core conftest.err conftest.$ac_objext \
57805    conftest$ac_exeext conftest.$ac_ext
57806LIBS=$ac_check_lib_save_LIBS
57807fi
57808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
57809$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
57810if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
57811  cat >>confdefs.h <<_ACEOF
57812#define HAVE_LIBGIF 1
57813_ACEOF
57814
57815  LIBS="-lgif $LIBS"
57816
57817else
57818   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
57819fi
57820
57821
57822    USE_EXTERNAL_LIBGIF=true
57823  else
57824    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
57825  fi
57826
57827
57828
57829
57830
57831# Check whether --with-libpng was given.
57832if test "${with_libpng+set}" = set; then :
57833  withval=$with_libpng;
57834fi
57835
57836
57837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
57838$as_echo_n "checking for which libpng to use... " >&6; }
57839
57840  # default is bundled
57841  DEFAULT_LIBPNG=bundled
57842  # if user didn't specify, use DEFAULT_LIBPNG
57843  if test "x${with_libpng}" = "x"; then
57844      with_libpng=${DEFAULT_LIBPNG}
57845  fi
57846
57847  if test "x${with_libpng}" = "xbundled"; then
57848      USE_EXTERNAL_LIBPNG=false
57849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
57850$as_echo "bundled" >&6; }
57851  elif test "x${with_libpng}" = "xsystem"; then
57852
57853pkg_failed=no
57854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
57855$as_echo_n "checking for PNG... " >&6; }
57856
57857if test -n "$PNG_CFLAGS"; then
57858    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
57859 elif test -n "$PKG_CONFIG"; then
57860    if test -n "$PKG_CONFIG" && \
57861    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
57862  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
57863  ac_status=$?
57864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57865  test $ac_status = 0; }; then
57866  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
57867else
57868  pkg_failed=yes
57869fi
57870 else
57871    pkg_failed=untried
57872fi
57873if test -n "$PNG_LIBS"; then
57874    pkg_cv_PNG_LIBS="$PNG_LIBS"
57875 elif test -n "$PKG_CONFIG"; then
57876    if test -n "$PKG_CONFIG" && \
57877    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
57878  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
57879  ac_status=$?
57880  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57881  test $ac_status = 0; }; then
57882  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
57883else
57884  pkg_failed=yes
57885fi
57886 else
57887    pkg_failed=untried
57888fi
57889
57890
57891
57892if test $pkg_failed = yes; then
57893
57894if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57895        _pkg_short_errors_supported=yes
57896else
57897        _pkg_short_errors_supported=no
57898fi
57899        if test $_pkg_short_errors_supported = yes; then
57900	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
57901        else
57902	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
57903        fi
57904	# Put the nasty error message in config.log where it belongs
57905	echo "$PNG_PKG_ERRORS" >&5
57906
57907	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57908$as_echo "no" >&6; }
57909                 LIBPNG_FOUND=no
57910elif test $pkg_failed = untried; then
57911	 LIBPNG_FOUND=no
57912else
57913	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
57914	PNG_LIBS=$pkg_cv_PNG_LIBS
57915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57916$as_echo "yes" >&6; }
57917	 LIBPNG_FOUND=yes
57918fi
57919      if test "x${LIBPNG_FOUND}" = "xyes"; then
57920          USE_EXTERNAL_LIBPNG=true
57921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
57922$as_echo "system" >&6; }
57923      else
57924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
57925$as_echo "system not found" >&6; }
57926          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
57927      fi
57928  else
57929      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
57930  fi
57931
57932
57933
57934
57935
57936# Check whether --with-zlib was given.
57937if test "${with_zlib+set}" = set; then :
57938  withval=$with_zlib;
57939fi
57940
57941
57942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
57943$as_echo_n "checking for compress in -lz... " >&6; }
57944if ${ac_cv_lib_z_compress+:} false; then :
57945  $as_echo_n "(cached) " >&6
57946else
57947  ac_check_lib_save_LIBS=$LIBS
57948LIBS="-lz  $LIBS"
57949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57950/* end confdefs.h.  */
57951
57952/* Override any GCC internal prototype to avoid an error.
57953   Use char because int might match the return type of a GCC
57954   builtin and then its argument prototype would still apply.  */
57955#ifdef __cplusplus
57956extern "C"
57957#endif
57958char compress ();
57959int
57960main ()
57961{
57962return compress ();
57963  ;
57964  return 0;
57965}
57966_ACEOF
57967if ac_fn_cxx_try_link "$LINENO"; then :
57968  ac_cv_lib_z_compress=yes
57969else
57970  ac_cv_lib_z_compress=no
57971fi
57972rm -f core conftest.err conftest.$ac_objext \
57973    conftest$ac_exeext conftest.$ac_ext
57974LIBS=$ac_check_lib_save_LIBS
57975fi
57976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
57977$as_echo "$ac_cv_lib_z_compress" >&6; }
57978if test "x$ac_cv_lib_z_compress" = xyes; then :
57979   ZLIB_FOUND=yes
57980else
57981   ZLIB_FOUND=no
57982fi
57983
57984
57985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
57986$as_echo_n "checking for which zlib to use... " >&6; }
57987
57988  DEFAULT_ZLIB=bundled
57989  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
57990    # On macosx default is system...on others default is bundled
57991    DEFAULT_ZLIB=system
57992  fi
57993
57994  if test "x${ZLIB_FOUND}" != "xyes"; then
57995    # If we don't find any system...set default to bundled
57996    DEFAULT_ZLIB=bundled
57997  fi
57998
57999  # If user didn't specify, use DEFAULT_ZLIB
58000  if test "x${with_zlib}" = "x"; then
58001    with_zlib=${DEFAULT_ZLIB}
58002  fi
58003
58004  if test "x${with_zlib}" = "xbundled"; then
58005    USE_EXTERNAL_LIBZ=false
58006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58007$as_echo "bundled" >&6; }
58008  elif test "x${with_zlib}" = "xsystem"; then
58009    if test "x${ZLIB_FOUND}" = "xyes"; then
58010      USE_EXTERNAL_LIBZ=true
58011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58012$as_echo "system" >&6; }
58013    else
58014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58015$as_echo "system not found" >&6; }
58016      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58017    fi
58018  else
58019    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58020  fi
58021
58022
58023
58024
58025
58026# Check whether --with-lcms was given.
58027if test "${with_lcms+set}" = set; then :
58028  withval=$with_lcms;
58029fi
58030
58031
58032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58033$as_echo_n "checking for which lcms to use... " >&6; }
58034
58035  DEFAULT_LCMS=bundled
58036  # If user didn't specify, use DEFAULT_LCMS
58037  if test "x${with_lcms}" = "x"; then
58038      with_lcms=${DEFAULT_LCMS}
58039  fi
58040
58041  if test "x${with_lcms}" = "xbundled"; then
58042    USE_EXTERNAL_LCMS=false
58043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58044$as_echo "bundled" >&6; }
58045  elif test "x${with_lcms}" = "xsystem"; then
58046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58047$as_echo "system" >&6; }
58048
58049pkg_failed=no
58050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58051$as_echo_n "checking for LCMS... " >&6; }
58052
58053if test -n "$LCMS_CFLAGS"; then
58054    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58055 elif test -n "$PKG_CONFIG"; then
58056    if test -n "$PKG_CONFIG" && \
58057    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58058  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58059  ac_status=$?
58060  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58061  test $ac_status = 0; }; then
58062  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58063else
58064  pkg_failed=yes
58065fi
58066 else
58067    pkg_failed=untried
58068fi
58069if test -n "$LCMS_LIBS"; then
58070    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58071 elif test -n "$PKG_CONFIG"; then
58072    if test -n "$PKG_CONFIG" && \
58073    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58074  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58075  ac_status=$?
58076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58077  test $ac_status = 0; }; then
58078  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58079else
58080  pkg_failed=yes
58081fi
58082 else
58083    pkg_failed=untried
58084fi
58085
58086
58087
58088if test $pkg_failed = yes; then
58089
58090if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58091        _pkg_short_errors_supported=yes
58092else
58093        _pkg_short_errors_supported=no
58094fi
58095        if test $_pkg_short_errors_supported = yes; then
58096	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58097        else
58098	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58099        fi
58100	# Put the nasty error message in config.log where it belongs
58101	echo "$LCMS_PKG_ERRORS" >&5
58102
58103	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58104$as_echo "no" >&6; }
58105                LCMS_FOUND=no
58106elif test $pkg_failed = untried; then
58107	LCMS_FOUND=no
58108else
58109	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58110	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58112$as_echo "yes" >&6; }
58113	LCMS_FOUND=yes
58114fi
58115    if test "x${LCMS_FOUND}" = "xyes"; then
58116      USE_EXTERNAL_LCMS=true
58117    else
58118      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58119    fi
58120  else
58121    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58122  fi
58123
58124
58125
58126
58127
58128
58129
58130
58131
58132
58133
58134  # Setup libm (the maths library)
58135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58136$as_echo_n "checking for cos in -lm... " >&6; }
58137if ${ac_cv_lib_m_cos+:} false; then :
58138  $as_echo_n "(cached) " >&6
58139else
58140  ac_check_lib_save_LIBS=$LIBS
58141LIBS="-lm  $LIBS"
58142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58143/* end confdefs.h.  */
58144
58145/* Override any GCC internal prototype to avoid an error.
58146   Use char because int might match the return type of a GCC
58147   builtin and then its argument prototype would still apply.  */
58148#ifdef __cplusplus
58149extern "C"
58150#endif
58151char cos ();
58152int
58153main ()
58154{
58155return cos ();
58156  ;
58157  return 0;
58158}
58159_ACEOF
58160if ac_fn_cxx_try_link "$LINENO"; then :
58161  ac_cv_lib_m_cos=yes
58162else
58163  ac_cv_lib_m_cos=no
58164fi
58165rm -f core conftest.err conftest.$ac_objext \
58166    conftest$ac_exeext conftest.$ac_ext
58167LIBS=$ac_check_lib_save_LIBS
58168fi
58169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58170$as_echo "$ac_cv_lib_m_cos" >&6; }
58171if test "x$ac_cv_lib_m_cos" = xyes; then :
58172  cat >>confdefs.h <<_ACEOF
58173#define HAVE_LIBM 1
58174_ACEOF
58175
58176  LIBS="-lm $LIBS"
58177
58178else
58179
58180      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58181$as_echo "$as_me: Maths library was not found" >&6;}
58182
58183fi
58184
58185  LIBM=-lm
58186
58187
58188  # Setup libdl (for dynamic library loading)
58189  save_LIBS="$LIBS"
58190  LIBS=""
58191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58192$as_echo_n "checking for dlopen in -ldl... " >&6; }
58193if ${ac_cv_lib_dl_dlopen+:} false; then :
58194  $as_echo_n "(cached) " >&6
58195else
58196  ac_check_lib_save_LIBS=$LIBS
58197LIBS="-ldl  $LIBS"
58198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58199/* end confdefs.h.  */
58200
58201/* Override any GCC internal prototype to avoid an error.
58202   Use char because int might match the return type of a GCC
58203   builtin and then its argument prototype would still apply.  */
58204#ifdef __cplusplus
58205extern "C"
58206#endif
58207char dlopen ();
58208int
58209main ()
58210{
58211return dlopen ();
58212  ;
58213  return 0;
58214}
58215_ACEOF
58216if ac_fn_cxx_try_link "$LINENO"; then :
58217  ac_cv_lib_dl_dlopen=yes
58218else
58219  ac_cv_lib_dl_dlopen=no
58220fi
58221rm -f core conftest.err conftest.$ac_objext \
58222    conftest$ac_exeext conftest.$ac_ext
58223LIBS=$ac_check_lib_save_LIBS
58224fi
58225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58226$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58227if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58228  cat >>confdefs.h <<_ACEOF
58229#define HAVE_LIBDL 1
58230_ACEOF
58231
58232  LIBS="-ldl $LIBS"
58233
58234fi
58235
58236  LIBDL="$LIBS"
58237
58238  LIBS="$save_LIBS"
58239
58240  # Deprecated libraries, keep the flags for backwards compatibility
58241  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58242
58243
58244# Check whether --with-dxsdk was given.
58245if test "${with_dxsdk+set}" = set; then :
58246  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58247$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58248fi
58249
58250
58251
58252
58253# Check whether --with-dxsdk-lib was given.
58254if test "${with_dxsdk_lib+set}" = set; then :
58255  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58256$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58257fi
58258
58259
58260
58261
58262# Check whether --with-dxsdk-include was given.
58263if test "${with_dxsdk_include+set}" = set; then :
58264  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58265$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58266fi
58267
58268
58269  fi
58270
58271  # Control if libzip can use mmap. Available for purposes of overriding.
58272  LIBZIP_CAN_USE_MMAP=true
58273
58274
58275
58276
58277
58278
58279
58280
58281
58282
58283
58284
58285
58286
58287###############################################################################
58288#
58289# We need to do some final tweaking, when everything else is done.
58290#
58291###############################################################################
58292
58293
58294  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58295
58296
58297
58298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58299$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58300
58301  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58302    ENABLE_INTREE_EC=yes
58303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58304$as_echo "yes" >&6; }
58305  else
58306    ENABLE_INTREE_EC=no
58307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58308$as_echo "no" >&6; }
58309  fi
58310
58311
58312
58313
58314###############################################################################
58315#
58316# Configure parts of the build that only affect the build performance,
58317# not the result.
58318#
58319###############################################################################
58320
58321
58322  # How many cores do we have on this build system?
58323
58324# Check whether --with-num-cores was given.
58325if test "${with_num_cores+set}" = set; then :
58326  withval=$with_num_cores;
58327fi
58328
58329  if test "x$with_num_cores" = x; then
58330    # The number of cores were not specified, try to probe them.
58331
58332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58333$as_echo_n "checking for number of cores... " >&6; }
58334  NUM_CORES=1
58335  FOUND_CORES=no
58336
58337  if test -f /proc/cpuinfo; then
58338    # Looks like a Linux (or cygwin) system
58339    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58340    FOUND_CORES=yes
58341  elif test -x /usr/sbin/psrinfo; then
58342    # Looks like a Solaris system
58343    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58344    FOUND_CORES=yes
58345  elif test -x /usr/sbin/sysctl; then
58346    # Looks like a MacOSX system
58347    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
58348    FOUND_CORES=yes
58349  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58350    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58351    FOUND_CORES=yes
58352  elif test -n "$NUMBER_OF_PROCESSORS"; then
58353    # On windows, look in the env
58354    NUM_CORES=$NUMBER_OF_PROCESSORS
58355    FOUND_CORES=yes
58356  fi
58357
58358  if test "x$FOUND_CORES" = xyes; then
58359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58360$as_echo "$NUM_CORES" >&6; }
58361  else
58362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58363$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58364    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58365$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58366  fi
58367
58368  else
58369    NUM_CORES=$with_num_cores
58370  fi
58371
58372
58373
58374  # How much memory do we have on this build system?
58375
58376# Check whether --with-memory-size was given.
58377if test "${with_memory_size+set}" = set; then :
58378  withval=$with_memory_size;
58379fi
58380
58381  if test "x$with_memory_size" = x; then
58382    # The memory size was not specified, try to probe it.
58383
58384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58385$as_echo_n "checking for memory size... " >&6; }
58386  # Default to 1024 MB
58387  MEMORY_SIZE=1024
58388  FOUND_MEM=no
58389
58390  if test -f /proc/meminfo; then
58391    # Looks like a Linux (or cygwin) system
58392    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58393    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58394    FOUND_MEM=yes
58395  elif test -x /usr/sbin/prtconf; then
58396    # Looks like a Solaris or AIX system
58397    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58398    FOUND_MEM=yes
58399  elif test -x /usr/sbin/sysctl; then
58400    # Looks like a MacOSX system
58401    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
58402    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58403    FOUND_MEM=yes
58404  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58405    # Windows, but without cygwin
58406    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58407    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58408    FOUND_MEM=yes
58409  fi
58410
58411  if test "x$FOUND_MEM" = xyes; then
58412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58413$as_echo "$MEMORY_SIZE MB" >&6; }
58414  else
58415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58416$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58417    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58418$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58419  fi
58420
58421  else
58422    MEMORY_SIZE=$with_memory_size
58423  fi
58424
58425
58426
58427  # Provide a decent default number of parallel jobs for make depending on
58428  # number of cores, amount of memory and machine architecture.
58429
58430# Check whether --with-jobs was given.
58431if test "${with_jobs+set}" = set; then :
58432  withval=$with_jobs;
58433fi
58434
58435  if test "x$with_jobs" = x; then
58436    # Number of jobs was not specified, calculate.
58437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58438$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58439    # Approximate memory in GB.
58440    memory_gb=`expr $MEMORY_SIZE / 1024`
58441    # Pick the lowest of memory in gb and number of cores.
58442    if test "$memory_gb" -lt "$NUM_CORES"; then
58443      JOBS="$memory_gb"
58444    else
58445      JOBS="$NUM_CORES"
58446    fi
58447    if test "$JOBS" -eq "0"; then
58448      JOBS=1
58449    fi
58450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58451$as_echo "$JOBS" >&6; }
58452  else
58453    JOBS=$with_jobs
58454  fi
58455
58456
58457
58458  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58459
58460# Check whether --with-test-jobs was given.
58461if test "${with_test_jobs+set}" = set; then :
58462  withval=$with_test_jobs;
58463fi
58464
58465  if test "x$with_test_jobs" = x; then
58466      TEST_JOBS=0
58467  else
58468      TEST_JOBS=$with_test_jobs
58469  fi
58470
58471
58472
58473# Setup arguments for the boot jdk (after cores and memory have been setup)
58474
58475  ##############################################################################
58476  #
58477  # Specify jvm options for anything that is run with the Boot JDK.
58478  # Not all JVM:s accept the same arguments on the command line.
58479  #
58480
58481# Check whether --with-boot-jdk-jvmargs was given.
58482if test "${with_boot_jdk_jvmargs+set}" = set; then :
58483  withval=$with_boot_jdk_jvmargs;
58484fi
58485
58486
58487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
58488$as_echo_n "checking flags for boot jdk java command ... " >&6; }
58489
58490  # Disable special log output when a debug build is used as Boot JDK...
58491
58492  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
58493  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
58494  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
58495  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58496  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58497  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58498    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
58499    JVM_ARG_OK=true
58500  else
58501    $ECHO "Arg failed:" >&5
58502    $ECHO "$OUTPUT" >&5
58503    JVM_ARG_OK=false
58504  fi
58505
58506
58507  # Apply user provided options.
58508
58509  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
58510  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
58511  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
58512  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58513  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58514  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58515    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
58516    JVM_ARG_OK=true
58517  else
58518    $ECHO "Arg failed:" >&5
58519    $ECHO "$OUTPUT" >&5
58520    JVM_ARG_OK=false
58521  fi
58522
58523
58524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
58525$as_echo "$boot_jdk_jvmargs" >&6; }
58526
58527  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
58528  JAVA_FLAGS=$boot_jdk_jvmargs
58529
58530
58531
58532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
58533$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
58534
58535  # Starting amount of heap memory.
58536
58537  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
58538  $ECHO "Command: $JAVA -Xms64M -version" >&5
58539  OUTPUT=`$JAVA -Xms64M -version 2>&1`
58540  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58541  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58542  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58543    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
58544    JVM_ARG_OK=true
58545  else
58546    $ECHO "Arg failed:" >&5
58547    $ECHO "$OUTPUT" >&5
58548    JVM_ARG_OK=false
58549  fi
58550
58551
58552  # Maximum amount of heap memory.
58553  # Maximum stack size.
58554  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
58555  if test "x$BOOT_JDK_BITS" = "x32"; then
58556    if test "$JVM_MAX_HEAP" -gt "1100"; then
58557      JVM_MAX_HEAP=1100
58558    elif test "$JVM_MAX_HEAP" -lt "512"; then
58559      JVM_MAX_HEAP=512
58560    fi
58561    STACK_SIZE=768
58562  else
58563    # Running a 64 bit JVM allows for and requires a bigger heap
58564    if test "$JVM_MAX_HEAP" -gt "1600"; then
58565      JVM_MAX_HEAP=1600
58566    elif test "$JVM_MAX_HEAP" -lt "512"; then
58567      JVM_MAX_HEAP=512
58568    fi
58569    STACK_SIZE=1536
58570  fi
58571
58572  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
58573  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
58574  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
58575  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58576  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58577  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58578    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
58579    JVM_ARG_OK=true
58580  else
58581    $ECHO "Arg failed:" >&5
58582    $ECHO "$OUTPUT" >&5
58583    JVM_ARG_OK=false
58584  fi
58585
58586
58587  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
58588  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
58589  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
58590  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58591  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58592  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58593    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
58594    JVM_ARG_OK=true
58595  else
58596    $ECHO "Arg failed:" >&5
58597    $ECHO "$OUTPUT" >&5
58598    JVM_ARG_OK=false
58599  fi
58600
58601
58602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
58603$as_echo "$boot_jdk_jvmargs_big" >&6; }
58604
58605  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
58606
58607
58608  # By default, the main javac compilations use big
58609  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
58610
58611
58612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
58613$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
58614
58615  # Use serial gc for small short lived tools if possible
58616
58617  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
58618  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
58619  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
58620  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58621  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58622  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58623    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
58624    JVM_ARG_OK=true
58625  else
58626    $ECHO "Arg failed:" >&5
58627    $ECHO "$OUTPUT" >&5
58628    JVM_ARG_OK=false
58629  fi
58630
58631
58632  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
58633  $ECHO "Command: $JAVA -Xms32M -version" >&5
58634  OUTPUT=`$JAVA -Xms32M -version 2>&1`
58635  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58636  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58637  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58638    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
58639    JVM_ARG_OK=true
58640  else
58641    $ECHO "Arg failed:" >&5
58642    $ECHO "$OUTPUT" >&5
58643    JVM_ARG_OK=false
58644  fi
58645
58646
58647  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
58648  $ECHO "Command: $JAVA -Xmx512M -version" >&5
58649  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
58650  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58651  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58652  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58653    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
58654    JVM_ARG_OK=true
58655  else
58656    $ECHO "Arg failed:" >&5
58657    $ECHO "$OUTPUT" >&5
58658    JVM_ARG_OK=false
58659  fi
58660
58661
58662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
58663$as_echo "$boot_jdk_jvmargs_small" >&6; }
58664
58665  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
58666
58667
58668  JAVA_TOOL_FLAGS_SMALL=""
58669  for f in $JAVA_FLAGS_SMALL; do
58670    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
58671  done
58672
58673
58674
58675# Setup smart javac (after cores and memory have been setup)
58676
58677
58678# Check whether --with-sjavac-server-java was given.
58679if test "${with_sjavac_server_java+set}" = set; then :
58680  withval=$with_sjavac_server_java;
58681fi
58682
58683
58684  if test "x$with_sjavac_server_java" != x; then
58685    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
58686    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
58687    if test "x$FOUND_VERSION" = x; then
58688      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
58689    fi
58690  else
58691    SJAVAC_SERVER_JAVA="$JAVA"
58692  fi
58693
58694
58695  if test "$MEMORY_SIZE" -gt "3000"; then
58696
58697  $ECHO "Check if jvm arg is ok: -d64" >&5
58698  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
58699  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
58700  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58701  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58702  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58703    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
58704    JVM_ARG_OK=true
58705  else
58706    $ECHO "Arg failed:" >&5
58707    $ECHO "$OUTPUT" >&5
58708    JVM_ARG_OK=false
58709  fi
58710
58711    if test "$JVM_ARG_OK" = true; then
58712      JVM_64BIT=true
58713      JVM_ARG_OK=false
58714    fi
58715  fi
58716
58717  MX_VALUE=`expr $MEMORY_SIZE / 2`
58718  if test "$JVM_64BIT" = true; then
58719    # Set ms lower than mx since more than one instance of the server might
58720    # get launched at the same time before they figure out which instance won.
58721    MS_VALUE=512
58722    if test "$MX_VALUE" -gt "2048"; then
58723      MX_VALUE=2048
58724    fi
58725  else
58726    MS_VALUE=256
58727    if test "$MX_VALUE" -gt "1500"; then
58728      MX_VALUE=1500
58729    fi
58730  fi
58731  if test "$MX_VALUE" -lt "512"; then
58732    MX_VALUE=512
58733  fi
58734
58735  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
58736  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
58737  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
58738  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58739  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58740  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58741    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
58742    JVM_ARG_OK=true
58743  else
58744    $ECHO "Arg failed:" >&5
58745    $ECHO "$OUTPUT" >&5
58746    JVM_ARG_OK=false
58747  fi
58748
58749
58750
58751  # Check whether --enable-sjavac was given.
58752if test "${enable_sjavac+set}" = set; then :
58753  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
58754else
58755  ENABLE_SJAVAC="no"
58756fi
58757
58758  if test "x$JVM_ARG_OK" = "xfalse"; then
58759    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
58760$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
58761    ENABLE_SJAVAC="no"
58762  fi
58763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
58764$as_echo_n "checking whether to use sjavac... " >&6; }
58765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
58766$as_echo "$ENABLE_SJAVAC" >&6; }
58767
58768
58769  # Check whether --enable-javac-server was given.
58770if test "${enable_javac_server+set}" = set; then :
58771  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
58772else
58773  ENABLE_JAVAC_SERVER="yes"
58774fi
58775
58776  if test "x$JVM_ARG_OK" = "xfalse"; then
58777    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
58778$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
58779    ENABLE_JAVAC_SERVER="no"
58780  fi
58781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
58782$as_echo_n "checking whether to use javac server... " >&6; }
58783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
58784$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
58785
58786
58787  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
58788    # When using a server javac, the small client instances do not need much
58789    # resources.
58790    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
58791  fi
58792
58793
58794# Setup use of icecc if requested
58795
58796  # Check whether --enable-icecc was given.
58797if test "${enable_icecc+set}" = set; then :
58798  enableval=$enable_icecc;
58799fi
58800
58801
58802  if test "x${enable_icecc}" = "xyes"; then
58803
58804
58805
58806  # Publish this variable in the help.
58807
58808
58809  if [ -z "${ICECC_CMD+x}" ]; then
58810    # The variable is not set by user, try to locate tool using the code snippet
58811    for ac_prog in icecc
58812do
58813  # Extract the first word of "$ac_prog", so it can be a program name with args.
58814set dummy $ac_prog; ac_word=$2
58815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58816$as_echo_n "checking for $ac_word... " >&6; }
58817if ${ac_cv_path_ICECC_CMD+:} false; then :
58818  $as_echo_n "(cached) " >&6
58819else
58820  case $ICECC_CMD in
58821  [\\/]* | ?:[\\/]*)
58822  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
58823  ;;
58824  *)
58825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58826for as_dir in $PATH
58827do
58828  IFS=$as_save_IFS
58829  test -z "$as_dir" && as_dir=.
58830    for ac_exec_ext in '' $ac_executable_extensions; do
58831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58832    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
58833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58834    break 2
58835  fi
58836done
58837  done
58838IFS=$as_save_IFS
58839
58840  ;;
58841esac
58842fi
58843ICECC_CMD=$ac_cv_path_ICECC_CMD
58844if test -n "$ICECC_CMD"; then
58845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
58846$as_echo "$ICECC_CMD" >&6; }
58847else
58848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58849$as_echo "no" >&6; }
58850fi
58851
58852
58853  test -n "$ICECC_CMD" && break
58854done
58855
58856  else
58857    # The variable is set, but is it from the command line or the environment?
58858
58859    # Try to remove the string !ICECC_CMD! from our list.
58860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
58861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
58862      # If it failed, the variable was not from the command line. Ignore it,
58863      # but warn the user (except for BASH, which is always set by the calling BASH).
58864      if test "xICECC_CMD" != xBASH; then
58865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
58866$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
58867      fi
58868      # Try to locate tool using the code snippet
58869      for ac_prog in icecc
58870do
58871  # Extract the first word of "$ac_prog", so it can be a program name with args.
58872set dummy $ac_prog; ac_word=$2
58873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58874$as_echo_n "checking for $ac_word... " >&6; }
58875if ${ac_cv_path_ICECC_CMD+:} false; then :
58876  $as_echo_n "(cached) " >&6
58877else
58878  case $ICECC_CMD in
58879  [\\/]* | ?:[\\/]*)
58880  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
58881  ;;
58882  *)
58883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58884for as_dir in $PATH
58885do
58886  IFS=$as_save_IFS
58887  test -z "$as_dir" && as_dir=.
58888    for ac_exec_ext in '' $ac_executable_extensions; do
58889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58890    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
58891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58892    break 2
58893  fi
58894done
58895  done
58896IFS=$as_save_IFS
58897
58898  ;;
58899esac
58900fi
58901ICECC_CMD=$ac_cv_path_ICECC_CMD
58902if test -n "$ICECC_CMD"; then
58903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
58904$as_echo "$ICECC_CMD" >&6; }
58905else
58906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58907$as_echo "no" >&6; }
58908fi
58909
58910
58911  test -n "$ICECC_CMD" && break
58912done
58913
58914    else
58915      # If it succeeded, then it was overridden by the user. We will use it
58916      # for the tool.
58917
58918      # First remove it from the list of overridden variables, so we can test
58919      # for unknown variables in the end.
58920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
58921
58922      # Check if we try to supply an empty value
58923      if test "x$ICECC_CMD" = x; then
58924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
58925$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
58926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
58927$as_echo_n "checking for ICECC_CMD... " >&6; }
58928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58929$as_echo "disabled" >&6; }
58930      else
58931        # Check if the provided tool contains a complete path.
58932        tool_specified="$ICECC_CMD"
58933        tool_basename="${tool_specified##*/}"
58934        if test "x$tool_basename" = "x$tool_specified"; then
58935          # A command without a complete path is provided, search $PATH.
58936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
58937$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
58938          # Extract the first word of "$tool_basename", so it can be a program name with args.
58939set dummy $tool_basename; ac_word=$2
58940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58941$as_echo_n "checking for $ac_word... " >&6; }
58942if ${ac_cv_path_ICECC_CMD+:} false; then :
58943  $as_echo_n "(cached) " >&6
58944else
58945  case $ICECC_CMD in
58946  [\\/]* | ?:[\\/]*)
58947  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
58948  ;;
58949  *)
58950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58951for as_dir in $PATH
58952do
58953  IFS=$as_save_IFS
58954  test -z "$as_dir" && as_dir=.
58955    for ac_exec_ext in '' $ac_executable_extensions; do
58956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58957    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
58958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58959    break 2
58960  fi
58961done
58962  done
58963IFS=$as_save_IFS
58964
58965  ;;
58966esac
58967fi
58968ICECC_CMD=$ac_cv_path_ICECC_CMD
58969if test -n "$ICECC_CMD"; then
58970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
58971$as_echo "$ICECC_CMD" >&6; }
58972else
58973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58974$as_echo "no" >&6; }
58975fi
58976
58977
58978          if test "x$ICECC_CMD" = x; then
58979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58980          fi
58981        else
58982          # Otherwise we believe it is a complete path. Use it as it is.
58983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
58984$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
58985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
58986$as_echo_n "checking for ICECC_CMD... " >&6; }
58987          if test ! -x "$tool_specified"; then
58988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58989$as_echo "not found" >&6; }
58990            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
58991          fi
58992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58993$as_echo "$tool_specified" >&6; }
58994        fi
58995      fi
58996    fi
58997
58998  fi
58999
59000
59001
59002  if test "x$ICECC_CMD" = x; then
59003    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59004  fi
59005
59006
59007    old_path="$PATH"
59008
59009    # Look for icecc-create-env in some known places
59010    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59011
59012
59013
59014  # Publish this variable in the help.
59015
59016
59017  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59018    # The variable is not set by user, try to locate tool using the code snippet
59019    for ac_prog in icecc-create-env
59020do
59021  # Extract the first word of "$ac_prog", so it can be a program name with args.
59022set dummy $ac_prog; ac_word=$2
59023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59024$as_echo_n "checking for $ac_word... " >&6; }
59025if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59026  $as_echo_n "(cached) " >&6
59027else
59028  case $ICECC_CREATE_ENV in
59029  [\\/]* | ?:[\\/]*)
59030  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59031  ;;
59032  *)
59033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59034for as_dir in $PATH
59035do
59036  IFS=$as_save_IFS
59037  test -z "$as_dir" && as_dir=.
59038    for ac_exec_ext in '' $ac_executable_extensions; do
59039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59040    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59042    break 2
59043  fi
59044done
59045  done
59046IFS=$as_save_IFS
59047
59048  ;;
59049esac
59050fi
59051ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59052if test -n "$ICECC_CREATE_ENV"; then
59053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59054$as_echo "$ICECC_CREATE_ENV" >&6; }
59055else
59056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59057$as_echo "no" >&6; }
59058fi
59059
59060
59061  test -n "$ICECC_CREATE_ENV" && break
59062done
59063
59064  else
59065    # The variable is set, but is it from the command line or the environment?
59066
59067    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59070      # If it failed, the variable was not from the command line. Ignore it,
59071      # but warn the user (except for BASH, which is always set by the calling BASH).
59072      if test "xICECC_CREATE_ENV" != xBASH; then
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59074$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59075      fi
59076      # Try to locate tool using the code snippet
59077      for ac_prog in icecc-create-env
59078do
59079  # Extract the first word of "$ac_prog", so it can be a program name with args.
59080set dummy $ac_prog; ac_word=$2
59081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59082$as_echo_n "checking for $ac_word... " >&6; }
59083if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59084  $as_echo_n "(cached) " >&6
59085else
59086  case $ICECC_CREATE_ENV in
59087  [\\/]* | ?:[\\/]*)
59088  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59089  ;;
59090  *)
59091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59092for as_dir in $PATH
59093do
59094  IFS=$as_save_IFS
59095  test -z "$as_dir" && as_dir=.
59096    for ac_exec_ext in '' $ac_executable_extensions; do
59097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59098    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59100    break 2
59101  fi
59102done
59103  done
59104IFS=$as_save_IFS
59105
59106  ;;
59107esac
59108fi
59109ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59110if test -n "$ICECC_CREATE_ENV"; then
59111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59112$as_echo "$ICECC_CREATE_ENV" >&6; }
59113else
59114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59115$as_echo "no" >&6; }
59116fi
59117
59118
59119  test -n "$ICECC_CREATE_ENV" && break
59120done
59121
59122    else
59123      # If it succeeded, then it was overridden by the user. We will use it
59124      # for the tool.
59125
59126      # First remove it from the list of overridden variables, so we can test
59127      # for unknown variables in the end.
59128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59129
59130      # Check if we try to supply an empty value
59131      if test "x$ICECC_CREATE_ENV" = x; then
59132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59133$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59135$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59137$as_echo "disabled" >&6; }
59138      else
59139        # Check if the provided tool contains a complete path.
59140        tool_specified="$ICECC_CREATE_ENV"
59141        tool_basename="${tool_specified##*/}"
59142        if test "x$tool_basename" = "x$tool_specified"; then
59143          # A command without a complete path is provided, search $PATH.
59144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59145$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59146          # Extract the first word of "$tool_basename", so it can be a program name with args.
59147set dummy $tool_basename; ac_word=$2
59148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59149$as_echo_n "checking for $ac_word... " >&6; }
59150if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59151  $as_echo_n "(cached) " >&6
59152else
59153  case $ICECC_CREATE_ENV in
59154  [\\/]* | ?:[\\/]*)
59155  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59156  ;;
59157  *)
59158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59159for as_dir in $PATH
59160do
59161  IFS=$as_save_IFS
59162  test -z "$as_dir" && as_dir=.
59163    for ac_exec_ext in '' $ac_executable_extensions; do
59164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59165    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59167    break 2
59168  fi
59169done
59170  done
59171IFS=$as_save_IFS
59172
59173  ;;
59174esac
59175fi
59176ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59177if test -n "$ICECC_CREATE_ENV"; then
59178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59179$as_echo "$ICECC_CREATE_ENV" >&6; }
59180else
59181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59182$as_echo "no" >&6; }
59183fi
59184
59185
59186          if test "x$ICECC_CREATE_ENV" = x; then
59187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59188          fi
59189        else
59190          # Otherwise we believe it is a complete path. Use it as it is.
59191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59192$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59194$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59195          if test ! -x "$tool_specified"; then
59196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59197$as_echo "not found" >&6; }
59198            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59199          fi
59200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59201$as_echo "$tool_specified" >&6; }
59202        fi
59203      fi
59204    fi
59205
59206  fi
59207
59208
59209
59210  if test "x$ICECC_CREATE_ENV" = x; then
59211    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59212  fi
59213
59214
59215    # Use icecc-create-env to create a minimal compilation environment that can
59216    # be sent to the other hosts in the icecream cluster.
59217    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59218    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59219    # Older versions of icecc does not have the --gcc parameter
59220    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
59221      icecc_gcc_arg="--gcc"
59222    fi
59223    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59224
59225  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59226      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
59227          ${icecc_create_env_log} 2>&1
59228  if test "$?" != "0"; then
59229    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59230$as_echo "$as_me: icecc-create-env output:" >&6;}
59231    cat \
59232          ${icecc_create_env_log}
59233    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59234  fi
59235
59236    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59237      # For clang, the icecc compilerwrapper is needed. It usually resides next
59238      # to icecc-create-env.
59239
59240
59241
59242  # Publish this variable in the help.
59243
59244
59245  if [ -z "${ICECC_WRAPPER+x}" ]; then
59246    # The variable is not set by user, try to locate tool using the code snippet
59247    for ac_prog in compilerwrapper
59248do
59249  # Extract the first word of "$ac_prog", so it can be a program name with args.
59250set dummy $ac_prog; ac_word=$2
59251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59252$as_echo_n "checking for $ac_word... " >&6; }
59253if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59254  $as_echo_n "(cached) " >&6
59255else
59256  case $ICECC_WRAPPER in
59257  [\\/]* | ?:[\\/]*)
59258  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59259  ;;
59260  *)
59261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59262for as_dir in $PATH
59263do
59264  IFS=$as_save_IFS
59265  test -z "$as_dir" && as_dir=.
59266    for ac_exec_ext in '' $ac_executable_extensions; do
59267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59268    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59270    break 2
59271  fi
59272done
59273  done
59274IFS=$as_save_IFS
59275
59276  ;;
59277esac
59278fi
59279ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59280if test -n "$ICECC_WRAPPER"; then
59281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59282$as_echo "$ICECC_WRAPPER" >&6; }
59283else
59284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59285$as_echo "no" >&6; }
59286fi
59287
59288
59289  test -n "$ICECC_WRAPPER" && break
59290done
59291
59292  else
59293    # The variable is set, but is it from the command line or the environment?
59294
59295    # Try to remove the string !ICECC_WRAPPER! from our list.
59296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59298      # If it failed, the variable was not from the command line. Ignore it,
59299      # but warn the user (except for BASH, which is always set by the calling BASH).
59300      if test "xICECC_WRAPPER" != xBASH; then
59301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59302$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59303      fi
59304      # Try to locate tool using the code snippet
59305      for ac_prog in compilerwrapper
59306do
59307  # Extract the first word of "$ac_prog", so it can be a program name with args.
59308set dummy $ac_prog; ac_word=$2
59309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59310$as_echo_n "checking for $ac_word... " >&6; }
59311if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59312  $as_echo_n "(cached) " >&6
59313else
59314  case $ICECC_WRAPPER in
59315  [\\/]* | ?:[\\/]*)
59316  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59317  ;;
59318  *)
59319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59320for as_dir in $PATH
59321do
59322  IFS=$as_save_IFS
59323  test -z "$as_dir" && as_dir=.
59324    for ac_exec_ext in '' $ac_executable_extensions; do
59325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59326    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59328    break 2
59329  fi
59330done
59331  done
59332IFS=$as_save_IFS
59333
59334  ;;
59335esac
59336fi
59337ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59338if test -n "$ICECC_WRAPPER"; then
59339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59340$as_echo "$ICECC_WRAPPER" >&6; }
59341else
59342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59343$as_echo "no" >&6; }
59344fi
59345
59346
59347  test -n "$ICECC_WRAPPER" && break
59348done
59349
59350    else
59351      # If it succeeded, then it was overridden by the user. We will use it
59352      # for the tool.
59353
59354      # First remove it from the list of overridden variables, so we can test
59355      # for unknown variables in the end.
59356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59357
59358      # Check if we try to supply an empty value
59359      if test "x$ICECC_WRAPPER" = x; then
59360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59361$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59363$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59365$as_echo "disabled" >&6; }
59366      else
59367        # Check if the provided tool contains a complete path.
59368        tool_specified="$ICECC_WRAPPER"
59369        tool_basename="${tool_specified##*/}"
59370        if test "x$tool_basename" = "x$tool_specified"; then
59371          # A command without a complete path is provided, search $PATH.
59372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59373$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59374          # Extract the first word of "$tool_basename", so it can be a program name with args.
59375set dummy $tool_basename; ac_word=$2
59376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59377$as_echo_n "checking for $ac_word... " >&6; }
59378if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59379  $as_echo_n "(cached) " >&6
59380else
59381  case $ICECC_WRAPPER in
59382  [\\/]* | ?:[\\/]*)
59383  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59384  ;;
59385  *)
59386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59387for as_dir in $PATH
59388do
59389  IFS=$as_save_IFS
59390  test -z "$as_dir" && as_dir=.
59391    for ac_exec_ext in '' $ac_executable_extensions; do
59392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59393    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59395    break 2
59396  fi
59397done
59398  done
59399IFS=$as_save_IFS
59400
59401  ;;
59402esac
59403fi
59404ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59405if test -n "$ICECC_WRAPPER"; then
59406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59407$as_echo "$ICECC_WRAPPER" >&6; }
59408else
59409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59410$as_echo "no" >&6; }
59411fi
59412
59413
59414          if test "x$ICECC_WRAPPER" = x; then
59415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59416          fi
59417        else
59418          # Otherwise we believe it is a complete path. Use it as it is.
59419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59420$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59422$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59423          if test ! -x "$tool_specified"; then
59424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59425$as_echo "not found" >&6; }
59426            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59427          fi
59428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59429$as_echo "$tool_specified" >&6; }
59430        fi
59431      fi
59432    fi
59433
59434  fi
59435
59436
59437
59438  if test "x$ICECC_WRAPPER" = x; then
59439    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59440  fi
59441
59442
59443
59444  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59445      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1
59446  if test "$?" != "0"; then
59447    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59448$as_echo "$as_me: icecc-create-env output:" >&6;}
59449    cat ${icecc_create_env_log}
59450    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59451  fi
59452
59453    else
59454      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59455    fi
59456    PATH="$old_path"
59457    # The bundle with the compiler gets a name based on checksums. Parse log file
59458    # to find it.
59459    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59460    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59461    if test ! -f ${ICECC_ENV_BUNDLE}; then
59462      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59463    fi
59464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59465$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59467$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59468    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59469
59470    if test "x${COMPILE_TYPE}" = "xcross"; then
59471      # If cross compiling, create a separate env package for the build compiler
59472      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
59473      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
59474      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
59475
59476  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59477      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
59478            ${icecc_create_env_log_build} 2>&1
59479  if test "$?" != "0"; then
59480    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59481$as_echo "$as_me: icecc-create-env output:" >&6;}
59482    cat \
59483            ${icecc_create_env_log_build}
59484    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59485  fi
59486
59487      elif test "x${BUILD_CC##*/}" = "xclang"; then
59488
59489  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59490      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1
59491  if test "$?" != "0"; then
59492    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59493$as_echo "$as_me: icecc-create-env output:" >&6;}
59494    cat ${icecc_create_env_log_build}
59495    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59496  fi
59497
59498      else
59499        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
59500      fi
59501      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
59502      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59503      if test ! -f ${ICECC_ENV_BUNDLE}; then
59504        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59505      fi
59506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
59507$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
59508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59509$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59510      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
59511          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
59512    else
59513      BUILD_ICECC="${ICECC}"
59514    fi
59515
59516
59517  fi
59518
59519
59520# Can the C/C++ compiler use precompiled headers?
59521
59522
59523  ###############################################################################
59524  #
59525  # Can the C/C++ compiler use precompiled headers?
59526  #
59527  # Check whether --enable-precompiled-headers was given.
59528if test "${enable_precompiled_headers+set}" = set; then :
59529  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
59530else
59531  ENABLE_PRECOMPH=yes
59532fi
59533
59534
59535  USE_PRECOMPILED_HEADER=1
59536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
59537$as_echo_n "checking If precompiled header is enabled... " >&6; }
59538  if test "x$ENABLE_PRECOMPH" = xno; then
59539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
59540$as_echo "no, forced" >&6; }
59541    USE_PRECOMPILED_HEADER=0
59542  elif test "x$ICECC" != "x"; then
59543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
59544$as_echo "no, does not work effectively with icecc" >&6; }
59545    USE_PRECOMPILED_HEADER=0
59546  else
59547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59548$as_echo "yes" >&6; }
59549  fi
59550
59551  if test "x$ENABLE_PRECOMPH" = xyes; then
59552    # Check that the compiler actually supports precomp headers.
59553    if test "x$TOOLCHAIN_TYPE" = xgcc; then
59554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
59555$as_echo_n "checking that precompiled headers work... " >&6; }
59556      echo "int alfa();" > conftest.h
59557      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
59558      if test ! -f conftest.hpp.gch; then
59559        USE_PRECOMPILED_HEADER=0
59560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59561$as_echo "no" >&6; }
59562      else
59563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59564$as_echo "yes" >&6; }
59565      fi
59566      rm -f conftest.h conftest.hpp.gch
59567    fi
59568  fi
59569
59570
59571
59572
59573# Setup use of ccache, if available
59574
59575  # Check whether --enable-ccache was given.
59576if test "${enable_ccache+set}" = set; then :
59577  enableval=$enable_ccache;
59578fi
59579
59580
59581  CCACHE=
59582  CCACHE_STATUS=
59583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
59584$as_echo_n "checking is ccache enabled... " >&6; }
59585  if test "x$enable_ccache" = xyes; then
59586    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
59587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59588$as_echo "yes" >&6; }
59589      OLD_PATH="$PATH"
59590      if test "x$TOOLCHAIN_PATH" != x; then
59591        PATH=$TOOLCHAIN_PATH:$PATH
59592      fi
59593
59594
59595
59596  # Publish this variable in the help.
59597
59598
59599  if [ -z "${CCACHE+x}" ]; then
59600    # The variable is not set by user, try to locate tool using the code snippet
59601    for ac_prog in ccache
59602do
59603  # Extract the first word of "$ac_prog", so it can be a program name with args.
59604set dummy $ac_prog; ac_word=$2
59605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59606$as_echo_n "checking for $ac_word... " >&6; }
59607if ${ac_cv_path_CCACHE+:} false; then :
59608  $as_echo_n "(cached) " >&6
59609else
59610  case $CCACHE in
59611  [\\/]* | ?:[\\/]*)
59612  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59613  ;;
59614  *)
59615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59616for as_dir in $PATH
59617do
59618  IFS=$as_save_IFS
59619  test -z "$as_dir" && as_dir=.
59620    for ac_exec_ext in '' $ac_executable_extensions; do
59621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59622    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59624    break 2
59625  fi
59626done
59627  done
59628IFS=$as_save_IFS
59629
59630  ;;
59631esac
59632fi
59633CCACHE=$ac_cv_path_CCACHE
59634if test -n "$CCACHE"; then
59635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59636$as_echo "$CCACHE" >&6; }
59637else
59638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59639$as_echo "no" >&6; }
59640fi
59641
59642
59643  test -n "$CCACHE" && break
59644done
59645
59646  else
59647    # The variable is set, but is it from the command line or the environment?
59648
59649    # Try to remove the string !CCACHE! from our list.
59650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
59651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59652      # If it failed, the variable was not from the command line. Ignore it,
59653      # but warn the user (except for BASH, which is always set by the calling BASH).
59654      if test "xCCACHE" != xBASH; then
59655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
59656$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
59657      fi
59658      # Try to locate tool using the code snippet
59659      for ac_prog in ccache
59660do
59661  # Extract the first word of "$ac_prog", so it can be a program name with args.
59662set dummy $ac_prog; ac_word=$2
59663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59664$as_echo_n "checking for $ac_word... " >&6; }
59665if ${ac_cv_path_CCACHE+:} false; then :
59666  $as_echo_n "(cached) " >&6
59667else
59668  case $CCACHE in
59669  [\\/]* | ?:[\\/]*)
59670  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59671  ;;
59672  *)
59673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59674for as_dir in $PATH
59675do
59676  IFS=$as_save_IFS
59677  test -z "$as_dir" && as_dir=.
59678    for ac_exec_ext in '' $ac_executable_extensions; do
59679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59680    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59682    break 2
59683  fi
59684done
59685  done
59686IFS=$as_save_IFS
59687
59688  ;;
59689esac
59690fi
59691CCACHE=$ac_cv_path_CCACHE
59692if test -n "$CCACHE"; then
59693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59694$as_echo "$CCACHE" >&6; }
59695else
59696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59697$as_echo "no" >&6; }
59698fi
59699
59700
59701  test -n "$CCACHE" && break
59702done
59703
59704    else
59705      # If it succeeded, then it was overridden by the user. We will use it
59706      # for the tool.
59707
59708      # First remove it from the list of overridden variables, so we can test
59709      # for unknown variables in the end.
59710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59711
59712      # Check if we try to supply an empty value
59713      if test "x$CCACHE" = x; then
59714        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
59715$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
59716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
59717$as_echo_n "checking for CCACHE... " >&6; }
59718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59719$as_echo "disabled" >&6; }
59720      else
59721        # Check if the provided tool contains a complete path.
59722        tool_specified="$CCACHE"
59723        tool_basename="${tool_specified##*/}"
59724        if test "x$tool_basename" = "x$tool_specified"; then
59725          # A command without a complete path is provided, search $PATH.
59726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
59727$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
59728          # Extract the first word of "$tool_basename", so it can be a program name with args.
59729set dummy $tool_basename; ac_word=$2
59730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59731$as_echo_n "checking for $ac_word... " >&6; }
59732if ${ac_cv_path_CCACHE+:} false; then :
59733  $as_echo_n "(cached) " >&6
59734else
59735  case $CCACHE in
59736  [\\/]* | ?:[\\/]*)
59737  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59738  ;;
59739  *)
59740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59741for as_dir in $PATH
59742do
59743  IFS=$as_save_IFS
59744  test -z "$as_dir" && as_dir=.
59745    for ac_exec_ext in '' $ac_executable_extensions; do
59746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59747    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59749    break 2
59750  fi
59751done
59752  done
59753IFS=$as_save_IFS
59754
59755  ;;
59756esac
59757fi
59758CCACHE=$ac_cv_path_CCACHE
59759if test -n "$CCACHE"; then
59760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59761$as_echo "$CCACHE" >&6; }
59762else
59763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59764$as_echo "no" >&6; }
59765fi
59766
59767
59768          if test "x$CCACHE" = x; then
59769            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59770          fi
59771        else
59772          # Otherwise we believe it is a complete path. Use it as it is.
59773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
59774$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
59775          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
59776$as_echo_n "checking for CCACHE... " >&6; }
59777          if test ! -x "$tool_specified"; then
59778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59779$as_echo "not found" >&6; }
59780            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
59781          fi
59782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59783$as_echo "$tool_specified" >&6; }
59784        fi
59785      fi
59786    fi
59787
59788  fi
59789
59790
59791
59792  if test "x$CCACHE" = x; then
59793    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
59794  fi
59795
59796
59797      PATH="$OLD_PATH"
59798      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
59799      CCACHE_STATUS="Active ($CCACHE_VERSION)"
59800    else
59801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59802$as_echo "no" >&6; }
59803      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
59804$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
59805    fi
59806  elif test "x$enable_ccache" = xno; then
59807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
59808$as_echo "no, explicitly disabled" >&6; }
59809    CCACHE_STATUS="Disabled"
59810  elif test "x$enable_ccache" = x; then
59811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59812$as_echo "no" >&6; }
59813  else
59814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
59815$as_echo "unknown" >&6; }
59816    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
59817  fi
59818
59819
59820
59821# Check whether --with-ccache-dir was given.
59822if test "${with_ccache_dir+set}" = set; then :
59823  withval=$with_ccache_dir;
59824fi
59825
59826
59827  if test "x$with_ccache_dir" != x; then
59828    # When using a non home ccache directory, assume the use is to share ccache files
59829    # with other users. Thus change the umask.
59830    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
59831    if test "x$CCACHE" = x; then
59832      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
59833$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
59834    fi
59835  fi
59836
59837  if test "x$CCACHE" != x; then
59838
59839  if test "x$CCACHE" != x; then
59840    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
59841      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
59842          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
59843      if test "x$HAS_BAD_CCACHE" != "x"; then
59844        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
59845      fi
59846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
59847$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
59848      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
59849      PUSHED_FLAGS="$CXXFLAGS"
59850      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
59851      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59852/* end confdefs.h.  */
59853
59854int
59855main ()
59856{
59857
59858  ;
59859  return 0;
59860}
59861_ACEOF
59862if ac_fn_cxx_try_compile "$LINENO"; then :
59863  CC_KNOWS_CCACHE_TRICK=yes
59864else
59865  CC_KNOWS_CCACHE_TRICK=no
59866fi
59867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59868      CXXFLAGS="$PUSHED_FLAGS"
59869      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
59870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59871$as_echo "yes" >&6; }
59872        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
59873
59874        CCACHE_SLOPPINESS=pch_defines,time_macros
59875      else
59876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59877$as_echo "no" >&6; }
59878        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
59879      fi
59880    fi
59881
59882    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
59883        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
59884
59885    if test "x$SET_CCACHE_DIR" != x; then
59886      mkdir -p $CCACHE_DIR > /dev/null 2>&1
59887      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
59888    fi
59889  fi
59890
59891  fi
59892
59893
59894###############################################################################
59895#
59896# And now the finish...
59897#
59898###############################################################################
59899
59900# Check for some common pitfalls
59901
59902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59903    file_to_test="$SRC_ROOT/LICENSE"
59904    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
59905      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
59906    fi
59907  fi
59908
59909
59910  # Did user specify any unknown variables?
59911
59912  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
59913    # Replace the separating ! with spaces before presenting for end user.
59914    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
59915    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
59916$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
59917  fi
59918
59919
59920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
59921$as_echo_n "checking if build directory is on local disk... " >&6; }
59922
59923  # df -l lists only local disks; if the given directory is not found then
59924  # a non-zero exit code is given
59925  if test "x$DF" = x; then
59926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59927      # msys does not have df; use Windows "net use" instead.
59928      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
59929      if test "x$IS_NETWORK_DISK" = x; then
59930        OUTPUT_DIR_IS_LOCAL="yes"
59931      else
59932        OUTPUT_DIR_IS_LOCAL="no"
59933      fi
59934    else
59935      # No df here, say it's local
59936      OUTPUT_DIR_IS_LOCAL="yes"
59937    fi
59938  else
59939    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
59940      OUTPUT_DIR_IS_LOCAL="yes"
59941    else
59942      OUTPUT_DIR_IS_LOCAL="no"
59943    fi
59944  fi
59945
59946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
59947$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
59948
59949
59950
59951  # Check if the user has any old-style ALT_ variables set.
59952  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
59953
59954  # Before generating output files, test if they exist. If they do, this is a reconfigure.
59955  # Since we can't properly handle the dependencies for this, warn the user about the situation
59956  if test -e $OUTPUT_ROOT/spec.gmk; then
59957    IS_RECONFIGURE=yes
59958  else
59959    IS_RECONFIGURE=no
59960  fi
59961
59962
59963# At the end, call the custom hook. (Dummy macro if no custom sources available)
59964
59965
59966# We're messing a bit with internal autoconf variables to put the config.status
59967# in the output directory instead of the current directory.
59968CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
59969
59970# Create the actual output files. Now the main work of configure is done.
59971cat >confcache <<\_ACEOF
59972# This file is a shell script that caches the results of configure
59973# tests run on this system so they can be shared between configure
59974# scripts and configure runs, see configure's option --config-cache.
59975# It is not useful on other systems.  If it contains results you don't
59976# want to keep, you may remove or edit it.
59977#
59978# config.status only pays attention to the cache file if you give it
59979# the --recheck option to rerun configure.
59980#
59981# `ac_cv_env_foo' variables (set or unset) will be overridden when
59982# loading this file, other *unset* `ac_cv_foo' will be assigned the
59983# following values.
59984
59985_ACEOF
59986
59987# The following way of writing the cache mishandles newlines in values,
59988# but we know of no workaround that is simple, portable, and efficient.
59989# So, we kill variables containing newlines.
59990# Ultrix sh set writes to stderr and can't be redirected directly,
59991# and sets the high bit in the cache file unless we assign to the vars.
59992(
59993  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
59994    eval ac_val=\$$ac_var
59995    case $ac_val in #(
59996    *${as_nl}*)
59997      case $ac_var in #(
59998      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
59999$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60000      esac
60001      case $ac_var in #(
60002      _ | IFS | as_nl) ;; #(
60003      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60004      *) { eval $ac_var=; unset $ac_var;} ;;
60005      esac ;;
60006    esac
60007  done
60008
60009  (set) 2>&1 |
60010    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60011    *${as_nl}ac_space=\ *)
60012      # `set' does not quote correctly, so add quotes: double-quote
60013      # substitution turns \\\\ into \\, and sed turns \\ into \.
60014      sed -n \
60015	"s/'/'\\\\''/g;
60016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60017      ;; #(
60018    *)
60019      # `set' quotes correctly as required by POSIX, so do not add quotes.
60020      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60021      ;;
60022    esac |
60023    sort
60024) |
60025  sed '
60026     /^ac_cv_env_/b end
60027     t clear
60028     :clear
60029     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60030     t end
60031     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60032     :end' >>confcache
60033if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60034  if test -w "$cache_file"; then
60035    if test "x$cache_file" != "x/dev/null"; then
60036      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60037$as_echo "$as_me: updating cache $cache_file" >&6;}
60038      if test ! -f "$cache_file" || test -h "$cache_file"; then
60039	cat confcache >"$cache_file"
60040      else
60041        case $cache_file in #(
60042        */* | ?:*)
60043	  mv -f confcache "$cache_file"$$ &&
60044	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60045        *)
60046	  mv -f confcache "$cache_file" ;;
60047	esac
60048      fi
60049    fi
60050  else
60051    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60052$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60053  fi
60054fi
60055rm -f confcache
60056
60057test "x$prefix" = xNONE && prefix=$ac_default_prefix
60058# Let make expand exec_prefix.
60059test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60060
60061# Transform confdefs.h into DEFS.
60062# Protect against shell expansion while executing Makefile rules.
60063# Protect against Makefile macro expansion.
60064#
60065# If the first sed substitution is executed (which looks for macros that
60066# take arguments), then branch to the quote section.  Otherwise,
60067# look for a macro that doesn't take arguments.
60068ac_script='
60069:mline
60070/\\$/{
60071 N
60072 s,\\\n,,
60073 b mline
60074}
60075t clear
60076:clear
60077s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60078t quote
60079s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60080t quote
60081b any
60082:quote
60083s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60084s/\[/\\&/g
60085s/\]/\\&/g
60086s/\$/$$/g
60087H
60088:any
60089${
60090	g
60091	s/^\n//
60092	s/\n/ /g
60093	p
60094}
60095'
60096DEFS=`sed -n "$ac_script" confdefs.h`
60097
60098
60099ac_libobjs=
60100ac_ltlibobjs=
60101U=
60102for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60103  # 1. Remove the extension, and $U if already installed.
60104  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60105  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60106  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60107  #    will be set to the directory where LIBOBJS objects are built.
60108  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60109  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60110done
60111LIBOBJS=$ac_libobjs
60112
60113LTLIBOBJS=$ac_ltlibobjs
60114
60115
60116
60117: "${CONFIG_STATUS=./config.status}"
60118ac_write_fail=0
60119ac_clean_files_save=$ac_clean_files
60120ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60121{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60122$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60123as_write_fail=0
60124cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60125#! $SHELL
60126# Generated by $as_me.
60127# Run this file to recreate the current configuration.
60128# Compiler output produced by configure, useful for debugging
60129# configure, is in config.log if it exists.
60130
60131debug=false
60132ac_cs_recheck=false
60133ac_cs_silent=false
60134
60135SHELL=\${CONFIG_SHELL-$SHELL}
60136export SHELL
60137_ASEOF
60138cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60139## -------------------- ##
60140## M4sh Initialization. ##
60141## -------------------- ##
60142
60143# Be more Bourne compatible
60144DUALCASE=1; export DUALCASE # for MKS sh
60145if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60146  emulate sh
60147  NULLCMD=:
60148  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60149  # is contrary to our usage.  Disable this feature.
60150  alias -g '${1+"$@"}'='"$@"'
60151  setopt NO_GLOB_SUBST
60152else
60153  case `(set -o) 2>/dev/null` in #(
60154  *posix*) :
60155    set -o posix ;; #(
60156  *) :
60157     ;;
60158esac
60159fi
60160
60161
60162as_nl='
60163'
60164export as_nl
60165# Printing a long string crashes Solaris 7 /usr/bin/printf.
60166as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60167as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60168as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60169# Prefer a ksh shell builtin over an external printf program on Solaris,
60170# but without wasting forks for bash or zsh.
60171if test -z "$BASH_VERSION$ZSH_VERSION" \
60172    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60173  as_echo='print -r --'
60174  as_echo_n='print -rn --'
60175elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60176  as_echo='printf %s\n'
60177  as_echo_n='printf %s'
60178else
60179  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60180    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60181    as_echo_n='/usr/ucb/echo -n'
60182  else
60183    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60184    as_echo_n_body='eval
60185      arg=$1;
60186      case $arg in #(
60187      *"$as_nl"*)
60188	expr "X$arg" : "X\\(.*\\)$as_nl";
60189	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60190      esac;
60191      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60192    '
60193    export as_echo_n_body
60194    as_echo_n='sh -c $as_echo_n_body as_echo'
60195  fi
60196  export as_echo_body
60197  as_echo='sh -c $as_echo_body as_echo'
60198fi
60199
60200# The user is always right.
60201if test "${PATH_SEPARATOR+set}" != set; then
60202  PATH_SEPARATOR=:
60203  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60204    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60205      PATH_SEPARATOR=';'
60206  }
60207fi
60208
60209
60210# IFS
60211# We need space, tab and new line, in precisely that order.  Quoting is
60212# there to prevent editors from complaining about space-tab.
60213# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60214# splitting by setting IFS to empty value.)
60215IFS=" ""	$as_nl"
60216
60217# Find who we are.  Look in the path if we contain no directory separator.
60218as_myself=
60219case $0 in #((
60220  *[\\/]* ) as_myself=$0 ;;
60221  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60222for as_dir in $PATH
60223do
60224  IFS=$as_save_IFS
60225  test -z "$as_dir" && as_dir=.
60226    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60227  done
60228IFS=$as_save_IFS
60229
60230     ;;
60231esac
60232# We did not find ourselves, most probably we were run as `sh COMMAND'
60233# in which case we are not to be found in the path.
60234if test "x$as_myself" = x; then
60235  as_myself=$0
60236fi
60237if test ! -f "$as_myself"; then
60238  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60239  exit 1
60240fi
60241
60242# Unset variables that we do not need and which cause bugs (e.g. in
60243# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60244# suppresses any "Segmentation fault" message there.  '((' could
60245# trigger a bug in pdksh 5.2.14.
60246for as_var in BASH_ENV ENV MAIL MAILPATH
60247do eval test x\${$as_var+set} = xset \
60248  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60249done
60250PS1='$ '
60251PS2='> '
60252PS4='+ '
60253
60254# NLS nuisances.
60255LC_ALL=C
60256export LC_ALL
60257LANGUAGE=C
60258export LANGUAGE
60259
60260# CDPATH.
60261(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60262
60263
60264# as_fn_error STATUS ERROR [LINENO LOG_FD]
60265# ----------------------------------------
60266# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60267# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60268# script with STATUS, using 1 if that was 0.
60269as_fn_error ()
60270{
60271  as_status=$1; test $as_status -eq 0 && as_status=1
60272  if test "$4"; then
60273    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60274    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60275  fi
60276  $as_echo "$as_me: error: $2" >&2
60277  as_fn_exit $as_status
60278} # as_fn_error
60279
60280
60281# as_fn_set_status STATUS
60282# -----------------------
60283# Set $? to STATUS, without forking.
60284as_fn_set_status ()
60285{
60286  return $1
60287} # as_fn_set_status
60288
60289# as_fn_exit STATUS
60290# -----------------
60291# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60292as_fn_exit ()
60293{
60294  set +e
60295  as_fn_set_status $1
60296  exit $1
60297} # as_fn_exit
60298
60299# as_fn_unset VAR
60300# ---------------
60301# Portably unset VAR.
60302as_fn_unset ()
60303{
60304  { eval $1=; unset $1;}
60305}
60306as_unset=as_fn_unset
60307# as_fn_append VAR VALUE
60308# ----------------------
60309# Append the text in VALUE to the end of the definition contained in VAR. Take
60310# advantage of any shell optimizations that allow amortized linear growth over
60311# repeated appends, instead of the typical quadratic growth present in naive
60312# implementations.
60313if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60314  eval 'as_fn_append ()
60315  {
60316    eval $1+=\$2
60317  }'
60318else
60319  as_fn_append ()
60320  {
60321    eval $1=\$$1\$2
60322  }
60323fi # as_fn_append
60324
60325# as_fn_arith ARG...
60326# ------------------
60327# Perform arithmetic evaluation on the ARGs, and store the result in the
60328# global $as_val. Take advantage of shells that can avoid forks. The arguments
60329# must be portable across $(()) and expr.
60330if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60331  eval 'as_fn_arith ()
60332  {
60333    as_val=$(( $* ))
60334  }'
60335else
60336  as_fn_arith ()
60337  {
60338    as_val=`expr "$@" || test $? -eq 1`
60339  }
60340fi # as_fn_arith
60341
60342
60343if expr a : '\(a\)' >/dev/null 2>&1 &&
60344   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60345  as_expr=expr
60346else
60347  as_expr=false
60348fi
60349
60350if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60351  as_basename=basename
60352else
60353  as_basename=false
60354fi
60355
60356if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60357  as_dirname=dirname
60358else
60359  as_dirname=false
60360fi
60361
60362as_me=`$as_basename -- "$0" ||
60363$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60364	 X"$0" : 'X\(//\)$' \| \
60365	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60366$as_echo X/"$0" |
60367    sed '/^.*\/\([^/][^/]*\)\/*$/{
60368	    s//\1/
60369	    q
60370	  }
60371	  /^X\/\(\/\/\)$/{
60372	    s//\1/
60373	    q
60374	  }
60375	  /^X\/\(\/\).*/{
60376	    s//\1/
60377	    q
60378	  }
60379	  s/.*/./; q'`
60380
60381# Avoid depending upon Character Ranges.
60382as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60383as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60384as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60385as_cr_digits='0123456789'
60386as_cr_alnum=$as_cr_Letters$as_cr_digits
60387
60388ECHO_C= ECHO_N= ECHO_T=
60389case `echo -n x` in #(((((
60390-n*)
60391  case `echo 'xy\c'` in
60392  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60393  xy)  ECHO_C='\c';;
60394  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60395       ECHO_T='	';;
60396  esac;;
60397*)
60398  ECHO_N='-n';;
60399esac
60400
60401rm -f conf$$ conf$$.exe conf$$.file
60402if test -d conf$$.dir; then
60403  rm -f conf$$.dir/conf$$.file
60404else
60405  rm -f conf$$.dir
60406  mkdir conf$$.dir 2>/dev/null
60407fi
60408if (echo >conf$$.file) 2>/dev/null; then
60409  if ln -s conf$$.file conf$$ 2>/dev/null; then
60410    as_ln_s='ln -s'
60411    # ... but there are two gotchas:
60412    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60413    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60414    # In both cases, we have to default to `cp -pR'.
60415    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60416      as_ln_s='cp -pR'
60417  elif ln conf$$.file conf$$ 2>/dev/null; then
60418    as_ln_s=ln
60419  else
60420    as_ln_s='cp -pR'
60421  fi
60422else
60423  as_ln_s='cp -pR'
60424fi
60425rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60426rmdir conf$$.dir 2>/dev/null
60427
60428
60429# as_fn_mkdir_p
60430# -------------
60431# Create "$as_dir" as a directory, including parents if necessary.
60432as_fn_mkdir_p ()
60433{
60434
60435  case $as_dir in #(
60436  -*) as_dir=./$as_dir;;
60437  esac
60438  test -d "$as_dir" || eval $as_mkdir_p || {
60439    as_dirs=
60440    while :; do
60441      case $as_dir in #(
60442      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60443      *) as_qdir=$as_dir;;
60444      esac
60445      as_dirs="'$as_qdir' $as_dirs"
60446      as_dir=`$as_dirname -- "$as_dir" ||
60447$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60448	 X"$as_dir" : 'X\(//\)[^/]' \| \
60449	 X"$as_dir" : 'X\(//\)$' \| \
60450	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60451$as_echo X"$as_dir" |
60452    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60453	    s//\1/
60454	    q
60455	  }
60456	  /^X\(\/\/\)[^/].*/{
60457	    s//\1/
60458	    q
60459	  }
60460	  /^X\(\/\/\)$/{
60461	    s//\1/
60462	    q
60463	  }
60464	  /^X\(\/\).*/{
60465	    s//\1/
60466	    q
60467	  }
60468	  s/.*/./; q'`
60469      test -d "$as_dir" && break
60470    done
60471    test -z "$as_dirs" || eval "mkdir $as_dirs"
60472  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60473
60474
60475} # as_fn_mkdir_p
60476if mkdir -p . 2>/dev/null; then
60477  as_mkdir_p='mkdir -p "$as_dir"'
60478else
60479  test -d ./-p && rmdir ./-p
60480  as_mkdir_p=false
60481fi
60482
60483
60484# as_fn_executable_p FILE
60485# -----------------------
60486# Test if FILE is an executable regular file.
60487as_fn_executable_p ()
60488{
60489  test -f "$1" && test -x "$1"
60490} # as_fn_executable_p
60491as_test_x='test -x'
60492as_executable_p=as_fn_executable_p
60493
60494# Sed expression to map a string onto a valid CPP name.
60495as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60496
60497# Sed expression to map a string onto a valid variable name.
60498as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60499
60500
60501exec 6>&1
60502## ----------------------------------- ##
60503## Main body of $CONFIG_STATUS script. ##
60504## ----------------------------------- ##
60505_ASEOF
60506test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
60507
60508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60509# Save the log message, to keep $0 and so on meaningful, and to
60510# report actual input values of CONFIG_FILES etc. instead of their
60511# values after options handling.
60512ac_log="
60513This file was extended by OpenJDK $as_me jdk9, which was
60514generated by GNU Autoconf 2.69.  Invocation command line was
60515
60516  CONFIG_FILES    = $CONFIG_FILES
60517  CONFIG_HEADERS  = $CONFIG_HEADERS
60518  CONFIG_LINKS    = $CONFIG_LINKS
60519  CONFIG_COMMANDS = $CONFIG_COMMANDS
60520  $ $0 $@
60521
60522on `(hostname || uname -n) 2>/dev/null | sed 1q`
60523"
60524
60525_ACEOF
60526
60527case $ac_config_files in *"
60528"*) set x $ac_config_files; shift; ac_config_files=$*;;
60529esac
60530
60531
60532
60533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60534# Files that config.status was made for.
60535config_files="$ac_config_files"
60536
60537_ACEOF
60538
60539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60540ac_cs_usage="\
60541\`$as_me' instantiates files and other configuration actions
60542from templates according to the current configuration.  Unless the files
60543and actions are specified as TAGs, all are instantiated by default.
60544
60545Usage: $0 [OPTION]... [TAG]...
60546
60547  -h, --help       print this help, then exit
60548  -V, --version    print version number and configuration settings, then exit
60549      --config     print configuration, then exit
60550  -q, --quiet, --silent
60551                   do not print progress messages
60552  -d, --debug      don't remove temporary files
60553      --recheck    update $as_me by reconfiguring in the same conditions
60554      --file=FILE[:TEMPLATE]
60555                   instantiate the configuration file FILE
60556
60557Configuration files:
60558$config_files
60559
60560Report bugs to <build-dev@openjdk.java.net>.
60561OpenJDK home page: <http://openjdk.java.net>."
60562
60563_ACEOF
60564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60565ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
60566ac_cs_version="\\
60567OpenJDK config.status jdk9
60568configured by $0, generated by GNU Autoconf 2.69,
60569  with options \\"\$ac_cs_config\\"
60570
60571Copyright (C) 2012 Free Software Foundation, Inc.
60572This config.status script is free software; the Free Software Foundation
60573gives unlimited permission to copy, distribute and modify it."
60574
60575ac_pwd='$ac_pwd'
60576srcdir='$srcdir'
60577AWK='$AWK'
60578test -n "\$AWK" || AWK=awk
60579_ACEOF
60580
60581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60582# The default lists apply if the user does not specify any file.
60583ac_need_defaults=:
60584while test $# != 0
60585do
60586  case $1 in
60587  --*=?*)
60588    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60589    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
60590    ac_shift=:
60591    ;;
60592  --*=)
60593    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60594    ac_optarg=
60595    ac_shift=:
60596    ;;
60597  *)
60598    ac_option=$1
60599    ac_optarg=$2
60600    ac_shift=shift
60601    ;;
60602  esac
60603
60604  case $ac_option in
60605  # Handling of the options.
60606  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
60607    ac_cs_recheck=: ;;
60608  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
60609    $as_echo "$ac_cs_version"; exit ;;
60610  --config | --confi | --conf | --con | --co | --c )
60611    $as_echo "$ac_cs_config"; exit ;;
60612  --debug | --debu | --deb | --de | --d | -d )
60613    debug=: ;;
60614  --file | --fil | --fi | --f )
60615    $ac_shift
60616    case $ac_optarg in
60617    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60618    '') as_fn_error $? "missing file argument" ;;
60619    esac
60620    as_fn_append CONFIG_FILES " '$ac_optarg'"
60621    ac_need_defaults=false;;
60622  --he | --h |  --help | --hel | -h )
60623    $as_echo "$ac_cs_usage"; exit ;;
60624  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
60625  | -silent | --silent | --silen | --sile | --sil | --si | --s)
60626    ac_cs_silent=: ;;
60627
60628  # This is an error.
60629  -*) as_fn_error $? "unrecognized option: \`$1'
60630Try \`$0 --help' for more information." ;;
60631
60632  *) as_fn_append ac_config_targets " $1"
60633     ac_need_defaults=false ;;
60634
60635  esac
60636  shift
60637done
60638
60639ac_configure_extra_args=
60640
60641if $ac_cs_silent; then
60642  exec 6>/dev/null
60643  ac_configure_extra_args="$ac_configure_extra_args --silent"
60644fi
60645
60646_ACEOF
60647cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60648if \$ac_cs_recheck; then
60649  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60650  shift
60651  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
60652  CONFIG_SHELL='$SHELL'
60653  export CONFIG_SHELL
60654  exec "\$@"
60655fi
60656
60657_ACEOF
60658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60659exec 5>>config.log
60660{
60661  echo
60662  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
60663## Running $as_me. ##
60664_ASBOX
60665  $as_echo "$ac_log"
60666} >&5
60667
60668_ACEOF
60669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60670_ACEOF
60671
60672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60673
60674# Handling of arguments.
60675for ac_config_target in $ac_config_targets
60676do
60677  case $ac_config_target in
60678    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
60679    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
60680    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
60681    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
60682    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
60683
60684  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
60685  esac
60686done
60687
60688
60689# If the user did not use the arguments to specify the items to instantiate,
60690# then the envvar interface is used.  Set only those that are not.
60691# We use the long form for the default assignment because of an extremely
60692# bizarre bug on SunOS 4.1.3.
60693if $ac_need_defaults; then
60694  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
60695fi
60696
60697# Have a temporary directory for convenience.  Make it in the build tree
60698# simply because there is no reason against having it here, and in addition,
60699# creating and moving files from /tmp can sometimes cause problems.
60700# Hook for its removal unless debugging.
60701# Note that there is a small window in which the directory will not be cleaned:
60702# after its creation but before its name has been assigned to `$tmp'.
60703$debug ||
60704{
60705  tmp= ac_tmp=
60706  trap 'exit_status=$?
60707  : "${ac_tmp:=$tmp}"
60708  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
60709' 0
60710  trap 'as_fn_exit 1' 1 2 13 15
60711}
60712# Create a (secure) tmp directory for tmp files.
60713
60714{
60715  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
60716  test -d "$tmp"
60717}  ||
60718{
60719  tmp=./conf$$-$RANDOM
60720  (umask 077 && mkdir "$tmp")
60721} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
60722ac_tmp=$tmp
60723
60724# Set up the scripts for CONFIG_FILES section.
60725# No need to generate them if there are no CONFIG_FILES.
60726# This happens for instance with `./config.status config.h'.
60727if test -n "$CONFIG_FILES"; then
60728
60729
60730ac_cr=`echo X | tr X '\015'`
60731# On cygwin, bash can eat \r inside `` if the user requested igncr.
60732# But we know of no other shell where ac_cr would be empty at this
60733# point, so we can use a bashism as a fallback.
60734if test "x$ac_cr" = x; then
60735  eval ac_cr=\$\'\\r\'
60736fi
60737ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
60738if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
60739  ac_cs_awk_cr='\\r'
60740else
60741  ac_cs_awk_cr=$ac_cr
60742fi
60743
60744echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
60745_ACEOF
60746
60747
60748{
60749  echo "cat >conf$$subs.awk <<_ACEOF" &&
60750  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
60751  echo "_ACEOF"
60752} >conf$$subs.sh ||
60753  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60754ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
60755ac_delim='%!_!# '
60756for ac_last_try in false false false false false :; do
60757  . ./conf$$subs.sh ||
60758    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60759
60760  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
60761  if test $ac_delim_n = $ac_delim_num; then
60762    break
60763  elif $ac_last_try; then
60764    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
60765  else
60766    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
60767  fi
60768done
60769rm -f conf$$subs.sh
60770
60771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60772cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
60773_ACEOF
60774sed -n '
60775h
60776s/^/S["/; s/!.*/"]=/
60777p
60778g
60779s/^[^!]*!//
60780:repl
60781t repl
60782s/'"$ac_delim"'$//
60783t delim
60784:nl
60785h
60786s/\(.\{148\}\)..*/\1/
60787t more1
60788s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
60789p
60790n
60791b repl
60792:more1
60793s/["\\]/\\&/g; s/^/"/; s/$/"\\/
60794p
60795g
60796s/.\{148\}//
60797t nl
60798:delim
60799h
60800s/\(.\{148\}\)..*/\1/
60801t more2
60802s/["\\]/\\&/g; s/^/"/; s/$/"/
60803p
60804b
60805:more2
60806s/["\\]/\\&/g; s/^/"/; s/$/"\\/
60807p
60808g
60809s/.\{148\}//
60810t delim
60811' <conf$$subs.awk | sed '
60812/^[^""]/{
60813  N
60814  s/\n//
60815}
60816' >>$CONFIG_STATUS || ac_write_fail=1
60817rm -f conf$$subs.awk
60818cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60819_ACAWK
60820cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
60821  for (key in S) S_is_set[key] = 1
60822  FS = ""
60823
60824}
60825{
60826  line = $ 0
60827  nfields = split(line, field, "@")
60828  substed = 0
60829  len = length(field[1])
60830  for (i = 2; i < nfields; i++) {
60831    key = field[i]
60832    keylen = length(key)
60833    if (S_is_set[key]) {
60834      value = S[key]
60835      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
60836      len += length(value) + length(field[++i])
60837      substed = 1
60838    } else
60839      len += 1 + keylen
60840  }
60841
60842  print line
60843}
60844
60845_ACAWK
60846_ACEOF
60847cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60848if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
60849  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
60850else
60851  cat
60852fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
60853  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
60854_ACEOF
60855
60856# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
60857# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
60858# trailing colons and then remove the whole line if VPATH becomes empty
60859# (actually we leave an empty line to preserve line numbers).
60860if test "x$srcdir" = x.; then
60861  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
60862h
60863s///
60864s/^/:/
60865s/[	 ]*$/:/
60866s/:\$(srcdir):/:/g
60867s/:\${srcdir}:/:/g
60868s/:@srcdir@:/:/g
60869s/^:*//
60870s/:*$//
60871x
60872s/\(=[	 ]*\).*/\1/
60873G
60874s/\n//
60875s/^[^=]*=[	 ]*$//
60876}'
60877fi
60878
60879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60880fi # test -n "$CONFIG_FILES"
60881
60882
60883eval set X "  :F $CONFIG_FILES      "
60884shift
60885for ac_tag
60886do
60887  case $ac_tag in
60888  :[FHLC]) ac_mode=$ac_tag; continue;;
60889  esac
60890  case $ac_mode$ac_tag in
60891  :[FHL]*:*);;
60892  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
60893  :[FH]-) ac_tag=-:-;;
60894  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
60895  esac
60896  ac_save_IFS=$IFS
60897  IFS=:
60898  set x $ac_tag
60899  IFS=$ac_save_IFS
60900  shift
60901  ac_file=$1
60902  shift
60903
60904  case $ac_mode in
60905  :L) ac_source=$1;;
60906  :[FH])
60907    ac_file_inputs=
60908    for ac_f
60909    do
60910      case $ac_f in
60911      -) ac_f="$ac_tmp/stdin";;
60912      *) # Look for the file first in the build tree, then in the source tree
60913	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
60914	 # because $ac_f cannot contain `:'.
60915	 test -f "$ac_f" ||
60916	   case $ac_f in
60917	   [\\/$]*) false;;
60918	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
60919	   esac ||
60920	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
60921      esac
60922      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
60923      as_fn_append ac_file_inputs " '$ac_f'"
60924    done
60925
60926    # Let's still pretend it is `configure' which instantiates (i.e., don't
60927    # use $as_me), people would be surprised to read:
60928    #    /* config.h.  Generated by config.status.  */
60929    configure_input='Generated from '`
60930	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
60931	`' by configure.'
60932    if test x"$ac_file" != x-; then
60933      configure_input="$ac_file.  $configure_input"
60934      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
60935$as_echo "$as_me: creating $ac_file" >&6;}
60936    fi
60937    # Neutralize special characters interpreted by sed in replacement strings.
60938    case $configure_input in #(
60939    *\&* | *\|* | *\\* )
60940       ac_sed_conf_input=`$as_echo "$configure_input" |
60941       sed 's/[\\\\&|]/\\\\&/g'`;; #(
60942    *) ac_sed_conf_input=$configure_input;;
60943    esac
60944
60945    case $ac_tag in
60946    *:-:* | *:-) cat >"$ac_tmp/stdin" \
60947      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
60948    esac
60949    ;;
60950  esac
60951
60952  ac_dir=`$as_dirname -- "$ac_file" ||
60953$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60954	 X"$ac_file" : 'X\(//\)[^/]' \| \
60955	 X"$ac_file" : 'X\(//\)$' \| \
60956	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
60957$as_echo X"$ac_file" |
60958    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60959	    s//\1/
60960	    q
60961	  }
60962	  /^X\(\/\/\)[^/].*/{
60963	    s//\1/
60964	    q
60965	  }
60966	  /^X\(\/\/\)$/{
60967	    s//\1/
60968	    q
60969	  }
60970	  /^X\(\/\).*/{
60971	    s//\1/
60972	    q
60973	  }
60974	  s/.*/./; q'`
60975  as_dir="$ac_dir"; as_fn_mkdir_p
60976  ac_builddir=.
60977
60978case "$ac_dir" in
60979.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
60980*)
60981  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
60982  # A ".." for each directory in $ac_dir_suffix.
60983  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
60984  case $ac_top_builddir_sub in
60985  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
60986  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
60987  esac ;;
60988esac
60989ac_abs_top_builddir=$ac_pwd
60990ac_abs_builddir=$ac_pwd$ac_dir_suffix
60991# for backward compatibility:
60992ac_top_builddir=$ac_top_build_prefix
60993
60994case $srcdir in
60995  .)  # We are building in place.
60996    ac_srcdir=.
60997    ac_top_srcdir=$ac_top_builddir_sub
60998    ac_abs_top_srcdir=$ac_pwd ;;
60999  [\\/]* | ?:[\\/]* )  # Absolute name.
61000    ac_srcdir=$srcdir$ac_dir_suffix;
61001    ac_top_srcdir=$srcdir
61002    ac_abs_top_srcdir=$srcdir ;;
61003  *) # Relative name.
61004    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61005    ac_top_srcdir=$ac_top_build_prefix$srcdir
61006    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61007esac
61008ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61009
61010
61011  case $ac_mode in
61012  :F)
61013  #
61014  # CONFIG_FILE
61015  #
61016
61017_ACEOF
61018
61019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61020# If the template does not know about datarootdir, expand it.
61021# FIXME: This hack should be removed a few years after 2.60.
61022ac_datarootdir_hack=; ac_datarootdir_seen=
61023ac_sed_dataroot='
61024/datarootdir/ {
61025  p
61026  q
61027}
61028/@datadir@/p
61029/@docdir@/p
61030/@infodir@/p
61031/@localedir@/p
61032/@mandir@/p'
61033case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61034*datarootdir*) ac_datarootdir_seen=yes;;
61035*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61036  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61037$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61038_ACEOF
61039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61040  ac_datarootdir_hack='
61041  s&@datadir@&$datadir&g
61042  s&@docdir@&$docdir&g
61043  s&@infodir@&$infodir&g
61044  s&@localedir@&$localedir&g
61045  s&@mandir@&$mandir&g
61046  s&\\\${datarootdir}&$datarootdir&g' ;;
61047esac
61048_ACEOF
61049
61050# Neutralize VPATH when `$srcdir' = `.'.
61051# Shell code in configure.ac might set extrasub.
61052# FIXME: do we really want to maintain this feature?
61053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61054ac_sed_extra="$ac_vpsub
61055$extrasub
61056_ACEOF
61057cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61058:t
61059/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61060s|@configure_input@|$ac_sed_conf_input|;t t
61061s&@top_builddir@&$ac_top_builddir_sub&;t t
61062s&@top_build_prefix@&$ac_top_build_prefix&;t t
61063s&@srcdir@&$ac_srcdir&;t t
61064s&@abs_srcdir@&$ac_abs_srcdir&;t t
61065s&@top_srcdir@&$ac_top_srcdir&;t t
61066s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61067s&@builddir@&$ac_builddir&;t t
61068s&@abs_builddir@&$ac_abs_builddir&;t t
61069s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61070$ac_datarootdir_hack
61071"
61072eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61073  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61074
61075test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61076  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61077  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61078      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61079  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61080which seems to be undefined.  Please make sure it is defined" >&5
61081$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61082which seems to be undefined.  Please make sure it is defined" >&2;}
61083
61084  rm -f "$ac_tmp/stdin"
61085  case $ac_file in
61086  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61087  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61088  esac \
61089  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61090 ;;
61091
61092
61093
61094  esac
61095
61096done # for ac_tag
61097
61098
61099as_fn_exit 0
61100_ACEOF
61101ac_clean_files=$ac_clean_files_save
61102
61103test $ac_write_fail = 0 ||
61104  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61105
61106
61107# configure is writing to config.log, and then calls config.status.
61108# config.status does its own redirection, appending to config.log.
61109# Unfortunately, on DOS this fails, as config.log is still kept open
61110# by configure, so config.status won't be able to write to it; its
61111# output is simply discarded.  So we exec the FD to /dev/null,
61112# effectively closing config.log, so it can be properly (re)opened and
61113# appended to by config.status.  When coming back to configure, we
61114# need to make the FD available again.
61115if test "$no_create" != yes; then
61116  ac_cs_success=:
61117  ac_config_status_args=
61118  test "$silent" = yes &&
61119    ac_config_status_args="$ac_config_status_args --quiet"
61120  exec 5>/dev/null
61121  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61122  exec 5>>config.log
61123  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61124  # would make configure fail if this is the last instruction.
61125  $ac_cs_success || as_fn_exit 1
61126fi
61127if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61128  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61129$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61130fi
61131
61132
61133# After AC_OUTPUT, we need to do final work
61134
61135
61136  # Try to move config.log (generated by autoconf) to the configure-support directory.
61137  if test -e ./config.log; then
61138    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61139  fi
61140
61141  # Rotate our log file (configure.log)
61142  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61143    $RM -f "$OUTPUT_ROOT/configure.log.old"
61144  fi
61145  if test -e "$OUTPUT_ROOT/configure.log"; then
61146    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61147  fi
61148
61149  # Move configure.log from current directory to the build output root
61150  if test -e ./configure.log; then
61151    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61152  fi
61153
61154  # Make the compare script executable
61155  $CHMOD +x $OUTPUT_ROOT/compare.sh
61156
61157
61158# Finally output some useful information to the user
61159
61160  # Finally output some useful information to the user
61161
61162  printf "\n"
61163  printf "====================================================\n"
61164  if test "x$no_create" != "xyes"; then
61165    if test "x$IS_RECONFIGURE" != "xyes"; then
61166      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61167    else
61168      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61169    fi
61170  else
61171    if test "x$IS_RECONFIGURE" != "xyes"; then
61172      printf "A configuration has been successfully checked but not created\n"
61173    else
61174      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61175    fi
61176  fi
61177  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61178    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61179  else
61180    printf "using default settings.\n"
61181  fi
61182
61183  printf "\n"
61184  printf "Configuration summary:\n"
61185  printf "* Debug level:    $DEBUG_LEVEL\n"
61186  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61187  printf "* JDK variant:    $JDK_VARIANT\n"
61188  printf "* JVM variants:   $with_jvm_variants\n"
61189  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61190  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61191
61192  printf "\n"
61193  printf "Tools summary:\n"
61194  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61195    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61196  fi
61197  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61198  if test "x$TOOLCHAIN_VERSION" != "x"; then
61199    print_version=" $TOOLCHAIN_VERSION"
61200  fi
61201  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61202  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61203  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61204
61205  printf "\n"
61206  printf "Build performance summary:\n"
61207  printf "* Cores to use:   $JOBS\n"
61208  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61209  if test "x$CCACHE_STATUS" != "x"; then
61210    printf "* ccache status:  $CCACHE_STATUS\n"
61211  fi
61212  printf "\n"
61213
61214  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61215    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61216    printf "will result in longer build times.\n"
61217    printf "\n"
61218  fi
61219
61220  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61221    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61222    printf "These are not respected, and will be ignored. It is recommended\n"
61223    printf "that you clean your environment. The following variables are set:\n"
61224    printf "$FOUND_ALT_VARIABLES\n"
61225    printf "\n"
61226  fi
61227
61228  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61229    printf "WARNING: Your build output directory is not on a local disk.\n"
61230    printf "This will severely degrade build performance!\n"
61231    printf "It is recommended that you create an output directory on a local disk,\n"
61232    printf "and run the configure script again from that directory.\n"
61233    printf "\n"
61234  fi
61235
61236  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61237    printf "WARNING: The result of this configuration has overridden an older\n"
61238    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61239    printf "proper build. Failure to do so might result in strange build problems.\n"
61240    printf "\n"
61241  fi
61242
61243  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61244    printf "WARNING: The result of this configuration was not saved.\n"
61245    printf "You should run without '--no-create | -n' to create the configuration.\n"
61246    printf "\n"
61247  fi
61248
61249
61250
61251  # Locate config.log.
61252  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61253    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61254  elif test -e "./config.log"; then
61255    CONFIG_LOG_PATH="."
61256  fi
61257
61258  if test -e "$CONFIG_LOG_PATH/config.log"; then
61259    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61260    if test $? -eq 0; then
61261      printf "The following warnings were produced. Repeated here for convenience:\n"
61262      # We must quote sed expression (using []) to stop m4 from eating the [].
61263      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61264      printf "\n"
61265    fi
61266  fi
61267
61268