generated-configure.sh revision 1837:bd6101c06dd5
156067Smarkm#!/bin/bash
256067Smarkm#
3139106Sru# ##########################################################
456067Smarkm# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
556067Smarkm# ##########################################################
656067Smarkm#
7125491Sru#! /bin/sh
856549Smarkm# Guess values for system-dependent variables and create Makefiles.
9228308Sume# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10116517Smr#
11125261Sru# Report bugs to <build-dev@openjdk.java.net>.
12125261Sru#
13228284Sume#
14125261Sru# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15116517Smr#
16116517Smr#
17117182Sru# This configure script is free software; the Free Software Foundation
18117182Sru# gives unlimited permission to copy, distribute and modify it.
1956067Smarkm## -------------------- ##
20125261Sru## M4sh Initialization. ##
2156067Smarkm## -------------------- ##
22125261Sru
23125261Sru# Be more Bourne compatible
24125261SruDUALCASE=1; export DUALCASE # for MKS sh
25125261Sruif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26125261Sru  emulate sh
27125261Sru  NULLCMD=:
28178828Sdfr  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29178828Sdfr  # is contrary to our usage.  Disable this feature.
30178828Sdfr  alias -g '${1+"$@"}'='"$@"'
31233294Sstas  setopt NO_GLOB_SUBST
32233294Sstaselse
33233294Sstas  case `(set -o) 2>/dev/null` in #(
3456067Smarkm  *posix*) :
35125261Sru    set -o posix ;; #(
36125261Sru  *) :
37125261Sru     ;;
38125261Sruesac
39125261Srufi
40125261Sru
41125261Sru
42125261Sruas_nl='
43125261Sru'
44125261Sruexport as_nl
4556067Smarkm# Printing a long string crashes Solaris 7 /usr/bin/printf.
46145254Simpas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47236422Sobrienas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48236422Sobrienas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49236422Sobrien# Prefer a ksh shell builtin over an external printf program on Solaris,
50236422Sobrien# 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
691ZIP_DEBUGINFO_FILES
692ENABLE_DEBUG_SYMBOLS
693STRIP_POLICY
694DEBUG_BINARIES
695NATIVE_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787ac_ct_CXX
788CXXFLAGS
789CXX
790ac_ct_PROPER_COMPILER_CXX
791PROPER_COMPILER_CXX
792TOOLCHAIN_PATH_CXX
793POTENTIAL_CXX
794OBJEXT
795EXEEXT
796ac_ct_CC
797CPPFLAGS
798LDFLAGS
799CFLAGS
800CC
801ac_ct_PROPER_COMPILER_CC
802PROPER_COMPILER_CC
803TOOLCHAIN_PATH_CC
804POTENTIAL_CC
805TOOLCHAIN_VERSION
806VS_LIB
807VS_INCLUDE
808VS_PATH
809CYGWIN_LINK
810SYSROOT_LDFLAGS
811SYSROOT_CFLAGS
812LEGACY_EXTRA_LDFLAGS
813LEGACY_EXTRA_CXXFLAGS
814LEGACY_EXTRA_CFLAGS
815EXE_SUFFIX
816OBJ_SUFFIX
817STATIC_LIBRARY
818SHARED_LIBRARY
819STATIC_LIBRARY_SUFFIX
820SHARED_LIBRARY_SUFFIX
821LIBRARY_PREFIX
822TOOLCHAIN_TYPE
823STATIC_BUILD
824BUILD_HOTSPOT
825HOTSPOT_DIST
826BUILD_OUTPUT
827JDK_TOPDIR
828NASHORN_TOPDIR
829HOTSPOT_TOPDIR
830JAXWS_TOPDIR
831JAXP_TOPDIR
832CORBA_TOPDIR
833LANGTOOLS_TOPDIR
834BOOT_JDK_BITS
835JAVAC_FLAGS
836BOOT_JDK_SOURCETARGET
837JARSIGNER
838JAR
839JAVAH
840JAVAC
841JAVA
842BOOT_JDK
843JAVA_CHECK
844JAVAC_CHECK
845VERSION_IS_GA
846VERSION_SHORT
847VERSION_STRING
848VERSION_NUMBER_FOUR_POSITIONS
849VERSION_NUMBER
850VERSION_OPT
851VERSION_BUILD
852VERSION_PRE
853VERSION_PATCH
854VERSION_SECURITY
855VERSION_MINOR
856VERSION_MAJOR
857MACOSX_BUNDLE_ID_BASE
858MACOSX_BUNDLE_NAME_BASE
859COMPANY_NAME
860JDK_RC_PLATFORM_NAME
861PRODUCT_SUFFIX
862PRODUCT_NAME
863LAUNCHER_NAME
864TEST_IN_BUILD
865COPYRIGHT_YEAR
866COMPRESS_JARS
867UNLIMITED_CRYPTO
868CACERTS_FILE
869BUILD_HEADLESS
870SUPPORT_HEADFUL
871SUPPORT_HEADLESS
872DEFAULT_MAKE_TARGET
873OS_VERSION_MICRO
874OS_VERSION_MINOR
875OS_VERSION_MAJOR
876PKG_CONFIG
877BASH_ARGS
878SETFILE
879CODESIGN
880XATTR
881DSYMUTIL
882IS_GNU_TIME
883PATCH
884TIME
885STAT
886HG
887READELF
888OTOOL
889LDD
890ZIP
891UNZIP
892FIND_DELETE
893OUTPUT_SYNC
894OUTPUT_SYNC_SUPPORTED
895CHECK_TOOLSDIR_MAKE
896CHECK_TOOLSDIR_GMAKE
897CHECK_MAKE
898CHECK_GMAKE
899MAKE
900PKGHANDLER
901CONFIGURESUPPORT_OUTPUTDIR
902OUTPUT_ROOT
903CONF_NAME
904SPEC
905SDKROOT
906XCODEBUILD
907BUILD_VARIANT_RELEASE
908DEBUG_CLASSFILES
909FASTDEBUG
910VARIANT
911DEBUG_LEVEL
912MACOSX_UNIVERSAL
913INCLUDE_SA
914JVM_VARIANT_CORE
915JVM_VARIANT_ZEROSHARK
916JVM_VARIANT_ZERO
917JVM_VARIANT_MINIMAL1
918JVM_VARIANT_CLIENT
919JVM_VARIANT_SERVER
920JVM_VARIANTS
921JVM_INTERPRETER
922JDK_VARIANT
923SET_OPENJDK
924CANONICAL_TOPDIR
925ORIGINAL_TOPDIR
926TOPDIR
927PATH_SEP
928ZERO_ARCHDEF
929DEFINE_CROSS_COMPILE_ARCH
930LP64
931OPENJDK_TARGET_OS_EXPORT_DIR
932OPENJDK_TARGET_CPU_JLI_CFLAGS
933OPENJDK_TARGET_CPU_OSARCH
934OPENJDK_TARGET_CPU_ISADIR
935OPENJDK_TARGET_CPU_LIBDIR
936OPENJDK_TARGET_CPU_LEGACY_LIB
937OPENJDK_TARGET_CPU_LEGACY
938REQUIRED_OS_VERSION
939REQUIRED_OS_NAME
940COMPILE_TYPE
941OPENJDK_TARGET_CPU_ENDIAN
942OPENJDK_TARGET_CPU_BITS
943OPENJDK_TARGET_CPU_ARCH
944OPENJDK_TARGET_CPU
945OPENJDK_TARGET_OS_ENV
946OPENJDK_TARGET_OS_TYPE
947OPENJDK_TARGET_OS
948OPENJDK_BUILD_CPU_ENDIAN
949OPENJDK_BUILD_CPU_BITS
950OPENJDK_BUILD_CPU_ARCH
951OPENJDK_BUILD_CPU
952OPENJDK_BUILD_OS_ENV
953OPENJDK_BUILD_OS_TYPE
954OPENJDK_BUILD_OS
955OPENJDK_BUILD_AUTOCONF_NAME
956OPENJDK_TARGET_AUTOCONF_NAME
957target_os
958target_vendor
959target_cpu
960target
961host_os
962host_vendor
963host_cpu
964host
965build_os
966build_vendor
967build_cpu
968build
969NICE
970CPIO
971DF
972READLINK
973CYGPATH
974SED
975FGREP
976EGREP
977GREP
978AWK
979XARGS
980WHICH
981WC
982UNIQ
983UNAME
984TR
985TOUCH
986TEE
987TAR
988TAIL
989SORT
990SH
991RMDIR
992RM
993PRINTF
994NAWK
995MV
996MKTEMP
997MKDIR
998LS
999LN
1000HEAD
1001FIND
1002FILE
1003EXPR
1004ECHO
1005DIRNAME
1006DIFF
1007DATE
1008CUT
1009CP
1010COMM
1011CMP
1012CHMOD
1013CAT
1014BASH
1015BASENAME
1016DATE_WHEN_CONFIGURED
1017ORIGINAL_PATH
1018CONFIGURE_COMMAND_LINE
1019target_alias
1020host_alias
1021build_alias
1022LIBS
1023ECHO_T
1024ECHO_N
1025ECHO_C
1026DEFS
1027mandir
1028localedir
1029libdir
1030psdir
1031pdfdir
1032dvidir
1033htmldir
1034infodir
1035docdir
1036oldincludedir
1037includedir
1038localstatedir
1039sharedstatedir
1040sysconfdir
1041datadir
1042datarootdir
1043libexecdir
1044sbindir
1045bindir
1046program_transform_name
1047prefix
1048exec_prefix
1049PACKAGE_URL
1050PACKAGE_BUGREPORT
1051PACKAGE_STRING
1052PACKAGE_VERSION
1053PACKAGE_TARNAME
1054PACKAGE_NAME
1055PATH_SEPARATOR
1056SHELL'
1057ac_subst_files=''
1058ac_user_opts='
1059enable_option_checking
1060with_target_bits
1061enable_openjdk_only
1062with_custom_make_dir
1063with_jdk_variant
1064with_jvm_interpreter
1065with_jvm_variants
1066enable_debug
1067with_debug_level
1068with_devkit
1069with_sys_root
1070with_sysroot
1071with_tools_dir
1072with_toolchain_path
1073with_extra_path
1074with_sdk_name
1075with_conf_name
1076with_output_sync
1077with_default_make_target
1078enable_headful
1079with_cacerts_file
1080enable_unlimited_crypto
1081with_copyright_year
1082enable_hotspot_test_in_build
1083with_milestone
1084with_update_version
1085with_user_release_suffix
1086with_build_number
1087with_version_string
1088with_version_pre
1089with_version_opt
1090with_version_build
1091with_version_major
1092with_version_minor
1093with_version_security
1094with_version_patch
1095with_boot_jdk
1096with_add_source_root
1097with_override_source_root
1098with_adds_and_overrides
1099with_override_langtools
1100with_override_corba
1101with_override_jaxp
1102with_override_jaxws
1103with_override_hotspot
1104with_override_nashorn
1105with_override_jdk
1106with_import_hotspot
1107enable_static_build
1108with_toolchain_type
1109with_extra_cflags
1110with_extra_cxxflags
1111with_extra_ldflags
1112with_toolchain_version
1113with_build_devkit
1114with_jtreg
1115enable_warnings_as_errors
1116with_native_debug_symbols
1117enable_debug_symbols
1118enable_zip_debug_info
1119enable_native_coverage
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_x
1124with_cups
1125with_cups_include
1126with_freetype
1127with_freetype_include
1128with_freetype_lib
1129with_freetype_src
1130enable_freetype_bundling
1131with_alsa
1132with_alsa_include
1133with_alsa_lib
1134with_libffi
1135with_libffi_include
1136with_libffi_lib
1137with_libjpeg
1138with_giflib
1139with_libpng
1140with_zlib
1141with_lcms
1142with_dxsdk
1143with_dxsdk_lib
1144with_dxsdk_include
1145with_num_cores
1146with_memory_size
1147with_jobs
1148with_test_jobs
1149with_boot_jdk_jvmargs
1150with_sjavac_server_java
1151enable_sjavac
1152enable_javac_server
1153enable_icecc
1154enable_precompiled_headers
1155enable_ccache
1156with_ccache_dir
1157'
1158      ac_precious_vars='build_alias
1159host_alias
1160target_alias
1161BASENAME
1162BASH
1163CAT
1164CHMOD
1165CMP
1166COMM
1167CP
1168CUT
1169DATE
1170DIFF
1171DIRNAME
1172ECHO
1173EXPR
1174FILE
1175FIND
1176HEAD
1177LN
1178LS
1179MKDIR
1180MKTEMP
1181MV
1182NAWK
1183PRINTF
1184RM
1185RMDIR
1186SH
1187SORT
1188TAIL
1189TAR
1190TEE
1191TOUCH
1192TR
1193UNAME
1194UNIQ
1195WC
1196WHICH
1197XARGS
1198AWK
1199GREP
1200EGREP
1201FGREP
1202SED
1203CYGPATH
1204READLINK
1205DF
1206CPIO
1207NICE
1208MAKE
1209UNZIP
1210ZIP
1211LDD
1212OTOOL
1213READELF
1214HG
1215STAT
1216TIME
1217PATCH
1218DSYMUTIL
1219XATTR
1220CODESIGN
1221SETFILE
1222PKG_CONFIG
1223JAVA
1224JAVAC
1225JAVAH
1226JAR
1227JARSIGNER
1228CC
1229CFLAGS
1230LDFLAGS
1231LIBS
1232CPPFLAGS
1233CXX
1234CXXFLAGS
1235CCC
1236CPP
1237CXXCPP
1238AS
1239AR
1240LIPO
1241STRIP
1242NM
1243GNM
1244OBJCOPY
1245OBJDUMP
1246BUILD_CC
1247BUILD_CXX
1248BUILD_NM
1249BUILD_AR
1250JTREGEXE
1251XMKMF
1252FREETYPE_CFLAGS
1253FREETYPE_LIBS
1254ALSA_CFLAGS
1255ALSA_LIBS
1256LIBFFI_CFLAGS
1257LIBFFI_LIBS
1258PNG_CFLAGS
1259PNG_LIBS
1260LCMS_CFLAGS
1261LCMS_LIBS
1262ICECC_CMD
1263ICECC_CREATE_ENV
1264ICECC_WRAPPER
1265CCACHE'
1266
1267
1268# Initialize some variables set by options.
1269ac_init_help=
1270ac_init_version=false
1271ac_unrecognized_opts=
1272ac_unrecognized_sep=
1273# The variables have the same names as the options, with
1274# dashes changed to underlines.
1275cache_file=/dev/null
1276exec_prefix=NONE
1277no_create=
1278no_recursion=
1279prefix=NONE
1280program_prefix=NONE
1281program_suffix=NONE
1282program_transform_name=s,x,x,
1283silent=
1284site=
1285srcdir=
1286verbose=
1287x_includes=NONE
1288x_libraries=NONE
1289
1290# Installation directory options.
1291# These are left unexpanded so users can "make install exec_prefix=/foo"
1292# and all the variables that are supposed to be based on exec_prefix
1293# by default will actually change.
1294# Use braces instead of parens because sh, perl, etc. also accept them.
1295# (The list follows the same order as the GNU Coding Standards.)
1296bindir='${exec_prefix}/bin'
1297sbindir='${exec_prefix}/sbin'
1298libexecdir='${exec_prefix}/libexec'
1299datarootdir='${prefix}/share'
1300datadir='${datarootdir}'
1301sysconfdir='${prefix}/etc'
1302sharedstatedir='${prefix}/com'
1303localstatedir='${prefix}/var'
1304includedir='${prefix}/include'
1305oldincludedir='/usr/include'
1306docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1307infodir='${datarootdir}/info'
1308htmldir='${docdir}'
1309dvidir='${docdir}'
1310pdfdir='${docdir}'
1311psdir='${docdir}'
1312libdir='${exec_prefix}/lib'
1313localedir='${datarootdir}/locale'
1314mandir='${datarootdir}/man'
1315
1316ac_prev=
1317ac_dashdash=
1318for ac_option
1319do
1320  # If the previous option needs an argument, assign it.
1321  if test -n "$ac_prev"; then
1322    eval $ac_prev=\$ac_option
1323    ac_prev=
1324    continue
1325  fi
1326
1327  case $ac_option in
1328  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1329  *=)   ac_optarg= ;;
1330  *)    ac_optarg=yes ;;
1331  esac
1332
1333  # Accept the important Cygnus configure options, so we can diagnose typos.
1334
1335  case $ac_dashdash$ac_option in
1336  --)
1337    ac_dashdash=yes ;;
1338
1339  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1340    ac_prev=bindir ;;
1341  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1342    bindir=$ac_optarg ;;
1343
1344  -build | --build | --buil | --bui | --bu)
1345    ac_prev=build_alias ;;
1346  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1347    build_alias=$ac_optarg ;;
1348
1349  -cache-file | --cache-file | --cache-fil | --cache-fi \
1350  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1351    ac_prev=cache_file ;;
1352  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1353  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1354    cache_file=$ac_optarg ;;
1355
1356  --config-cache | -C)
1357    cache_file=config.cache ;;
1358
1359  -datadir | --datadir | --datadi | --datad)
1360    ac_prev=datadir ;;
1361  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1362    datadir=$ac_optarg ;;
1363
1364  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1365  | --dataroo | --dataro | --datar)
1366    ac_prev=datarootdir ;;
1367  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1368  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1369    datarootdir=$ac_optarg ;;
1370
1371  -disable-* | --disable-*)
1372    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1373    # Reject names that are not valid shell variable names.
1374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375      as_fn_error $? "invalid feature name: $ac_useropt"
1376    ac_useropt_orig=$ac_useropt
1377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378    case $ac_user_opts in
1379      *"
1380"enable_$ac_useropt"
1381"*) ;;
1382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1383	 ac_unrecognized_sep=', ';;
1384    esac
1385    eval enable_$ac_useropt=no ;;
1386
1387  -docdir | --docdir | --docdi | --doc | --do)
1388    ac_prev=docdir ;;
1389  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1390    docdir=$ac_optarg ;;
1391
1392  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1393    ac_prev=dvidir ;;
1394  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1395    dvidir=$ac_optarg ;;
1396
1397  -enable-* | --enable-*)
1398    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1399    # Reject names that are not valid shell variable names.
1400    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1401      as_fn_error $? "invalid feature name: $ac_useropt"
1402    ac_useropt_orig=$ac_useropt
1403    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1404    case $ac_user_opts in
1405      *"
1406"enable_$ac_useropt"
1407"*) ;;
1408      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1409	 ac_unrecognized_sep=', ';;
1410    esac
1411    eval enable_$ac_useropt=\$ac_optarg ;;
1412
1413  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1414  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1415  | --exec | --exe | --ex)
1416    ac_prev=exec_prefix ;;
1417  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1418  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1419  | --exec=* | --exe=* | --ex=*)
1420    exec_prefix=$ac_optarg ;;
1421
1422  -gas | --gas | --ga | --g)
1423    # Obsolete; use --with-gas.
1424    with_gas=yes ;;
1425
1426  -help | --help | --hel | --he | -h)
1427    ac_init_help=long ;;
1428  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1429    ac_init_help=recursive ;;
1430  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1431    ac_init_help=short ;;
1432
1433  -host | --host | --hos | --ho)
1434    ac_prev=host_alias ;;
1435  -host=* | --host=* | --hos=* | --ho=*)
1436    host_alias=$ac_optarg ;;
1437
1438  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1439    ac_prev=htmldir ;;
1440  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1441  | --ht=*)
1442    htmldir=$ac_optarg ;;
1443
1444  -includedir | --includedir | --includedi | --included | --include \
1445  | --includ | --inclu | --incl | --inc)
1446    ac_prev=includedir ;;
1447  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1448  | --includ=* | --inclu=* | --incl=* | --inc=*)
1449    includedir=$ac_optarg ;;
1450
1451  -infodir | --infodir | --infodi | --infod | --info | --inf)
1452    ac_prev=infodir ;;
1453  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1454    infodir=$ac_optarg ;;
1455
1456  -libdir | --libdir | --libdi | --libd)
1457    ac_prev=libdir ;;
1458  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1459    libdir=$ac_optarg ;;
1460
1461  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1462  | --libexe | --libex | --libe)
1463    ac_prev=libexecdir ;;
1464  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1465  | --libexe=* | --libex=* | --libe=*)
1466    libexecdir=$ac_optarg ;;
1467
1468  -localedir | --localedir | --localedi | --localed | --locale)
1469    ac_prev=localedir ;;
1470  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1471    localedir=$ac_optarg ;;
1472
1473  -localstatedir | --localstatedir | --localstatedi | --localstated \
1474  | --localstate | --localstat | --localsta | --localst | --locals)
1475    ac_prev=localstatedir ;;
1476  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1477  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1478    localstatedir=$ac_optarg ;;
1479
1480  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1481    ac_prev=mandir ;;
1482  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1483    mandir=$ac_optarg ;;
1484
1485  -nfp | --nfp | --nf)
1486    # Obsolete; use --without-fp.
1487    with_fp=no ;;
1488
1489  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1490  | --no-cr | --no-c | -n)
1491    no_create=yes ;;
1492
1493  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1494  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1495    no_recursion=yes ;;
1496
1497  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1498  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1499  | --oldin | --oldi | --old | --ol | --o)
1500    ac_prev=oldincludedir ;;
1501  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1502  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1503  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1504    oldincludedir=$ac_optarg ;;
1505
1506  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1507    ac_prev=prefix ;;
1508  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1509    prefix=$ac_optarg ;;
1510
1511  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1512  | --program-pre | --program-pr | --program-p)
1513    ac_prev=program_prefix ;;
1514  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1515  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1516    program_prefix=$ac_optarg ;;
1517
1518  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1519  | --program-suf | --program-su | --program-s)
1520    ac_prev=program_suffix ;;
1521  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1522  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1523    program_suffix=$ac_optarg ;;
1524
1525  -program-transform-name | --program-transform-name \
1526  | --program-transform-nam | --program-transform-na \
1527  | --program-transform-n | --program-transform- \
1528  | --program-transform | --program-transfor \
1529  | --program-transfo | --program-transf \
1530  | --program-trans | --program-tran \
1531  | --progr-tra | --program-tr | --program-t)
1532    ac_prev=program_transform_name ;;
1533  -program-transform-name=* | --program-transform-name=* \
1534  | --program-transform-nam=* | --program-transform-na=* \
1535  | --program-transform-n=* | --program-transform-=* \
1536  | --program-transform=* | --program-transfor=* \
1537  | --program-transfo=* | --program-transf=* \
1538  | --program-trans=* | --program-tran=* \
1539  | --progr-tra=* | --program-tr=* | --program-t=*)
1540    program_transform_name=$ac_optarg ;;
1541
1542  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1543    ac_prev=pdfdir ;;
1544  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1545    pdfdir=$ac_optarg ;;
1546
1547  -psdir | --psdir | --psdi | --psd | --ps)
1548    ac_prev=psdir ;;
1549  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1550    psdir=$ac_optarg ;;
1551
1552  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1553  | -silent | --silent | --silen | --sile | --sil)
1554    silent=yes ;;
1555
1556  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1557    ac_prev=sbindir ;;
1558  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1559  | --sbi=* | --sb=*)
1560    sbindir=$ac_optarg ;;
1561
1562  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1563  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1564  | --sharedst | --shareds | --shared | --share | --shar \
1565  | --sha | --sh)
1566    ac_prev=sharedstatedir ;;
1567  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1568  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1569  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1570  | --sha=* | --sh=*)
1571    sharedstatedir=$ac_optarg ;;
1572
1573  -site | --site | --sit)
1574    ac_prev=site ;;
1575  -site=* | --site=* | --sit=*)
1576    site=$ac_optarg ;;
1577
1578  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1579    ac_prev=srcdir ;;
1580  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1581    srcdir=$ac_optarg ;;
1582
1583  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1584  | --syscon | --sysco | --sysc | --sys | --sy)
1585    ac_prev=sysconfdir ;;
1586  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1587  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1588    sysconfdir=$ac_optarg ;;
1589
1590  -target | --target | --targe | --targ | --tar | --ta | --t)
1591    ac_prev=target_alias ;;
1592  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1593    target_alias=$ac_optarg ;;
1594
1595  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1596    verbose=yes ;;
1597
1598  -version | --version | --versio | --versi | --vers | -V)
1599    ac_init_version=: ;;
1600
1601  -with-* | --with-*)
1602    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1603    # Reject names that are not valid shell variable names.
1604    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1605      as_fn_error $? "invalid package name: $ac_useropt"
1606    ac_useropt_orig=$ac_useropt
1607    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1608    case $ac_user_opts in
1609      *"
1610"with_$ac_useropt"
1611"*) ;;
1612      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1613	 ac_unrecognized_sep=', ';;
1614    esac
1615    eval with_$ac_useropt=\$ac_optarg ;;
1616
1617  -without-* | --without-*)
1618    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1619    # Reject names that are not valid shell variable names.
1620    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1621      as_fn_error $? "invalid package name: $ac_useropt"
1622    ac_useropt_orig=$ac_useropt
1623    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1624    case $ac_user_opts in
1625      *"
1626"with_$ac_useropt"
1627"*) ;;
1628      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1629	 ac_unrecognized_sep=', ';;
1630    esac
1631    eval with_$ac_useropt=no ;;
1632
1633  --x)
1634    # Obsolete; use --with-x.
1635    with_x=yes ;;
1636
1637  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1638  | --x-incl | --x-inc | --x-in | --x-i)
1639    ac_prev=x_includes ;;
1640  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1641  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1642    x_includes=$ac_optarg ;;
1643
1644  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1645  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1646    ac_prev=x_libraries ;;
1647  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1648  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1649    x_libraries=$ac_optarg ;;
1650
1651  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1652Try \`$0 --help' for more information"
1653    ;;
1654
1655  *=*)
1656    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1657    # Reject names that are not valid shell variable names.
1658    case $ac_envvar in #(
1659      '' | [0-9]* | *[!_$as_cr_alnum]* )
1660      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1661    esac
1662    eval $ac_envvar=\$ac_optarg
1663    export $ac_envvar ;;
1664
1665  *)
1666    # FIXME: should be removed in autoconf 3.0.
1667    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1668    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1669      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1670    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1671    ;;
1672
1673  esac
1674done
1675
1676if test -n "$ac_prev"; then
1677  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1678  as_fn_error $? "missing argument to $ac_option"
1679fi
1680
1681if test -n "$ac_unrecognized_opts"; then
1682  case $enable_option_checking in
1683    no) ;;
1684    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1685    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1686  esac
1687fi
1688
1689# Check all directory arguments for consistency.
1690for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1691		datadir sysconfdir sharedstatedir localstatedir includedir \
1692		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1693		libdir localedir mandir
1694do
1695  eval ac_val=\$$ac_var
1696  # Remove trailing slashes.
1697  case $ac_val in
1698    */ )
1699      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1700      eval $ac_var=\$ac_val;;
1701  esac
1702  # Be sure to have absolute directory names.
1703  case $ac_val in
1704    [\\/$]* | ?:[\\/]* )  continue;;
1705    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1706  esac
1707  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1708done
1709
1710# There might be people who depend on the old broken behavior: `$host'
1711# used to hold the argument of --host etc.
1712# FIXME: To remove some day.
1713build=$build_alias
1714host=$host_alias
1715target=$target_alias
1716
1717# FIXME: To remove some day.
1718if test "x$host_alias" != x; then
1719  if test "x$build_alias" = x; then
1720    cross_compiling=maybe
1721  elif test "x$build_alias" != "x$host_alias"; then
1722    cross_compiling=yes
1723  fi
1724fi
1725
1726ac_tool_prefix=
1727test -n "$host_alias" && ac_tool_prefix=$host_alias-
1728
1729test "$silent" = yes && exec 6>/dev/null
1730
1731
1732ac_pwd=`pwd` && test -n "$ac_pwd" &&
1733ac_ls_di=`ls -di .` &&
1734ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1735  as_fn_error $? "working directory cannot be determined"
1736test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1737  as_fn_error $? "pwd does not report name of working directory"
1738
1739
1740# Find the source files, if location was not specified.
1741if test -z "$srcdir"; then
1742  ac_srcdir_defaulted=yes
1743  # Try the directory containing this script, then the parent directory.
1744  ac_confdir=`$as_dirname -- "$as_myself" ||
1745$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1746	 X"$as_myself" : 'X\(//\)[^/]' \| \
1747	 X"$as_myself" : 'X\(//\)$' \| \
1748	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1749$as_echo X"$as_myself" |
1750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)[^/].*/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\/\)$/{
1759	    s//\1/
1760	    q
1761	  }
1762	  /^X\(\/\).*/{
1763	    s//\1/
1764	    q
1765	  }
1766	  s/.*/./; q'`
1767  srcdir=$ac_confdir
1768  if test ! -r "$srcdir/$ac_unique_file"; then
1769    srcdir=..
1770  fi
1771else
1772  ac_srcdir_defaulted=no
1773fi
1774if test ! -r "$srcdir/$ac_unique_file"; then
1775  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1776  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1777fi
1778ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1779ac_abs_confdir=`(
1780	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1781	pwd)`
1782# When building in place, set srcdir=.
1783if test "$ac_abs_confdir" = "$ac_pwd"; then
1784  srcdir=.
1785fi
1786# Remove unnecessary trailing slashes from srcdir.
1787# Double slashes in file names in object file debugging info
1788# mess up M-x gdb in Emacs.
1789case $srcdir in
1790*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1791esac
1792for ac_var in $ac_precious_vars; do
1793  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1794  eval ac_env_${ac_var}_value=\$${ac_var}
1795  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1796  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1797done
1798
1799#
1800# Report the --help message.
1801#
1802if test "$ac_init_help" = "long"; then
1803  # Omit some internal or obsolete options to make the list less imposing.
1804  # This message is too long to be a string in the A/UX 3.1 sh.
1805  cat <<_ACEOF
1806\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1807
1808Usage: $0 [OPTION]... [VAR=VALUE]...
1809
1810To assign environment variables (e.g., CC, CFLAGS...), specify them as
1811VAR=VALUE.  See below for descriptions of some of the useful variables.
1812
1813Defaults for the options are specified in brackets.
1814
1815Configuration:
1816  -h, --help              display this help and exit
1817      --help=short        display options specific to this package
1818      --help=recursive    display the short help of all the included packages
1819  -V, --version           display version information and exit
1820  -q, --quiet, --silent   do not print \`checking ...' messages
1821      --cache-file=FILE   cache test results in FILE [disabled]
1822  -C, --config-cache      alias for \`--cache-file=config.cache'
1823  -n, --no-create         do not create output files
1824      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1825
1826Installation directories:
1827  --prefix=PREFIX         install architecture-independent files in PREFIX
1828                          [$ac_default_prefix]
1829  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1830                          [PREFIX]
1831
1832By default, \`make install' will install all the files in
1833\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1834an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1835for instance \`--prefix=\$HOME'.
1836
1837For better control, use the options below.
1838
1839Fine tuning of the installation directories:
1840  --bindir=DIR            user executables [EPREFIX/bin]
1841  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1842  --libexecdir=DIR        program executables [EPREFIX/libexec]
1843  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1844  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1845  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1846  --libdir=DIR            object code libraries [EPREFIX/lib]
1847  --includedir=DIR        C header files [PREFIX/include]
1848  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1849  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1850  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1851  --infodir=DIR           info documentation [DATAROOTDIR/info]
1852  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1853  --mandir=DIR            man documentation [DATAROOTDIR/man]
1854  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1855  --htmldir=DIR           html documentation [DOCDIR]
1856  --dvidir=DIR            dvi documentation [DOCDIR]
1857  --pdfdir=DIR            pdf documentation [DOCDIR]
1858  --psdir=DIR             ps documentation [DOCDIR]
1859_ACEOF
1860
1861  cat <<\_ACEOF
1862
1863X features:
1864  --x-includes=DIR    X include files are in DIR
1865  --x-libraries=DIR   X library files are in DIR
1866
1867System types:
1868  --build=BUILD     configure for building on BUILD [guessed]
1869  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1870  --target=TARGET   configure for building compilers for TARGET [HOST]
1871_ACEOF
1872fi
1873
1874if test -n "$ac_init_help"; then
1875  case $ac_init_help in
1876     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1877   esac
1878  cat <<\_ACEOF
1879
1880Optional Features:
1881  --disable-option-checking  ignore unrecognized --enable/--with options
1882  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1883  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1884  --enable-openjdk-only   suppress building custom source even if present
1885                          [disabled]
1886  --enable-debug          set the debug level to fastdebug (shorthand for
1887                          --with-debug-level=fastdebug) [disabled]
1888  --disable-headful       disable building headful support (graphical UI
1889                          support) [enabled]
1890  --enable-unlimited-crypto
1891                          Enable unlimited crypto policy [disabled]
1892  --enable-hotspot-test-in-build
1893                          run the Queens test after Hotspot build [disabled]
1894  --enable-static-build   enable static library build [disabled]
1895  --disable-warnings-as-errors
1896                          do not consider native warnings to be an error
1897                          [enabled]
1898  --enable-debug-symbols  Deprecated. Option is kept for backwards
1899                          compatibility and is ignored
1900  --enable-zip-debug-info Deprecated. Option is kept for backwards
1901                          compatibility and is ignored
1902  --enable-native-coverage
1903                          enable native compilation with code coverage
1904                          data[disabled]
1905  --disable-freetype-bundling
1906                          disable bundling of the freetype library with the
1907                          build result [enabled on Windows or when using
1908                          --with-freetype, disabled otherwise]
1909  --enable-sjavac         use sjavac to do fast incremental compiles
1910                          [disabled]
1911  --disable-javac-server  disable javac server [enabled]
1912  --enable-icecc          enable distribted compilation of native code using
1913                          icecc/icecream [disabled]
1914  --disable-precompiled-headers
1915                          disable using precompiled headers when compiling C++
1916                          [enabled]
1917  --enable-ccache         enable using ccache to speed up recompilations
1918                          [disabled]
1919
1920Optional Packages:
1921  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1922  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1923  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1924                          support it), e.g. --with-target-bits=32 [guessed]
1925  --with-custom-make-dir  Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-jdk-variant      JDK variant to build (normal) [normal]
1928  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1929  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1930                          client, minimal1, zero, zeroshark, core) [server]
1931  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1932                          optimized (HotSpot build only)) [release]
1933  --with-devkit           use this devkit for compilers, tools and resources
1934  --with-sys-root         alias for --with-sysroot for backwards compatability
1935  --with-sysroot          use this directory as sysroot
1936  --with-tools-dir        alias for --with-toolchain-path for backwards
1937                          compatibility
1938  --with-toolchain-path   prepend these directories when searching for
1939                          toolchain binaries (compilers etc)
1940  --with-extra-path       prepend these directories to the default path
1941  --with-sdk-name         use the platform SDK of the given name. [macosx]
1942  --with-conf-name        use this as the name of the configuration [generated
1943                          from important configuration options]
1944  --with-output-sync      set make output sync type if supported by make.
1945                          [recurse]
1946  --with-default-make-target
1947                          set the default make target [exploded-image]
1948  --with-cacerts-file     specify alternative cacerts file
1949  --with-copyright-year   Set copyright year value for build [current year]
1950  --with-milestone        Deprecated. Option is kept for backwards
1951                          compatibility and is ignored
1952  --with-update-version   Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-user-release-suffix
1955                          Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-build-number     Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-version-string   Set version string [calculated]
1960  --with-version-pre      Set the base part of the version 'PRE' field
1961                          (pre-release identifier) ['internal']
1962  --with-version-opt      Set version 'OPT' field (build metadata)
1963                          [<timestamp>.<user>.<dirname>]
1964  --with-version-build    Set version 'BUILD' field (build number) [not
1965                          specified]
1966  --with-version-major    Set version 'MAJOR' field (first number) [current
1967                          source value]
1968  --with-version-minor    Set version 'MINOR' field (second number) [current
1969                          source value]
1970  --with-version-security Set version 'SECURITY' field (third number) [current
1971                          source value]
1972  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1973                          specified]
1974  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1975  --with-add-source-root  Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-override-source-root
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-adds-and-overrides
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-langtools
1984                          Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-corba   Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-jaxp    Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-override-jaxws   Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-override-hotspot Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-override-nashorn Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-override-jdk     Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-import-hotspot   import hotspot binaries from this jdk image or
1999                          hotspot build dist dir instead of building from
2000                          source
2001  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2002                          to show possible values [platform dependent]
2003  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2004  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2005  --with-extra-ldflags    extra flags to be used when linking jdk
2006  --with-toolchain-version
2007                          the version of the toolchain to look for, use
2008                          '--help' to show possible values [platform
2009                          dependent]
2010  --with-build-devkit     Devkit to use for the build platform toolchain
2011  --with-jtreg            Regression Test Harness [probed]
2012  --with-native-debug-symbols
2013                          set the native debug symbol configuration (none,
2014                          internal, external, zipped) [zipped]
2015  --with-stdc++lib=<static>,<dynamic>,<default>
2016                          force linking of the C++ runtime on Linux to either
2017                          static or dynamic, default is static with dynamic as
2018                          fallback
2019  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2020                          (Windows only) [probed]
2021  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2022                          (Windows only) [probed]
2023  --with-x                use the X Window System
2024  --with-cups             specify prefix directory for the cups package
2025                          (expecting the headers under PATH/include)
2026  --with-cups-include     specify directory for the cups include files
2027  --with-freetype         specify prefix directory for the freetype package
2028                          (expecting the libraries under PATH/lib and the
2029                          headers under PATH/include)
2030  --with-freetype-include specify directory for the freetype include files
2031  --with-freetype-lib     specify directory for the freetype library
2032  --with-freetype-src     specify directory with freetype sources to
2033                          automatically build the library (experimental,
2034                          Windows-only)
2035  --with-alsa             specify prefix directory for the alsa package
2036                          (expecting the libraries under PATH/lib and the
2037                          headers under PATH/include)
2038  --with-alsa-include     specify directory for the alsa include files
2039  --with-alsa-lib         specify directory for the alsa library
2040  --with-libffi           specify prefix directory for the libffi package
2041                          (expecting the libraries under PATH/lib and the
2042                          headers under PATH/include)
2043  --with-libffi-include   specify directory for the libffi include files
2044  --with-libffi-lib       specify directory for the libffi library
2045  --with-libjpeg          use libjpeg from build system or OpenJDK source
2046                          (system, bundled) [bundled]
2047  --with-giflib           use giflib from build system or OpenJDK source
2048                          (system, bundled) [bundled]
2049  --with-libpng           use libpng from build system or OpenJDK source
2050                          (system, bundled) [bundled]
2051  --with-zlib             use zlib from build system or OpenJDK source
2052                          (system, bundled) [bundled]
2053  --with-lcms             use lcms2 from build system or OpenJDK source
2054                          (system, bundled) [bundled]
2055  --with-dxsdk            Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-dxsdk-include    Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-num-cores        number of cores in the build system, e.g.
2062                          --with-num-cores=8 [probed]
2063  --with-memory-size      memory (in MB) available in the build system, e.g.
2064                          --with-memory-size=1024 [probed]
2065  --with-jobs             number of parallel jobs to let make run [calculated
2066                          based on cores and memory]
2067  --with-test-jobs        number of parallel tests jobs to run [based on build
2068                          jobs]
2069  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2070                          invocations of boot JDK, overriding the default
2071                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2072                          -enableassertions"
2073  --with-sjavac-server-java
2074                          use this java binary for running the sjavac
2075                          background server [Boot JDK java]
2076  --with-ccache-dir       where to store ccache files [~/.ccache]
2077
2078Some influential environment variables:
2079  BASENAME    Override default value for BASENAME
2080  BASH        Override default value for BASH
2081  CAT         Override default value for CAT
2082  CHMOD       Override default value for CHMOD
2083  CMP         Override default value for CMP
2084  COMM        Override default value for COMM
2085  CP          Override default value for CP
2086  CUT         Override default value for CUT
2087  DATE        Override default value for DATE
2088  DIFF        Override default value for DIFF
2089  DIRNAME     Override default value for DIRNAME
2090  ECHO        Override default value for ECHO
2091  EXPR        Override default value for EXPR
2092  FILE        Override default value for FILE
2093  FIND        Override default value for FIND
2094  HEAD        Override default value for HEAD
2095  LN          Override default value for LN
2096  LS          Override default value for LS
2097  MKDIR       Override default value for MKDIR
2098  MKTEMP      Override default value for MKTEMP
2099  MV          Override default value for MV
2100  NAWK        Override default value for NAWK
2101  PRINTF      Override default value for PRINTF
2102  RM          Override default value for RM
2103  RMDIR       Override default value for RMDIR
2104  SH          Override default value for SH
2105  SORT        Override default value for SORT
2106  TAIL        Override default value for TAIL
2107  TAR         Override default value for TAR
2108  TEE         Override default value for TEE
2109  TOUCH       Override default value for TOUCH
2110  TR          Override default value for TR
2111  UNAME       Override default value for UNAME
2112  UNIQ        Override default value for UNIQ
2113  WC          Override default value for WC
2114  WHICH       Override default value for WHICH
2115  XARGS       Override default value for XARGS
2116  AWK         Override default value for AWK
2117  GREP        Override default value for GREP
2118  EGREP       Override default value for EGREP
2119  FGREP       Override default value for FGREP
2120  SED         Override default value for SED
2121  CYGPATH     Override default value for CYGPATH
2122  READLINK    Override default value for READLINK
2123  DF          Override default value for DF
2124  CPIO        Override default value for CPIO
2125  NICE        Override default value for NICE
2126  MAKE        Override default value for MAKE
2127  UNZIP       Override default value for UNZIP
2128  ZIP         Override default value for ZIP
2129  LDD         Override default value for LDD
2130  OTOOL       Override default value for OTOOL
2131  READELF     Override default value for READELF
2132  HG          Override default value for HG
2133  STAT        Override default value for STAT
2134  TIME        Override default value for TIME
2135  PATCH       Override default value for PATCH
2136  DSYMUTIL    Override default value for DSYMUTIL
2137  XATTR       Override default value for XATTR
2138  CODESIGN    Override default value for CODESIGN
2139  SETFILE     Override default value for SETFILE
2140  PKG_CONFIG  path to pkg-config utility
2141  JAVA        Override default value for JAVA
2142  JAVAC       Override default value for JAVAC
2143  JAVAH       Override default value for JAVAH
2144  JAR         Override default value for JAR
2145  JARSIGNER   Override default value for JARSIGNER
2146  CC          C compiler command
2147  CFLAGS      C compiler flags
2148  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2149              nonstandard directory <lib dir>
2150  LIBS        libraries to pass to the linker, e.g. -l<library>
2151  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2152              you have headers in a nonstandard directory <include dir>
2153  CXX         C++ compiler command
2154  CXXFLAGS    C++ compiler flags
2155  CPP         C preprocessor
2156  CXXCPP      C++ preprocessor
2157  AS          Override default value for AS
2158  AR          Override default value for AR
2159  LIPO        Override default value for LIPO
2160  STRIP       Override default value for STRIP
2161  NM          Override default value for NM
2162  GNM         Override default value for GNM
2163  OBJCOPY     Override default value for OBJCOPY
2164  OBJDUMP     Override default value for OBJDUMP
2165  BUILD_CC    Override default value for BUILD_CC
2166  BUILD_CXX   Override default value for BUILD_CXX
2167  BUILD_NM    Override default value for BUILD_NM
2168  BUILD_AR    Override default value for BUILD_AR
2169  JTREGEXE    Override default value for JTREGEXE
2170  XMKMF       Path to xmkmf, Makefile generator for X Window System
2171  FREETYPE_CFLAGS
2172              C compiler flags for FREETYPE, overriding pkg-config
2173  FREETYPE_LIBS
2174              linker flags for FREETYPE, overriding pkg-config
2175  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2176  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2177  LIBFFI_CFLAGS
2178              C compiler flags for LIBFFI, overriding pkg-config
2179  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2180  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2181  PNG_LIBS    linker flags for PNG, overriding pkg-config
2182  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2183  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2184  ICECC_CMD   Override default value for ICECC_CMD
2185  ICECC_CREATE_ENV
2186              Override default value for ICECC_CREATE_ENV
2187  ICECC_WRAPPER
2188              Override default value for ICECC_WRAPPER
2189  CCACHE      Override default value for CCACHE
2190
2191Use these variables to override the choices made by `configure' or to help
2192it to find libraries and programs with nonstandard names/locations.
2193
2194Report bugs to <build-dev@openjdk.java.net>.
2195OpenJDK home page: <http://openjdk.java.net>.
2196_ACEOF
2197ac_status=$?
2198fi
2199
2200if test "$ac_init_help" = "recursive"; then
2201  # If there are subdirs, report their specific --help.
2202  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2203    test -d "$ac_dir" ||
2204      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2205      continue
2206    ac_builddir=.
2207
2208case "$ac_dir" in
2209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2210*)
2211  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2212  # A ".." for each directory in $ac_dir_suffix.
2213  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2214  case $ac_top_builddir_sub in
2215  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2216  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2217  esac ;;
2218esac
2219ac_abs_top_builddir=$ac_pwd
2220ac_abs_builddir=$ac_pwd$ac_dir_suffix
2221# for backward compatibility:
2222ac_top_builddir=$ac_top_build_prefix
2223
2224case $srcdir in
2225  .)  # We are building in place.
2226    ac_srcdir=.
2227    ac_top_srcdir=$ac_top_builddir_sub
2228    ac_abs_top_srcdir=$ac_pwd ;;
2229  [\\/]* | ?:[\\/]* )  # Absolute name.
2230    ac_srcdir=$srcdir$ac_dir_suffix;
2231    ac_top_srcdir=$srcdir
2232    ac_abs_top_srcdir=$srcdir ;;
2233  *) # Relative name.
2234    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2235    ac_top_srcdir=$ac_top_build_prefix$srcdir
2236    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2237esac
2238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2239
2240    cd "$ac_dir" || { ac_status=$?; continue; }
2241    # Check for guested configure.
2242    if test -f "$ac_srcdir/configure.gnu"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2245    elif test -f "$ac_srcdir/configure"; then
2246      echo &&
2247      $SHELL "$ac_srcdir/configure" --help=recursive
2248    else
2249      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2250    fi || ac_status=$?
2251    cd "$ac_pwd" || { ac_status=$?; break; }
2252  done
2253fi
2254
2255test -n "$ac_init_help" && exit $ac_status
2256if $ac_init_version; then
2257  cat <<\_ACEOF
2258OpenJDK configure jdk9
2259generated by GNU Autoconf 2.69
2260
2261Copyright (C) 2012 Free Software Foundation, Inc.
2262This configure script is free software; the Free Software Foundation
2263gives unlimited permission to copy, distribute and modify it.
2264_ACEOF
2265  exit
2266fi
2267
2268## ------------------------ ##
2269## Autoconf initialization. ##
2270## ------------------------ ##
2271
2272# ac_fn_c_try_compile LINENO
2273# --------------------------
2274# Try to compile conftest.$ac_ext, and return whether this succeeded.
2275ac_fn_c_try_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  rm -f conftest.$ac_objext
2279  if { { ac_try="$ac_compile"
2280case "(($ac_try" in
2281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282  *) ac_try_echo=$ac_try;;
2283esac
2284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285$as_echo "$ac_try_echo"; } >&5
2286  (eval "$ac_compile") 2>conftest.err
2287  ac_status=$?
2288  if test -s conftest.err; then
2289    grep -v '^ *+' conftest.err >conftest.er1
2290    cat conftest.er1 >&5
2291    mv -f conftest.er1 conftest.err
2292  fi
2293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294  test $ac_status = 0; } && {
2295	 test -z "$ac_c_werror_flag" ||
2296	 test ! -s conftest.err
2297       } && test -s conftest.$ac_objext; then :
2298  ac_retval=0
2299else
2300  $as_echo "$as_me: failed program was:" >&5
2301sed 's/^/| /' conftest.$ac_ext >&5
2302
2303	ac_retval=1
2304fi
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306  as_fn_set_status $ac_retval
2307
2308} # ac_fn_c_try_compile
2309
2310# ac_fn_cxx_try_compile LINENO
2311# ----------------------------
2312# Try to compile conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_cxx_try_compile ()
2314{
2315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316  rm -f conftest.$ac_objext
2317  if { { ac_try="$ac_compile"
2318case "(($ac_try" in
2319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2320  *) ac_try_echo=$ac_try;;
2321esac
2322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2323$as_echo "$ac_try_echo"; } >&5
2324  (eval "$ac_compile") 2>conftest.err
2325  ac_status=$?
2326  if test -s conftest.err; then
2327    grep -v '^ *+' conftest.err >conftest.er1
2328    cat conftest.er1 >&5
2329    mv -f conftest.er1 conftest.err
2330  fi
2331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2332  test $ac_status = 0; } && {
2333	 test -z "$ac_cxx_werror_flag" ||
2334	 test ! -s conftest.err
2335       } && test -s conftest.$ac_objext; then :
2336  ac_retval=0
2337else
2338  $as_echo "$as_me: failed program was:" >&5
2339sed 's/^/| /' conftest.$ac_ext >&5
2340
2341	ac_retval=1
2342fi
2343  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2344  as_fn_set_status $ac_retval
2345
2346} # ac_fn_cxx_try_compile
2347
2348# ac_fn_c_try_cpp LINENO
2349# ----------------------
2350# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2351ac_fn_c_try_cpp ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  if { { ac_try="$ac_cpp conftest.$ac_ext"
2355case "(($ac_try" in
2356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357  *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2362  ac_status=$?
2363  if test -s conftest.err; then
2364    grep -v '^ *+' conftest.err >conftest.er1
2365    cat conftest.er1 >&5
2366    mv -f conftest.er1 conftest.err
2367  fi
2368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369  test $ac_status = 0; } > conftest.i && {
2370	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2371	 test ! -s conftest.err
2372       }; then :
2373  ac_retval=0
2374else
2375  $as_echo "$as_me: failed program was:" >&5
2376sed 's/^/| /' conftest.$ac_ext >&5
2377
2378    ac_retval=1
2379fi
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_cpp
2384
2385# ac_fn_cxx_try_cpp LINENO
2386# ------------------------
2387# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388ac_fn_cxx_try_cpp ()
2389{
2390  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391  if { { ac_try="$ac_cpp conftest.$ac_ext"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } > conftest.i && {
2407	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2408	 test ! -s conftest.err
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415    ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_cxx_try_cpp
2421
2422# ac_fn_c_try_link LINENO
2423# -----------------------
2424# Try to link conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_c_try_link ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext conftest$ac_exeext
2429  if { { ac_try="$ac_link"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_link") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_c_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest$ac_exeext && {
2448	 test "$cross_compiling" = yes ||
2449	 test -x conftest$ac_exeext
2450       }; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2459  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2460  # interfere with the next link command; also delete a directory that is
2461  # left behind by Apple's compiler.  We do this before executing the actions.
2462  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2463  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464  as_fn_set_status $ac_retval
2465
2466} # ac_fn_c_try_link
2467
2468# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2469# ---------------------------------------------------------
2470# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2471# the include files in INCLUDES and setting the cache variable VAR
2472# accordingly.
2473ac_fn_cxx_check_header_mongrel ()
2474{
2475  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476  if eval \${$3+:} false; then :
2477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
2479if eval \${$3+:} false; then :
2480  $as_echo_n "(cached) " >&6
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485else
2486  # Is the header compilable?
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2488$as_echo_n "checking $2 usability... " >&6; }
2489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h.  */
2491$4
2492#include <$2>
2493_ACEOF
2494if ac_fn_cxx_try_compile "$LINENO"; then :
2495  ac_header_compiler=yes
2496else
2497  ac_header_compiler=no
2498fi
2499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2501$as_echo "$ac_header_compiler" >&6; }
2502
2503# Is the header present?
2504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2505$as_echo_n "checking $2 presence... " >&6; }
2506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508#include <$2>
2509_ACEOF
2510if ac_fn_cxx_try_cpp "$LINENO"; then :
2511  ac_header_preproc=yes
2512else
2513  ac_header_preproc=no
2514fi
2515rm -f conftest.err conftest.i conftest.$ac_ext
2516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2517$as_echo "$ac_header_preproc" >&6; }
2518
2519# So?  What about this header?
2520case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2521  yes:no: )
2522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2523$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2525$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2526    ;;
2527  no:yes:* )
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2529$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2531$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2533$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2535$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2537$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2538( $as_echo "## ----------------------------------------- ##
2539## Report this to build-dev@openjdk.java.net ##
2540## ----------------------------------------- ##"
2541     ) | sed "s/^/$as_me: WARNING:     /" >&2
2542    ;;
2543esac
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  eval "$3=\$ac_header_compiler"
2550fi
2551eval ac_res=\$$3
2552	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2553$as_echo "$ac_res" >&6; }
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_mongrel
2558
2559# ac_fn_cxx_try_run LINENO
2560# ------------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2562# that executables *can* be run.
2563ac_fn_cxx_try_run ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>&5
2574  ac_status=$?
2575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2576  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2577  { { case "(($ac_try" in
2578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579  *) ac_try_echo=$ac_try;;
2580esac
2581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582$as_echo "$ac_try_echo"; } >&5
2583  (eval "$ac_try") 2>&5
2584  ac_status=$?
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; }; }; then :
2587  ac_retval=0
2588else
2589  $as_echo "$as_me: program exited with status $ac_status" >&5
2590       $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593       ac_retval=$ac_status
2594fi
2595  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597  as_fn_set_status $ac_retval
2598
2599} # ac_fn_cxx_try_run
2600
2601# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2602# ---------------------------------------------------------
2603# Tests whether HEADER exists and can be compiled using the include files in
2604# INCLUDES, setting the cache variable VAR accordingly.
2605ac_fn_cxx_check_header_compile ()
2606{
2607  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2609$as_echo_n "checking for $2... " >&6; }
2610if eval \${$3+:} false; then :
2611  $as_echo_n "(cached) " >&6
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  eval "$3=yes"
2620else
2621  eval "$3=no"
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_header_compile
2631
2632# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2633# ----------------------------------------------
2634# Tries to find the compile-time value of EXPR in a program that includes
2635# INCLUDES, setting VAR accordingly. Returns whether the value could be
2636# computed
2637ac_fn_cxx_compute_int ()
2638{
2639  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2640  if test "$cross_compiling" = yes; then
2641    # Depending upon the size, compute the lo and hi bounds.
2642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) >= 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_lo=0 ac_mid=0
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid; break
2675else
2676  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2677			if test $ac_lo -le $ac_mid; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) < 0)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=-1 ac_mid=-1
2702  while :; do
2703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2704/* end confdefs.h.  */
2705$4
2706int
2707main ()
2708{
2709static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2710test_array [0] = 0;
2711return test_array [0];
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_compile "$LINENO"; then :
2718  ac_lo=$ac_mid; break
2719else
2720  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2721			if test $ac_mid -le $ac_hi; then
2722			  ac_lo= ac_hi=
2723			  break
2724			fi
2725			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728  done
2729else
2730  ac_lo= ac_hi=
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2735# Binary search between lo and hi bounds.
2736while test "x$ac_lo" != "x$ac_hi"; do
2737  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740$4
2741int
2742main ()
2743{
2744static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2745test_array [0] = 0;
2746return test_array [0];
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  ac_hi=$ac_mid
2754else
2755  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2756fi
2757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758done
2759case $ac_lo in #((
2760?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2761'') ac_retval=1 ;;
2762esac
2763  else
2764    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765/* end confdefs.h.  */
2766$4
2767static long int longval () { return $2; }
2768static unsigned long int ulongval () { return $2; }
2769#include <stdio.h>
2770#include <stdlib.h>
2771int
2772main ()
2773{
2774
2775  FILE *f = fopen ("conftest.val", "w");
2776  if (! f)
2777    return 1;
2778  if (($2) < 0)
2779    {
2780      long int i = longval ();
2781      if (i != ($2))
2782	return 1;
2783      fprintf (f, "%ld", i);
2784    }
2785  else
2786    {
2787      unsigned long int i = ulongval ();
2788      if (i != ($2))
2789	return 1;
2790      fprintf (f, "%lu", i);
2791    }
2792  /* Do not output a trailing newline, as this causes \r\n confusion
2793     on some platforms.  */
2794  return ferror (f) || fclose (f) != 0;
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_run "$LINENO"; then :
2801  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2802else
2803  ac_retval=1
2804fi
2805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2806  conftest.$ac_objext conftest.beam conftest.$ac_ext
2807rm -f conftest.val
2808
2809  fi
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_compute_int
2814
2815# ac_fn_cxx_try_link LINENO
2816# -------------------------
2817# Try to link conftest.$ac_ext, and return whether this succeeded.
2818ac_fn_cxx_try_link ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  rm -f conftest.$ac_objext conftest$ac_exeext
2822  if { { ac_try="$ac_link"
2823case "(($ac_try" in
2824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825  *) ac_try_echo=$ac_try;;
2826esac
2827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2828$as_echo "$ac_try_echo"; } >&5
2829  (eval "$ac_link") 2>conftest.err
2830  ac_status=$?
2831  if test -s conftest.err; then
2832    grep -v '^ *+' conftest.err >conftest.er1
2833    cat conftest.er1 >&5
2834    mv -f conftest.er1 conftest.err
2835  fi
2836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2837  test $ac_status = 0; } && {
2838	 test -z "$ac_cxx_werror_flag" ||
2839	 test ! -s conftest.err
2840       } && test -s conftest$ac_exeext && {
2841	 test "$cross_compiling" = yes ||
2842	 test -x conftest$ac_exeext
2843       }; then :
2844  ac_retval=0
2845else
2846  $as_echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849	ac_retval=1
2850fi
2851  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2852  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2853  # interfere with the next link command; also delete a directory that is
2854  # left behind by Apple's compiler.  We do this before executing the actions.
2855  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857  as_fn_set_status $ac_retval
2858
2859} # ac_fn_cxx_try_link
2860
2861# ac_fn_cxx_check_func LINENO FUNC VAR
2862# ------------------------------------
2863# Tests whether FUNC exists, setting the cache variable VAR accordingly
2864ac_fn_cxx_check_func ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2875   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2876#define $2 innocuous_$2
2877
2878/* System header to define __stub macros and hopefully few prototypes,
2879    which can conflict with char $2 (); below.
2880    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2881    <limits.h> exists even on freestanding compilers.  */
2882
2883#ifdef __STDC__
2884# include <limits.h>
2885#else
2886# include <assert.h>
2887#endif
2888
2889#undef $2
2890
2891/* Override any GCC internal prototype to avoid an error.
2892   Use char because int might match the return type of a GCC
2893   builtin and then its argument prototype would still apply.  */
2894#ifdef __cplusplus
2895extern "C"
2896#endif
2897char $2 ();
2898/* The GNU C library defines this for functions which it implements
2899    to always fail with ENOSYS.  Some functions are actually named
2900    something starting with __ and the normal name is an alias.  */
2901#if defined __stub_$2 || defined __stub___$2
2902choke me
2903#endif
2904
2905int
2906main ()
2907{
2908return $2 ();
2909  ;
2910  return 0;
2911}
2912_ACEOF
2913if ac_fn_cxx_try_link "$LINENO"; then :
2914  eval "$3=yes"
2915else
2916  eval "$3=no"
2917fi
2918rm -f core conftest.err conftest.$ac_objext \
2919    conftest$ac_exeext conftest.$ac_ext
2920fi
2921eval ac_res=\$$3
2922	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2923$as_echo "$ac_res" >&6; }
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925
2926} # ac_fn_cxx_check_func
2927
2928# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2929# -------------------------------------------------------
2930# Tests whether HEADER exists and can be compiled using the include files in
2931# INCLUDES, setting the cache variable VAR accordingly.
2932ac_fn_c_check_header_compile ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936$as_echo_n "checking for $2... " >&6; }
2937if eval \${$3+:} false; then :
2938  $as_echo_n "(cached) " >&6
2939else
2940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h.  */
2942$4
2943#include <$2>
2944_ACEOF
2945if ac_fn_c_try_compile "$LINENO"; then :
2946  eval "$3=yes"
2947else
2948  eval "$3=no"
2949fi
2950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951fi
2952eval ac_res=\$$3
2953	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2954$as_echo "$ac_res" >&6; }
2955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2956
2957} # ac_fn_c_check_header_compile
2958cat >config.log <<_ACEOF
2959This file contains any messages produced by compilers while
2960running configure, to aid debugging if configure makes a mistake.
2961
2962It was created by OpenJDK $as_me jdk9, which was
2963generated by GNU Autoconf 2.69.  Invocation command line was
2964
2965  $ $0 $@
2966
2967_ACEOF
2968exec 5>>config.log
2969{
2970cat <<_ASUNAME
2971## --------- ##
2972## Platform. ##
2973## --------- ##
2974
2975hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2976uname -m = `(uname -m) 2>/dev/null || echo unknown`
2977uname -r = `(uname -r) 2>/dev/null || echo unknown`
2978uname -s = `(uname -s) 2>/dev/null || echo unknown`
2979uname -v = `(uname -v) 2>/dev/null || echo unknown`
2980
2981/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2982/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2983
2984/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2985/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2986/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2987/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2988/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2989/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2990/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2991
2992_ASUNAME
2993
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997  IFS=$as_save_IFS
2998  test -z "$as_dir" && as_dir=.
2999    $as_echo "PATH: $as_dir"
3000  done
3001IFS=$as_save_IFS
3002
3003} >&5
3004
3005cat >&5 <<_ACEOF
3006
3007
3008## ----------- ##
3009## Core tests. ##
3010## ----------- ##
3011
3012_ACEOF
3013
3014
3015# Keep a trace of the command line.
3016# Strip out --no-create and --no-recursion so they do not pile up.
3017# Strip out --silent because we don't want to record it for future runs.
3018# Also quote any args containing shell meta-characters.
3019# Make two passes to allow for proper duplicate-argument suppression.
3020ac_configure_args=
3021ac_configure_args0=
3022ac_configure_args1=
3023ac_must_keep_next=false
3024for ac_pass in 1 2
3025do
3026  for ac_arg
3027  do
3028    case $ac_arg in
3029    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3030    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3031    | -silent | --silent | --silen | --sile | --sil)
3032      continue ;;
3033    *\'*)
3034      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3035    esac
3036    case $ac_pass in
3037    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3038    2)
3039      as_fn_append ac_configure_args1 " '$ac_arg'"
3040      if test $ac_must_keep_next = true; then
3041	ac_must_keep_next=false # Got value, back to normal.
3042      else
3043	case $ac_arg in
3044	  *=* | --config-cache | -C | -disable-* | --disable-* \
3045	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3046	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3047	  | -with-* | --with-* | -without-* | --without-* | --x)
3048	    case "$ac_configure_args0 " in
3049	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3050	    esac
3051	    ;;
3052	  -* ) ac_must_keep_next=true ;;
3053	esac
3054      fi
3055      as_fn_append ac_configure_args " '$ac_arg'"
3056      ;;
3057    esac
3058  done
3059done
3060{ ac_configure_args0=; unset ac_configure_args0;}
3061{ ac_configure_args1=; unset ac_configure_args1;}
3062
3063# When interrupted or exit'd, cleanup temporary files, and complete
3064# config.log.  We remove comments because anyway the quotes in there
3065# would cause problems or look ugly.
3066# WARNING: Use '\'' to represent an apostrophe within the trap.
3067# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3068trap 'exit_status=$?
3069  # Save into config.log some information that might help in debugging.
3070  {
3071    echo
3072
3073    $as_echo "## ---------------- ##
3074## Cache variables. ##
3075## ---------------- ##"
3076    echo
3077    # The following way of writing the cache mishandles newlines in values,
3078(
3079  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3080    eval ac_val=\$$ac_var
3081    case $ac_val in #(
3082    *${as_nl}*)
3083      case $ac_var in #(
3084      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3085$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3086      esac
3087      case $ac_var in #(
3088      _ | IFS | as_nl) ;; #(
3089      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3090      *) { eval $ac_var=; unset $ac_var;} ;;
3091      esac ;;
3092    esac
3093  done
3094  (set) 2>&1 |
3095    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3096    *${as_nl}ac_space=\ *)
3097      sed -n \
3098	"s/'\''/'\''\\\\'\'''\''/g;
3099	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3100      ;; #(
3101    *)
3102      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3103      ;;
3104    esac |
3105    sort
3106)
3107    echo
3108
3109    $as_echo "## ----------------- ##
3110## Output variables. ##
3111## ----------------- ##"
3112    echo
3113    for ac_var in $ac_subst_vars
3114    do
3115      eval ac_val=\$$ac_var
3116      case $ac_val in
3117      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3118      esac
3119      $as_echo "$ac_var='\''$ac_val'\''"
3120    done | sort
3121    echo
3122
3123    if test -n "$ac_subst_files"; then
3124      $as_echo "## ------------------- ##
3125## File substitutions. ##
3126## ------------------- ##"
3127      echo
3128      for ac_var in $ac_subst_files
3129      do
3130	eval ac_val=\$$ac_var
3131	case $ac_val in
3132	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3133	esac
3134	$as_echo "$ac_var='\''$ac_val'\''"
3135      done | sort
3136      echo
3137    fi
3138
3139    if test -s confdefs.h; then
3140      $as_echo "## ----------- ##
3141## confdefs.h. ##
3142## ----------- ##"
3143      echo
3144      cat confdefs.h
3145      echo
3146    fi
3147    test "$ac_signal" != 0 &&
3148      $as_echo "$as_me: caught signal $ac_signal"
3149    $as_echo "$as_me: exit $exit_status"
3150  } >&5
3151  rm -f core *.core core.conftest.* &&
3152    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3153    exit $exit_status
3154' 0
3155for ac_signal in 1 2 13 15; do
3156  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3157done
3158ac_signal=0
3159
3160# confdefs.h avoids OS command line length limits that DEFS can exceed.
3161rm -f -r conftest* confdefs.h
3162
3163$as_echo "/* confdefs.h */" > confdefs.h
3164
3165# Predefined preprocessor variables.
3166
3167cat >>confdefs.h <<_ACEOF
3168#define PACKAGE_NAME "$PACKAGE_NAME"
3169_ACEOF
3170
3171cat >>confdefs.h <<_ACEOF
3172#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3173_ACEOF
3174
3175cat >>confdefs.h <<_ACEOF
3176#define PACKAGE_VERSION "$PACKAGE_VERSION"
3177_ACEOF
3178
3179cat >>confdefs.h <<_ACEOF
3180#define PACKAGE_STRING "$PACKAGE_STRING"
3181_ACEOF
3182
3183cat >>confdefs.h <<_ACEOF
3184#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3185_ACEOF
3186
3187cat >>confdefs.h <<_ACEOF
3188#define PACKAGE_URL "$PACKAGE_URL"
3189_ACEOF
3190
3191
3192# Let the site file select an alternate cache file if it wants to.
3193# Prefer an explicitly selected file to automatically selected ones.
3194ac_site_file1=NONE
3195ac_site_file2=NONE
3196if test -n "$CONFIG_SITE"; then
3197  # We do not want a PATH search for config.site.
3198  case $CONFIG_SITE in #((
3199    -*)  ac_site_file1=./$CONFIG_SITE;;
3200    */*) ac_site_file1=$CONFIG_SITE;;
3201    *)   ac_site_file1=./$CONFIG_SITE;;
3202  esac
3203elif test "x$prefix" != xNONE; then
3204  ac_site_file1=$prefix/share/config.site
3205  ac_site_file2=$prefix/etc/config.site
3206else
3207  ac_site_file1=$ac_default_prefix/share/config.site
3208  ac_site_file2=$ac_default_prefix/etc/config.site
3209fi
3210for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3211do
3212  test "x$ac_site_file" = xNONE && continue
3213  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3214    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3215$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3216    sed 's/^/| /' "$ac_site_file" >&5
3217    . "$ac_site_file" \
3218      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error $? "failed to load site script $ac_site_file
3221See \`config.log' for more details" "$LINENO" 5; }
3222  fi
3223done
3224
3225if test -r "$cache_file"; then
3226  # Some versions of bash will fail to source /dev/null (special files
3227  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3228  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3229    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3230$as_echo "$as_me: loading cache $cache_file" >&6;}
3231    case $cache_file in
3232      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3233      *)                      . "./$cache_file";;
3234    esac
3235  fi
3236else
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3238$as_echo "$as_me: creating cache $cache_file" >&6;}
3239  >$cache_file
3240fi
3241
3242# Check that the precious variables saved in the cache have kept the same
3243# value.
3244ac_cache_corrupted=false
3245for ac_var in $ac_precious_vars; do
3246  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3247  eval ac_new_set=\$ac_env_${ac_var}_set
3248  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3249  eval ac_new_val=\$ac_env_${ac_var}_value
3250  case $ac_old_set,$ac_new_set in
3251    set,)
3252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3253$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3254      ac_cache_corrupted=: ;;
3255    ,set)
3256      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3257$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3258      ac_cache_corrupted=: ;;
3259    ,);;
3260    *)
3261      if test "x$ac_old_val" != "x$ac_new_val"; then
3262	# differences in whitespace do not lead to failure.
3263	ac_old_val_w=`echo x $ac_old_val`
3264	ac_new_val_w=`echo x $ac_new_val`
3265	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3266	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3267$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3268	  ac_cache_corrupted=:
3269	else
3270	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3271$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3272	  eval $ac_var=\$ac_old_val
3273	fi
3274	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3275$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3276	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3277$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3278      fi;;
3279  esac
3280  # Pass precious variables to config.status.
3281  if test "$ac_new_set" = set; then
3282    case $ac_new_val in
3283    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3284    *) ac_arg=$ac_var=$ac_new_val ;;
3285    esac
3286    case " $ac_configure_args " in
3287      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3288      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3289    esac
3290  fi
3291done
3292if $ac_cache_corrupted; then
3293  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3295  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3296$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3297  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3298fi
3299## -------------------- ##
3300## Main body of script. ##
3301## -------------------- ##
3302
3303ac_ext=c
3304ac_cpp='$CPP $CPPFLAGS'
3305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3307ac_compiler_gnu=$ac_cv_c_compiler_gnu
3308
3309
3310
3311ac_aux_dir=
3312for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3313  if test -f "$ac_dir/install-sh"; then
3314    ac_aux_dir=$ac_dir
3315    ac_install_sh="$ac_aux_dir/install-sh -c"
3316    break
3317  elif test -f "$ac_dir/install.sh"; then
3318    ac_aux_dir=$ac_dir
3319    ac_install_sh="$ac_aux_dir/install.sh -c"
3320    break
3321  elif test -f "$ac_dir/shtool"; then
3322    ac_aux_dir=$ac_dir
3323    ac_install_sh="$ac_aux_dir/shtool install -c"
3324    break
3325  fi
3326done
3327if test -z "$ac_aux_dir"; then
3328  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3329fi
3330
3331# These three variables are undocumented and unsupported,
3332# and are intended to be withdrawn in a future Autoconf release.
3333# They can cause serious problems if a builder's source tree is in a directory
3334# whose full name contains unusual characters.
3335ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3336ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3337ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3338
3339
3340# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3341
3342#
3343# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3344# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3345#
3346# This code is free software; you can redistribute it and/or modify it
3347# under the terms of the GNU General Public License version 2 only, as
3348# published by the Free Software Foundation.  Oracle designates this
3349# particular file as subject to the "Classpath" exception as provided
3350# by Oracle in the LICENSE file that accompanied this code.
3351#
3352# This code is distributed in the hope that it will be useful, but WITHOUT
3353# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3354# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3355# version 2 for more details (a copy is included in the LICENSE file that
3356# accompanied this code).
3357#
3358# You should have received a copy of the GNU General Public License version
3359# 2 along with this work; if not, write to the Free Software Foundation,
3360# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3361#
3362# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3363# or visit www.oracle.com if you need additional information or have any
3364# questions.
3365#
3366
3367#
3368# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3369#
3370# This program is free software; you can redistribute it and/or modify
3371# it under the terms of the GNU General Public License as published by
3372# the Free Software Foundation; either version 2 of the License, or
3373# (at your option) any later version.
3374#
3375# This program is distributed in the hope that it will be useful, but
3376# WITHOUT ANY WARRANTY; without even the implied warranty of
3377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3378# General Public License for more details.
3379#
3380# You should have received a copy of the GNU General Public License
3381# along with this program; if not, write to the Free Software
3382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3383#
3384# As a special exception to the GNU General Public License, if you
3385# distribute this file as part of a program that contains a
3386# configuration script generated by Autoconf, you may include it under
3387# the same distribution terms that you use for the rest of that program.
3388
3389# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3390# ----------------------------------
3391# PKG_PROG_PKG_CONFIG
3392
3393# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3394#
3395# Check to see whether a particular set of modules exists.  Similar
3396# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3397#
3398#
3399# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3400# this or PKG_CHECK_MODULES is called, or make sure to call
3401# PKG_CHECK_EXISTS manually
3402# --------------------------------------------------------------
3403
3404
3405
3406# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3407# ---------------------------------------------
3408# _PKG_CONFIG
3409
3410# _PKG_SHORT_ERRORS_SUPPORTED
3411# -----------------------------
3412# _PKG_SHORT_ERRORS_SUPPORTED
3413
3414
3415# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3416# [ACTION-IF-NOT-FOUND])
3417#
3418#
3419# Note that if there is a possibility the first call to
3420# PKG_CHECK_MODULES might not happen, you should be sure to include an
3421# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3422#
3423#
3424# --------------------------------------------------------------
3425# PKG_CHECK_MODULES
3426
3427
3428# Include these first...
3429#
3430# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3455# If so, then append $1 to $2 \
3456# Also set JVM_ARG_OK to true/false depending on outcome.
3457
3458
3459# Appends a string to a path variable, only adding the : when needed.
3460
3461
3462# Prepends a string to a path variable, only adding the : when needed.
3463
3464
3465# This will make sure the given variable points to a full and proper
3466# path. This means:
3467# 1) There will be no spaces in the path. On unix platforms,
3468#    spaces in the path will result in an error. On Windows,
3469#    the path will be rewritten using short-style to be space-free.
3470# 2) The path will be absolute, and it will be in unix-style (on
3471#     cygwin).
3472# $1: The name of the variable to fix
3473
3474
3475# This will make sure the given variable points to a executable
3476# with a full and proper path. This means:
3477# 1) There will be no spaces in the path. On unix platforms,
3478#    spaces in the path will result in an error. On Windows,
3479#    the path will be rewritten using short-style to be space-free.
3480# 2) The path will be absolute, and it will be in unix-style (on
3481#     cygwin).
3482# Any arguments given to the executable is preserved.
3483# If the input variable does not have a directory specification, then
3484# it need to be in the PATH.
3485# $1: The name of the variable to fix
3486
3487
3488
3489
3490# Register a --with argument but mark it as deprecated
3491# $1: The name of the with argument to deprecate, not including --with-
3492
3493
3494# Register a --enable argument but mark it as deprecated
3495# $1: The name of the with argument to deprecate, not including --enable-
3496# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3497# $3: Messages to user.
3498
3499
3500
3501
3502# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3503# $1: variable to check
3504
3505
3506# Check that there are no unprocessed overridden variables left.
3507# If so, they are an incorrect argument and we will exit with an error.
3508
3509
3510# Setup a tool for the given variable. If correctly specified by the user,
3511# use that value, otherwise search for the tool using the supplied code snippet.
3512# $1: variable to set
3513# $2: code snippet to call to look for the tool
3514# $3: code snippet to call if variable was used to find tool
3515
3516
3517# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3518# $1: variable to set
3519# $2: executable name (or list of names) to look for
3520
3521
3522# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3523# $1: variable to set
3524# $2: executable name (or list of names) to look for
3525
3526
3527# Like BASIC_PATH_PROGS but fails if no tool was found.
3528# $1: variable to set
3529# $2: executable name (or list of names) to look for
3530
3531
3532# Like BASIC_SETUP_TOOL but fails if no tool was found.
3533# $1: variable to set
3534# $2: autoconf macro to call to look for the special tool
3535
3536
3537# Setup the most fundamental tools that relies on not much else to set up,
3538# but is used by much of the early bootstrap code.
3539
3540
3541# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3542
3543
3544# Evaluates platform specific overrides for devkit variables.
3545# $1: Name of variable
3546
3547
3548
3549
3550
3551
3552#%%% Simple tools %%%
3553
3554# Check if we have found a usable version of make
3555# $1: the path to a potential make binary (or empty)
3556# $2: the description on how we found this
3557
3558
3559
3560
3561# Goes looking for a usable version of GNU make.
3562
3563
3564
3565
3566
3567
3568# Check if build directory is on local disk. If not possible to determine,
3569# we prefer to claim it's local.
3570# Argument 1: directory to test
3571# Argument 2: what to do if it is on local disk
3572# Argument 3: what to do otherwise (remote disk or failure)
3573
3574
3575# Check that source files have basic read permissions set. This might
3576# not be the case in cygwin in certain conditions.
3577
3578
3579
3580
3581# Check for support for specific options in bash
3582
3583
3584################################################################################
3585#
3586# Default make target
3587#
3588
3589
3590# Code to run after AC_OUTPUT
3591
3592
3593#
3594# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3596#
3597# This code is free software; you can redistribute it and/or modify it
3598# under the terms of the GNU General Public License version 2 only, as
3599# published by the Free Software Foundation.  Oracle designates this
3600# particular file as subject to the "Classpath" exception as provided
3601# by Oracle in the LICENSE file that accompanied this code.
3602#
3603# This code is distributed in the hope that it will be useful, but WITHOUT
3604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3606# version 2 for more details (a copy is included in the LICENSE file that
3607# accompanied this code).
3608#
3609# You should have received a copy of the GNU General Public License version
3610# 2 along with this work; if not, write to the Free Software Foundation,
3611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3612#
3613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3614# or visit www.oracle.com if you need additional information or have any
3615# questions.
3616#
3617
3618
3619
3620
3621
3622# Helper function which possibly converts a path using DOS-style short mode.
3623# If so, the updated path is stored in $new_path.
3624# $1: The path to check
3625
3626
3627# Helper function which possibly converts a path using DOS-style short mode.
3628# If so, the updated path is stored in $new_path.
3629# $1: The path to check
3630
3631
3632# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3633# and could probably be heavily simplified. However, all changes in this
3634# area tend to need lot of testing in different scenarios, and in lack of
3635# proper unit testing, cleaning this up has not been deemed worth the effort
3636# at the moment.
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3647
3648
3649
3650
3651# ... then the rest
3652#
3653# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3654# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3655#
3656# This code is free software; you can redistribute it and/or modify it
3657# under the terms of the GNU General Public License version 2 only, as
3658# published by the Free Software Foundation.  Oracle designates this
3659# particular file as subject to the "Classpath" exception as provided
3660# by Oracle in the LICENSE file that accompanied this code.
3661#
3662# This code is distributed in the hope that it will be useful, but WITHOUT
3663# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3664# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3665# version 2 for more details (a copy is included in the LICENSE file that
3666# accompanied this code).
3667#
3668# You should have received a copy of the GNU General Public License version
3669# 2 along with this work; if not, write to the Free Software Foundation,
3670# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3671#
3672# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3673# or visit www.oracle.com if you need additional information or have any
3674# questions.
3675#
3676
3677########################################################################
3678# This file handles detection of the Boot JDK. The Boot JDK detection
3679# process has been developed as a response to solve a complex real-world
3680# problem. Initially, it was simple, but it has grown as platform after
3681# platform, idiosyncracy after idiosyncracy has been supported.
3682#
3683# The basic idea is this:
3684# 1) You need an acceptable *) JDK to use as a Boot JDK
3685# 2) There are several ways to locate a JDK, that are mostly platform
3686#    dependent **)
3687# 3) You can have multiple JDKs installed
3688# 4) If possible, configure should try to dig out an acceptable JDK
3689#    automatically, without having to resort to command-line options
3690#
3691# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3692#     javac) and not a JRE, etc.
3693#
3694# **) On Windows we typically use a well-known path.
3695#     On MacOSX we typically use the tool java_home.
3696#     On Linux we typically find javac in the $PATH, and then follow a
3697#     chain of symlinks that often ends up in a real JDK.
3698#
3699# This leads to the code where we check in different ways to locate a
3700# JDK, and if one is found, check if it is acceptable. If not, we print
3701# our reasons for rejecting it (useful when debugging non-working
3702# configure situations) and continue checking the next one.
3703########################################################################
3704
3705# Execute the check given as argument, and verify the result
3706# If the Boot JDK was previously found, do nothing
3707# $1 A command line (typically autoconf macro) to execute
3708
3709
3710# Test: Is bootjdk explicitely set by command line arguments?
3711
3712
3713# Test: Is $JAVA_HOME set?
3714
3715
3716# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3717
3718
3719# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3720# $1: Argument to the java_home binary (optional)
3721
3722
3723# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3724
3725
3726# Look for a jdk in the given path. If there are multiple, try to select the newest.
3727# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3728# $1 = Path to directory containing jdk installations.
3729# $2 = String to append to the found JDK directory to get the proper JDK home
3730
3731
3732# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3733# environmental variable as base for where to look.
3734# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3735
3736
3737# Test: Is there a JDK installed in default, well-known locations?
3738
3739
3740# Check that a command-line tool in the Boot JDK is correct
3741# $1 = name of variable to assign
3742# $2 = name of binary
3743
3744
3745###############################################################################
3746#
3747# We need a Boot JDK to bootstrap the build.
3748#
3749
3750
3751
3752
3753
3754#
3755# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3757#
3758# This code is free software; you can redistribute it and/or modify it
3759# under the terms of the GNU General Public License version 2 only, as
3760# published by the Free Software Foundation.  Oracle designates this
3761# particular file as subject to the "Classpath" exception as provided
3762# by Oracle in the LICENSE file that accompanied this code.
3763#
3764# This code is distributed in the hope that it will be useful, but WITHOUT
3765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3767# version 2 for more details (a copy is included in the LICENSE file that
3768# accompanied this code).
3769#
3770# You should have received a copy of the GNU General Public License version
3771# 2 along with this work; if not, write to the Free Software Foundation,
3772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3773#
3774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3775# or visit www.oracle.com if you need additional information or have any
3776# questions.
3777#
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795################################################################################
3796#
3797# Optionally enable distributed compilation of native code using icecc/icecream
3798#
3799
3800
3801
3802
3803
3804
3805
3806#
3807# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3832# corresponding configure arguments instead
3833
3834
3835# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3836# that configure can use them while detecting compilers.
3837# TOOLCHAIN_TYPE is available here.
3838# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3839
3840
3841
3842
3843
3844
3845# Documentation on common flags used for solstudio in HIGHEST.
3846#
3847# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3848#          done with care, there are some assumptions below that need to
3849#          be understood about the use of pointers, and IEEE behavior.
3850#
3851# -fns: Use non-standard floating point mode (not IEEE 754)
3852# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3853# -fsingle: Use single precision floating point with 'float'
3854# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3855#   (Source with excessing pointer casting and data access with mixed
3856#    pointer types are not recommended)
3857# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3858#   (If you expect perfect errno behavior, do not use this)
3859# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3860# -xrestrict: Pointer parameters to functions do not overlap
3861#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3862#    If you pass in multiple pointers to the same data, do not use this)
3863# -xlibmil: Inline some library routines
3864#   (If you expect perfect errno behavior, do not use this)
3865# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3866#   (If you expect perfect errno behavior, do not use this)
3867#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3868
3869    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3870    # Bug?
3871    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3872    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3873    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3874    #fi
3875
3876
3877
3878
3879
3880# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3881#                                   [RUN-IF-FALSE])
3882# ------------------------------------------------------------
3883# Check that the c and c++ compilers support an argument
3884
3885
3886# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3887#                                    [RUN-IF-FALSE])
3888# ------------------------------------------------------------
3889# Check that the linker support an argument
3890
3891
3892
3893
3894#
3895# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3896# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3897#
3898# This code is free software; you can redistribute it and/or modify it
3899# under the terms of the GNU General Public License version 2 only, as
3900# published by the Free Software Foundation.  Oracle designates this
3901# particular file as subject to the "Classpath" exception as provided
3902# by Oracle in the LICENSE file that accompanied this code.
3903#
3904# This code is distributed in the hope that it will be useful, but WITHOUT
3905# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3906# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3907# version 2 for more details (a copy is included in the LICENSE file that
3908# accompanied this code).
3909#
3910# You should have received a copy of the GNU General Public License version
3911# 2 along with this work; if not, write to the Free Software Foundation,
3912# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3913#
3914# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3915# or visit www.oracle.com if you need additional information or have any
3916# questions.
3917#
3918
3919
3920
3921
3922
3923cygwin_help() {
3924  case $1 in
3925    unzip)
3926      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3927      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3928      ;;
3929    zip)
3930      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3931      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3932      ;;
3933    make)
3934      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3935      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3936      ;;
3937    freetype)
3938      HELP_MSG="
3939The freetype library can now be build during the configure process.
3940Download the freetype sources and unpack them into an arbitrary directory:
3941
3942wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3943tar -xzf freetype-2.5.3.tar.gz
3944
3945Then run configure with '--with-freetype-src=<freetype_src>'. This will
3946automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3947builds or into '<freetype_src>/lib32' for 32-bit builds.
3948Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3949and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3950
3951Alternatively you can unpack the sources like this to use the default directory:
3952
3953tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3954      ;;
3955  esac
3956}
3957
3958msys_help() {
3959  PKGHANDLER_COMMAND=""
3960}
3961
3962apt_help() {
3963  case $1 in
3964    reduced)
3965      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3966    devkit)
3967      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3968    openjdk)
3969      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3970    alsa)
3971      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3972    cups)
3973      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3974    freetype)
3975      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3976    ffi)
3977      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3978    x11)
3979      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3980    ccache)
3981      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3982  esac
3983}
3984
3985yum_help() {
3986  case $1 in
3987    devkit)
3988      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3989    openjdk)
3990      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3991    alsa)
3992      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3993    cups)
3994      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3995    freetype)
3996      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3997    x11)
3998      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3999    ccache)
4000      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4001  esac
4002}
4003
4004port_help() {
4005  PKGHANDLER_COMMAND=""
4006}
4007
4008pkgutil_help() {
4009  PKGHANDLER_COMMAND=""
4010}
4011
4012pkgadd_help() {
4013  PKGHANDLER_COMMAND=""
4014}
4015
4016# This function will check if we're called from the "configure" wrapper while
4017# printing --help. If so, we will print out additional information that can
4018# only be extracted within the autoconf script, and then exit. This must be
4019# called at the very beginning in configure.ac.
4020
4021
4022
4023
4024
4025
4026#
4027# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4028# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4029#
4030# This code is free software; you can redistribute it and/or modify it
4031# under the terms of the GNU General Public License version 2 only, as
4032# published by the Free Software Foundation.  Oracle designates this
4033# particular file as subject to the "Classpath" exception as provided
4034# by Oracle in the LICENSE file that accompanied this code.
4035#
4036# This code is distributed in the hope that it will be useful, but WITHOUT
4037# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4038# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4039# version 2 for more details (a copy is included in the LICENSE file that
4040# accompanied this code).
4041#
4042# You should have received a copy of the GNU General Public License version
4043# 2 along with this work; if not, write to the Free Software Foundation,
4044# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4045#
4046# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4047# or visit www.oracle.com if you need additional information or have any
4048# questions.
4049#
4050
4051###############################################################################
4052# Check which interpreter of the JVM we want to build.
4053# Currently we have:
4054#    template: Template interpreter (the default)
4055#    cpp     : C++ interpreter
4056
4057
4058###############################################################################
4059# Check which variants of the JVM that we want to build.
4060# Currently we have:
4061#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4062#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4063#    minimal1: reduced form of client with optional VM services and features stripped out
4064#    zero: no machine code interpreter, no compiler
4065#    zeroshark: zero interpreter and shark/llvm compiler backend
4066#    core: interpreter only, no compiler (only works on some platforms)
4067
4068
4069
4070###############################################################################
4071# Setup legacy vars/targets and new vars to deal with different debug levels.
4072#
4073#    release: no debug information, all optimizations, no asserts.
4074#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4075#    fastdebug: debug information (-g), all optimizations, all asserts
4076#    slowdebug: debug information (-g), no optimizations, all asserts
4077#
4078
4079
4080
4081
4082
4083
4084#
4085# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4086# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4087#
4088# This code is free software; you can redistribute it and/or modify it
4089# under the terms of the GNU General Public License version 2 only, as
4090# published by the Free Software Foundation.  Oracle designates this
4091# particular file as subject to the "Classpath" exception as provided
4092# by Oracle in the LICENSE file that accompanied this code.
4093#
4094# This code is distributed in the hope that it will be useful, but WITHOUT
4095# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4096# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4097# version 2 for more details (a copy is included in the LICENSE file that
4098# accompanied this code).
4099#
4100# You should have received a copy of the GNU General Public License version
4101# 2 along with this work; if not, write to the Free Software Foundation,
4102# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4103#
4104# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4105# or visit www.oracle.com if you need additional information or have any
4106# questions.
4107#
4108
4109###############################################################################
4110# Check which variant of the JDK that we want to build.
4111# Currently we have:
4112#    normal:   standard edition
4113# but the custom make system may add other variants
4114#
4115# Effectively the JDK variant gives a name to a specific set of
4116# modules to compile into the JDK.
4117
4118
4119###############################################################################
4120# Set the debug level
4121#    release: no debug information, all optimizations, no asserts.
4122#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4123#    fastdebug: debug information (-g), all optimizations, all asserts
4124#    slowdebug: debug information (-g), no optimizations, all asserts
4125
4126
4127###############################################################################
4128#
4129# Should we build only OpenJDK even if closed sources are present?
4130#
4131
4132
4133
4134
4135###############################################################################
4136#
4137# Enable or disable the elliptic curve crypto implementation
4138#
4139
4140
4141
4142
4143################################################################################
4144#
4145# Gcov coverage data for hotspot
4146#
4147
4148
4149################################################################################
4150#
4151# Static build support.  When enabled will generate static
4152# libraries instead of shared libraries for all JDK libs.
4153#
4154
4155
4156#
4157# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4158# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4159#
4160# This code is free software; you can redistribute it and/or modify it
4161# under the terms of the GNU General Public License version 2 only, as
4162# published by the Free Software Foundation.  Oracle designates this
4163# particular file as subject to the "Classpath" exception as provided
4164# by Oracle in the LICENSE file that accompanied this code.
4165#
4166# This code is distributed in the hope that it will be useful, but WITHOUT
4167# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4168# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4169# version 2 for more details (a copy is included in the LICENSE file that
4170# accompanied this code).
4171#
4172# You should have received a copy of the GNU General Public License version
4173# 2 along with this work; if not, write to the Free Software Foundation,
4174# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4175#
4176# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4177# or visit www.oracle.com if you need additional information or have any
4178# questions.
4179#
4180
4181###############################################################################
4182#
4183# Setup version numbers
4184#
4185
4186# Verify that a given string represents a valid version number, and assign it
4187# to a variable.
4188
4189# Argument 1: the variable to assign to
4190# Argument 2: the value given by the user
4191
4192
4193
4194
4195#
4196# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4197# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4198#
4199# This code is free software; you can redistribute it and/or modify it
4200# under the terms of the GNU General Public License version 2 only, as
4201# published by the Free Software Foundation.  Oracle designates this
4202# particular file as subject to the "Classpath" exception as provided
4203# by Oracle in the LICENSE file that accompanied this code.
4204#
4205# This code is distributed in the hope that it will be useful, but WITHOUT
4206# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4207# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4208# version 2 for more details (a copy is included in the LICENSE file that
4209# accompanied this code).
4210#
4211# You should have received a copy of the GNU General Public License version
4212# 2 along with this work; if not, write to the Free Software Foundation,
4213# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4214#
4215# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4216# or visit www.oracle.com if you need additional information or have any
4217# questions.
4218#
4219
4220# Major library component reside in separate files.
4221#
4222# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4224#
4225# This code is free software; you can redistribute it and/or modify it
4226# under the terms of the GNU General Public License version 2 only, as
4227# published by the Free Software Foundation.  Oracle designates this
4228# particular file as subject to the "Classpath" exception as provided
4229# by Oracle in the LICENSE file that accompanied this code.
4230#
4231# This code is distributed in the hope that it will be useful, but WITHOUT
4232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4234# version 2 for more details (a copy is included in the LICENSE file that
4235# accompanied this code).
4236#
4237# You should have received a copy of the GNU General Public License version
4238# 2 along with this work; if not, write to the Free Software Foundation,
4239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4240#
4241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4242# or visit www.oracle.com if you need additional information or have any
4243# questions.
4244#
4245
4246################################################################################
4247# Setup alsa (Advanced Linux Sound Architecture)
4248################################################################################
4249
4250
4251#
4252# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4253# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4254#
4255# This code is free software; you can redistribute it and/or modify it
4256# under the terms of the GNU General Public License version 2 only, as
4257# published by the Free Software Foundation.  Oracle designates this
4258# particular file as subject to the "Classpath" exception as provided
4259# by Oracle in the LICENSE file that accompanied this code.
4260#
4261# This code is distributed in the hope that it will be useful, but WITHOUT
4262# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4263# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4264# version 2 for more details (a copy is included in the LICENSE file that
4265# accompanied this code).
4266#
4267# You should have received a copy of the GNU General Public License version
4268# 2 along with this work; if not, write to the Free Software Foundation,
4269# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4270#
4271# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4272# or visit www.oracle.com if you need additional information or have any
4273# questions.
4274#
4275
4276################################################################################
4277# Setup bundled libraries.
4278#
4279# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4280# OpenJDK repository. Default is to use these libraries as bundled, but they
4281# might be replaced by en external version by the user.
4282################################################################################
4283
4284
4285################################################################################
4286# Setup libjpeg
4287################################################################################
4288
4289
4290################################################################################
4291# Setup giflib
4292################################################################################
4293
4294
4295################################################################################
4296# Setup libpng
4297################################################################################
4298
4299
4300################################################################################
4301# Setup zlib
4302################################################################################
4303
4304
4305################################################################################
4306# Setup lcms (Little CMS)
4307################################################################################
4308
4309
4310#
4311# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4312# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4313#
4314# This code is free software; you can redistribute it and/or modify it
4315# under the terms of the GNU General Public License version 2 only, as
4316# published by the Free Software Foundation.  Oracle designates this
4317# particular file as subject to the "Classpath" exception as provided
4318# by Oracle in the LICENSE file that accompanied this code.
4319#
4320# This code is distributed in the hope that it will be useful, but WITHOUT
4321# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4322# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4323# version 2 for more details (a copy is included in the LICENSE file that
4324# accompanied this code).
4325#
4326# You should have received a copy of the GNU General Public License version
4327# 2 along with this work; if not, write to the Free Software Foundation,
4328# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4329#
4330# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4331# or visit www.oracle.com if you need additional information or have any
4332# questions.
4333#
4334
4335################################################################################
4336# Setup cups (Common Unix Printing System)
4337################################################################################
4338
4339
4340#
4341# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4342# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343#
4344# This code is free software; you can redistribute it and/or modify it
4345# under the terms of the GNU General Public License version 2 only, as
4346# published by the Free Software Foundation.  Oracle designates this
4347# particular file as subject to the "Classpath" exception as provided
4348# by Oracle in the LICENSE file that accompanied this code.
4349#
4350# This code is distributed in the hope that it will be useful, but WITHOUT
4351# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4353# version 2 for more details (a copy is included in the LICENSE file that
4354# accompanied this code).
4355#
4356# You should have received a copy of the GNU General Public License version
4357# 2 along with this work; if not, write to the Free Software Foundation,
4358# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359#
4360# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361# or visit www.oracle.com if you need additional information or have any
4362# questions.
4363#
4364
4365################################################################################
4366# Setup libffi (Foreign Function Interface)
4367################################################################################
4368
4369
4370#
4371# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395################################################################################
4396# Build the freetype lib from source
4397################################################################################
4398
4399
4400################################################################################
4401# Check if a potential freeype library match is correct and usable
4402################################################################################
4403
4404
4405################################################################################
4406# Setup freetype (The FreeType2 font rendering library)
4407################################################################################
4408
4409
4410#
4411# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4412# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4413#
4414# This code is free software; you can redistribute it and/or modify it
4415# under the terms of the GNU General Public License version 2 only, as
4416# published by the Free Software Foundation.  Oracle designates this
4417# particular file as subject to the "Classpath" exception as provided
4418# by Oracle in the LICENSE file that accompanied this code.
4419#
4420# This code is distributed in the hope that it will be useful, but WITHOUT
4421# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4422# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4423# version 2 for more details (a copy is included in the LICENSE file that
4424# accompanied this code).
4425#
4426# You should have received a copy of the GNU General Public License version
4427# 2 along with this work; if not, write to the Free Software Foundation,
4428# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4429#
4430# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4431# or visit www.oracle.com if you need additional information or have any
4432# questions.
4433#
4434
4435################################################################################
4436# Setup the standard C/C++ runtime libraries.
4437#
4438# Most importantly, determine if stdc++ should be linked statically or
4439# dynamically.
4440################################################################################
4441
4442
4443#
4444# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4445# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4446#
4447# This code is free software; you can redistribute it and/or modify it
4448# under the terms of the GNU General Public License version 2 only, as
4449# published by the Free Software Foundation.  Oracle designates this
4450# particular file as subject to the "Classpath" exception as provided
4451# by Oracle in the LICENSE file that accompanied this code.
4452#
4453# This code is distributed in the hope that it will be useful, but WITHOUT
4454# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4455# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4456# version 2 for more details (a copy is included in the LICENSE file that
4457# accompanied this code).
4458#
4459# You should have received a copy of the GNU General Public License version
4460# 2 along with this work; if not, write to the Free Software Foundation,
4461# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4462#
4463# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4464# or visit www.oracle.com if you need additional information or have any
4465# questions.
4466#
4467
4468################################################################################
4469# Setup X11 Windows system
4470################################################################################
4471
4472
4473
4474################################################################################
4475# Determine which libraries are needed for this configuration
4476################################################################################
4477
4478
4479################################################################################
4480# Parse library options, and setup needed libraries
4481################################################################################
4482
4483
4484################################################################################
4485# Setup llvm (Low-Level VM)
4486################################################################################
4487
4488
4489################################################################################
4490# Setup various libraries, typically small system libraries
4491################################################################################
4492
4493
4494#
4495# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4496# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4497#
4498# This code is free software; you can redistribute it and/or modify it
4499# under the terms of the GNU General Public License version 2 only, as
4500# published by the Free Software Foundation.  Oracle designates this
4501# particular file as subject to the "Classpath" exception as provided
4502# by Oracle in the LICENSE file that accompanied this code.
4503#
4504# This code is distributed in the hope that it will be useful, but WITHOUT
4505# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4506# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4507# version 2 for more details (a copy is included in the LICENSE file that
4508# accompanied this code).
4509#
4510# You should have received a copy of the GNU General Public License version
4511# 2 along with this work; if not, write to the Free Software Foundation,
4512# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4513#
4514# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4515# or visit www.oracle.com if you need additional information or have any
4516# questions.
4517#
4518
4519# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4520# Converts autoconf style CPU name to OpenJDK style, into
4521# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4522
4523
4524# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4525# Converts autoconf style OS name to OpenJDK style, into
4526# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4527
4528
4529# Expects $host_os $host_cpu $build_os and $build_cpu
4530# and $with_target_bits to have been setup!
4531#
4532# Translate the standard triplet(quadruplet) definition
4533# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4534# OPENJDK_BUILD_OS, etc.
4535
4536
4537# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4538# accordingly. Must be done after setting up build and target system, but before
4539# doing anything else with these values.
4540
4541
4542# Setup the legacy variables, for controlling the old makefiles.
4543#
4544
4545
4546
4547
4548#%%% Build and target systems %%%
4549
4550
4551
4552
4553# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4554# Add -mX to various FLAGS variables.
4555
4556
4557
4558
4559
4560
4561#
4562# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586
4587
4588
4589
4590
4591
4592#
4593# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4595#
4596# This code is free software; you can redistribute it and/or modify it
4597# under the terms of the GNU General Public License version 2 only, as
4598# published by the Free Software Foundation.  Oracle designates this
4599# particular file as subject to the "Classpath" exception as provided
4600# by Oracle in the LICENSE file that accompanied this code.
4601#
4602# This code is distributed in the hope that it will be useful, but WITHOUT
4603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4605# version 2 for more details (a copy is included in the LICENSE file that
4606# accompanied this code).
4607#
4608# You should have received a copy of the GNU General Public License version
4609# 2 along with this work; if not, write to the Free Software Foundation,
4610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4611#
4612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4613# or visit www.oracle.com if you need additional information or have any
4614# questions.
4615#
4616
4617########################################################################
4618# This file is responsible for detecting, verifying and setting up the
4619# toolchain, i.e. the compiler, linker and related utilities. It will setup
4620# proper paths to the binaries, but it will not setup any flags.
4621#
4622# The binaries used is determined by the toolchain type, which is the family of
4623# compilers and related tools that are used.
4624########################################################################
4625
4626
4627# All valid toolchains, regardless of platform (used by help.m4)
4628VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4629
4630# These toolchains are valid on different platforms
4631VALID_TOOLCHAINS_linux="gcc clang"
4632VALID_TOOLCHAINS_solaris="solstudio"
4633VALID_TOOLCHAINS_macosx="gcc clang"
4634VALID_TOOLCHAINS_aix="xlc"
4635VALID_TOOLCHAINS_windows="microsoft"
4636
4637# Toolchain descriptions
4638TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4639TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4640TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4641TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4642TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4643
4644# Setup a number of variables describing how native output files are
4645# named on this platform/toolchain.
4646
4647
4648# Determine which toolchain type to use, and make sure it is valid for this
4649# platform. Setup various information about the selected toolchain.
4650
4651
4652# Before we start detecting the toolchain executables, we might need some
4653# special setup, e.g. additional paths etc.
4654
4655
4656# Restore path, etc
4657
4658
4659# Check if a compiler is of the toolchain type we expect, and save the version
4660# information from it. If the compiler does not match the expected type,
4661# this function will abort using AC_MSG_ERROR. If it matches, the version will
4662# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4663# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4664#
4665# $1 = compiler to test (CC or CXX)
4666# $2 = human readable name of compiler (C or C++)
4667
4668
4669# Try to locate the given C or C++ compiler in the path, or otherwise.
4670#
4671# $1 = compiler to test (CC or CXX)
4672# $2 = human readable name of compiler (C or C++)
4673# $3 = list of compiler names to search for
4674
4675
4676# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4677# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4678# archiver (AR). Verify that the compilers are correct according to the
4679# toolchain type.
4680
4681
4682# Setup additional tools that is considered a part of the toolchain, but not the
4683# core part. Many of these are highly platform-specific and do not exist,
4684# and/or are not needed on all platforms.
4685
4686
4687# Setup the build tools (i.e, the compiler and linker used to build programs
4688# that should be run on the build platform, not the target platform, as a build
4689# helper). Since the non-cross-compile case uses the normal, target compilers
4690# for this, we can only do this after these have been setup.
4691
4692
4693# Setup legacy variables that are still needed as alternative ways to refer to
4694# parts of the toolchain.
4695
4696
4697# Do some additional checks on the detected tools.
4698
4699
4700# Setup the JTReg Regression Test Harness.
4701
4702
4703#
4704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4706#
4707# This code is free software; you can redistribute it and/or modify it
4708# under the terms of the GNU General Public License version 2 only, as
4709# published by the Free Software Foundation.  Oracle designates this
4710# particular file as subject to the "Classpath" exception as provided
4711# by Oracle in the LICENSE file that accompanied this code.
4712#
4713# This code is distributed in the hope that it will be useful, but WITHOUT
4714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4716# version 2 for more details (a copy is included in the LICENSE file that
4717# accompanied this code).
4718#
4719# You should have received a copy of the GNU General Public License version
4720# 2 along with this work; if not, write to the Free Software Foundation,
4721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4722#
4723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4724# or visit www.oracle.com if you need additional information or have any
4725# questions.
4726#
4727
4728################################################################################
4729# The order of these defines the priority by which we try to find them.
4730VALID_VS_VERSIONS="2013 2012 2010"
4731
4732VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4733VS_VERSION_INTERNAL_2010=100
4734VS_MSVCR_2010=msvcr100.dll
4735# We don't use msvcp on Visual Studio 2010
4736#VS_MSVCP_2010=msvcp100.dll
4737VS_ENVVAR_2010="VS100COMNTOOLS"
4738VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4739VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4740VS_VS_PLATFORM_NAME_2010="v100"
4741VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4742
4743VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4744VS_VERSION_INTERNAL_2012=110
4745VS_MSVCR_2012=msvcr110.dll
4746VS_MSVCP_2012=msvcp110.dll
4747VS_ENVVAR_2012="VS110COMNTOOLS"
4748VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4749VS_SDK_INSTALLDIR_2012=
4750VS_VS_PLATFORM_NAME_2012="v110"
4751VS_SDK_PLATFORM_NAME_2012=
4752
4753VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4754VS_VERSION_INTERNAL_2013=120
4755VS_MSVCR_2013=msvcr120.dll
4756VS_MSVCP_2013=msvcp120.dll
4757VS_ENVVAR_2013="VS120COMNTOOLS"
4758VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4759VS_SDK_INSTALLDIR_2013=
4760VS_VS_PLATFORM_NAME_2013="v120"
4761VS_SDK_PLATFORM_NAME_2013=
4762
4763################################################################################
4764
4765
4766
4767################################################################################
4768
4769
4770
4771################################################################################
4772# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4773# build environment and assigns it to VS_ENV_CMD
4774
4775
4776################################################################################
4777
4778
4779
4780################################################################################
4781# Check if the VS env variables were setup prior to running configure.
4782# If not, then find vcvarsall.bat and run it automatically, and integrate
4783# the set env variables into the spec file.
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798# This line needs to be here, verbatim, after all includes and the dummy hook
4799# definitions. It is replaced with custom functionality when building
4800# custom sources.
4801#CUSTOM_AUTOCONF_INCLUDE
4802
4803# Do not change or remove the following line, it is needed for consistency checks:
4804DATE_WHEN_GENERATED=1450273627
4805
4806###############################################################################
4807#
4808# Initialization / Boot-strapping
4809#
4810# The bootstrapping process needs to solve the "chicken or the egg" problem,
4811# thus it jumps back and forth, each time gaining something needed later on.
4812#
4813###############################################################################
4814
4815# If we are requested to print additional help, do that and then exit.
4816# This must be the very first call.
4817
4818  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4819    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4820    $PRINTF "Which are valid to use depends on the build platform.\n"
4821    for toolchain in $VALID_TOOLCHAINS_all; do
4822      # Use indirect variable referencing
4823      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4824      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4825      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4826    done
4827
4828    # And now exit directly
4829    exit 0
4830  fi
4831
4832
4833# Basic initialization that must happen first of all in the normal process.
4834
4835  # Save the original command line. This is passed to us by the wrapper configure script.
4836
4837  # Save the path variable before it gets changed
4838  ORIGINAL_PATH="$PATH"
4839
4840  DATE_WHEN_CONFIGURED=`LANG=C date`
4841
4842  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4843$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4845$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4846
4847
4848  # Start with tools that do not need have cross compilation support
4849  # and can be expected to be found in the default PATH. These tools are
4850  # used by configure.
4851
4852  # First are all the simple required tools.
4853
4854
4855
4856  # Publish this variable in the help.
4857
4858
4859  if [ -z "${BASENAME+x}" ]; then
4860    # The variable is not set by user, try to locate tool using the code snippet
4861    for ac_prog in basename
4862do
4863  # Extract the first word of "$ac_prog", so it can be a program name with args.
4864set dummy $ac_prog; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if ${ac_cv_path_BASENAME+:} false; then :
4868  $as_echo_n "(cached) " >&6
4869else
4870  case $BASENAME in
4871  [\\/]* | ?:[\\/]*)
4872  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4873  ;;
4874  *)
4875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in $PATH
4877do
4878  IFS=$as_save_IFS
4879  test -z "$as_dir" && as_dir=.
4880    for ac_exec_ext in '' $ac_executable_extensions; do
4881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4882    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4884    break 2
4885  fi
4886done
4887  done
4888IFS=$as_save_IFS
4889
4890  ;;
4891esac
4892fi
4893BASENAME=$ac_cv_path_BASENAME
4894if test -n "$BASENAME"; then
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4896$as_echo "$BASENAME" >&6; }
4897else
4898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902
4903  test -n "$BASENAME" && break
4904done
4905
4906  else
4907    # The variable is set, but is it from the command line or the environment?
4908
4909    # Try to remove the string !BASENAME! from our list.
4910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4912      # If it failed, the variable was not from the command line. Ignore it,
4913      # but warn the user (except for BASH, which is always set by the calling BASH).
4914      if test "xBASENAME" != xBASH; then
4915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4916$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4917      fi
4918      # Try to locate tool using the code snippet
4919      for ac_prog in basename
4920do
4921  # Extract the first word of "$ac_prog", so it can be a program name with args.
4922set dummy $ac_prog; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_BASENAME+:} false; then :
4926  $as_echo_n "(cached) " >&6
4927else
4928  case $BASENAME in
4929  [\\/]* | ?:[\\/]*)
4930  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4931  ;;
4932  *)
4933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in $PATH
4935do
4936  IFS=$as_save_IFS
4937  test -z "$as_dir" && as_dir=.
4938    for ac_exec_ext in '' $ac_executable_extensions; do
4939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4940    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942    break 2
4943  fi
4944done
4945  done
4946IFS=$as_save_IFS
4947
4948  ;;
4949esac
4950fi
4951BASENAME=$ac_cv_path_BASENAME
4952if test -n "$BASENAME"; then
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4954$as_echo "$BASENAME" >&6; }
4955else
4956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961  test -n "$BASENAME" && break
4962done
4963
4964    else
4965      # If it succeeded, then it was overridden by the user. We will use it
4966      # for the tool.
4967
4968      # First remove it from the list of overridden variables, so we can test
4969      # for unknown variables in the end.
4970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4971
4972      # Check if we try to supply an empty value
4973      if test "x$BASENAME" = x; then
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4975$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4977$as_echo_n "checking for BASENAME... " >&6; }
4978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4979$as_echo "disabled" >&6; }
4980      else
4981        # Check if the provided tool contains a complete path.
4982        tool_specified="$BASENAME"
4983        tool_basename="${tool_specified##*/}"
4984        if test "x$tool_basename" = "x$tool_specified"; then
4985          # A command without a complete path is provided, search $PATH.
4986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4987$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4988          # Extract the first word of "$tool_basename", so it can be a program name with args.
4989set dummy $tool_basename; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_BASENAME+:} false; then :
4993  $as_echo_n "(cached) " >&6
4994else
4995  case $BASENAME in
4996  [\\/]* | ?:[\\/]*)
4997  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4998  ;;
4999  *)
5000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in $PATH
5002do
5003  IFS=$as_save_IFS
5004  test -z "$as_dir" && as_dir=.
5005    for ac_exec_ext in '' $ac_executable_extensions; do
5006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009    break 2
5010  fi
5011done
5012  done
5013IFS=$as_save_IFS
5014
5015  ;;
5016esac
5017fi
5018BASENAME=$ac_cv_path_BASENAME
5019if test -n "$BASENAME"; then
5020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5021$as_echo "$BASENAME" >&6; }
5022else
5023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027
5028          if test "x$BASENAME" = x; then
5029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5030          fi
5031        else
5032          # Otherwise we believe it is a complete path. Use it as it is.
5033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5034$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5036$as_echo_n "checking for BASENAME... " >&6; }
5037          if test ! -x "$tool_specified"; then
5038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5039$as_echo "not found" >&6; }
5040            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5041          fi
5042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5043$as_echo "$tool_specified" >&6; }
5044        fi
5045      fi
5046    fi
5047
5048  fi
5049
5050
5051
5052  if test "x$BASENAME" = x; then
5053    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5054  fi
5055
5056
5057
5058
5059
5060  # Publish this variable in the help.
5061
5062
5063  if [ -z "${BASH+x}" ]; then
5064    # The variable is not set by user, try to locate tool using the code snippet
5065    for ac_prog in bash
5066do
5067  # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_BASH+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $BASH in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097BASH=$ac_cv_path_BASH
5098if test -n "$BASH"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5100$as_echo "$BASH" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107  test -n "$BASH" && break
5108done
5109
5110  else
5111    # The variable is set, but is it from the command line or the environment?
5112
5113    # Try to remove the string !BASH! from our list.
5114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5116      # If it failed, the variable was not from the command line. Ignore it,
5117      # but warn the user (except for BASH, which is always set by the calling BASH).
5118      if test "xBASH" != xBASH; then
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5120$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5121      fi
5122      # Try to locate tool using the code snippet
5123      for ac_prog in bash
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_path_BASH+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $BASH in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5144    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155BASH=$ac_cv_path_BASH
5156if test -n "$BASH"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5158$as_echo "$BASH" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$BASH" && break
5166done
5167
5168    else
5169      # If it succeeded, then it was overridden by the user. We will use it
5170      # for the tool.
5171
5172      # First remove it from the list of overridden variables, so we can test
5173      # for unknown variables in the end.
5174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5175
5176      # Check if we try to supply an empty value
5177      if test "x$BASH" = x; then
5178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5179$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5181$as_echo_n "checking for BASH... " >&6; }
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5183$as_echo "disabled" >&6; }
5184      else
5185        # Check if the provided tool contains a complete path.
5186        tool_specified="$BASH"
5187        tool_basename="${tool_specified##*/}"
5188        if test "x$tool_basename" = "x$tool_specified"; then
5189          # A command without a complete path is provided, search $PATH.
5190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5192          # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_BASH+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $BASH in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222BASH=$ac_cv_path_BASH
5223if test -n "$BASH"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5225$as_echo "$BASH" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232          if test "x$BASH" = x; then
5233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234          fi
5235        else
5236          # Otherwise we believe it is a complete path. Use it as it is.
5237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5240$as_echo_n "checking for BASH... " >&6; }
5241          if test ! -x "$tool_specified"; then
5242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5245          fi
5246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248        fi
5249      fi
5250    fi
5251
5252  fi
5253
5254
5255
5256  if test "x$BASH" = x; then
5257    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5258  fi
5259
5260
5261
5262
5263
5264  # Publish this variable in the help.
5265
5266
5267  if [ -z "${CAT+x}" ]; then
5268    # The variable is not set by user, try to locate tool using the code snippet
5269    for ac_prog in cat
5270do
5271  # Extract the first word of "$ac_prog", so it can be a program name with args.
5272set dummy $ac_prog; ac_word=$2
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274$as_echo_n "checking for $ac_word... " >&6; }
5275if ${ac_cv_path_CAT+:} false; then :
5276  $as_echo_n "(cached) " >&6
5277else
5278  case $CAT in
5279  [\\/]* | ?:[\\/]*)
5280  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5281  ;;
5282  *)
5283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286  IFS=$as_save_IFS
5287  test -z "$as_dir" && as_dir=.
5288    for ac_exec_ext in '' $ac_executable_extensions; do
5289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292    break 2
5293  fi
5294done
5295  done
5296IFS=$as_save_IFS
5297
5298  ;;
5299esac
5300fi
5301CAT=$ac_cv_path_CAT
5302if test -n "$CAT"; then
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5304$as_echo "$CAT" >&6; }
5305else
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
5308fi
5309
5310
5311  test -n "$CAT" && break
5312done
5313
5314  else
5315    # The variable is set, but is it from the command line or the environment?
5316
5317    # Try to remove the string !CAT! from our list.
5318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5320      # If it failed, the variable was not from the command line. Ignore it,
5321      # but warn the user (except for BASH, which is always set by the calling BASH).
5322      if test "xCAT" != xBASH; then
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5324$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5325      fi
5326      # Try to locate tool using the code snippet
5327      for ac_prog in cat
5328do
5329  # Extract the first word of "$ac_prog", so it can be a program name with args.
5330set dummy $ac_prog; ac_word=$2
5331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5332$as_echo_n "checking for $ac_word... " >&6; }
5333if ${ac_cv_path_CAT+:} false; then :
5334  $as_echo_n "(cached) " >&6
5335else
5336  case $CAT in
5337  [\\/]* | ?:[\\/]*)
5338  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5339  ;;
5340  *)
5341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5342for as_dir in $PATH
5343do
5344  IFS=$as_save_IFS
5345  test -z "$as_dir" && as_dir=.
5346    for ac_exec_ext in '' $ac_executable_extensions; do
5347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5348    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5350    break 2
5351  fi
5352done
5353  done
5354IFS=$as_save_IFS
5355
5356  ;;
5357esac
5358fi
5359CAT=$ac_cv_path_CAT
5360if test -n "$CAT"; then
5361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5362$as_echo "$CAT" >&6; }
5363else
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5365$as_echo "no" >&6; }
5366fi
5367
5368
5369  test -n "$CAT" && break
5370done
5371
5372    else
5373      # If it succeeded, then it was overridden by the user. We will use it
5374      # for the tool.
5375
5376      # First remove it from the list of overridden variables, so we can test
5377      # for unknown variables in the end.
5378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5379
5380      # Check if we try to supply an empty value
5381      if test "x$CAT" = x; then
5382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5383$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5385$as_echo_n "checking for CAT... " >&6; }
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5387$as_echo "disabled" >&6; }
5388      else
5389        # Check if the provided tool contains a complete path.
5390        tool_specified="$CAT"
5391        tool_basename="${tool_specified##*/}"
5392        if test "x$tool_basename" = "x$tool_specified"; then
5393          # A command without a complete path is provided, search $PATH.
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5395$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5396          # Extract the first word of "$tool_basename", so it can be a program name with args.
5397set dummy $tool_basename; ac_word=$2
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399$as_echo_n "checking for $ac_word... " >&6; }
5400if ${ac_cv_path_CAT+:} false; then :
5401  $as_echo_n "(cached) " >&6
5402else
5403  case $CAT in
5404  [\\/]* | ?:[\\/]*)
5405  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5406  ;;
5407  *)
5408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409for as_dir in $PATH
5410do
5411  IFS=$as_save_IFS
5412  test -z "$as_dir" && as_dir=.
5413    for ac_exec_ext in '' $ac_executable_extensions; do
5414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5415    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5417    break 2
5418  fi
5419done
5420  done
5421IFS=$as_save_IFS
5422
5423  ;;
5424esac
5425fi
5426CAT=$ac_cv_path_CAT
5427if test -n "$CAT"; then
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5429$as_echo "$CAT" >&6; }
5430else
5431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432$as_echo "no" >&6; }
5433fi
5434
5435
5436          if test "x$CAT" = x; then
5437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5438          fi
5439        else
5440          # Otherwise we believe it is a complete path. Use it as it is.
5441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5442$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5444$as_echo_n "checking for CAT... " >&6; }
5445          if test ! -x "$tool_specified"; then
5446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5447$as_echo "not found" >&6; }
5448            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5449          fi
5450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5451$as_echo "$tool_specified" >&6; }
5452        fi
5453      fi
5454    fi
5455
5456  fi
5457
5458
5459
5460  if test "x$CAT" = x; then
5461    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5462  fi
5463
5464
5465
5466
5467
5468  # Publish this variable in the help.
5469
5470
5471  if [ -z "${CHMOD+x}" ]; then
5472    # The variable is not set by user, try to locate tool using the code snippet
5473    for ac_prog in chmod
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if ${ac_cv_path_CHMOD+:} false; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $CHMOD in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505CHMOD=$ac_cv_path_CHMOD
5506if test -n "$CHMOD"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5508$as_echo "$CHMOD" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$CHMOD" && break
5516done
5517
5518  else
5519    # The variable is set, but is it from the command line or the environment?
5520
5521    # Try to remove the string !CHMOD! from our list.
5522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5524      # If it failed, the variable was not from the command line. Ignore it,
5525      # but warn the user (except for BASH, which is always set by the calling BASH).
5526      if test "xCHMOD" != xBASH; then
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5528$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5529      fi
5530      # Try to locate tool using the code snippet
5531      for ac_prog in chmod
5532do
5533  # Extract the first word of "$ac_prog", so it can be a program name with args.
5534set dummy $ac_prog; ac_word=$2
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
5537if ${ac_cv_path_CHMOD+:} false; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  case $CHMOD in
5541  [\\/]* | ?:[\\/]*)
5542  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5543  ;;
5544  *)
5545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546for as_dir in $PATH
5547do
5548  IFS=$as_save_IFS
5549  test -z "$as_dir" && as_dir=.
5550    for ac_exec_ext in '' $ac_executable_extensions; do
5551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554    break 2
5555  fi
5556done
5557  done
5558IFS=$as_save_IFS
5559
5560  ;;
5561esac
5562fi
5563CHMOD=$ac_cv_path_CHMOD
5564if test -n "$CHMOD"; then
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5566$as_echo "$CHMOD" >&6; }
5567else
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570fi
5571
5572
5573  test -n "$CHMOD" && break
5574done
5575
5576    else
5577      # If it succeeded, then it was overridden by the user. We will use it
5578      # for the tool.
5579
5580      # First remove it from the list of overridden variables, so we can test
5581      # for unknown variables in the end.
5582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5583
5584      # Check if we try to supply an empty value
5585      if test "x$CHMOD" = x; then
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5587$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5589$as_echo_n "checking for CHMOD... " >&6; }
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5591$as_echo "disabled" >&6; }
5592      else
5593        # Check if the provided tool contains a complete path.
5594        tool_specified="$CHMOD"
5595        tool_basename="${tool_specified##*/}"
5596        if test "x$tool_basename" = "x$tool_specified"; then
5597          # A command without a complete path is provided, search $PATH.
5598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5599$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5600          # Extract the first word of "$tool_basename", so it can be a program name with args.
5601set dummy $tool_basename; ac_word=$2
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5603$as_echo_n "checking for $ac_word... " >&6; }
5604if ${ac_cv_path_CHMOD+:} false; then :
5605  $as_echo_n "(cached) " >&6
5606else
5607  case $CHMOD in
5608  [\\/]* | ?:[\\/]*)
5609  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5610  ;;
5611  *)
5612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5613for as_dir in $PATH
5614do
5615  IFS=$as_save_IFS
5616  test -z "$as_dir" && as_dir=.
5617    for ac_exec_ext in '' $ac_executable_extensions; do
5618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5619    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5621    break 2
5622  fi
5623done
5624  done
5625IFS=$as_save_IFS
5626
5627  ;;
5628esac
5629fi
5630CHMOD=$ac_cv_path_CHMOD
5631if test -n "$CHMOD"; then
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5633$as_echo "$CHMOD" >&6; }
5634else
5635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5636$as_echo "no" >&6; }
5637fi
5638
5639
5640          if test "x$CHMOD" = x; then
5641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5642          fi
5643        else
5644          # Otherwise we believe it is a complete path. Use it as it is.
5645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5646$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5648$as_echo_n "checking for CHMOD... " >&6; }
5649          if test ! -x "$tool_specified"; then
5650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5651$as_echo "not found" >&6; }
5652            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5653          fi
5654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5655$as_echo "$tool_specified" >&6; }
5656        fi
5657      fi
5658    fi
5659
5660  fi
5661
5662
5663
5664  if test "x$CHMOD" = x; then
5665    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5666  fi
5667
5668
5669
5670
5671
5672  # Publish this variable in the help.
5673
5674
5675  if [ -z "${CMP+x}" ]; then
5676    # The variable is not set by user, try to locate tool using the code snippet
5677    for ac_prog in cmp
5678do
5679  # Extract the first word of "$ac_prog", so it can be a program name with args.
5680set dummy $ac_prog; ac_word=$2
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682$as_echo_n "checking for $ac_word... " >&6; }
5683if ${ac_cv_path_CMP+:} false; then :
5684  $as_echo_n "(cached) " >&6
5685else
5686  case $CMP in
5687  [\\/]* | ?:[\\/]*)
5688  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5689  ;;
5690  *)
5691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694  IFS=$as_save_IFS
5695  test -z "$as_dir" && as_dir=.
5696    for ac_exec_ext in '' $ac_executable_extensions; do
5697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5698    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700    break 2
5701  fi
5702done
5703  done
5704IFS=$as_save_IFS
5705
5706  ;;
5707esac
5708fi
5709CMP=$ac_cv_path_CMP
5710if test -n "$CMP"; then
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5712$as_echo "$CMP" >&6; }
5713else
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716fi
5717
5718
5719  test -n "$CMP" && break
5720done
5721
5722  else
5723    # The variable is set, but is it from the command line or the environment?
5724
5725    # Try to remove the string !CMP! from our list.
5726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5728      # If it failed, the variable was not from the command line. Ignore it,
5729      # but warn the user (except for BASH, which is always set by the calling BASH).
5730      if test "xCMP" != xBASH; then
5731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5732$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5733      fi
5734      # Try to locate tool using the code snippet
5735      for ac_prog in cmp
5736do
5737  # Extract the first word of "$ac_prog", so it can be a program name with args.
5738set dummy $ac_prog; ac_word=$2
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
5741if ${ac_cv_path_CMP+:} false; then :
5742  $as_echo_n "(cached) " >&6
5743else
5744  case $CMP in
5745  [\\/]* | ?:[\\/]*)
5746  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5747  ;;
5748  *)
5749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752  IFS=$as_save_IFS
5753  test -z "$as_dir" && as_dir=.
5754    for ac_exec_ext in '' $ac_executable_extensions; do
5755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5756    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758    break 2
5759  fi
5760done
5761  done
5762IFS=$as_save_IFS
5763
5764  ;;
5765esac
5766fi
5767CMP=$ac_cv_path_CMP
5768if test -n "$CMP"; then
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5770$as_echo "$CMP" >&6; }
5771else
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
5774fi
5775
5776
5777  test -n "$CMP" && break
5778done
5779
5780    else
5781      # If it succeeded, then it was overridden by the user. We will use it
5782      # for the tool.
5783
5784      # First remove it from the list of overridden variables, so we can test
5785      # for unknown variables in the end.
5786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5787
5788      # Check if we try to supply an empty value
5789      if test "x$CMP" = x; then
5790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5791$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5793$as_echo_n "checking for CMP... " >&6; }
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5795$as_echo "disabled" >&6; }
5796      else
5797        # Check if the provided tool contains a complete path.
5798        tool_specified="$CMP"
5799        tool_basename="${tool_specified##*/}"
5800        if test "x$tool_basename" = "x$tool_specified"; then
5801          # A command without a complete path is provided, search $PATH.
5802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5803$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5804          # Extract the first word of "$tool_basename", so it can be a program name with args.
5805set dummy $tool_basename; ac_word=$2
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
5808if ${ac_cv_path_CMP+:} false; then :
5809  $as_echo_n "(cached) " >&6
5810else
5811  case $CMP in
5812  [\\/]* | ?:[\\/]*)
5813  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5814  ;;
5815  *)
5816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5817for as_dir in $PATH
5818do
5819  IFS=$as_save_IFS
5820  test -z "$as_dir" && as_dir=.
5821    for ac_exec_ext in '' $ac_executable_extensions; do
5822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5823    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5825    break 2
5826  fi
5827done
5828  done
5829IFS=$as_save_IFS
5830
5831  ;;
5832esac
5833fi
5834CMP=$ac_cv_path_CMP
5835if test -n "$CMP"; then
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5837$as_echo "$CMP" >&6; }
5838else
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5840$as_echo "no" >&6; }
5841fi
5842
5843
5844          if test "x$CMP" = x; then
5845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5846          fi
5847        else
5848          # Otherwise we believe it is a complete path. Use it as it is.
5849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5850$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5852$as_echo_n "checking for CMP... " >&6; }
5853          if test ! -x "$tool_specified"; then
5854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5855$as_echo "not found" >&6; }
5856            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5857          fi
5858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5859$as_echo "$tool_specified" >&6; }
5860        fi
5861      fi
5862    fi
5863
5864  fi
5865
5866
5867
5868  if test "x$CMP" = x; then
5869    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5870  fi
5871
5872
5873
5874
5875
5876  # Publish this variable in the help.
5877
5878
5879  if [ -z "${COMM+x}" ]; then
5880    # The variable is not set by user, try to locate tool using the code snippet
5881    for ac_prog in comm
5882do
5883  # Extract the first word of "$ac_prog", so it can be a program name with args.
5884set dummy $ac_prog; ac_word=$2
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5886$as_echo_n "checking for $ac_word... " >&6; }
5887if ${ac_cv_path_COMM+:} false; then :
5888  $as_echo_n "(cached) " >&6
5889else
5890  case $COMM in
5891  [\\/]* | ?:[\\/]*)
5892  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5893  ;;
5894  *)
5895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5896for as_dir in $PATH
5897do
5898  IFS=$as_save_IFS
5899  test -z "$as_dir" && as_dir=.
5900    for ac_exec_ext in '' $ac_executable_extensions; do
5901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5902    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5904    break 2
5905  fi
5906done
5907  done
5908IFS=$as_save_IFS
5909
5910  ;;
5911esac
5912fi
5913COMM=$ac_cv_path_COMM
5914if test -n "$COMM"; then
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5916$as_echo "$COMM" >&6; }
5917else
5918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919$as_echo "no" >&6; }
5920fi
5921
5922
5923  test -n "$COMM" && break
5924done
5925
5926  else
5927    # The variable is set, but is it from the command line or the environment?
5928
5929    # Try to remove the string !COMM! from our list.
5930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5932      # If it failed, the variable was not from the command line. Ignore it,
5933      # but warn the user (except for BASH, which is always set by the calling BASH).
5934      if test "xCOMM" != xBASH; then
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5936$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5937      fi
5938      # Try to locate tool using the code snippet
5939      for ac_prog in comm
5940do
5941  # Extract the first word of "$ac_prog", so it can be a program name with args.
5942set dummy $ac_prog; ac_word=$2
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
5945if ${ac_cv_path_COMM+:} false; then :
5946  $as_echo_n "(cached) " >&6
5947else
5948  case $COMM in
5949  [\\/]* | ?:[\\/]*)
5950  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5951  ;;
5952  *)
5953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956  IFS=$as_save_IFS
5957  test -z "$as_dir" && as_dir=.
5958    for ac_exec_ext in '' $ac_executable_extensions; do
5959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5960    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5962    break 2
5963  fi
5964done
5965  done
5966IFS=$as_save_IFS
5967
5968  ;;
5969esac
5970fi
5971COMM=$ac_cv_path_COMM
5972if test -n "$COMM"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5974$as_echo "$COMM" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$COMM" && break
5982done
5983
5984    else
5985      # If it succeeded, then it was overridden by the user. We will use it
5986      # for the tool.
5987
5988      # First remove it from the list of overridden variables, so we can test
5989      # for unknown variables in the end.
5990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5991
5992      # Check if we try to supply an empty value
5993      if test "x$COMM" = x; then
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5995$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5997$as_echo_n "checking for COMM... " >&6; }
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5999$as_echo "disabled" >&6; }
6000      else
6001        # Check if the provided tool contains a complete path.
6002        tool_specified="$COMM"
6003        tool_basename="${tool_specified##*/}"
6004        if test "x$tool_basename" = "x$tool_specified"; then
6005          # A command without a complete path is provided, search $PATH.
6006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6007$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6008          # Extract the first word of "$tool_basename", so it can be a program name with args.
6009set dummy $tool_basename; ac_word=$2
6010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6011$as_echo_n "checking for $ac_word... " >&6; }
6012if ${ac_cv_path_COMM+:} false; then :
6013  $as_echo_n "(cached) " >&6
6014else
6015  case $COMM in
6016  [\\/]* | ?:[\\/]*)
6017  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6018  ;;
6019  *)
6020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023  IFS=$as_save_IFS
6024  test -z "$as_dir" && as_dir=.
6025    for ac_exec_ext in '' $ac_executable_extensions; do
6026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6027    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029    break 2
6030  fi
6031done
6032  done
6033IFS=$as_save_IFS
6034
6035  ;;
6036esac
6037fi
6038COMM=$ac_cv_path_COMM
6039if test -n "$COMM"; then
6040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6041$as_echo "$COMM" >&6; }
6042else
6043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
6046
6047
6048          if test "x$COMM" = x; then
6049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6050          fi
6051        else
6052          # Otherwise we believe it is a complete path. Use it as it is.
6053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6054$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6056$as_echo_n "checking for COMM... " >&6; }
6057          if test ! -x "$tool_specified"; then
6058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6059$as_echo "not found" >&6; }
6060            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6061          fi
6062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6063$as_echo "$tool_specified" >&6; }
6064        fi
6065      fi
6066    fi
6067
6068  fi
6069
6070
6071
6072  if test "x$COMM" = x; then
6073    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6074  fi
6075
6076
6077
6078
6079
6080  # Publish this variable in the help.
6081
6082
6083  if [ -z "${CP+x}" ]; then
6084    # The variable is not set by user, try to locate tool using the code snippet
6085    for ac_prog in cp
6086do
6087  # Extract the first word of "$ac_prog", so it can be a program name with args.
6088set dummy $ac_prog; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_path_CP+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  case $CP in
6095  [\\/]* | ?:[\\/]*)
6096  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6097  ;;
6098  *)
6099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102  IFS=$as_save_IFS
6103  test -z "$as_dir" && as_dir=.
6104    for ac_exec_ext in '' $ac_executable_extensions; do
6105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108    break 2
6109  fi
6110done
6111  done
6112IFS=$as_save_IFS
6113
6114  ;;
6115esac
6116fi
6117CP=$ac_cv_path_CP
6118if test -n "$CP"; then
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6120$as_echo "$CP" >&6; }
6121else
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127  test -n "$CP" && break
6128done
6129
6130  else
6131    # The variable is set, but is it from the command line or the environment?
6132
6133    # Try to remove the string !CP! from our list.
6134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6136      # If it failed, the variable was not from the command line. Ignore it,
6137      # but warn the user (except for BASH, which is always set by the calling BASH).
6138      if test "xCP" != xBASH; then
6139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6140$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6141      fi
6142      # Try to locate tool using the code snippet
6143      for ac_prog in cp
6144do
6145  # Extract the first word of "$ac_prog", so it can be a program name with args.
6146set dummy $ac_prog; ac_word=$2
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if ${ac_cv_path_CP+:} false; then :
6150  $as_echo_n "(cached) " >&6
6151else
6152  case $CP in
6153  [\\/]* | ?:[\\/]*)
6154  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6155  ;;
6156  *)
6157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6158for as_dir in $PATH
6159do
6160  IFS=$as_save_IFS
6161  test -z "$as_dir" && as_dir=.
6162    for ac_exec_ext in '' $ac_executable_extensions; do
6163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6164    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6166    break 2
6167  fi
6168done
6169  done
6170IFS=$as_save_IFS
6171
6172  ;;
6173esac
6174fi
6175CP=$ac_cv_path_CP
6176if test -n "$CP"; then
6177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6178$as_echo "$CP" >&6; }
6179else
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
6182fi
6183
6184
6185  test -n "$CP" && break
6186done
6187
6188    else
6189      # If it succeeded, then it was overridden by the user. We will use it
6190      # for the tool.
6191
6192      # First remove it from the list of overridden variables, so we can test
6193      # for unknown variables in the end.
6194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6195
6196      # Check if we try to supply an empty value
6197      if test "x$CP" = x; then
6198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6199$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6201$as_echo_n "checking for CP... " >&6; }
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6203$as_echo "disabled" >&6; }
6204      else
6205        # Check if the provided tool contains a complete path.
6206        tool_specified="$CP"
6207        tool_basename="${tool_specified##*/}"
6208        if test "x$tool_basename" = "x$tool_specified"; then
6209          # A command without a complete path is provided, search $PATH.
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6211$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6212          # Extract the first word of "$tool_basename", so it can be a program name with args.
6213set dummy $tool_basename; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_path_CP+:} false; then :
6217  $as_echo_n "(cached) " >&6
6218else
6219  case $CP in
6220  [\\/]* | ?:[\\/]*)
6221  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6222  ;;
6223  *)
6224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227  IFS=$as_save_IFS
6228  test -z "$as_dir" && as_dir=.
6229    for ac_exec_ext in '' $ac_executable_extensions; do
6230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6231    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233    break 2
6234  fi
6235done
6236  done
6237IFS=$as_save_IFS
6238
6239  ;;
6240esac
6241fi
6242CP=$ac_cv_path_CP
6243if test -n "$CP"; then
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6245$as_echo "$CP" >&6; }
6246else
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6248$as_echo "no" >&6; }
6249fi
6250
6251
6252          if test "x$CP" = x; then
6253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6254          fi
6255        else
6256          # Otherwise we believe it is a complete path. Use it as it is.
6257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6258$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6260$as_echo_n "checking for CP... " >&6; }
6261          if test ! -x "$tool_specified"; then
6262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6263$as_echo "not found" >&6; }
6264            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6265          fi
6266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6267$as_echo "$tool_specified" >&6; }
6268        fi
6269      fi
6270    fi
6271
6272  fi
6273
6274
6275
6276  if test "x$CP" = x; then
6277    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6278  fi
6279
6280
6281
6282
6283
6284  # Publish this variable in the help.
6285
6286
6287  if [ -z "${CUT+x}" ]; then
6288    # The variable is not set by user, try to locate tool using the code snippet
6289    for ac_prog in cut
6290do
6291  # Extract the first word of "$ac_prog", so it can be a program name with args.
6292set dummy $ac_prog; ac_word=$2
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6294$as_echo_n "checking for $ac_word... " >&6; }
6295if ${ac_cv_path_CUT+:} false; then :
6296  $as_echo_n "(cached) " >&6
6297else
6298  case $CUT in
6299  [\\/]* | ?:[\\/]*)
6300  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6301  ;;
6302  *)
6303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH
6305do
6306  IFS=$as_save_IFS
6307  test -z "$as_dir" && as_dir=.
6308    for ac_exec_ext in '' $ac_executable_extensions; do
6309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6310    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6312    break 2
6313  fi
6314done
6315  done
6316IFS=$as_save_IFS
6317
6318  ;;
6319esac
6320fi
6321CUT=$ac_cv_path_CUT
6322if test -n "$CUT"; then
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6324$as_echo "$CUT" >&6; }
6325else
6326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }
6328fi
6329
6330
6331  test -n "$CUT" && break
6332done
6333
6334  else
6335    # The variable is set, but is it from the command line or the environment?
6336
6337    # Try to remove the string !CUT! from our list.
6338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6340      # If it failed, the variable was not from the command line. Ignore it,
6341      # but warn the user (except for BASH, which is always set by the calling BASH).
6342      if test "xCUT" != xBASH; then
6343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6344$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6345      fi
6346      # Try to locate tool using the code snippet
6347      for ac_prog in cut
6348do
6349  # Extract the first word of "$ac_prog", so it can be a program name with args.
6350set dummy $ac_prog; ac_word=$2
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6352$as_echo_n "checking for $ac_word... " >&6; }
6353if ${ac_cv_path_CUT+:} false; then :
6354  $as_echo_n "(cached) " >&6
6355else
6356  case $CUT in
6357  [\\/]* | ?:[\\/]*)
6358  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6359  ;;
6360  *)
6361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6362for as_dir in $PATH
6363do
6364  IFS=$as_save_IFS
6365  test -z "$as_dir" && as_dir=.
6366    for ac_exec_ext in '' $ac_executable_extensions; do
6367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6368    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6370    break 2
6371  fi
6372done
6373  done
6374IFS=$as_save_IFS
6375
6376  ;;
6377esac
6378fi
6379CUT=$ac_cv_path_CUT
6380if test -n "$CUT"; then
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6382$as_echo "$CUT" >&6; }
6383else
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
6388
6389  test -n "$CUT" && break
6390done
6391
6392    else
6393      # If it succeeded, then it was overridden by the user. We will use it
6394      # for the tool.
6395
6396      # First remove it from the list of overridden variables, so we can test
6397      # for unknown variables in the end.
6398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6399
6400      # Check if we try to supply an empty value
6401      if test "x$CUT" = x; then
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6403$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6405$as_echo_n "checking for CUT... " >&6; }
6406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6407$as_echo "disabled" >&6; }
6408      else
6409        # Check if the provided tool contains a complete path.
6410        tool_specified="$CUT"
6411        tool_basename="${tool_specified##*/}"
6412        if test "x$tool_basename" = "x$tool_specified"; then
6413          # A command without a complete path is provided, search $PATH.
6414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6415$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6416          # Extract the first word of "$tool_basename", so it can be a program name with args.
6417set dummy $tool_basename; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_CUT+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $CUT in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446CUT=$ac_cv_path_CUT
6447if test -n "$CUT"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6449$as_echo "$CUT" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456          if test "x$CUT" = x; then
6457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6458          fi
6459        else
6460          # Otherwise we believe it is a complete path. Use it as it is.
6461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6462$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6464$as_echo_n "checking for CUT... " >&6; }
6465          if test ! -x "$tool_specified"; then
6466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6467$as_echo "not found" >&6; }
6468            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6469          fi
6470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6471$as_echo "$tool_specified" >&6; }
6472        fi
6473      fi
6474    fi
6475
6476  fi
6477
6478
6479
6480  if test "x$CUT" = x; then
6481    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6482  fi
6483
6484
6485
6486
6487
6488  # Publish this variable in the help.
6489
6490
6491  if [ -z "${DATE+x}" ]; then
6492    # The variable is not set by user, try to locate tool using the code snippet
6493    for ac_prog in date
6494do
6495  # Extract the first word of "$ac_prog", so it can be a program name with args.
6496set dummy $ac_prog; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DATE+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DATE in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DATE=$ac_cv_path_DATE
6526if test -n "$DATE"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6528$as_echo "$DATE" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535  test -n "$DATE" && break
6536done
6537
6538  else
6539    # The variable is set, but is it from the command line or the environment?
6540
6541    # Try to remove the string !DATE! from our list.
6542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6544      # If it failed, the variable was not from the command line. Ignore it,
6545      # but warn the user (except for BASH, which is always set by the calling BASH).
6546      if test "xDATE" != xBASH; then
6547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6548$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6549      fi
6550      # Try to locate tool using the code snippet
6551      for ac_prog in date
6552do
6553  # Extract the first word of "$ac_prog", so it can be a program name with args.
6554set dummy $ac_prog; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_DATE+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $DATE in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583DATE=$ac_cv_path_DATE
6584if test -n "$DATE"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6586$as_echo "$DATE" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593  test -n "$DATE" && break
6594done
6595
6596    else
6597      # If it succeeded, then it was overridden by the user. We will use it
6598      # for the tool.
6599
6600      # First remove it from the list of overridden variables, so we can test
6601      # for unknown variables in the end.
6602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6603
6604      # Check if we try to supply an empty value
6605      if test "x$DATE" = x; then
6606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6607$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6609$as_echo_n "checking for DATE... " >&6; }
6610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6611$as_echo "disabled" >&6; }
6612      else
6613        # Check if the provided tool contains a complete path.
6614        tool_specified="$DATE"
6615        tool_basename="${tool_specified##*/}"
6616        if test "x$tool_basename" = "x$tool_specified"; then
6617          # A command without a complete path is provided, search $PATH.
6618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6619$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6620          # Extract the first word of "$tool_basename", so it can be a program name with args.
6621set dummy $tool_basename; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_DATE+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $DATE in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650DATE=$ac_cv_path_DATE
6651if test -n "$DATE"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6653$as_echo "$DATE" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660          if test "x$DATE" = x; then
6661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6662          fi
6663        else
6664          # Otherwise we believe it is a complete path. Use it as it is.
6665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6666$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6668$as_echo_n "checking for DATE... " >&6; }
6669          if test ! -x "$tool_specified"; then
6670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6671$as_echo "not found" >&6; }
6672            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6673          fi
6674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6675$as_echo "$tool_specified" >&6; }
6676        fi
6677      fi
6678    fi
6679
6680  fi
6681
6682
6683
6684  if test "x$DATE" = x; then
6685    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6686  fi
6687
6688
6689
6690
6691
6692  # Publish this variable in the help.
6693
6694
6695  if [ -z "${DIFF+x}" ]; then
6696    # The variable is not set by user, try to locate tool using the code snippet
6697    for ac_prog in gdiff diff
6698do
6699  # Extract the first word of "$ac_prog", so it can be a program name with args.
6700set dummy $ac_prog; ac_word=$2
6701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702$as_echo_n "checking for $ac_word... " >&6; }
6703if ${ac_cv_path_DIFF+:} false; then :
6704  $as_echo_n "(cached) " >&6
6705else
6706  case $DIFF in
6707  [\\/]* | ?:[\\/]*)
6708  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6709  ;;
6710  *)
6711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6712for as_dir in $PATH
6713do
6714  IFS=$as_save_IFS
6715  test -z "$as_dir" && as_dir=.
6716    for ac_exec_ext in '' $ac_executable_extensions; do
6717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6718    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6720    break 2
6721  fi
6722done
6723  done
6724IFS=$as_save_IFS
6725
6726  ;;
6727esac
6728fi
6729DIFF=$ac_cv_path_DIFF
6730if test -n "$DIFF"; then
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6732$as_echo "$DIFF" >&6; }
6733else
6734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6735$as_echo "no" >&6; }
6736fi
6737
6738
6739  test -n "$DIFF" && break
6740done
6741
6742  else
6743    # The variable is set, but is it from the command line or the environment?
6744
6745    # Try to remove the string !DIFF! from our list.
6746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6748      # If it failed, the variable was not from the command line. Ignore it,
6749      # but warn the user (except for BASH, which is always set by the calling BASH).
6750      if test "xDIFF" != xBASH; then
6751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6752$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6753      fi
6754      # Try to locate tool using the code snippet
6755      for ac_prog in gdiff diff
6756do
6757  # Extract the first word of "$ac_prog", so it can be a program name with args.
6758set dummy $ac_prog; ac_word=$2
6759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6760$as_echo_n "checking for $ac_word... " >&6; }
6761if ${ac_cv_path_DIFF+:} false; then :
6762  $as_echo_n "(cached) " >&6
6763else
6764  case $DIFF in
6765  [\\/]* | ?:[\\/]*)
6766  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6767  ;;
6768  *)
6769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6770for as_dir in $PATH
6771do
6772  IFS=$as_save_IFS
6773  test -z "$as_dir" && as_dir=.
6774    for ac_exec_ext in '' $ac_executable_extensions; do
6775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6776    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6778    break 2
6779  fi
6780done
6781  done
6782IFS=$as_save_IFS
6783
6784  ;;
6785esac
6786fi
6787DIFF=$ac_cv_path_DIFF
6788if test -n "$DIFF"; then
6789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6790$as_echo "$DIFF" >&6; }
6791else
6792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6793$as_echo "no" >&6; }
6794fi
6795
6796
6797  test -n "$DIFF" && break
6798done
6799
6800    else
6801      # If it succeeded, then it was overridden by the user. We will use it
6802      # for the tool.
6803
6804      # First remove it from the list of overridden variables, so we can test
6805      # for unknown variables in the end.
6806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6807
6808      # Check if we try to supply an empty value
6809      if test "x$DIFF" = x; then
6810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6811$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6813$as_echo_n "checking for DIFF... " >&6; }
6814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6815$as_echo "disabled" >&6; }
6816      else
6817        # Check if the provided tool contains a complete path.
6818        tool_specified="$DIFF"
6819        tool_basename="${tool_specified##*/}"
6820        if test "x$tool_basename" = "x$tool_specified"; then
6821          # A command without a complete path is provided, search $PATH.
6822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6823$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6824          # Extract the first word of "$tool_basename", so it can be a program name with args.
6825set dummy $tool_basename; ac_word=$2
6826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6827$as_echo_n "checking for $ac_word... " >&6; }
6828if ${ac_cv_path_DIFF+:} false; then :
6829  $as_echo_n "(cached) " >&6
6830else
6831  case $DIFF in
6832  [\\/]* | ?:[\\/]*)
6833  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6834  ;;
6835  *)
6836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6837for as_dir in $PATH
6838do
6839  IFS=$as_save_IFS
6840  test -z "$as_dir" && as_dir=.
6841    for ac_exec_ext in '' $ac_executable_extensions; do
6842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6843    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6845    break 2
6846  fi
6847done
6848  done
6849IFS=$as_save_IFS
6850
6851  ;;
6852esac
6853fi
6854DIFF=$ac_cv_path_DIFF
6855if test -n "$DIFF"; then
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6857$as_echo "$DIFF" >&6; }
6858else
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6860$as_echo "no" >&6; }
6861fi
6862
6863
6864          if test "x$DIFF" = x; then
6865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6866          fi
6867        else
6868          # Otherwise we believe it is a complete path. Use it as it is.
6869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6870$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6872$as_echo_n "checking for DIFF... " >&6; }
6873          if test ! -x "$tool_specified"; then
6874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6875$as_echo "not found" >&6; }
6876            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6877          fi
6878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6879$as_echo "$tool_specified" >&6; }
6880        fi
6881      fi
6882    fi
6883
6884  fi
6885
6886
6887
6888  if test "x$DIFF" = x; then
6889    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6890  fi
6891
6892
6893
6894
6895
6896  # Publish this variable in the help.
6897
6898
6899  if [ -z "${DIRNAME+x}" ]; then
6900    # The variable is not set by user, try to locate tool using the code snippet
6901    for ac_prog in dirname
6902do
6903  # Extract the first word of "$ac_prog", so it can be a program name with args.
6904set dummy $ac_prog; ac_word=$2
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6906$as_echo_n "checking for $ac_word... " >&6; }
6907if ${ac_cv_path_DIRNAME+:} false; then :
6908  $as_echo_n "(cached) " >&6
6909else
6910  case $DIRNAME in
6911  [\\/]* | ?:[\\/]*)
6912  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6913  ;;
6914  *)
6915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916for as_dir in $PATH
6917do
6918  IFS=$as_save_IFS
6919  test -z "$as_dir" && as_dir=.
6920    for ac_exec_ext in '' $ac_executable_extensions; do
6921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6922    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924    break 2
6925  fi
6926done
6927  done
6928IFS=$as_save_IFS
6929
6930  ;;
6931esac
6932fi
6933DIRNAME=$ac_cv_path_DIRNAME
6934if test -n "$DIRNAME"; then
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6936$as_echo "$DIRNAME" >&6; }
6937else
6938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6939$as_echo "no" >&6; }
6940fi
6941
6942
6943  test -n "$DIRNAME" && break
6944done
6945
6946  else
6947    # The variable is set, but is it from the command line or the environment?
6948
6949    # Try to remove the string !DIRNAME! from our list.
6950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6952      # If it failed, the variable was not from the command line. Ignore it,
6953      # but warn the user (except for BASH, which is always set by the calling BASH).
6954      if test "xDIRNAME" != xBASH; then
6955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6956$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6957      fi
6958      # Try to locate tool using the code snippet
6959      for ac_prog in dirname
6960do
6961  # Extract the first word of "$ac_prog", so it can be a program name with args.
6962set dummy $ac_prog; ac_word=$2
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6964$as_echo_n "checking for $ac_word... " >&6; }
6965if ${ac_cv_path_DIRNAME+:} false; then :
6966  $as_echo_n "(cached) " >&6
6967else
6968  case $DIRNAME in
6969  [\\/]* | ?:[\\/]*)
6970  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6971  ;;
6972  *)
6973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6974for as_dir in $PATH
6975do
6976  IFS=$as_save_IFS
6977  test -z "$as_dir" && as_dir=.
6978    for ac_exec_ext in '' $ac_executable_extensions; do
6979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6980    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6982    break 2
6983  fi
6984done
6985  done
6986IFS=$as_save_IFS
6987
6988  ;;
6989esac
6990fi
6991DIRNAME=$ac_cv_path_DIRNAME
6992if test -n "$DIRNAME"; then
6993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6994$as_echo "$DIRNAME" >&6; }
6995else
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997$as_echo "no" >&6; }
6998fi
6999
7000
7001  test -n "$DIRNAME" && break
7002done
7003
7004    else
7005      # If it succeeded, then it was overridden by the user. We will use it
7006      # for the tool.
7007
7008      # First remove it from the list of overridden variables, so we can test
7009      # for unknown variables in the end.
7010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7011
7012      # Check if we try to supply an empty value
7013      if test "x$DIRNAME" = x; then
7014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7015$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7017$as_echo_n "checking for DIRNAME... " >&6; }
7018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7019$as_echo "disabled" >&6; }
7020      else
7021        # Check if the provided tool contains a complete path.
7022        tool_specified="$DIRNAME"
7023        tool_basename="${tool_specified##*/}"
7024        if test "x$tool_basename" = "x$tool_specified"; then
7025          # A command without a complete path is provided, search $PATH.
7026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7027$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7028          # Extract the first word of "$tool_basename", so it can be a program name with args.
7029set dummy $tool_basename; ac_word=$2
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7031$as_echo_n "checking for $ac_word... " >&6; }
7032if ${ac_cv_path_DIRNAME+:} false; then :
7033  $as_echo_n "(cached) " >&6
7034else
7035  case $DIRNAME in
7036  [\\/]* | ?:[\\/]*)
7037  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7038  ;;
7039  *)
7040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7041for as_dir in $PATH
7042do
7043  IFS=$as_save_IFS
7044  test -z "$as_dir" && as_dir=.
7045    for ac_exec_ext in '' $ac_executable_extensions; do
7046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7047    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7049    break 2
7050  fi
7051done
7052  done
7053IFS=$as_save_IFS
7054
7055  ;;
7056esac
7057fi
7058DIRNAME=$ac_cv_path_DIRNAME
7059if test -n "$DIRNAME"; then
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7061$as_echo "$DIRNAME" >&6; }
7062else
7063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
7065fi
7066
7067
7068          if test "x$DIRNAME" = x; then
7069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7070          fi
7071        else
7072          # Otherwise we believe it is a complete path. Use it as it is.
7073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7074$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7076$as_echo_n "checking for DIRNAME... " >&6; }
7077          if test ! -x "$tool_specified"; then
7078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7079$as_echo "not found" >&6; }
7080            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7081          fi
7082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7083$as_echo "$tool_specified" >&6; }
7084        fi
7085      fi
7086    fi
7087
7088  fi
7089
7090
7091
7092  if test "x$DIRNAME" = x; then
7093    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7094  fi
7095
7096
7097
7098
7099
7100  # Publish this variable in the help.
7101
7102
7103  if [ -z "${ECHO+x}" ]; then
7104    # The variable is not set by user, try to locate tool using the code snippet
7105    for ac_prog in echo
7106do
7107  # Extract the first word of "$ac_prog", so it can be a program name with args.
7108set dummy $ac_prog; ac_word=$2
7109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7110$as_echo_n "checking for $ac_word... " >&6; }
7111if ${ac_cv_path_ECHO+:} false; then :
7112  $as_echo_n "(cached) " >&6
7113else
7114  case $ECHO in
7115  [\\/]* | ?:[\\/]*)
7116  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7117  ;;
7118  *)
7119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120for as_dir in $PATH
7121do
7122  IFS=$as_save_IFS
7123  test -z "$as_dir" && as_dir=.
7124    for ac_exec_ext in '' $ac_executable_extensions; do
7125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7126    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7128    break 2
7129  fi
7130done
7131  done
7132IFS=$as_save_IFS
7133
7134  ;;
7135esac
7136fi
7137ECHO=$ac_cv_path_ECHO
7138if test -n "$ECHO"; then
7139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7140$as_echo "$ECHO" >&6; }
7141else
7142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7143$as_echo "no" >&6; }
7144fi
7145
7146
7147  test -n "$ECHO" && break
7148done
7149
7150  else
7151    # The variable is set, but is it from the command line or the environment?
7152
7153    # Try to remove the string !ECHO! from our list.
7154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7156      # If it failed, the variable was not from the command line. Ignore it,
7157      # but warn the user (except for BASH, which is always set by the calling BASH).
7158      if test "xECHO" != xBASH; then
7159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7160$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7161      fi
7162      # Try to locate tool using the code snippet
7163      for ac_prog in echo
7164do
7165  # Extract the first word of "$ac_prog", so it can be a program name with args.
7166set dummy $ac_prog; ac_word=$2
7167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7168$as_echo_n "checking for $ac_word... " >&6; }
7169if ${ac_cv_path_ECHO+:} false; then :
7170  $as_echo_n "(cached) " >&6
7171else
7172  case $ECHO in
7173  [\\/]* | ?:[\\/]*)
7174  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7175  ;;
7176  *)
7177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178for as_dir in $PATH
7179do
7180  IFS=$as_save_IFS
7181  test -z "$as_dir" && as_dir=.
7182    for ac_exec_ext in '' $ac_executable_extensions; do
7183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186    break 2
7187  fi
7188done
7189  done
7190IFS=$as_save_IFS
7191
7192  ;;
7193esac
7194fi
7195ECHO=$ac_cv_path_ECHO
7196if test -n "$ECHO"; then
7197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7198$as_echo "$ECHO" >&6; }
7199else
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201$as_echo "no" >&6; }
7202fi
7203
7204
7205  test -n "$ECHO" && break
7206done
7207
7208    else
7209      # If it succeeded, then it was overridden by the user. We will use it
7210      # for the tool.
7211
7212      # First remove it from the list of overridden variables, so we can test
7213      # for unknown variables in the end.
7214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7215
7216      # Check if we try to supply an empty value
7217      if test "x$ECHO" = x; then
7218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7219$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7221$as_echo_n "checking for ECHO... " >&6; }
7222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7223$as_echo "disabled" >&6; }
7224      else
7225        # Check if the provided tool contains a complete path.
7226        tool_specified="$ECHO"
7227        tool_basename="${tool_specified##*/}"
7228        if test "x$tool_basename" = "x$tool_specified"; then
7229          # A command without a complete path is provided, search $PATH.
7230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7231$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7232          # Extract the first word of "$tool_basename", so it can be a program name with args.
7233set dummy $tool_basename; ac_word=$2
7234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7235$as_echo_n "checking for $ac_word... " >&6; }
7236if ${ac_cv_path_ECHO+:} false; then :
7237  $as_echo_n "(cached) " >&6
7238else
7239  case $ECHO in
7240  [\\/]* | ?:[\\/]*)
7241  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7242  ;;
7243  *)
7244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7245for as_dir in $PATH
7246do
7247  IFS=$as_save_IFS
7248  test -z "$as_dir" && as_dir=.
7249    for ac_exec_ext in '' $ac_executable_extensions; do
7250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7251    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7253    break 2
7254  fi
7255done
7256  done
7257IFS=$as_save_IFS
7258
7259  ;;
7260esac
7261fi
7262ECHO=$ac_cv_path_ECHO
7263if test -n "$ECHO"; then
7264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7265$as_echo "$ECHO" >&6; }
7266else
7267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7268$as_echo "no" >&6; }
7269fi
7270
7271
7272          if test "x$ECHO" = x; then
7273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7274          fi
7275        else
7276          # Otherwise we believe it is a complete path. Use it as it is.
7277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7278$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7280$as_echo_n "checking for ECHO... " >&6; }
7281          if test ! -x "$tool_specified"; then
7282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7283$as_echo "not found" >&6; }
7284            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7285          fi
7286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7287$as_echo "$tool_specified" >&6; }
7288        fi
7289      fi
7290    fi
7291
7292  fi
7293
7294
7295
7296  if test "x$ECHO" = x; then
7297    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7298  fi
7299
7300
7301
7302
7303
7304  # Publish this variable in the help.
7305
7306
7307  if [ -z "${EXPR+x}" ]; then
7308    # The variable is not set by user, try to locate tool using the code snippet
7309    for ac_prog in expr
7310do
7311  # Extract the first word of "$ac_prog", so it can be a program name with args.
7312set dummy $ac_prog; ac_word=$2
7313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7314$as_echo_n "checking for $ac_word... " >&6; }
7315if ${ac_cv_path_EXPR+:} false; then :
7316  $as_echo_n "(cached) " >&6
7317else
7318  case $EXPR in
7319  [\\/]* | ?:[\\/]*)
7320  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7321  ;;
7322  *)
7323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7324for as_dir in $PATH
7325do
7326  IFS=$as_save_IFS
7327  test -z "$as_dir" && as_dir=.
7328    for ac_exec_ext in '' $ac_executable_extensions; do
7329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7330    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7332    break 2
7333  fi
7334done
7335  done
7336IFS=$as_save_IFS
7337
7338  ;;
7339esac
7340fi
7341EXPR=$ac_cv_path_EXPR
7342if test -n "$EXPR"; then
7343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7344$as_echo "$EXPR" >&6; }
7345else
7346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7347$as_echo "no" >&6; }
7348fi
7349
7350
7351  test -n "$EXPR" && break
7352done
7353
7354  else
7355    # The variable is set, but is it from the command line or the environment?
7356
7357    # Try to remove the string !EXPR! from our list.
7358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7360      # If it failed, the variable was not from the command line. Ignore it,
7361      # but warn the user (except for BASH, which is always set by the calling BASH).
7362      if test "xEXPR" != xBASH; then
7363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7364$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7365      fi
7366      # Try to locate tool using the code snippet
7367      for ac_prog in expr
7368do
7369  # Extract the first word of "$ac_prog", so it can be a program name with args.
7370set dummy $ac_prog; ac_word=$2
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372$as_echo_n "checking for $ac_word... " >&6; }
7373if ${ac_cv_path_EXPR+:} false; then :
7374  $as_echo_n "(cached) " >&6
7375else
7376  case $EXPR in
7377  [\\/]* | ?:[\\/]*)
7378  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7379  ;;
7380  *)
7381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382for as_dir in $PATH
7383do
7384  IFS=$as_save_IFS
7385  test -z "$as_dir" && as_dir=.
7386    for ac_exec_ext in '' $ac_executable_extensions; do
7387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390    break 2
7391  fi
7392done
7393  done
7394IFS=$as_save_IFS
7395
7396  ;;
7397esac
7398fi
7399EXPR=$ac_cv_path_EXPR
7400if test -n "$EXPR"; then
7401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7402$as_echo "$EXPR" >&6; }
7403else
7404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405$as_echo "no" >&6; }
7406fi
7407
7408
7409  test -n "$EXPR" && break
7410done
7411
7412    else
7413      # If it succeeded, then it was overridden by the user. We will use it
7414      # for the tool.
7415
7416      # First remove it from the list of overridden variables, so we can test
7417      # for unknown variables in the end.
7418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7419
7420      # Check if we try to supply an empty value
7421      if test "x$EXPR" = x; then
7422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7423$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7425$as_echo_n "checking for EXPR... " >&6; }
7426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7427$as_echo "disabled" >&6; }
7428      else
7429        # Check if the provided tool contains a complete path.
7430        tool_specified="$EXPR"
7431        tool_basename="${tool_specified##*/}"
7432        if test "x$tool_basename" = "x$tool_specified"; then
7433          # A command without a complete path is provided, search $PATH.
7434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7435$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7436          # Extract the first word of "$tool_basename", so it can be a program name with args.
7437set dummy $tool_basename; ac_word=$2
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439$as_echo_n "checking for $ac_word... " >&6; }
7440if ${ac_cv_path_EXPR+:} false; then :
7441  $as_echo_n "(cached) " >&6
7442else
7443  case $EXPR in
7444  [\\/]* | ?:[\\/]*)
7445  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7446  ;;
7447  *)
7448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449for as_dir in $PATH
7450do
7451  IFS=$as_save_IFS
7452  test -z "$as_dir" && as_dir=.
7453    for ac_exec_ext in '' $ac_executable_extensions; do
7454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7455    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7457    break 2
7458  fi
7459done
7460  done
7461IFS=$as_save_IFS
7462
7463  ;;
7464esac
7465fi
7466EXPR=$ac_cv_path_EXPR
7467if test -n "$EXPR"; then
7468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7469$as_echo "$EXPR" >&6; }
7470else
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472$as_echo "no" >&6; }
7473fi
7474
7475
7476          if test "x$EXPR" = x; then
7477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7478          fi
7479        else
7480          # Otherwise we believe it is a complete path. Use it as it is.
7481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7482$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7484$as_echo_n "checking for EXPR... " >&6; }
7485          if test ! -x "$tool_specified"; then
7486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7487$as_echo "not found" >&6; }
7488            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7489          fi
7490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7491$as_echo "$tool_specified" >&6; }
7492        fi
7493      fi
7494    fi
7495
7496  fi
7497
7498
7499
7500  if test "x$EXPR" = x; then
7501    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7502  fi
7503
7504
7505
7506
7507
7508  # Publish this variable in the help.
7509
7510
7511  if [ -z "${FILE+x}" ]; then
7512    # The variable is not set by user, try to locate tool using the code snippet
7513    for ac_prog in file
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_FILE+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $FILE in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545FILE=$ac_cv_path_FILE
7546if test -n "$FILE"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7548$as_echo "$FILE" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$FILE" && break
7556done
7557
7558  else
7559    # The variable is set, but is it from the command line or the environment?
7560
7561    # Try to remove the string !FILE! from our list.
7562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7564      # If it failed, the variable was not from the command line. Ignore it,
7565      # but warn the user (except for BASH, which is always set by the calling BASH).
7566      if test "xFILE" != xBASH; then
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7568$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7569      fi
7570      # Try to locate tool using the code snippet
7571      for ac_prog in file
7572do
7573  # Extract the first word of "$ac_prog", so it can be a program name with args.
7574set dummy $ac_prog; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_FILE+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $FILE in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603FILE=$ac_cv_path_FILE
7604if test -n "$FILE"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7606$as_echo "$FILE" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613  test -n "$FILE" && break
7614done
7615
7616    else
7617      # If it succeeded, then it was overridden by the user. We will use it
7618      # for the tool.
7619
7620      # First remove it from the list of overridden variables, so we can test
7621      # for unknown variables in the end.
7622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7623
7624      # Check if we try to supply an empty value
7625      if test "x$FILE" = x; then
7626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7627$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7629$as_echo_n "checking for FILE... " >&6; }
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7631$as_echo "disabled" >&6; }
7632      else
7633        # Check if the provided tool contains a complete path.
7634        tool_specified="$FILE"
7635        tool_basename="${tool_specified##*/}"
7636        if test "x$tool_basename" = "x$tool_specified"; then
7637          # A command without a complete path is provided, search $PATH.
7638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7639$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7640          # Extract the first word of "$tool_basename", so it can be a program name with args.
7641set dummy $tool_basename; ac_word=$2
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7643$as_echo_n "checking for $ac_word... " >&6; }
7644if ${ac_cv_path_FILE+:} false; then :
7645  $as_echo_n "(cached) " >&6
7646else
7647  case $FILE in
7648  [\\/]* | ?:[\\/]*)
7649  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7650  ;;
7651  *)
7652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653for as_dir in $PATH
7654do
7655  IFS=$as_save_IFS
7656  test -z "$as_dir" && as_dir=.
7657    for ac_exec_ext in '' $ac_executable_extensions; do
7658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7659    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7661    break 2
7662  fi
7663done
7664  done
7665IFS=$as_save_IFS
7666
7667  ;;
7668esac
7669fi
7670FILE=$ac_cv_path_FILE
7671if test -n "$FILE"; then
7672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7673$as_echo "$FILE" >&6; }
7674else
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676$as_echo "no" >&6; }
7677fi
7678
7679
7680          if test "x$FILE" = x; then
7681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7682          fi
7683        else
7684          # Otherwise we believe it is a complete path. Use it as it is.
7685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7686$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7688$as_echo_n "checking for FILE... " >&6; }
7689          if test ! -x "$tool_specified"; then
7690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7691$as_echo "not found" >&6; }
7692            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7693          fi
7694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7695$as_echo "$tool_specified" >&6; }
7696        fi
7697      fi
7698    fi
7699
7700  fi
7701
7702
7703
7704  if test "x$FILE" = x; then
7705    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7706  fi
7707
7708
7709
7710
7711
7712  # Publish this variable in the help.
7713
7714
7715  if [ -z "${FIND+x}" ]; then
7716    # The variable is not set by user, try to locate tool using the code snippet
7717    for ac_prog in find
7718do
7719  # Extract the first word of "$ac_prog", so it can be a program name with args.
7720set dummy $ac_prog; ac_word=$2
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722$as_echo_n "checking for $ac_word... " >&6; }
7723if ${ac_cv_path_FIND+:} false; then :
7724  $as_echo_n "(cached) " >&6
7725else
7726  case $FIND in
7727  [\\/]* | ?:[\\/]*)
7728  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7729  ;;
7730  *)
7731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732for as_dir in $PATH
7733do
7734  IFS=$as_save_IFS
7735  test -z "$as_dir" && as_dir=.
7736    for ac_exec_ext in '' $ac_executable_extensions; do
7737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7738    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7740    break 2
7741  fi
7742done
7743  done
7744IFS=$as_save_IFS
7745
7746  ;;
7747esac
7748fi
7749FIND=$ac_cv_path_FIND
7750if test -n "$FIND"; then
7751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7752$as_echo "$FIND" >&6; }
7753else
7754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7755$as_echo "no" >&6; }
7756fi
7757
7758
7759  test -n "$FIND" && break
7760done
7761
7762  else
7763    # The variable is set, but is it from the command line or the environment?
7764
7765    # Try to remove the string !FIND! from our list.
7766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7768      # If it failed, the variable was not from the command line. Ignore it,
7769      # but warn the user (except for BASH, which is always set by the calling BASH).
7770      if test "xFIND" != xBASH; then
7771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7772$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7773      fi
7774      # Try to locate tool using the code snippet
7775      for ac_prog in find
7776do
7777  # Extract the first word of "$ac_prog", so it can be a program name with args.
7778set dummy $ac_prog; ac_word=$2
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7780$as_echo_n "checking for $ac_word... " >&6; }
7781if ${ac_cv_path_FIND+:} false; then :
7782  $as_echo_n "(cached) " >&6
7783else
7784  case $FIND in
7785  [\\/]* | ?:[\\/]*)
7786  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7787  ;;
7788  *)
7789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7790for as_dir in $PATH
7791do
7792  IFS=$as_save_IFS
7793  test -z "$as_dir" && as_dir=.
7794    for ac_exec_ext in '' $ac_executable_extensions; do
7795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7796    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7798    break 2
7799  fi
7800done
7801  done
7802IFS=$as_save_IFS
7803
7804  ;;
7805esac
7806fi
7807FIND=$ac_cv_path_FIND
7808if test -n "$FIND"; then
7809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7810$as_echo "$FIND" >&6; }
7811else
7812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7813$as_echo "no" >&6; }
7814fi
7815
7816
7817  test -n "$FIND" && break
7818done
7819
7820    else
7821      # If it succeeded, then it was overridden by the user. We will use it
7822      # for the tool.
7823
7824      # First remove it from the list of overridden variables, so we can test
7825      # for unknown variables in the end.
7826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7827
7828      # Check if we try to supply an empty value
7829      if test "x$FIND" = x; then
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7831$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7833$as_echo_n "checking for FIND... " >&6; }
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7835$as_echo "disabled" >&6; }
7836      else
7837        # Check if the provided tool contains a complete path.
7838        tool_specified="$FIND"
7839        tool_basename="${tool_specified##*/}"
7840        if test "x$tool_basename" = "x$tool_specified"; then
7841          # A command without a complete path is provided, search $PATH.
7842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7843$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7844          # Extract the first word of "$tool_basename", so it can be a program name with args.
7845set dummy $tool_basename; ac_word=$2
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7847$as_echo_n "checking for $ac_word... " >&6; }
7848if ${ac_cv_path_FIND+:} false; then :
7849  $as_echo_n "(cached) " >&6
7850else
7851  case $FIND in
7852  [\\/]* | ?:[\\/]*)
7853  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7854  ;;
7855  *)
7856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7857for as_dir in $PATH
7858do
7859  IFS=$as_save_IFS
7860  test -z "$as_dir" && as_dir=.
7861    for ac_exec_ext in '' $ac_executable_extensions; do
7862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7863    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7865    break 2
7866  fi
7867done
7868  done
7869IFS=$as_save_IFS
7870
7871  ;;
7872esac
7873fi
7874FIND=$ac_cv_path_FIND
7875if test -n "$FIND"; then
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7877$as_echo "$FIND" >&6; }
7878else
7879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7880$as_echo "no" >&6; }
7881fi
7882
7883
7884          if test "x$FIND" = x; then
7885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7886          fi
7887        else
7888          # Otherwise we believe it is a complete path. Use it as it is.
7889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7890$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7892$as_echo_n "checking for FIND... " >&6; }
7893          if test ! -x "$tool_specified"; then
7894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7895$as_echo "not found" >&6; }
7896            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7897          fi
7898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7899$as_echo "$tool_specified" >&6; }
7900        fi
7901      fi
7902    fi
7903
7904  fi
7905
7906
7907
7908  if test "x$FIND" = x; then
7909    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7910  fi
7911
7912
7913
7914
7915
7916  # Publish this variable in the help.
7917
7918
7919  if [ -z "${HEAD+x}" ]; then
7920    # The variable is not set by user, try to locate tool using the code snippet
7921    for ac_prog in head
7922do
7923  # Extract the first word of "$ac_prog", so it can be a program name with args.
7924set dummy $ac_prog; ac_word=$2
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7926$as_echo_n "checking for $ac_word... " >&6; }
7927if ${ac_cv_path_HEAD+:} false; then :
7928  $as_echo_n "(cached) " >&6
7929else
7930  case $HEAD in
7931  [\\/]* | ?:[\\/]*)
7932  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7933  ;;
7934  *)
7935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7936for as_dir in $PATH
7937do
7938  IFS=$as_save_IFS
7939  test -z "$as_dir" && as_dir=.
7940    for ac_exec_ext in '' $ac_executable_extensions; do
7941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7942    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7944    break 2
7945  fi
7946done
7947  done
7948IFS=$as_save_IFS
7949
7950  ;;
7951esac
7952fi
7953HEAD=$ac_cv_path_HEAD
7954if test -n "$HEAD"; then
7955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7956$as_echo "$HEAD" >&6; }
7957else
7958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7959$as_echo "no" >&6; }
7960fi
7961
7962
7963  test -n "$HEAD" && break
7964done
7965
7966  else
7967    # The variable is set, but is it from the command line or the environment?
7968
7969    # Try to remove the string !HEAD! from our list.
7970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7972      # If it failed, the variable was not from the command line. Ignore it,
7973      # but warn the user (except for BASH, which is always set by the calling BASH).
7974      if test "xHEAD" != xBASH; then
7975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7976$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7977      fi
7978      # Try to locate tool using the code snippet
7979      for ac_prog in head
7980do
7981  # Extract the first word of "$ac_prog", so it can be a program name with args.
7982set dummy $ac_prog; ac_word=$2
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7984$as_echo_n "checking for $ac_word... " >&6; }
7985if ${ac_cv_path_HEAD+:} false; then :
7986  $as_echo_n "(cached) " >&6
7987else
7988  case $HEAD in
7989  [\\/]* | ?:[\\/]*)
7990  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7991  ;;
7992  *)
7993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994for as_dir in $PATH
7995do
7996  IFS=$as_save_IFS
7997  test -z "$as_dir" && as_dir=.
7998    for ac_exec_ext in '' $ac_executable_extensions; do
7999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8000    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8002    break 2
8003  fi
8004done
8005  done
8006IFS=$as_save_IFS
8007
8008  ;;
8009esac
8010fi
8011HEAD=$ac_cv_path_HEAD
8012if test -n "$HEAD"; then
8013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8014$as_echo "$HEAD" >&6; }
8015else
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017$as_echo "no" >&6; }
8018fi
8019
8020
8021  test -n "$HEAD" && break
8022done
8023
8024    else
8025      # If it succeeded, then it was overridden by the user. We will use it
8026      # for the tool.
8027
8028      # First remove it from the list of overridden variables, so we can test
8029      # for unknown variables in the end.
8030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8031
8032      # Check if we try to supply an empty value
8033      if test "x$HEAD" = x; then
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8035$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8037$as_echo_n "checking for HEAD... " >&6; }
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8039$as_echo "disabled" >&6; }
8040      else
8041        # Check if the provided tool contains a complete path.
8042        tool_specified="$HEAD"
8043        tool_basename="${tool_specified##*/}"
8044        if test "x$tool_basename" = "x$tool_specified"; then
8045          # A command without a complete path is provided, search $PATH.
8046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8047$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8048          # Extract the first word of "$tool_basename", so it can be a program name with args.
8049set dummy $tool_basename; ac_word=$2
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8051$as_echo_n "checking for $ac_word... " >&6; }
8052if ${ac_cv_path_HEAD+:} false; then :
8053  $as_echo_n "(cached) " >&6
8054else
8055  case $HEAD in
8056  [\\/]* | ?:[\\/]*)
8057  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8058  ;;
8059  *)
8060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8061for as_dir in $PATH
8062do
8063  IFS=$as_save_IFS
8064  test -z "$as_dir" && as_dir=.
8065    for ac_exec_ext in '' $ac_executable_extensions; do
8066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8067    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8069    break 2
8070  fi
8071done
8072  done
8073IFS=$as_save_IFS
8074
8075  ;;
8076esac
8077fi
8078HEAD=$ac_cv_path_HEAD
8079if test -n "$HEAD"; then
8080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8081$as_echo "$HEAD" >&6; }
8082else
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
8085fi
8086
8087
8088          if test "x$HEAD" = x; then
8089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8090          fi
8091        else
8092          # Otherwise we believe it is a complete path. Use it as it is.
8093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8094$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8096$as_echo_n "checking for HEAD... " >&6; }
8097          if test ! -x "$tool_specified"; then
8098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8099$as_echo "not found" >&6; }
8100            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8101          fi
8102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8103$as_echo "$tool_specified" >&6; }
8104        fi
8105      fi
8106    fi
8107
8108  fi
8109
8110
8111
8112  if test "x$HEAD" = x; then
8113    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8114  fi
8115
8116
8117
8118
8119
8120  # Publish this variable in the help.
8121
8122
8123  if [ -z "${LN+x}" ]; then
8124    # The variable is not set by user, try to locate tool using the code snippet
8125    for ac_prog in ln
8126do
8127  # Extract the first word of "$ac_prog", so it can be a program name with args.
8128set dummy $ac_prog; ac_word=$2
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8130$as_echo_n "checking for $ac_word... " >&6; }
8131if ${ac_cv_path_LN+:} false; then :
8132  $as_echo_n "(cached) " >&6
8133else
8134  case $LN in
8135  [\\/]* | ?:[\\/]*)
8136  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8137  ;;
8138  *)
8139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8140for as_dir in $PATH
8141do
8142  IFS=$as_save_IFS
8143  test -z "$as_dir" && as_dir=.
8144    for ac_exec_ext in '' $ac_executable_extensions; do
8145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8146    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8148    break 2
8149  fi
8150done
8151  done
8152IFS=$as_save_IFS
8153
8154  ;;
8155esac
8156fi
8157LN=$ac_cv_path_LN
8158if test -n "$LN"; then
8159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8160$as_echo "$LN" >&6; }
8161else
8162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
8164fi
8165
8166
8167  test -n "$LN" && break
8168done
8169
8170  else
8171    # The variable is set, but is it from the command line or the environment?
8172
8173    # Try to remove the string !LN! from our list.
8174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8176      # If it failed, the variable was not from the command line. Ignore it,
8177      # but warn the user (except for BASH, which is always set by the calling BASH).
8178      if test "xLN" != xBASH; then
8179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8180$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8181      fi
8182      # Try to locate tool using the code snippet
8183      for ac_prog in ln
8184do
8185  # Extract the first word of "$ac_prog", so it can be a program name with args.
8186set dummy $ac_prog; ac_word=$2
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8188$as_echo_n "checking for $ac_word... " >&6; }
8189if ${ac_cv_path_LN+:} false; then :
8190  $as_echo_n "(cached) " >&6
8191else
8192  case $LN in
8193  [\\/]* | ?:[\\/]*)
8194  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8195  ;;
8196  *)
8197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8198for as_dir in $PATH
8199do
8200  IFS=$as_save_IFS
8201  test -z "$as_dir" && as_dir=.
8202    for ac_exec_ext in '' $ac_executable_extensions; do
8203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8204    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8206    break 2
8207  fi
8208done
8209  done
8210IFS=$as_save_IFS
8211
8212  ;;
8213esac
8214fi
8215LN=$ac_cv_path_LN
8216if test -n "$LN"; then
8217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8218$as_echo "$LN" >&6; }
8219else
8220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8221$as_echo "no" >&6; }
8222fi
8223
8224
8225  test -n "$LN" && break
8226done
8227
8228    else
8229      # If it succeeded, then it was overridden by the user. We will use it
8230      # for the tool.
8231
8232      # First remove it from the list of overridden variables, so we can test
8233      # for unknown variables in the end.
8234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8235
8236      # Check if we try to supply an empty value
8237      if test "x$LN" = x; then
8238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8239$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8241$as_echo_n "checking for LN... " >&6; }
8242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8243$as_echo "disabled" >&6; }
8244      else
8245        # Check if the provided tool contains a complete path.
8246        tool_specified="$LN"
8247        tool_basename="${tool_specified##*/}"
8248        if test "x$tool_basename" = "x$tool_specified"; then
8249          # A command without a complete path is provided, search $PATH.
8250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8251$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8252          # Extract the first word of "$tool_basename", so it can be a program name with args.
8253set dummy $tool_basename; ac_word=$2
8254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8255$as_echo_n "checking for $ac_word... " >&6; }
8256if ${ac_cv_path_LN+:} false; then :
8257  $as_echo_n "(cached) " >&6
8258else
8259  case $LN in
8260  [\\/]* | ?:[\\/]*)
8261  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8262  ;;
8263  *)
8264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8265for as_dir in $PATH
8266do
8267  IFS=$as_save_IFS
8268  test -z "$as_dir" && as_dir=.
8269    for ac_exec_ext in '' $ac_executable_extensions; do
8270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8271    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8273    break 2
8274  fi
8275done
8276  done
8277IFS=$as_save_IFS
8278
8279  ;;
8280esac
8281fi
8282LN=$ac_cv_path_LN
8283if test -n "$LN"; then
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8285$as_echo "$LN" >&6; }
8286else
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8288$as_echo "no" >&6; }
8289fi
8290
8291
8292          if test "x$LN" = x; then
8293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8294          fi
8295        else
8296          # Otherwise we believe it is a complete path. Use it as it is.
8297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8298$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8300$as_echo_n "checking for LN... " >&6; }
8301          if test ! -x "$tool_specified"; then
8302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8303$as_echo "not found" >&6; }
8304            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8305          fi
8306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8307$as_echo "$tool_specified" >&6; }
8308        fi
8309      fi
8310    fi
8311
8312  fi
8313
8314
8315
8316  if test "x$LN" = x; then
8317    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8318  fi
8319
8320
8321
8322
8323
8324  # Publish this variable in the help.
8325
8326
8327  if [ -z "${LS+x}" ]; then
8328    # The variable is not set by user, try to locate tool using the code snippet
8329    for ac_prog in ls
8330do
8331  # Extract the first word of "$ac_prog", so it can be a program name with args.
8332set dummy $ac_prog; ac_word=$2
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8334$as_echo_n "checking for $ac_word... " >&6; }
8335if ${ac_cv_path_LS+:} false; then :
8336  $as_echo_n "(cached) " >&6
8337else
8338  case $LS in
8339  [\\/]* | ?:[\\/]*)
8340  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8341  ;;
8342  *)
8343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344for as_dir in $PATH
8345do
8346  IFS=$as_save_IFS
8347  test -z "$as_dir" && as_dir=.
8348    for ac_exec_ext in '' $ac_executable_extensions; do
8349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352    break 2
8353  fi
8354done
8355  done
8356IFS=$as_save_IFS
8357
8358  ;;
8359esac
8360fi
8361LS=$ac_cv_path_LS
8362if test -n "$LS"; then
8363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8364$as_echo "$LS" >&6; }
8365else
8366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8367$as_echo "no" >&6; }
8368fi
8369
8370
8371  test -n "$LS" && break
8372done
8373
8374  else
8375    # The variable is set, but is it from the command line or the environment?
8376
8377    # Try to remove the string !LS! from our list.
8378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8380      # If it failed, the variable was not from the command line. Ignore it,
8381      # but warn the user (except for BASH, which is always set by the calling BASH).
8382      if test "xLS" != xBASH; then
8383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8384$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8385      fi
8386      # Try to locate tool using the code snippet
8387      for ac_prog in ls
8388do
8389  # Extract the first word of "$ac_prog", so it can be a program name with args.
8390set dummy $ac_prog; ac_word=$2
8391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8392$as_echo_n "checking for $ac_word... " >&6; }
8393if ${ac_cv_path_LS+:} false; then :
8394  $as_echo_n "(cached) " >&6
8395else
8396  case $LS in
8397  [\\/]* | ?:[\\/]*)
8398  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8399  ;;
8400  *)
8401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8402for as_dir in $PATH
8403do
8404  IFS=$as_save_IFS
8405  test -z "$as_dir" && as_dir=.
8406    for ac_exec_ext in '' $ac_executable_extensions; do
8407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8408    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8410    break 2
8411  fi
8412done
8413  done
8414IFS=$as_save_IFS
8415
8416  ;;
8417esac
8418fi
8419LS=$ac_cv_path_LS
8420if test -n "$LS"; then
8421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8422$as_echo "$LS" >&6; }
8423else
8424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8425$as_echo "no" >&6; }
8426fi
8427
8428
8429  test -n "$LS" && break
8430done
8431
8432    else
8433      # If it succeeded, then it was overridden by the user. We will use it
8434      # for the tool.
8435
8436      # First remove it from the list of overridden variables, so we can test
8437      # for unknown variables in the end.
8438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8439
8440      # Check if we try to supply an empty value
8441      if test "x$LS" = x; then
8442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8443$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8445$as_echo_n "checking for LS... " >&6; }
8446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8447$as_echo "disabled" >&6; }
8448      else
8449        # Check if the provided tool contains a complete path.
8450        tool_specified="$LS"
8451        tool_basename="${tool_specified##*/}"
8452        if test "x$tool_basename" = "x$tool_specified"; then
8453          # A command without a complete path is provided, search $PATH.
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8455$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8456          # Extract the first word of "$tool_basename", so it can be a program name with args.
8457set dummy $tool_basename; ac_word=$2
8458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8459$as_echo_n "checking for $ac_word... " >&6; }
8460if ${ac_cv_path_LS+:} false; then :
8461  $as_echo_n "(cached) " >&6
8462else
8463  case $LS in
8464  [\\/]* | ?:[\\/]*)
8465  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8466  ;;
8467  *)
8468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8469for as_dir in $PATH
8470do
8471  IFS=$as_save_IFS
8472  test -z "$as_dir" && as_dir=.
8473    for ac_exec_ext in '' $ac_executable_extensions; do
8474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8475    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8477    break 2
8478  fi
8479done
8480  done
8481IFS=$as_save_IFS
8482
8483  ;;
8484esac
8485fi
8486LS=$ac_cv_path_LS
8487if test -n "$LS"; then
8488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8489$as_echo "$LS" >&6; }
8490else
8491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492$as_echo "no" >&6; }
8493fi
8494
8495
8496          if test "x$LS" = x; then
8497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8498          fi
8499        else
8500          # Otherwise we believe it is a complete path. Use it as it is.
8501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8502$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8504$as_echo_n "checking for LS... " >&6; }
8505          if test ! -x "$tool_specified"; then
8506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8507$as_echo "not found" >&6; }
8508            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8509          fi
8510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8511$as_echo "$tool_specified" >&6; }
8512        fi
8513      fi
8514    fi
8515
8516  fi
8517
8518
8519
8520  if test "x$LS" = x; then
8521    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8522  fi
8523
8524
8525
8526
8527
8528  # Publish this variable in the help.
8529
8530
8531  if [ -z "${MKDIR+x}" ]; then
8532    # The variable is not set by user, try to locate tool using the code snippet
8533    for ac_prog in mkdir
8534do
8535  # Extract the first word of "$ac_prog", so it can be a program name with args.
8536set dummy $ac_prog; ac_word=$2
8537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8538$as_echo_n "checking for $ac_word... " >&6; }
8539if ${ac_cv_path_MKDIR+:} false; then :
8540  $as_echo_n "(cached) " >&6
8541else
8542  case $MKDIR in
8543  [\\/]* | ?:[\\/]*)
8544  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8545  ;;
8546  *)
8547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8548for as_dir in $PATH
8549do
8550  IFS=$as_save_IFS
8551  test -z "$as_dir" && as_dir=.
8552    for ac_exec_ext in '' $ac_executable_extensions; do
8553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8554    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8556    break 2
8557  fi
8558done
8559  done
8560IFS=$as_save_IFS
8561
8562  ;;
8563esac
8564fi
8565MKDIR=$ac_cv_path_MKDIR
8566if test -n "$MKDIR"; then
8567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8568$as_echo "$MKDIR" >&6; }
8569else
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571$as_echo "no" >&6; }
8572fi
8573
8574
8575  test -n "$MKDIR" && break
8576done
8577
8578  else
8579    # The variable is set, but is it from the command line or the environment?
8580
8581    # Try to remove the string !MKDIR! from our list.
8582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8584      # If it failed, the variable was not from the command line. Ignore it,
8585      # but warn the user (except for BASH, which is always set by the calling BASH).
8586      if test "xMKDIR" != xBASH; then
8587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8588$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8589      fi
8590      # Try to locate tool using the code snippet
8591      for ac_prog in mkdir
8592do
8593  # Extract the first word of "$ac_prog", so it can be a program name with args.
8594set dummy $ac_prog; ac_word=$2
8595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8596$as_echo_n "checking for $ac_word... " >&6; }
8597if ${ac_cv_path_MKDIR+:} false; then :
8598  $as_echo_n "(cached) " >&6
8599else
8600  case $MKDIR in
8601  [\\/]* | ?:[\\/]*)
8602  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8603  ;;
8604  *)
8605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8606for as_dir in $PATH
8607do
8608  IFS=$as_save_IFS
8609  test -z "$as_dir" && as_dir=.
8610    for ac_exec_ext in '' $ac_executable_extensions; do
8611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8612    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8614    break 2
8615  fi
8616done
8617  done
8618IFS=$as_save_IFS
8619
8620  ;;
8621esac
8622fi
8623MKDIR=$ac_cv_path_MKDIR
8624if test -n "$MKDIR"; then
8625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8626$as_echo "$MKDIR" >&6; }
8627else
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8629$as_echo "no" >&6; }
8630fi
8631
8632
8633  test -n "$MKDIR" && break
8634done
8635
8636    else
8637      # If it succeeded, then it was overridden by the user. We will use it
8638      # for the tool.
8639
8640      # First remove it from the list of overridden variables, so we can test
8641      # for unknown variables in the end.
8642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8643
8644      # Check if we try to supply an empty value
8645      if test "x$MKDIR" = x; then
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8647$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8649$as_echo_n "checking for MKDIR... " >&6; }
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8651$as_echo "disabled" >&6; }
8652      else
8653        # Check if the provided tool contains a complete path.
8654        tool_specified="$MKDIR"
8655        tool_basename="${tool_specified##*/}"
8656        if test "x$tool_basename" = "x$tool_specified"; then
8657          # A command without a complete path is provided, search $PATH.
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8659$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8660          # Extract the first word of "$tool_basename", so it can be a program name with args.
8661set dummy $tool_basename; ac_word=$2
8662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8663$as_echo_n "checking for $ac_word... " >&6; }
8664if ${ac_cv_path_MKDIR+:} false; then :
8665  $as_echo_n "(cached) " >&6
8666else
8667  case $MKDIR in
8668  [\\/]* | ?:[\\/]*)
8669  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8670  ;;
8671  *)
8672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8673for as_dir in $PATH
8674do
8675  IFS=$as_save_IFS
8676  test -z "$as_dir" && as_dir=.
8677    for ac_exec_ext in '' $ac_executable_extensions; do
8678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8679    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8681    break 2
8682  fi
8683done
8684  done
8685IFS=$as_save_IFS
8686
8687  ;;
8688esac
8689fi
8690MKDIR=$ac_cv_path_MKDIR
8691if test -n "$MKDIR"; then
8692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8693$as_echo "$MKDIR" >&6; }
8694else
8695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8696$as_echo "no" >&6; }
8697fi
8698
8699
8700          if test "x$MKDIR" = x; then
8701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8702          fi
8703        else
8704          # Otherwise we believe it is a complete path. Use it as it is.
8705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8706$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8708$as_echo_n "checking for MKDIR... " >&6; }
8709          if test ! -x "$tool_specified"; then
8710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8711$as_echo "not found" >&6; }
8712            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8713          fi
8714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8715$as_echo "$tool_specified" >&6; }
8716        fi
8717      fi
8718    fi
8719
8720  fi
8721
8722
8723
8724  if test "x$MKDIR" = x; then
8725    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8726  fi
8727
8728
8729
8730
8731
8732  # Publish this variable in the help.
8733
8734
8735  if [ -z "${MKTEMP+x}" ]; then
8736    # The variable is not set by user, try to locate tool using the code snippet
8737    for ac_prog in mktemp
8738do
8739  # Extract the first word of "$ac_prog", so it can be a program name with args.
8740set dummy $ac_prog; ac_word=$2
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8742$as_echo_n "checking for $ac_word... " >&6; }
8743if ${ac_cv_path_MKTEMP+:} false; then :
8744  $as_echo_n "(cached) " >&6
8745else
8746  case $MKTEMP in
8747  [\\/]* | ?:[\\/]*)
8748  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8749  ;;
8750  *)
8751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8752for as_dir in $PATH
8753do
8754  IFS=$as_save_IFS
8755  test -z "$as_dir" && as_dir=.
8756    for ac_exec_ext in '' $ac_executable_extensions; do
8757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8758    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8760    break 2
8761  fi
8762done
8763  done
8764IFS=$as_save_IFS
8765
8766  ;;
8767esac
8768fi
8769MKTEMP=$ac_cv_path_MKTEMP
8770if test -n "$MKTEMP"; then
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8772$as_echo "$MKTEMP" >&6; }
8773else
8774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8775$as_echo "no" >&6; }
8776fi
8777
8778
8779  test -n "$MKTEMP" && break
8780done
8781
8782  else
8783    # The variable is set, but is it from the command line or the environment?
8784
8785    # Try to remove the string !MKTEMP! from our list.
8786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8788      # If it failed, the variable was not from the command line. Ignore it,
8789      # but warn the user (except for BASH, which is always set by the calling BASH).
8790      if test "xMKTEMP" != xBASH; then
8791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8792$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8793      fi
8794      # Try to locate tool using the code snippet
8795      for ac_prog in mktemp
8796do
8797  # Extract the first word of "$ac_prog", so it can be a program name with args.
8798set dummy $ac_prog; ac_word=$2
8799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8800$as_echo_n "checking for $ac_word... " >&6; }
8801if ${ac_cv_path_MKTEMP+:} false; then :
8802  $as_echo_n "(cached) " >&6
8803else
8804  case $MKTEMP in
8805  [\\/]* | ?:[\\/]*)
8806  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8807  ;;
8808  *)
8809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810for as_dir in $PATH
8811do
8812  IFS=$as_save_IFS
8813  test -z "$as_dir" && as_dir=.
8814    for ac_exec_ext in '' $ac_executable_extensions; do
8815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8816    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8818    break 2
8819  fi
8820done
8821  done
8822IFS=$as_save_IFS
8823
8824  ;;
8825esac
8826fi
8827MKTEMP=$ac_cv_path_MKTEMP
8828if test -n "$MKTEMP"; then
8829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8830$as_echo "$MKTEMP" >&6; }
8831else
8832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8833$as_echo "no" >&6; }
8834fi
8835
8836
8837  test -n "$MKTEMP" && break
8838done
8839
8840    else
8841      # If it succeeded, then it was overridden by the user. We will use it
8842      # for the tool.
8843
8844      # First remove it from the list of overridden variables, so we can test
8845      # for unknown variables in the end.
8846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8847
8848      # Check if we try to supply an empty value
8849      if test "x$MKTEMP" = x; then
8850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8851$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8853$as_echo_n "checking for MKTEMP... " >&6; }
8854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8855$as_echo "disabled" >&6; }
8856      else
8857        # Check if the provided tool contains a complete path.
8858        tool_specified="$MKTEMP"
8859        tool_basename="${tool_specified##*/}"
8860        if test "x$tool_basename" = "x$tool_specified"; then
8861          # A command without a complete path is provided, search $PATH.
8862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8863$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8864          # Extract the first word of "$tool_basename", so it can be a program name with args.
8865set dummy $tool_basename; ac_word=$2
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if ${ac_cv_path_MKTEMP+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  case $MKTEMP in
8872  [\\/]* | ?:[\\/]*)
8873  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8874  ;;
8875  *)
8876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891  ;;
8892esac
8893fi
8894MKTEMP=$ac_cv_path_MKTEMP
8895if test -n "$MKTEMP"; then
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8897$as_echo "$MKTEMP" >&6; }
8898else
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900$as_echo "no" >&6; }
8901fi
8902
8903
8904          if test "x$MKTEMP" = x; then
8905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906          fi
8907        else
8908          # Otherwise we believe it is a complete path. Use it as it is.
8909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8910$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8912$as_echo_n "checking for MKTEMP... " >&6; }
8913          if test ! -x "$tool_specified"; then
8914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915$as_echo "not found" >&6; }
8916            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8917          fi
8918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919$as_echo "$tool_specified" >&6; }
8920        fi
8921      fi
8922    fi
8923
8924  fi
8925
8926
8927
8928  if test "x$MKTEMP" = x; then
8929    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8930  fi
8931
8932
8933
8934
8935
8936  # Publish this variable in the help.
8937
8938
8939  if [ -z "${MV+x}" ]; then
8940    # The variable is not set by user, try to locate tool using the code snippet
8941    for ac_prog in mv
8942do
8943  # Extract the first word of "$ac_prog", so it can be a program name with args.
8944set dummy $ac_prog; ac_word=$2
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946$as_echo_n "checking for $ac_word... " >&6; }
8947if ${ac_cv_path_MV+:} false; then :
8948  $as_echo_n "(cached) " >&6
8949else
8950  case $MV in
8951  [\\/]* | ?:[\\/]*)
8952  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8953  ;;
8954  *)
8955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956for as_dir in $PATH
8957do
8958  IFS=$as_save_IFS
8959  test -z "$as_dir" && as_dir=.
8960    for ac_exec_ext in '' $ac_executable_extensions; do
8961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8962    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8964    break 2
8965  fi
8966done
8967  done
8968IFS=$as_save_IFS
8969
8970  ;;
8971esac
8972fi
8973MV=$ac_cv_path_MV
8974if test -n "$MV"; then
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8976$as_echo "$MV" >&6; }
8977else
8978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
8980fi
8981
8982
8983  test -n "$MV" && break
8984done
8985
8986  else
8987    # The variable is set, but is it from the command line or the environment?
8988
8989    # Try to remove the string !MV! from our list.
8990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8992      # If it failed, the variable was not from the command line. Ignore it,
8993      # but warn the user (except for BASH, which is always set by the calling BASH).
8994      if test "xMV" != xBASH; then
8995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8996$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8997      fi
8998      # Try to locate tool using the code snippet
8999      for ac_prog in mv
9000do
9001  # Extract the first word of "$ac_prog", so it can be a program name with args.
9002set dummy $ac_prog; ac_word=$2
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9004$as_echo_n "checking for $ac_word... " >&6; }
9005if ${ac_cv_path_MV+:} false; then :
9006  $as_echo_n "(cached) " >&6
9007else
9008  case $MV in
9009  [\\/]* | ?:[\\/]*)
9010  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9011  ;;
9012  *)
9013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9014for as_dir in $PATH
9015do
9016  IFS=$as_save_IFS
9017  test -z "$as_dir" && as_dir=.
9018    for ac_exec_ext in '' $ac_executable_extensions; do
9019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9020    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9022    break 2
9023  fi
9024done
9025  done
9026IFS=$as_save_IFS
9027
9028  ;;
9029esac
9030fi
9031MV=$ac_cv_path_MV
9032if test -n "$MV"; then
9033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9034$as_echo "$MV" >&6; }
9035else
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9037$as_echo "no" >&6; }
9038fi
9039
9040
9041  test -n "$MV" && break
9042done
9043
9044    else
9045      # If it succeeded, then it was overridden by the user. We will use it
9046      # for the tool.
9047
9048      # First remove it from the list of overridden variables, so we can test
9049      # for unknown variables in the end.
9050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9051
9052      # Check if we try to supply an empty value
9053      if test "x$MV" = x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9055$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9057$as_echo_n "checking for MV... " >&6; }
9058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9059$as_echo "disabled" >&6; }
9060      else
9061        # Check if the provided tool contains a complete path.
9062        tool_specified="$MV"
9063        tool_basename="${tool_specified##*/}"
9064        if test "x$tool_basename" = "x$tool_specified"; then
9065          # A command without a complete path is provided, search $PATH.
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9067$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9068          # Extract the first word of "$tool_basename", so it can be a program name with args.
9069set dummy $tool_basename; ac_word=$2
9070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9071$as_echo_n "checking for $ac_word... " >&6; }
9072if ${ac_cv_path_MV+:} false; then :
9073  $as_echo_n "(cached) " >&6
9074else
9075  case $MV in
9076  [\\/]* | ?:[\\/]*)
9077  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9078  ;;
9079  *)
9080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9081for as_dir in $PATH
9082do
9083  IFS=$as_save_IFS
9084  test -z "$as_dir" && as_dir=.
9085    for ac_exec_ext in '' $ac_executable_extensions; do
9086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9087    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9089    break 2
9090  fi
9091done
9092  done
9093IFS=$as_save_IFS
9094
9095  ;;
9096esac
9097fi
9098MV=$ac_cv_path_MV
9099if test -n "$MV"; then
9100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9101$as_echo "$MV" >&6; }
9102else
9103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9104$as_echo "no" >&6; }
9105fi
9106
9107
9108          if test "x$MV" = x; then
9109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9110          fi
9111        else
9112          # Otherwise we believe it is a complete path. Use it as it is.
9113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9114$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9116$as_echo_n "checking for MV... " >&6; }
9117          if test ! -x "$tool_specified"; then
9118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9119$as_echo "not found" >&6; }
9120            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9121          fi
9122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9123$as_echo "$tool_specified" >&6; }
9124        fi
9125      fi
9126    fi
9127
9128  fi
9129
9130
9131
9132  if test "x$MV" = x; then
9133    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9134  fi
9135
9136
9137
9138
9139
9140  # Publish this variable in the help.
9141
9142
9143  if [ -z "${NAWK+x}" ]; then
9144    # The variable is not set by user, try to locate tool using the code snippet
9145    for ac_prog in nawk gawk awk
9146do
9147  # Extract the first word of "$ac_prog", so it can be a program name with args.
9148set dummy $ac_prog; ac_word=$2
9149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150$as_echo_n "checking for $ac_word... " >&6; }
9151if ${ac_cv_path_NAWK+:} false; then :
9152  $as_echo_n "(cached) " >&6
9153else
9154  case $NAWK in
9155  [\\/]* | ?:[\\/]*)
9156  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9157  ;;
9158  *)
9159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160for as_dir in $PATH
9161do
9162  IFS=$as_save_IFS
9163  test -z "$as_dir" && as_dir=.
9164    for ac_exec_ext in '' $ac_executable_extensions; do
9165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168    break 2
9169  fi
9170done
9171  done
9172IFS=$as_save_IFS
9173
9174  ;;
9175esac
9176fi
9177NAWK=$ac_cv_path_NAWK
9178if test -n "$NAWK"; then
9179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9180$as_echo "$NAWK" >&6; }
9181else
9182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
9184fi
9185
9186
9187  test -n "$NAWK" && break
9188done
9189
9190  else
9191    # The variable is set, but is it from the command line or the environment?
9192
9193    # Try to remove the string !NAWK! from our list.
9194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9196      # If it failed, the variable was not from the command line. Ignore it,
9197      # but warn the user (except for BASH, which is always set by the calling BASH).
9198      if test "xNAWK" != xBASH; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9200$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9201      fi
9202      # Try to locate tool using the code snippet
9203      for ac_prog in nawk gawk awk
9204do
9205  # Extract the first word of "$ac_prog", so it can be a program name with args.
9206set dummy $ac_prog; ac_word=$2
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208$as_echo_n "checking for $ac_word... " >&6; }
9209if ${ac_cv_path_NAWK+:} false; then :
9210  $as_echo_n "(cached) " >&6
9211else
9212  case $NAWK in
9213  [\\/]* | ?:[\\/]*)
9214  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9215  ;;
9216  *)
9217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218for as_dir in $PATH
9219do
9220  IFS=$as_save_IFS
9221  test -z "$as_dir" && as_dir=.
9222    for ac_exec_ext in '' $ac_executable_extensions; do
9223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226    break 2
9227  fi
9228done
9229  done
9230IFS=$as_save_IFS
9231
9232  ;;
9233esac
9234fi
9235NAWK=$ac_cv_path_NAWK
9236if test -n "$NAWK"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9238$as_echo "$NAWK" >&6; }
9239else
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
9243
9244
9245  test -n "$NAWK" && break
9246done
9247
9248    else
9249      # If it succeeded, then it was overridden by the user. We will use it
9250      # for the tool.
9251
9252      # First remove it from the list of overridden variables, so we can test
9253      # for unknown variables in the end.
9254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9255
9256      # Check if we try to supply an empty value
9257      if test "x$NAWK" = x; then
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9259$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9261$as_echo_n "checking for NAWK... " >&6; }
9262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9263$as_echo "disabled" >&6; }
9264      else
9265        # Check if the provided tool contains a complete path.
9266        tool_specified="$NAWK"
9267        tool_basename="${tool_specified##*/}"
9268        if test "x$tool_basename" = "x$tool_specified"; then
9269          # A command without a complete path is provided, search $PATH.
9270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9271$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9272          # Extract the first word of "$tool_basename", so it can be a program name with args.
9273set dummy $tool_basename; ac_word=$2
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9275$as_echo_n "checking for $ac_word... " >&6; }
9276if ${ac_cv_path_NAWK+:} false; then :
9277  $as_echo_n "(cached) " >&6
9278else
9279  case $NAWK in
9280  [\\/]* | ?:[\\/]*)
9281  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9282  ;;
9283  *)
9284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9285for as_dir in $PATH
9286do
9287  IFS=$as_save_IFS
9288  test -z "$as_dir" && as_dir=.
9289    for ac_exec_ext in '' $ac_executable_extensions; do
9290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9291    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9293    break 2
9294  fi
9295done
9296  done
9297IFS=$as_save_IFS
9298
9299  ;;
9300esac
9301fi
9302NAWK=$ac_cv_path_NAWK
9303if test -n "$NAWK"; then
9304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9305$as_echo "$NAWK" >&6; }
9306else
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
9309fi
9310
9311
9312          if test "x$NAWK" = x; then
9313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9314          fi
9315        else
9316          # Otherwise we believe it is a complete path. Use it as it is.
9317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9318$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9320$as_echo_n "checking for NAWK... " >&6; }
9321          if test ! -x "$tool_specified"; then
9322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9323$as_echo "not found" >&6; }
9324            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9325          fi
9326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9327$as_echo "$tool_specified" >&6; }
9328        fi
9329      fi
9330    fi
9331
9332  fi
9333
9334
9335
9336  if test "x$NAWK" = x; then
9337    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9338  fi
9339
9340
9341
9342
9343
9344  # Publish this variable in the help.
9345
9346
9347  if [ -z "${PRINTF+x}" ]; then
9348    # The variable is not set by user, try to locate tool using the code snippet
9349    for ac_prog in printf
9350do
9351  # Extract the first word of "$ac_prog", so it can be a program name with args.
9352set dummy $ac_prog; ac_word=$2
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9354$as_echo_n "checking for $ac_word... " >&6; }
9355if ${ac_cv_path_PRINTF+:} false; then :
9356  $as_echo_n "(cached) " >&6
9357else
9358  case $PRINTF in
9359  [\\/]* | ?:[\\/]*)
9360  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9361  ;;
9362  *)
9363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9364for as_dir in $PATH
9365do
9366  IFS=$as_save_IFS
9367  test -z "$as_dir" && as_dir=.
9368    for ac_exec_ext in '' $ac_executable_extensions; do
9369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9370    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9372    break 2
9373  fi
9374done
9375  done
9376IFS=$as_save_IFS
9377
9378  ;;
9379esac
9380fi
9381PRINTF=$ac_cv_path_PRINTF
9382if test -n "$PRINTF"; then
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9384$as_echo "$PRINTF" >&6; }
9385else
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
9388fi
9389
9390
9391  test -n "$PRINTF" && break
9392done
9393
9394  else
9395    # The variable is set, but is it from the command line or the environment?
9396
9397    # Try to remove the string !PRINTF! from our list.
9398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9400      # If it failed, the variable was not from the command line. Ignore it,
9401      # but warn the user (except for BASH, which is always set by the calling BASH).
9402      if test "xPRINTF" != xBASH; then
9403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9404$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9405      fi
9406      # Try to locate tool using the code snippet
9407      for ac_prog in printf
9408do
9409  # Extract the first word of "$ac_prog", so it can be a program name with args.
9410set dummy $ac_prog; ac_word=$2
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412$as_echo_n "checking for $ac_word... " >&6; }
9413if ${ac_cv_path_PRINTF+:} false; then :
9414  $as_echo_n "(cached) " >&6
9415else
9416  case $PRINTF in
9417  [\\/]* | ?:[\\/]*)
9418  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9419  ;;
9420  *)
9421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9422for as_dir in $PATH
9423do
9424  IFS=$as_save_IFS
9425  test -z "$as_dir" && as_dir=.
9426    for ac_exec_ext in '' $ac_executable_extensions; do
9427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9428    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9430    break 2
9431  fi
9432done
9433  done
9434IFS=$as_save_IFS
9435
9436  ;;
9437esac
9438fi
9439PRINTF=$ac_cv_path_PRINTF
9440if test -n "$PRINTF"; then
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9442$as_echo "$PRINTF" >&6; }
9443else
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
9446fi
9447
9448
9449  test -n "$PRINTF" && break
9450done
9451
9452    else
9453      # If it succeeded, then it was overridden by the user. We will use it
9454      # for the tool.
9455
9456      # First remove it from the list of overridden variables, so we can test
9457      # for unknown variables in the end.
9458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9459
9460      # Check if we try to supply an empty value
9461      if test "x$PRINTF" = x; then
9462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9463$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9465$as_echo_n "checking for PRINTF... " >&6; }
9466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9467$as_echo "disabled" >&6; }
9468      else
9469        # Check if the provided tool contains a complete path.
9470        tool_specified="$PRINTF"
9471        tool_basename="${tool_specified##*/}"
9472        if test "x$tool_basename" = "x$tool_specified"; then
9473          # A command without a complete path is provided, search $PATH.
9474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9475$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9476          # Extract the first word of "$tool_basename", so it can be a program name with args.
9477set dummy $tool_basename; ac_word=$2
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9479$as_echo_n "checking for $ac_word... " >&6; }
9480if ${ac_cv_path_PRINTF+:} false; then :
9481  $as_echo_n "(cached) " >&6
9482else
9483  case $PRINTF in
9484  [\\/]* | ?:[\\/]*)
9485  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9486  ;;
9487  *)
9488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9489for as_dir in $PATH
9490do
9491  IFS=$as_save_IFS
9492  test -z "$as_dir" && as_dir=.
9493    for ac_exec_ext in '' $ac_executable_extensions; do
9494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9495    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9497    break 2
9498  fi
9499done
9500  done
9501IFS=$as_save_IFS
9502
9503  ;;
9504esac
9505fi
9506PRINTF=$ac_cv_path_PRINTF
9507if test -n "$PRINTF"; then
9508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9509$as_echo "$PRINTF" >&6; }
9510else
9511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
9513fi
9514
9515
9516          if test "x$PRINTF" = x; then
9517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9518          fi
9519        else
9520          # Otherwise we believe it is a complete path. Use it as it is.
9521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9522$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9524$as_echo_n "checking for PRINTF... " >&6; }
9525          if test ! -x "$tool_specified"; then
9526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9527$as_echo "not found" >&6; }
9528            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9529          fi
9530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9531$as_echo "$tool_specified" >&6; }
9532        fi
9533      fi
9534    fi
9535
9536  fi
9537
9538
9539
9540  if test "x$PRINTF" = x; then
9541    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9542  fi
9543
9544
9545
9546
9547
9548  # Publish this variable in the help.
9549
9550
9551  if [ -z "${RM+x}" ]; then
9552    # The variable is not set by user, try to locate tool using the code snippet
9553    for ac_prog in rm
9554do
9555  # Extract the first word of "$ac_prog", so it can be a program name with args.
9556set dummy $ac_prog; ac_word=$2
9557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9558$as_echo_n "checking for $ac_word... " >&6; }
9559if ${ac_cv_path_RM+:} false; then :
9560  $as_echo_n "(cached) " >&6
9561else
9562  case $RM in
9563  [\\/]* | ?:[\\/]*)
9564  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9565  ;;
9566  *)
9567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568for as_dir in $PATH
9569do
9570  IFS=$as_save_IFS
9571  test -z "$as_dir" && as_dir=.
9572    for ac_exec_ext in '' $ac_executable_extensions; do
9573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576    break 2
9577  fi
9578done
9579  done
9580IFS=$as_save_IFS
9581
9582  ;;
9583esac
9584fi
9585RM=$ac_cv_path_RM
9586if test -n "$RM"; then
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9588$as_echo "$RM" >&6; }
9589else
9590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591$as_echo "no" >&6; }
9592fi
9593
9594
9595  test -n "$RM" && break
9596done
9597
9598  else
9599    # The variable is set, but is it from the command line or the environment?
9600
9601    # Try to remove the string !RM! from our list.
9602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9604      # If it failed, the variable was not from the command line. Ignore it,
9605      # but warn the user (except for BASH, which is always set by the calling BASH).
9606      if test "xRM" != xBASH; then
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9608$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9609      fi
9610      # Try to locate tool using the code snippet
9611      for ac_prog in rm
9612do
9613  # Extract the first word of "$ac_prog", so it can be a program name with args.
9614set dummy $ac_prog; ac_word=$2
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9616$as_echo_n "checking for $ac_word... " >&6; }
9617if ${ac_cv_path_RM+:} false; then :
9618  $as_echo_n "(cached) " >&6
9619else
9620  case $RM in
9621  [\\/]* | ?:[\\/]*)
9622  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9623  ;;
9624  *)
9625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9626for as_dir in $PATH
9627do
9628  IFS=$as_save_IFS
9629  test -z "$as_dir" && as_dir=.
9630    for ac_exec_ext in '' $ac_executable_extensions; do
9631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9632    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9634    break 2
9635  fi
9636done
9637  done
9638IFS=$as_save_IFS
9639
9640  ;;
9641esac
9642fi
9643RM=$ac_cv_path_RM
9644if test -n "$RM"; then
9645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9646$as_echo "$RM" >&6; }
9647else
9648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
9650fi
9651
9652
9653  test -n "$RM" && break
9654done
9655
9656    else
9657      # If it succeeded, then it was overridden by the user. We will use it
9658      # for the tool.
9659
9660      # First remove it from the list of overridden variables, so we can test
9661      # for unknown variables in the end.
9662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9663
9664      # Check if we try to supply an empty value
9665      if test "x$RM" = x; then
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9667$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9669$as_echo_n "checking for RM... " >&6; }
9670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9671$as_echo "disabled" >&6; }
9672      else
9673        # Check if the provided tool contains a complete path.
9674        tool_specified="$RM"
9675        tool_basename="${tool_specified##*/}"
9676        if test "x$tool_basename" = "x$tool_specified"; then
9677          # A command without a complete path is provided, search $PATH.
9678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9679$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9680          # Extract the first word of "$tool_basename", so it can be a program name with args.
9681set dummy $tool_basename; ac_word=$2
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683$as_echo_n "checking for $ac_word... " >&6; }
9684if ${ac_cv_path_RM+:} false; then :
9685  $as_echo_n "(cached) " >&6
9686else
9687  case $RM in
9688  [\\/]* | ?:[\\/]*)
9689  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9690  ;;
9691  *)
9692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9693for as_dir in $PATH
9694do
9695  IFS=$as_save_IFS
9696  test -z "$as_dir" && as_dir=.
9697    for ac_exec_ext in '' $ac_executable_extensions; do
9698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9699    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9701    break 2
9702  fi
9703done
9704  done
9705IFS=$as_save_IFS
9706
9707  ;;
9708esac
9709fi
9710RM=$ac_cv_path_RM
9711if test -n "$RM"; then
9712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9713$as_echo "$RM" >&6; }
9714else
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717fi
9718
9719
9720          if test "x$RM" = x; then
9721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9722          fi
9723        else
9724          # Otherwise we believe it is a complete path. Use it as it is.
9725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9726$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9728$as_echo_n "checking for RM... " >&6; }
9729          if test ! -x "$tool_specified"; then
9730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9731$as_echo "not found" >&6; }
9732            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9733          fi
9734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9735$as_echo "$tool_specified" >&6; }
9736        fi
9737      fi
9738    fi
9739
9740  fi
9741
9742
9743
9744  if test "x$RM" = x; then
9745    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9746  fi
9747
9748
9749
9750
9751
9752  # Publish this variable in the help.
9753
9754
9755  if [ -z "${RMDIR+x}" ]; then
9756    # The variable is not set by user, try to locate tool using the code snippet
9757    for ac_prog in rmdir
9758do
9759  # Extract the first word of "$ac_prog", so it can be a program name with args.
9760set dummy $ac_prog; ac_word=$2
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9762$as_echo_n "checking for $ac_word... " >&6; }
9763if ${ac_cv_path_RMDIR+:} false; then :
9764  $as_echo_n "(cached) " >&6
9765else
9766  case $RMDIR in
9767  [\\/]* | ?:[\\/]*)
9768  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9769  ;;
9770  *)
9771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772for as_dir in $PATH
9773do
9774  IFS=$as_save_IFS
9775  test -z "$as_dir" && as_dir=.
9776    for ac_exec_ext in '' $ac_executable_extensions; do
9777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9778    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9780    break 2
9781  fi
9782done
9783  done
9784IFS=$as_save_IFS
9785
9786  ;;
9787esac
9788fi
9789RMDIR=$ac_cv_path_RMDIR
9790if test -n "$RMDIR"; then
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9792$as_echo "$RMDIR" >&6; }
9793else
9794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9795$as_echo "no" >&6; }
9796fi
9797
9798
9799  test -n "$RMDIR" && break
9800done
9801
9802  else
9803    # The variable is set, but is it from the command line or the environment?
9804
9805    # Try to remove the string !RMDIR! from our list.
9806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9808      # If it failed, the variable was not from the command line. Ignore it,
9809      # but warn the user (except for BASH, which is always set by the calling BASH).
9810      if test "xRMDIR" != xBASH; then
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9812$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9813      fi
9814      # Try to locate tool using the code snippet
9815      for ac_prog in rmdir
9816do
9817  # Extract the first word of "$ac_prog", so it can be a program name with args.
9818set dummy $ac_prog; ac_word=$2
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9820$as_echo_n "checking for $ac_word... " >&6; }
9821if ${ac_cv_path_RMDIR+:} false; then :
9822  $as_echo_n "(cached) " >&6
9823else
9824  case $RMDIR in
9825  [\\/]* | ?:[\\/]*)
9826  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9827  ;;
9828  *)
9829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9830for as_dir in $PATH
9831do
9832  IFS=$as_save_IFS
9833  test -z "$as_dir" && as_dir=.
9834    for ac_exec_ext in '' $ac_executable_extensions; do
9835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9836    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9838    break 2
9839  fi
9840done
9841  done
9842IFS=$as_save_IFS
9843
9844  ;;
9845esac
9846fi
9847RMDIR=$ac_cv_path_RMDIR
9848if test -n "$RMDIR"; then
9849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9850$as_echo "$RMDIR" >&6; }
9851else
9852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854fi
9855
9856
9857  test -n "$RMDIR" && break
9858done
9859
9860    else
9861      # If it succeeded, then it was overridden by the user. We will use it
9862      # for the tool.
9863
9864      # First remove it from the list of overridden variables, so we can test
9865      # for unknown variables in the end.
9866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9867
9868      # Check if we try to supply an empty value
9869      if test "x$RMDIR" = x; then
9870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9871$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9873$as_echo_n "checking for RMDIR... " >&6; }
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9875$as_echo "disabled" >&6; }
9876      else
9877        # Check if the provided tool contains a complete path.
9878        tool_specified="$RMDIR"
9879        tool_basename="${tool_specified##*/}"
9880        if test "x$tool_basename" = "x$tool_specified"; then
9881          # A command without a complete path is provided, search $PATH.
9882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9883$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9884          # Extract the first word of "$tool_basename", so it can be a program name with args.
9885set dummy $tool_basename; ac_word=$2
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9887$as_echo_n "checking for $ac_word... " >&6; }
9888if ${ac_cv_path_RMDIR+:} false; then :
9889  $as_echo_n "(cached) " >&6
9890else
9891  case $RMDIR in
9892  [\\/]* | ?:[\\/]*)
9893  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9894  ;;
9895  *)
9896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9897for as_dir in $PATH
9898do
9899  IFS=$as_save_IFS
9900  test -z "$as_dir" && as_dir=.
9901    for ac_exec_ext in '' $ac_executable_extensions; do
9902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9903    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9905    break 2
9906  fi
9907done
9908  done
9909IFS=$as_save_IFS
9910
9911  ;;
9912esac
9913fi
9914RMDIR=$ac_cv_path_RMDIR
9915if test -n "$RMDIR"; then
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9917$as_echo "$RMDIR" >&6; }
9918else
9919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9920$as_echo "no" >&6; }
9921fi
9922
9923
9924          if test "x$RMDIR" = x; then
9925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9926          fi
9927        else
9928          # Otherwise we believe it is a complete path. Use it as it is.
9929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9930$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9932$as_echo_n "checking for RMDIR... " >&6; }
9933          if test ! -x "$tool_specified"; then
9934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9935$as_echo "not found" >&6; }
9936            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9937          fi
9938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9939$as_echo "$tool_specified" >&6; }
9940        fi
9941      fi
9942    fi
9943
9944  fi
9945
9946
9947
9948  if test "x$RMDIR" = x; then
9949    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9950  fi
9951
9952
9953
9954
9955
9956  # Publish this variable in the help.
9957
9958
9959  if [ -z "${SH+x}" ]; then
9960    # The variable is not set by user, try to locate tool using the code snippet
9961    for ac_prog in sh
9962do
9963  # Extract the first word of "$ac_prog", so it can be a program name with args.
9964set dummy $ac_prog; ac_word=$2
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966$as_echo_n "checking for $ac_word... " >&6; }
9967if ${ac_cv_path_SH+:} false; then :
9968  $as_echo_n "(cached) " >&6
9969else
9970  case $SH in
9971  [\\/]* | ?:[\\/]*)
9972  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9973  ;;
9974  *)
9975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978  IFS=$as_save_IFS
9979  test -z "$as_dir" && as_dir=.
9980    for ac_exec_ext in '' $ac_executable_extensions; do
9981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984    break 2
9985  fi
9986done
9987  done
9988IFS=$as_save_IFS
9989
9990  ;;
9991esac
9992fi
9993SH=$ac_cv_path_SH
9994if test -n "$SH"; then
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9996$as_echo "$SH" >&6; }
9997else
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
10000fi
10001
10002
10003  test -n "$SH" && break
10004done
10005
10006  else
10007    # The variable is set, but is it from the command line or the environment?
10008
10009    # Try to remove the string !SH! from our list.
10010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10012      # If it failed, the variable was not from the command line. Ignore it,
10013      # but warn the user (except for BASH, which is always set by the calling BASH).
10014      if test "xSH" != xBASH; then
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10016$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10017      fi
10018      # Try to locate tool using the code snippet
10019      for ac_prog in sh
10020do
10021  # Extract the first word of "$ac_prog", so it can be a program name with args.
10022set dummy $ac_prog; ac_word=$2
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10024$as_echo_n "checking for $ac_word... " >&6; }
10025if ${ac_cv_path_SH+:} false; then :
10026  $as_echo_n "(cached) " >&6
10027else
10028  case $SH in
10029  [\\/]* | ?:[\\/]*)
10030  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10031  ;;
10032  *)
10033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10034for as_dir in $PATH
10035do
10036  IFS=$as_save_IFS
10037  test -z "$as_dir" && as_dir=.
10038    for ac_exec_ext in '' $ac_executable_extensions; do
10039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10040    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10042    break 2
10043  fi
10044done
10045  done
10046IFS=$as_save_IFS
10047
10048  ;;
10049esac
10050fi
10051SH=$ac_cv_path_SH
10052if test -n "$SH"; then
10053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10054$as_echo "$SH" >&6; }
10055else
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
10058fi
10059
10060
10061  test -n "$SH" && break
10062done
10063
10064    else
10065      # If it succeeded, then it was overridden by the user. We will use it
10066      # for the tool.
10067
10068      # First remove it from the list of overridden variables, so we can test
10069      # for unknown variables in the end.
10070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10071
10072      # Check if we try to supply an empty value
10073      if test "x$SH" = x; then
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10075$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10077$as_echo_n "checking for SH... " >&6; }
10078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10079$as_echo "disabled" >&6; }
10080      else
10081        # Check if the provided tool contains a complete path.
10082        tool_specified="$SH"
10083        tool_basename="${tool_specified##*/}"
10084        if test "x$tool_basename" = "x$tool_specified"; then
10085          # A command without a complete path is provided, search $PATH.
10086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10087$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10088          # Extract the first word of "$tool_basename", so it can be a program name with args.
10089set dummy $tool_basename; ac_word=$2
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10091$as_echo_n "checking for $ac_word... " >&6; }
10092if ${ac_cv_path_SH+:} false; then :
10093  $as_echo_n "(cached) " >&6
10094else
10095  case $SH in
10096  [\\/]* | ?:[\\/]*)
10097  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10098  ;;
10099  *)
10100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10101for as_dir in $PATH
10102do
10103  IFS=$as_save_IFS
10104  test -z "$as_dir" && as_dir=.
10105    for ac_exec_ext in '' $ac_executable_extensions; do
10106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10107    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10109    break 2
10110  fi
10111done
10112  done
10113IFS=$as_save_IFS
10114
10115  ;;
10116esac
10117fi
10118SH=$ac_cv_path_SH
10119if test -n "$SH"; then
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10121$as_echo "$SH" >&6; }
10122else
10123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
10125fi
10126
10127
10128          if test "x$SH" = x; then
10129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10130          fi
10131        else
10132          # Otherwise we believe it is a complete path. Use it as it is.
10133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10134$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10136$as_echo_n "checking for SH... " >&6; }
10137          if test ! -x "$tool_specified"; then
10138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10139$as_echo "not found" >&6; }
10140            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10141          fi
10142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10143$as_echo "$tool_specified" >&6; }
10144        fi
10145      fi
10146    fi
10147
10148  fi
10149
10150
10151
10152  if test "x$SH" = x; then
10153    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10154  fi
10155
10156
10157
10158
10159
10160  # Publish this variable in the help.
10161
10162
10163  if [ -z "${SORT+x}" ]; then
10164    # The variable is not set by user, try to locate tool using the code snippet
10165    for ac_prog in sort
10166do
10167  # Extract the first word of "$ac_prog", so it can be a program name with args.
10168set dummy $ac_prog; ac_word=$2
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10170$as_echo_n "checking for $ac_word... " >&6; }
10171if ${ac_cv_path_SORT+:} false; then :
10172  $as_echo_n "(cached) " >&6
10173else
10174  case $SORT in
10175  [\\/]* | ?:[\\/]*)
10176  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10177  ;;
10178  *)
10179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10180for as_dir in $PATH
10181do
10182  IFS=$as_save_IFS
10183  test -z "$as_dir" && as_dir=.
10184    for ac_exec_ext in '' $ac_executable_extensions; do
10185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10186    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10188    break 2
10189  fi
10190done
10191  done
10192IFS=$as_save_IFS
10193
10194  ;;
10195esac
10196fi
10197SORT=$ac_cv_path_SORT
10198if test -n "$SORT"; then
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10200$as_echo "$SORT" >&6; }
10201else
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203$as_echo "no" >&6; }
10204fi
10205
10206
10207  test -n "$SORT" && break
10208done
10209
10210  else
10211    # The variable is set, but is it from the command line or the environment?
10212
10213    # Try to remove the string !SORT! from our list.
10214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10216      # If it failed, the variable was not from the command line. Ignore it,
10217      # but warn the user (except for BASH, which is always set by the calling BASH).
10218      if test "xSORT" != xBASH; then
10219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10220$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10221      fi
10222      # Try to locate tool using the code snippet
10223      for ac_prog in sort
10224do
10225  # Extract the first word of "$ac_prog", so it can be a program name with args.
10226set dummy $ac_prog; ac_word=$2
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10228$as_echo_n "checking for $ac_word... " >&6; }
10229if ${ac_cv_path_SORT+:} false; then :
10230  $as_echo_n "(cached) " >&6
10231else
10232  case $SORT in
10233  [\\/]* | ?:[\\/]*)
10234  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10235  ;;
10236  *)
10237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10238for as_dir in $PATH
10239do
10240  IFS=$as_save_IFS
10241  test -z "$as_dir" && as_dir=.
10242    for ac_exec_ext in '' $ac_executable_extensions; do
10243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10244    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10246    break 2
10247  fi
10248done
10249  done
10250IFS=$as_save_IFS
10251
10252  ;;
10253esac
10254fi
10255SORT=$ac_cv_path_SORT
10256if test -n "$SORT"; then
10257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10258$as_echo "$SORT" >&6; }
10259else
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10261$as_echo "no" >&6; }
10262fi
10263
10264
10265  test -n "$SORT" && break
10266done
10267
10268    else
10269      # If it succeeded, then it was overridden by the user. We will use it
10270      # for the tool.
10271
10272      # First remove it from the list of overridden variables, so we can test
10273      # for unknown variables in the end.
10274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10275
10276      # Check if we try to supply an empty value
10277      if test "x$SORT" = x; then
10278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10279$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10281$as_echo_n "checking for SORT... " >&6; }
10282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10283$as_echo "disabled" >&6; }
10284      else
10285        # Check if the provided tool contains a complete path.
10286        tool_specified="$SORT"
10287        tool_basename="${tool_specified##*/}"
10288        if test "x$tool_basename" = "x$tool_specified"; then
10289          # A command without a complete path is provided, search $PATH.
10290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10291$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10292          # Extract the first word of "$tool_basename", so it can be a program name with args.
10293set dummy $tool_basename; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_SORT+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $SORT in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322SORT=$ac_cv_path_SORT
10323if test -n "$SORT"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10325$as_echo "$SORT" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332          if test "x$SORT" = x; then
10333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10334          fi
10335        else
10336          # Otherwise we believe it is a complete path. Use it as it is.
10337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10338$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10340$as_echo_n "checking for SORT... " >&6; }
10341          if test ! -x "$tool_specified"; then
10342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10343$as_echo "not found" >&6; }
10344            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10345          fi
10346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10347$as_echo "$tool_specified" >&6; }
10348        fi
10349      fi
10350    fi
10351
10352  fi
10353
10354
10355
10356  if test "x$SORT" = x; then
10357    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10358  fi
10359
10360
10361
10362
10363
10364  # Publish this variable in the help.
10365
10366
10367  if [ -z "${TAIL+x}" ]; then
10368    # The variable is not set by user, try to locate tool using the code snippet
10369    for ac_prog in tail
10370do
10371  # Extract the first word of "$ac_prog", so it can be a program name with args.
10372set dummy $ac_prog; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
10375if ${ac_cv_path_TAIL+:} false; then :
10376  $as_echo_n "(cached) " >&6
10377else
10378  case $TAIL in
10379  [\\/]* | ?:[\\/]*)
10380  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10381  ;;
10382  *)
10383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386  IFS=$as_save_IFS
10387  test -z "$as_dir" && as_dir=.
10388    for ac_exec_ext in '' $ac_executable_extensions; do
10389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392    break 2
10393  fi
10394done
10395  done
10396IFS=$as_save_IFS
10397
10398  ;;
10399esac
10400fi
10401TAIL=$ac_cv_path_TAIL
10402if test -n "$TAIL"; then
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10404$as_echo "$TAIL" >&6; }
10405else
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
10408fi
10409
10410
10411  test -n "$TAIL" && break
10412done
10413
10414  else
10415    # The variable is set, but is it from the command line or the environment?
10416
10417    # Try to remove the string !TAIL! from our list.
10418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10420      # If it failed, the variable was not from the command line. Ignore it,
10421      # but warn the user (except for BASH, which is always set by the calling BASH).
10422      if test "xTAIL" != xBASH; then
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10424$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10425      fi
10426      # Try to locate tool using the code snippet
10427      for ac_prog in tail
10428do
10429  # Extract the first word of "$ac_prog", so it can be a program name with args.
10430set dummy $ac_prog; ac_word=$2
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432$as_echo_n "checking for $ac_word... " >&6; }
10433if ${ac_cv_path_TAIL+:} false; then :
10434  $as_echo_n "(cached) " >&6
10435else
10436  case $TAIL in
10437  [\\/]* | ?:[\\/]*)
10438  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10439  ;;
10440  *)
10441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442for as_dir in $PATH
10443do
10444  IFS=$as_save_IFS
10445  test -z "$as_dir" && as_dir=.
10446    for ac_exec_ext in '' $ac_executable_extensions; do
10447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10448    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10450    break 2
10451  fi
10452done
10453  done
10454IFS=$as_save_IFS
10455
10456  ;;
10457esac
10458fi
10459TAIL=$ac_cv_path_TAIL
10460if test -n "$TAIL"; then
10461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10462$as_echo "$TAIL" >&6; }
10463else
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466fi
10467
10468
10469  test -n "$TAIL" && break
10470done
10471
10472    else
10473      # If it succeeded, then it was overridden by the user. We will use it
10474      # for the tool.
10475
10476      # First remove it from the list of overridden variables, so we can test
10477      # for unknown variables in the end.
10478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10479
10480      # Check if we try to supply an empty value
10481      if test "x$TAIL" = x; then
10482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10483$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10485$as_echo_n "checking for TAIL... " >&6; }
10486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10487$as_echo "disabled" >&6; }
10488      else
10489        # Check if the provided tool contains a complete path.
10490        tool_specified="$TAIL"
10491        tool_basename="${tool_specified##*/}"
10492        if test "x$tool_basename" = "x$tool_specified"; then
10493          # A command without a complete path is provided, search $PATH.
10494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10495$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10496          # Extract the first word of "$tool_basename", so it can be a program name with args.
10497set dummy $tool_basename; ac_word=$2
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10499$as_echo_n "checking for $ac_word... " >&6; }
10500if ${ac_cv_path_TAIL+:} false; then :
10501  $as_echo_n "(cached) " >&6
10502else
10503  case $TAIL in
10504  [\\/]* | ?:[\\/]*)
10505  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10506  ;;
10507  *)
10508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10509for as_dir in $PATH
10510do
10511  IFS=$as_save_IFS
10512  test -z "$as_dir" && as_dir=.
10513    for ac_exec_ext in '' $ac_executable_extensions; do
10514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10515    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10517    break 2
10518  fi
10519done
10520  done
10521IFS=$as_save_IFS
10522
10523  ;;
10524esac
10525fi
10526TAIL=$ac_cv_path_TAIL
10527if test -n "$TAIL"; then
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10529$as_echo "$TAIL" >&6; }
10530else
10531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
10533fi
10534
10535
10536          if test "x$TAIL" = x; then
10537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10538          fi
10539        else
10540          # Otherwise we believe it is a complete path. Use it as it is.
10541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10542$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10544$as_echo_n "checking for TAIL... " >&6; }
10545          if test ! -x "$tool_specified"; then
10546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10547$as_echo "not found" >&6; }
10548            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10549          fi
10550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10551$as_echo "$tool_specified" >&6; }
10552        fi
10553      fi
10554    fi
10555
10556  fi
10557
10558
10559
10560  if test "x$TAIL" = x; then
10561    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10562  fi
10563
10564
10565
10566
10567
10568  # Publish this variable in the help.
10569
10570
10571  if [ -z "${TAR+x}" ]; then
10572    # The variable is not set by user, try to locate tool using the code snippet
10573    for ac_prog in tar
10574do
10575  # Extract the first word of "$ac_prog", so it can be a program name with args.
10576set dummy $ac_prog; ac_word=$2
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10578$as_echo_n "checking for $ac_word... " >&6; }
10579if ${ac_cv_path_TAR+:} false; then :
10580  $as_echo_n "(cached) " >&6
10581else
10582  case $TAR in
10583  [\\/]* | ?:[\\/]*)
10584  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10585  ;;
10586  *)
10587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10588for as_dir in $PATH
10589do
10590  IFS=$as_save_IFS
10591  test -z "$as_dir" && as_dir=.
10592    for ac_exec_ext in '' $ac_executable_extensions; do
10593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10594    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10596    break 2
10597  fi
10598done
10599  done
10600IFS=$as_save_IFS
10601
10602  ;;
10603esac
10604fi
10605TAR=$ac_cv_path_TAR
10606if test -n "$TAR"; then
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10608$as_echo "$TAR" >&6; }
10609else
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612fi
10613
10614
10615  test -n "$TAR" && break
10616done
10617
10618  else
10619    # The variable is set, but is it from the command line or the environment?
10620
10621    # Try to remove the string !TAR! from our list.
10622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10624      # If it failed, the variable was not from the command line. Ignore it,
10625      # but warn the user (except for BASH, which is always set by the calling BASH).
10626      if test "xTAR" != xBASH; then
10627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10628$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10629      fi
10630      # Try to locate tool using the code snippet
10631      for ac_prog in tar
10632do
10633  # Extract the first word of "$ac_prog", so it can be a program name with args.
10634set dummy $ac_prog; ac_word=$2
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636$as_echo_n "checking for $ac_word... " >&6; }
10637if ${ac_cv_path_TAR+:} false; then :
10638  $as_echo_n "(cached) " >&6
10639else
10640  case $TAR in
10641  [\\/]* | ?:[\\/]*)
10642  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10643  ;;
10644  *)
10645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646for as_dir in $PATH
10647do
10648  IFS=$as_save_IFS
10649  test -z "$as_dir" && as_dir=.
10650    for ac_exec_ext in '' $ac_executable_extensions; do
10651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654    break 2
10655  fi
10656done
10657  done
10658IFS=$as_save_IFS
10659
10660  ;;
10661esac
10662fi
10663TAR=$ac_cv_path_TAR
10664if test -n "$TAR"; then
10665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10666$as_echo "$TAR" >&6; }
10667else
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669$as_echo "no" >&6; }
10670fi
10671
10672
10673  test -n "$TAR" && break
10674done
10675
10676    else
10677      # If it succeeded, then it was overridden by the user. We will use it
10678      # for the tool.
10679
10680      # First remove it from the list of overridden variables, so we can test
10681      # for unknown variables in the end.
10682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10683
10684      # Check if we try to supply an empty value
10685      if test "x$TAR" = x; then
10686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10687$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10689$as_echo_n "checking for TAR... " >&6; }
10690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10691$as_echo "disabled" >&6; }
10692      else
10693        # Check if the provided tool contains a complete path.
10694        tool_specified="$TAR"
10695        tool_basename="${tool_specified##*/}"
10696        if test "x$tool_basename" = "x$tool_specified"; then
10697          # A command without a complete path is provided, search $PATH.
10698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10699$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10700          # Extract the first word of "$tool_basename", so it can be a program name with args.
10701set dummy $tool_basename; ac_word=$2
10702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10703$as_echo_n "checking for $ac_word... " >&6; }
10704if ${ac_cv_path_TAR+:} false; then :
10705  $as_echo_n "(cached) " >&6
10706else
10707  case $TAR in
10708  [\\/]* | ?:[\\/]*)
10709  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10710  ;;
10711  *)
10712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10713for as_dir in $PATH
10714do
10715  IFS=$as_save_IFS
10716  test -z "$as_dir" && as_dir=.
10717    for ac_exec_ext in '' $ac_executable_extensions; do
10718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10719    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10721    break 2
10722  fi
10723done
10724  done
10725IFS=$as_save_IFS
10726
10727  ;;
10728esac
10729fi
10730TAR=$ac_cv_path_TAR
10731if test -n "$TAR"; then
10732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10733$as_echo "$TAR" >&6; }
10734else
10735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10736$as_echo "no" >&6; }
10737fi
10738
10739
10740          if test "x$TAR" = x; then
10741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10742          fi
10743        else
10744          # Otherwise we believe it is a complete path. Use it as it is.
10745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10746$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10748$as_echo_n "checking for TAR... " >&6; }
10749          if test ! -x "$tool_specified"; then
10750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10751$as_echo "not found" >&6; }
10752            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10753          fi
10754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10755$as_echo "$tool_specified" >&6; }
10756        fi
10757      fi
10758    fi
10759
10760  fi
10761
10762
10763
10764  if test "x$TAR" = x; then
10765    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10766  fi
10767
10768
10769
10770
10771
10772  # Publish this variable in the help.
10773
10774
10775  if [ -z "${TEE+x}" ]; then
10776    # The variable is not set by user, try to locate tool using the code snippet
10777    for ac_prog in tee
10778do
10779  # Extract the first word of "$ac_prog", so it can be a program name with args.
10780set dummy $ac_prog; ac_word=$2
10781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10782$as_echo_n "checking for $ac_word... " >&6; }
10783if ${ac_cv_path_TEE+:} false; then :
10784  $as_echo_n "(cached) " >&6
10785else
10786  case $TEE in
10787  [\\/]* | ?:[\\/]*)
10788  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10789  ;;
10790  *)
10791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792for as_dir in $PATH
10793do
10794  IFS=$as_save_IFS
10795  test -z "$as_dir" && as_dir=.
10796    for ac_exec_ext in '' $ac_executable_extensions; do
10797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10798    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10800    break 2
10801  fi
10802done
10803  done
10804IFS=$as_save_IFS
10805
10806  ;;
10807esac
10808fi
10809TEE=$ac_cv_path_TEE
10810if test -n "$TEE"; then
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10812$as_echo "$TEE" >&6; }
10813else
10814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816fi
10817
10818
10819  test -n "$TEE" && break
10820done
10821
10822  else
10823    # The variable is set, but is it from the command line or the environment?
10824
10825    # Try to remove the string !TEE! from our list.
10826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10828      # If it failed, the variable was not from the command line. Ignore it,
10829      # but warn the user (except for BASH, which is always set by the calling BASH).
10830      if test "xTEE" != xBASH; then
10831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10832$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10833      fi
10834      # Try to locate tool using the code snippet
10835      for ac_prog in tee
10836do
10837  # Extract the first word of "$ac_prog", so it can be a program name with args.
10838set dummy $ac_prog; ac_word=$2
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10840$as_echo_n "checking for $ac_word... " >&6; }
10841if ${ac_cv_path_TEE+:} false; then :
10842  $as_echo_n "(cached) " >&6
10843else
10844  case $TEE in
10845  [\\/]* | ?:[\\/]*)
10846  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10847  ;;
10848  *)
10849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10850for as_dir in $PATH
10851do
10852  IFS=$as_save_IFS
10853  test -z "$as_dir" && as_dir=.
10854    for ac_exec_ext in '' $ac_executable_extensions; do
10855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10856    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10858    break 2
10859  fi
10860done
10861  done
10862IFS=$as_save_IFS
10863
10864  ;;
10865esac
10866fi
10867TEE=$ac_cv_path_TEE
10868if test -n "$TEE"; then
10869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10870$as_echo "$TEE" >&6; }
10871else
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10873$as_echo "no" >&6; }
10874fi
10875
10876
10877  test -n "$TEE" && break
10878done
10879
10880    else
10881      # If it succeeded, then it was overridden by the user. We will use it
10882      # for the tool.
10883
10884      # First remove it from the list of overridden variables, so we can test
10885      # for unknown variables in the end.
10886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10887
10888      # Check if we try to supply an empty value
10889      if test "x$TEE" = x; then
10890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10891$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10893$as_echo_n "checking for TEE... " >&6; }
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10895$as_echo "disabled" >&6; }
10896      else
10897        # Check if the provided tool contains a complete path.
10898        tool_specified="$TEE"
10899        tool_basename="${tool_specified##*/}"
10900        if test "x$tool_basename" = "x$tool_specified"; then
10901          # A command without a complete path is provided, search $PATH.
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10903$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10904          # Extract the first word of "$tool_basename", so it can be a program name with args.
10905set dummy $tool_basename; ac_word=$2
10906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10907$as_echo_n "checking for $ac_word... " >&6; }
10908if ${ac_cv_path_TEE+:} false; then :
10909  $as_echo_n "(cached) " >&6
10910else
10911  case $TEE in
10912  [\\/]* | ?:[\\/]*)
10913  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10914  ;;
10915  *)
10916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10917for as_dir in $PATH
10918do
10919  IFS=$as_save_IFS
10920  test -z "$as_dir" && as_dir=.
10921    for ac_exec_ext in '' $ac_executable_extensions; do
10922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10923    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10925    break 2
10926  fi
10927done
10928  done
10929IFS=$as_save_IFS
10930
10931  ;;
10932esac
10933fi
10934TEE=$ac_cv_path_TEE
10935if test -n "$TEE"; then
10936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10937$as_echo "$TEE" >&6; }
10938else
10939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10940$as_echo "no" >&6; }
10941fi
10942
10943
10944          if test "x$TEE" = x; then
10945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10946          fi
10947        else
10948          # Otherwise we believe it is a complete path. Use it as it is.
10949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10950$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10952$as_echo_n "checking for TEE... " >&6; }
10953          if test ! -x "$tool_specified"; then
10954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10955$as_echo "not found" >&6; }
10956            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10957          fi
10958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10959$as_echo "$tool_specified" >&6; }
10960        fi
10961      fi
10962    fi
10963
10964  fi
10965
10966
10967
10968  if test "x$TEE" = x; then
10969    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10970  fi
10971
10972
10973
10974
10975
10976  # Publish this variable in the help.
10977
10978
10979  if [ -z "${TOUCH+x}" ]; then
10980    # The variable is not set by user, try to locate tool using the code snippet
10981    for ac_prog in touch
10982do
10983  # Extract the first word of "$ac_prog", so it can be a program name with args.
10984set dummy $ac_prog; ac_word=$2
10985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10986$as_echo_n "checking for $ac_word... " >&6; }
10987if ${ac_cv_path_TOUCH+:} false; then :
10988  $as_echo_n "(cached) " >&6
10989else
10990  case $TOUCH in
10991  [\\/]* | ?:[\\/]*)
10992  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10993  ;;
10994  *)
10995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10996for as_dir in $PATH
10997do
10998  IFS=$as_save_IFS
10999  test -z "$as_dir" && as_dir=.
11000    for ac_exec_ext in '' $ac_executable_extensions; do
11001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11002    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11004    break 2
11005  fi
11006done
11007  done
11008IFS=$as_save_IFS
11009
11010  ;;
11011esac
11012fi
11013TOUCH=$ac_cv_path_TOUCH
11014if test -n "$TOUCH"; then
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11016$as_echo "$TOUCH" >&6; }
11017else
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
11020fi
11021
11022
11023  test -n "$TOUCH" && break
11024done
11025
11026  else
11027    # The variable is set, but is it from the command line or the environment?
11028
11029    # Try to remove the string !TOUCH! from our list.
11030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11032      # If it failed, the variable was not from the command line. Ignore it,
11033      # but warn the user (except for BASH, which is always set by the calling BASH).
11034      if test "xTOUCH" != xBASH; then
11035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11036$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11037      fi
11038      # Try to locate tool using the code snippet
11039      for ac_prog in touch
11040do
11041  # Extract the first word of "$ac_prog", so it can be a program name with args.
11042set dummy $ac_prog; ac_word=$2
11043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11044$as_echo_n "checking for $ac_word... " >&6; }
11045if ${ac_cv_path_TOUCH+:} false; then :
11046  $as_echo_n "(cached) " >&6
11047else
11048  case $TOUCH in
11049  [\\/]* | ?:[\\/]*)
11050  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11051  ;;
11052  *)
11053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11054for as_dir in $PATH
11055do
11056  IFS=$as_save_IFS
11057  test -z "$as_dir" && as_dir=.
11058    for ac_exec_ext in '' $ac_executable_extensions; do
11059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11060    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11062    break 2
11063  fi
11064done
11065  done
11066IFS=$as_save_IFS
11067
11068  ;;
11069esac
11070fi
11071TOUCH=$ac_cv_path_TOUCH
11072if test -n "$TOUCH"; then
11073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11074$as_echo "$TOUCH" >&6; }
11075else
11076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11077$as_echo "no" >&6; }
11078fi
11079
11080
11081  test -n "$TOUCH" && break
11082done
11083
11084    else
11085      # If it succeeded, then it was overridden by the user. We will use it
11086      # for the tool.
11087
11088      # First remove it from the list of overridden variables, so we can test
11089      # for unknown variables in the end.
11090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11091
11092      # Check if we try to supply an empty value
11093      if test "x$TOUCH" = x; then
11094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11095$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11097$as_echo_n "checking for TOUCH... " >&6; }
11098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11099$as_echo "disabled" >&6; }
11100      else
11101        # Check if the provided tool contains a complete path.
11102        tool_specified="$TOUCH"
11103        tool_basename="${tool_specified##*/}"
11104        if test "x$tool_basename" = "x$tool_specified"; then
11105          # A command without a complete path is provided, search $PATH.
11106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11107$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11108          # Extract the first word of "$tool_basename", so it can be a program name with args.
11109set dummy $tool_basename; ac_word=$2
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11111$as_echo_n "checking for $ac_word... " >&6; }
11112if ${ac_cv_path_TOUCH+:} false; then :
11113  $as_echo_n "(cached) " >&6
11114else
11115  case $TOUCH in
11116  [\\/]* | ?:[\\/]*)
11117  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11118  ;;
11119  *)
11120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11121for as_dir in $PATH
11122do
11123  IFS=$as_save_IFS
11124  test -z "$as_dir" && as_dir=.
11125    for ac_exec_ext in '' $ac_executable_extensions; do
11126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11127    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11129    break 2
11130  fi
11131done
11132  done
11133IFS=$as_save_IFS
11134
11135  ;;
11136esac
11137fi
11138TOUCH=$ac_cv_path_TOUCH
11139if test -n "$TOUCH"; then
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11141$as_echo "$TOUCH" >&6; }
11142else
11143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11144$as_echo "no" >&6; }
11145fi
11146
11147
11148          if test "x$TOUCH" = x; then
11149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11150          fi
11151        else
11152          # Otherwise we believe it is a complete path. Use it as it is.
11153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11154$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11156$as_echo_n "checking for TOUCH... " >&6; }
11157          if test ! -x "$tool_specified"; then
11158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11159$as_echo "not found" >&6; }
11160            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11161          fi
11162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11163$as_echo "$tool_specified" >&6; }
11164        fi
11165      fi
11166    fi
11167
11168  fi
11169
11170
11171
11172  if test "x$TOUCH" = x; then
11173    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11174  fi
11175
11176
11177
11178
11179
11180  # Publish this variable in the help.
11181
11182
11183  if [ -z "${TR+x}" ]; then
11184    # The variable is not set by user, try to locate tool using the code snippet
11185    for ac_prog in tr
11186do
11187  # Extract the first word of "$ac_prog", so it can be a program name with args.
11188set dummy $ac_prog; ac_word=$2
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190$as_echo_n "checking for $ac_word... " >&6; }
11191if ${ac_cv_path_TR+:} false; then :
11192  $as_echo_n "(cached) " >&6
11193else
11194  case $TR in
11195  [\\/]* | ?:[\\/]*)
11196  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11197  ;;
11198  *)
11199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200for as_dir in $PATH
11201do
11202  IFS=$as_save_IFS
11203  test -z "$as_dir" && as_dir=.
11204    for ac_exec_ext in '' $ac_executable_extensions; do
11205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208    break 2
11209  fi
11210done
11211  done
11212IFS=$as_save_IFS
11213
11214  ;;
11215esac
11216fi
11217TR=$ac_cv_path_TR
11218if test -n "$TR"; then
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11220$as_echo "$TR" >&6; }
11221else
11222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
11224fi
11225
11226
11227  test -n "$TR" && break
11228done
11229
11230  else
11231    # The variable is set, but is it from the command line or the environment?
11232
11233    # Try to remove the string !TR! from our list.
11234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11236      # If it failed, the variable was not from the command line. Ignore it,
11237      # but warn the user (except for BASH, which is always set by the calling BASH).
11238      if test "xTR" != xBASH; then
11239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11240$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11241      fi
11242      # Try to locate tool using the code snippet
11243      for ac_prog in tr
11244do
11245  # Extract the first word of "$ac_prog", so it can be a program name with args.
11246set dummy $ac_prog; ac_word=$2
11247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11248$as_echo_n "checking for $ac_word... " >&6; }
11249if ${ac_cv_path_TR+:} false; then :
11250  $as_echo_n "(cached) " >&6
11251else
11252  case $TR in
11253  [\\/]* | ?:[\\/]*)
11254  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11255  ;;
11256  *)
11257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11258for as_dir in $PATH
11259do
11260  IFS=$as_save_IFS
11261  test -z "$as_dir" && as_dir=.
11262    for ac_exec_ext in '' $ac_executable_extensions; do
11263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11264    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11266    break 2
11267  fi
11268done
11269  done
11270IFS=$as_save_IFS
11271
11272  ;;
11273esac
11274fi
11275TR=$ac_cv_path_TR
11276if test -n "$TR"; then
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11278$as_echo "$TR" >&6; }
11279else
11280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281$as_echo "no" >&6; }
11282fi
11283
11284
11285  test -n "$TR" && break
11286done
11287
11288    else
11289      # If it succeeded, then it was overridden by the user. We will use it
11290      # for the tool.
11291
11292      # First remove it from the list of overridden variables, so we can test
11293      # for unknown variables in the end.
11294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11295
11296      # Check if we try to supply an empty value
11297      if test "x$TR" = x; then
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11299$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11301$as_echo_n "checking for TR... " >&6; }
11302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11303$as_echo "disabled" >&6; }
11304      else
11305        # Check if the provided tool contains a complete path.
11306        tool_specified="$TR"
11307        tool_basename="${tool_specified##*/}"
11308        if test "x$tool_basename" = "x$tool_specified"; then
11309          # A command without a complete path is provided, search $PATH.
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11311$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11312          # Extract the first word of "$tool_basename", so it can be a program name with args.
11313set dummy $tool_basename; ac_word=$2
11314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11315$as_echo_n "checking for $ac_word... " >&6; }
11316if ${ac_cv_path_TR+:} false; then :
11317  $as_echo_n "(cached) " >&6
11318else
11319  case $TR in
11320  [\\/]* | ?:[\\/]*)
11321  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11322  ;;
11323  *)
11324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11325for as_dir in $PATH
11326do
11327  IFS=$as_save_IFS
11328  test -z "$as_dir" && as_dir=.
11329    for ac_exec_ext in '' $ac_executable_extensions; do
11330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11331    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11333    break 2
11334  fi
11335done
11336  done
11337IFS=$as_save_IFS
11338
11339  ;;
11340esac
11341fi
11342TR=$ac_cv_path_TR
11343if test -n "$TR"; then
11344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11345$as_echo "$TR" >&6; }
11346else
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11348$as_echo "no" >&6; }
11349fi
11350
11351
11352          if test "x$TR" = x; then
11353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11354          fi
11355        else
11356          # Otherwise we believe it is a complete path. Use it as it is.
11357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11358$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11360$as_echo_n "checking for TR... " >&6; }
11361          if test ! -x "$tool_specified"; then
11362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11363$as_echo "not found" >&6; }
11364            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11365          fi
11366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11367$as_echo "$tool_specified" >&6; }
11368        fi
11369      fi
11370    fi
11371
11372  fi
11373
11374
11375
11376  if test "x$TR" = x; then
11377    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11378  fi
11379
11380
11381
11382
11383
11384  # Publish this variable in the help.
11385
11386
11387  if [ -z "${UNAME+x}" ]; then
11388    # The variable is not set by user, try to locate tool using the code snippet
11389    for ac_prog in uname
11390do
11391  # Extract the first word of "$ac_prog", so it can be a program name with args.
11392set dummy $ac_prog; ac_word=$2
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11394$as_echo_n "checking for $ac_word... " >&6; }
11395if ${ac_cv_path_UNAME+:} false; then :
11396  $as_echo_n "(cached) " >&6
11397else
11398  case $UNAME in
11399  [\\/]* | ?:[\\/]*)
11400  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11401  ;;
11402  *)
11403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11404for as_dir in $PATH
11405do
11406  IFS=$as_save_IFS
11407  test -z "$as_dir" && as_dir=.
11408    for ac_exec_ext in '' $ac_executable_extensions; do
11409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11410    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11412    break 2
11413  fi
11414done
11415  done
11416IFS=$as_save_IFS
11417
11418  ;;
11419esac
11420fi
11421UNAME=$ac_cv_path_UNAME
11422if test -n "$UNAME"; then
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11424$as_echo "$UNAME" >&6; }
11425else
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428fi
11429
11430
11431  test -n "$UNAME" && break
11432done
11433
11434  else
11435    # The variable is set, but is it from the command line or the environment?
11436
11437    # Try to remove the string !UNAME! from our list.
11438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11440      # If it failed, the variable was not from the command line. Ignore it,
11441      # but warn the user (except for BASH, which is always set by the calling BASH).
11442      if test "xUNAME" != xBASH; then
11443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11444$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11445      fi
11446      # Try to locate tool using the code snippet
11447      for ac_prog in uname
11448do
11449  # Extract the first word of "$ac_prog", so it can be a program name with args.
11450set dummy $ac_prog; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_path_UNAME+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  case $UNAME in
11457  [\\/]* | ?:[\\/]*)
11458  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11459  ;;
11460  *)
11461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476  ;;
11477esac
11478fi
11479UNAME=$ac_cv_path_UNAME
11480if test -n "$UNAME"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11482$as_echo "$UNAME" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489  test -n "$UNAME" && break
11490done
11491
11492    else
11493      # If it succeeded, then it was overridden by the user. We will use it
11494      # for the tool.
11495
11496      # First remove it from the list of overridden variables, so we can test
11497      # for unknown variables in the end.
11498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11499
11500      # Check if we try to supply an empty value
11501      if test "x$UNAME" = x; then
11502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11503$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11505$as_echo_n "checking for UNAME... " >&6; }
11506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11507$as_echo "disabled" >&6; }
11508      else
11509        # Check if the provided tool contains a complete path.
11510        tool_specified="$UNAME"
11511        tool_basename="${tool_specified##*/}"
11512        if test "x$tool_basename" = "x$tool_specified"; then
11513          # A command without a complete path is provided, search $PATH.
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11515$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11516          # Extract the first word of "$tool_basename", so it can be a program name with args.
11517set dummy $tool_basename; ac_word=$2
11518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11519$as_echo_n "checking for $ac_word... " >&6; }
11520if ${ac_cv_path_UNAME+:} false; then :
11521  $as_echo_n "(cached) " >&6
11522else
11523  case $UNAME in
11524  [\\/]* | ?:[\\/]*)
11525  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11526  ;;
11527  *)
11528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529for as_dir in $PATH
11530do
11531  IFS=$as_save_IFS
11532  test -z "$as_dir" && as_dir=.
11533    for ac_exec_ext in '' $ac_executable_extensions; do
11534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11535    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11537    break 2
11538  fi
11539done
11540  done
11541IFS=$as_save_IFS
11542
11543  ;;
11544esac
11545fi
11546UNAME=$ac_cv_path_UNAME
11547if test -n "$UNAME"; then
11548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11549$as_echo "$UNAME" >&6; }
11550else
11551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553fi
11554
11555
11556          if test "x$UNAME" = x; then
11557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11558          fi
11559        else
11560          # Otherwise we believe it is a complete path. Use it as it is.
11561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11562$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11564$as_echo_n "checking for UNAME... " >&6; }
11565          if test ! -x "$tool_specified"; then
11566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11567$as_echo "not found" >&6; }
11568            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11569          fi
11570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11571$as_echo "$tool_specified" >&6; }
11572        fi
11573      fi
11574    fi
11575
11576  fi
11577
11578
11579
11580  if test "x$UNAME" = x; then
11581    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11582  fi
11583
11584
11585
11586
11587
11588  # Publish this variable in the help.
11589
11590
11591  if [ -z "${UNIQ+x}" ]; then
11592    # The variable is not set by user, try to locate tool using the code snippet
11593    for ac_prog in uniq
11594do
11595  # Extract the first word of "$ac_prog", so it can be a program name with args.
11596set dummy $ac_prog; ac_word=$2
11597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11598$as_echo_n "checking for $ac_word... " >&6; }
11599if ${ac_cv_path_UNIQ+:} false; then :
11600  $as_echo_n "(cached) " >&6
11601else
11602  case $UNIQ in
11603  [\\/]* | ?:[\\/]*)
11604  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11605  ;;
11606  *)
11607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11608for as_dir in $PATH
11609do
11610  IFS=$as_save_IFS
11611  test -z "$as_dir" && as_dir=.
11612    for ac_exec_ext in '' $ac_executable_extensions; do
11613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11614    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11616    break 2
11617  fi
11618done
11619  done
11620IFS=$as_save_IFS
11621
11622  ;;
11623esac
11624fi
11625UNIQ=$ac_cv_path_UNIQ
11626if test -n "$UNIQ"; then
11627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11628$as_echo "$UNIQ" >&6; }
11629else
11630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11631$as_echo "no" >&6; }
11632fi
11633
11634
11635  test -n "$UNIQ" && break
11636done
11637
11638  else
11639    # The variable is set, but is it from the command line or the environment?
11640
11641    # Try to remove the string !UNIQ! from our list.
11642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11644      # If it failed, the variable was not from the command line. Ignore it,
11645      # but warn the user (except for BASH, which is always set by the calling BASH).
11646      if test "xUNIQ" != xBASH; then
11647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11648$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11649      fi
11650      # Try to locate tool using the code snippet
11651      for ac_prog in uniq
11652do
11653  # Extract the first word of "$ac_prog", so it can be a program name with args.
11654set dummy $ac_prog; ac_word=$2
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11656$as_echo_n "checking for $ac_word... " >&6; }
11657if ${ac_cv_path_UNIQ+:} false; then :
11658  $as_echo_n "(cached) " >&6
11659else
11660  case $UNIQ in
11661  [\\/]* | ?:[\\/]*)
11662  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11663  ;;
11664  *)
11665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11666for as_dir in $PATH
11667do
11668  IFS=$as_save_IFS
11669  test -z "$as_dir" && as_dir=.
11670    for ac_exec_ext in '' $ac_executable_extensions; do
11671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11672    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11674    break 2
11675  fi
11676done
11677  done
11678IFS=$as_save_IFS
11679
11680  ;;
11681esac
11682fi
11683UNIQ=$ac_cv_path_UNIQ
11684if test -n "$UNIQ"; then
11685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11686$as_echo "$UNIQ" >&6; }
11687else
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
11690fi
11691
11692
11693  test -n "$UNIQ" && break
11694done
11695
11696    else
11697      # If it succeeded, then it was overridden by the user. We will use it
11698      # for the tool.
11699
11700      # First remove it from the list of overridden variables, so we can test
11701      # for unknown variables in the end.
11702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11703
11704      # Check if we try to supply an empty value
11705      if test "x$UNIQ" = x; then
11706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11707$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11709$as_echo_n "checking for UNIQ... " >&6; }
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11711$as_echo "disabled" >&6; }
11712      else
11713        # Check if the provided tool contains a complete path.
11714        tool_specified="$UNIQ"
11715        tool_basename="${tool_specified##*/}"
11716        if test "x$tool_basename" = "x$tool_specified"; then
11717          # A command without a complete path is provided, search $PATH.
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11719$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11720          # Extract the first word of "$tool_basename", so it can be a program name with args.
11721set dummy $tool_basename; ac_word=$2
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11723$as_echo_n "checking for $ac_word... " >&6; }
11724if ${ac_cv_path_UNIQ+:} false; then :
11725  $as_echo_n "(cached) " >&6
11726else
11727  case $UNIQ in
11728  [\\/]* | ?:[\\/]*)
11729  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11730  ;;
11731  *)
11732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11733for as_dir in $PATH
11734do
11735  IFS=$as_save_IFS
11736  test -z "$as_dir" && as_dir=.
11737    for ac_exec_ext in '' $ac_executable_extensions; do
11738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11739    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11741    break 2
11742  fi
11743done
11744  done
11745IFS=$as_save_IFS
11746
11747  ;;
11748esac
11749fi
11750UNIQ=$ac_cv_path_UNIQ
11751if test -n "$UNIQ"; then
11752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11753$as_echo "$UNIQ" >&6; }
11754else
11755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11756$as_echo "no" >&6; }
11757fi
11758
11759
11760          if test "x$UNIQ" = x; then
11761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11762          fi
11763        else
11764          # Otherwise we believe it is a complete path. Use it as it is.
11765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11766$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11768$as_echo_n "checking for UNIQ... " >&6; }
11769          if test ! -x "$tool_specified"; then
11770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11771$as_echo "not found" >&6; }
11772            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11773          fi
11774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11775$as_echo "$tool_specified" >&6; }
11776        fi
11777      fi
11778    fi
11779
11780  fi
11781
11782
11783
11784  if test "x$UNIQ" = x; then
11785    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11786  fi
11787
11788
11789
11790
11791
11792  # Publish this variable in the help.
11793
11794
11795  if [ -z "${WC+x}" ]; then
11796    # The variable is not set by user, try to locate tool using the code snippet
11797    for ac_prog in wc
11798do
11799  # Extract the first word of "$ac_prog", so it can be a program name with args.
11800set dummy $ac_prog; ac_word=$2
11801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11802$as_echo_n "checking for $ac_word... " >&6; }
11803if ${ac_cv_path_WC+:} false; then :
11804  $as_echo_n "(cached) " >&6
11805else
11806  case $WC in
11807  [\\/]* | ?:[\\/]*)
11808  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11809  ;;
11810  *)
11811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11812for as_dir in $PATH
11813do
11814  IFS=$as_save_IFS
11815  test -z "$as_dir" && as_dir=.
11816    for ac_exec_ext in '' $ac_executable_extensions; do
11817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11818    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11820    break 2
11821  fi
11822done
11823  done
11824IFS=$as_save_IFS
11825
11826  ;;
11827esac
11828fi
11829WC=$ac_cv_path_WC
11830if test -n "$WC"; then
11831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11832$as_echo "$WC" >&6; }
11833else
11834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
11836fi
11837
11838
11839  test -n "$WC" && break
11840done
11841
11842  else
11843    # The variable is set, but is it from the command line or the environment?
11844
11845    # Try to remove the string !WC! from our list.
11846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11848      # If it failed, the variable was not from the command line. Ignore it,
11849      # but warn the user (except for BASH, which is always set by the calling BASH).
11850      if test "xWC" != xBASH; then
11851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11852$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11853      fi
11854      # Try to locate tool using the code snippet
11855      for ac_prog in wc
11856do
11857  # Extract the first word of "$ac_prog", so it can be a program name with args.
11858set dummy $ac_prog; ac_word=$2
11859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11860$as_echo_n "checking for $ac_word... " >&6; }
11861if ${ac_cv_path_WC+:} false; then :
11862  $as_echo_n "(cached) " >&6
11863else
11864  case $WC in
11865  [\\/]* | ?:[\\/]*)
11866  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11867  ;;
11868  *)
11869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11870for as_dir in $PATH
11871do
11872  IFS=$as_save_IFS
11873  test -z "$as_dir" && as_dir=.
11874    for ac_exec_ext in '' $ac_executable_extensions; do
11875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11876    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11878    break 2
11879  fi
11880done
11881  done
11882IFS=$as_save_IFS
11883
11884  ;;
11885esac
11886fi
11887WC=$ac_cv_path_WC
11888if test -n "$WC"; then
11889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11890$as_echo "$WC" >&6; }
11891else
11892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11893$as_echo "no" >&6; }
11894fi
11895
11896
11897  test -n "$WC" && break
11898done
11899
11900    else
11901      # If it succeeded, then it was overridden by the user. We will use it
11902      # for the tool.
11903
11904      # First remove it from the list of overridden variables, so we can test
11905      # for unknown variables in the end.
11906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11907
11908      # Check if we try to supply an empty value
11909      if test "x$WC" = x; then
11910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11911$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11913$as_echo_n "checking for WC... " >&6; }
11914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11915$as_echo "disabled" >&6; }
11916      else
11917        # Check if the provided tool contains a complete path.
11918        tool_specified="$WC"
11919        tool_basename="${tool_specified##*/}"
11920        if test "x$tool_basename" = "x$tool_specified"; then
11921          # A command without a complete path is provided, search $PATH.
11922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11923$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11924          # Extract the first word of "$tool_basename", so it can be a program name with args.
11925set dummy $tool_basename; ac_word=$2
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11927$as_echo_n "checking for $ac_word... " >&6; }
11928if ${ac_cv_path_WC+:} false; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  case $WC in
11932  [\\/]* | ?:[\\/]*)
11933  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11934  ;;
11935  *)
11936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11937for as_dir in $PATH
11938do
11939  IFS=$as_save_IFS
11940  test -z "$as_dir" && as_dir=.
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11943    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11945    break 2
11946  fi
11947done
11948  done
11949IFS=$as_save_IFS
11950
11951  ;;
11952esac
11953fi
11954WC=$ac_cv_path_WC
11955if test -n "$WC"; then
11956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11957$as_echo "$WC" >&6; }
11958else
11959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11960$as_echo "no" >&6; }
11961fi
11962
11963
11964          if test "x$WC" = x; then
11965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11966          fi
11967        else
11968          # Otherwise we believe it is a complete path. Use it as it is.
11969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11970$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11972$as_echo_n "checking for WC... " >&6; }
11973          if test ! -x "$tool_specified"; then
11974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11975$as_echo "not found" >&6; }
11976            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11977          fi
11978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11979$as_echo "$tool_specified" >&6; }
11980        fi
11981      fi
11982    fi
11983
11984  fi
11985
11986
11987
11988  if test "x$WC" = x; then
11989    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11990  fi
11991
11992
11993
11994
11995
11996  # Publish this variable in the help.
11997
11998
11999  if [ -z "${WHICH+x}" ]; then
12000    # The variable is not set by user, try to locate tool using the code snippet
12001    for ac_prog in which
12002do
12003  # Extract the first word of "$ac_prog", so it can be a program name with args.
12004set dummy $ac_prog; ac_word=$2
12005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12006$as_echo_n "checking for $ac_word... " >&6; }
12007if ${ac_cv_path_WHICH+:} false; then :
12008  $as_echo_n "(cached) " >&6
12009else
12010  case $WHICH in
12011  [\\/]* | ?:[\\/]*)
12012  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12013  ;;
12014  *)
12015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12016for as_dir in $PATH
12017do
12018  IFS=$as_save_IFS
12019  test -z "$as_dir" && as_dir=.
12020    for ac_exec_ext in '' $ac_executable_extensions; do
12021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12022    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12024    break 2
12025  fi
12026done
12027  done
12028IFS=$as_save_IFS
12029
12030  ;;
12031esac
12032fi
12033WHICH=$ac_cv_path_WHICH
12034if test -n "$WHICH"; then
12035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12036$as_echo "$WHICH" >&6; }
12037else
12038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12039$as_echo "no" >&6; }
12040fi
12041
12042
12043  test -n "$WHICH" && break
12044done
12045
12046  else
12047    # The variable is set, but is it from the command line or the environment?
12048
12049    # Try to remove the string !WHICH! from our list.
12050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12052      # If it failed, the variable was not from the command line. Ignore it,
12053      # but warn the user (except for BASH, which is always set by the calling BASH).
12054      if test "xWHICH" != xBASH; then
12055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12056$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12057      fi
12058      # Try to locate tool using the code snippet
12059      for ac_prog in which
12060do
12061  # Extract the first word of "$ac_prog", so it can be a program name with args.
12062set dummy $ac_prog; ac_word=$2
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12064$as_echo_n "checking for $ac_word... " >&6; }
12065if ${ac_cv_path_WHICH+:} false; then :
12066  $as_echo_n "(cached) " >&6
12067else
12068  case $WHICH in
12069  [\\/]* | ?:[\\/]*)
12070  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12071  ;;
12072  *)
12073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12074for as_dir in $PATH
12075do
12076  IFS=$as_save_IFS
12077  test -z "$as_dir" && as_dir=.
12078    for ac_exec_ext in '' $ac_executable_extensions; do
12079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12080    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12082    break 2
12083  fi
12084done
12085  done
12086IFS=$as_save_IFS
12087
12088  ;;
12089esac
12090fi
12091WHICH=$ac_cv_path_WHICH
12092if test -n "$WHICH"; then
12093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12094$as_echo "$WHICH" >&6; }
12095else
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
12098fi
12099
12100
12101  test -n "$WHICH" && break
12102done
12103
12104    else
12105      # If it succeeded, then it was overridden by the user. We will use it
12106      # for the tool.
12107
12108      # First remove it from the list of overridden variables, so we can test
12109      # for unknown variables in the end.
12110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12111
12112      # Check if we try to supply an empty value
12113      if test "x$WHICH" = x; then
12114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12115$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12117$as_echo_n "checking for WHICH... " >&6; }
12118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12119$as_echo "disabled" >&6; }
12120      else
12121        # Check if the provided tool contains a complete path.
12122        tool_specified="$WHICH"
12123        tool_basename="${tool_specified##*/}"
12124        if test "x$tool_basename" = "x$tool_specified"; then
12125          # A command without a complete path is provided, search $PATH.
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12127$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12128          # Extract the first word of "$tool_basename", so it can be a program name with args.
12129set dummy $tool_basename; ac_word=$2
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12131$as_echo_n "checking for $ac_word... " >&6; }
12132if ${ac_cv_path_WHICH+:} false; then :
12133  $as_echo_n "(cached) " >&6
12134else
12135  case $WHICH in
12136  [\\/]* | ?:[\\/]*)
12137  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12138  ;;
12139  *)
12140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12141for as_dir in $PATH
12142do
12143  IFS=$as_save_IFS
12144  test -z "$as_dir" && as_dir=.
12145    for ac_exec_ext in '' $ac_executable_extensions; do
12146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12147    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12149    break 2
12150  fi
12151done
12152  done
12153IFS=$as_save_IFS
12154
12155  ;;
12156esac
12157fi
12158WHICH=$ac_cv_path_WHICH
12159if test -n "$WHICH"; then
12160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12161$as_echo "$WHICH" >&6; }
12162else
12163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12164$as_echo "no" >&6; }
12165fi
12166
12167
12168          if test "x$WHICH" = x; then
12169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12170          fi
12171        else
12172          # Otherwise we believe it is a complete path. Use it as it is.
12173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12174$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12176$as_echo_n "checking for WHICH... " >&6; }
12177          if test ! -x "$tool_specified"; then
12178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12179$as_echo "not found" >&6; }
12180            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12181          fi
12182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12183$as_echo "$tool_specified" >&6; }
12184        fi
12185      fi
12186    fi
12187
12188  fi
12189
12190
12191
12192  if test "x$WHICH" = x; then
12193    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12194  fi
12195
12196
12197
12198
12199
12200  # Publish this variable in the help.
12201
12202
12203  if [ -z "${XARGS+x}" ]; then
12204    # The variable is not set by user, try to locate tool using the code snippet
12205    for ac_prog in xargs
12206do
12207  # Extract the first word of "$ac_prog", so it can be a program name with args.
12208set dummy $ac_prog; ac_word=$2
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12210$as_echo_n "checking for $ac_word... " >&6; }
12211if ${ac_cv_path_XARGS+:} false; then :
12212  $as_echo_n "(cached) " >&6
12213else
12214  case $XARGS in
12215  [\\/]* | ?:[\\/]*)
12216  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12217  ;;
12218  *)
12219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12220for as_dir in $PATH
12221do
12222  IFS=$as_save_IFS
12223  test -z "$as_dir" && as_dir=.
12224    for ac_exec_ext in '' $ac_executable_extensions; do
12225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12226    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12228    break 2
12229  fi
12230done
12231  done
12232IFS=$as_save_IFS
12233
12234  ;;
12235esac
12236fi
12237XARGS=$ac_cv_path_XARGS
12238if test -n "$XARGS"; then
12239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12240$as_echo "$XARGS" >&6; }
12241else
12242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243$as_echo "no" >&6; }
12244fi
12245
12246
12247  test -n "$XARGS" && break
12248done
12249
12250  else
12251    # The variable is set, but is it from the command line or the environment?
12252
12253    # Try to remove the string !XARGS! from our list.
12254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12256      # If it failed, the variable was not from the command line. Ignore it,
12257      # but warn the user (except for BASH, which is always set by the calling BASH).
12258      if test "xXARGS" != xBASH; then
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12260$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12261      fi
12262      # Try to locate tool using the code snippet
12263      for ac_prog in xargs
12264do
12265  # Extract the first word of "$ac_prog", so it can be a program name with args.
12266set dummy $ac_prog; ac_word=$2
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12268$as_echo_n "checking for $ac_word... " >&6; }
12269if ${ac_cv_path_XARGS+:} false; then :
12270  $as_echo_n "(cached) " >&6
12271else
12272  case $XARGS in
12273  [\\/]* | ?:[\\/]*)
12274  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12275  ;;
12276  *)
12277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12278for as_dir in $PATH
12279do
12280  IFS=$as_save_IFS
12281  test -z "$as_dir" && as_dir=.
12282    for ac_exec_ext in '' $ac_executable_extensions; do
12283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12284    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12286    break 2
12287  fi
12288done
12289  done
12290IFS=$as_save_IFS
12291
12292  ;;
12293esac
12294fi
12295XARGS=$ac_cv_path_XARGS
12296if test -n "$XARGS"; then
12297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12298$as_echo "$XARGS" >&6; }
12299else
12300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12301$as_echo "no" >&6; }
12302fi
12303
12304
12305  test -n "$XARGS" && break
12306done
12307
12308    else
12309      # If it succeeded, then it was overridden by the user. We will use it
12310      # for the tool.
12311
12312      # First remove it from the list of overridden variables, so we can test
12313      # for unknown variables in the end.
12314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12315
12316      # Check if we try to supply an empty value
12317      if test "x$XARGS" = x; then
12318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12319$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12321$as_echo_n "checking for XARGS... " >&6; }
12322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12323$as_echo "disabled" >&6; }
12324      else
12325        # Check if the provided tool contains a complete path.
12326        tool_specified="$XARGS"
12327        tool_basename="${tool_specified##*/}"
12328        if test "x$tool_basename" = "x$tool_specified"; then
12329          # A command without a complete path is provided, search $PATH.
12330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12331$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12332          # Extract the first word of "$tool_basename", so it can be a program name with args.
12333set dummy $tool_basename; ac_word=$2
12334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12335$as_echo_n "checking for $ac_word... " >&6; }
12336if ${ac_cv_path_XARGS+:} false; then :
12337  $as_echo_n "(cached) " >&6
12338else
12339  case $XARGS in
12340  [\\/]* | ?:[\\/]*)
12341  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12342  ;;
12343  *)
12344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12345for as_dir in $PATH
12346do
12347  IFS=$as_save_IFS
12348  test -z "$as_dir" && as_dir=.
12349    for ac_exec_ext in '' $ac_executable_extensions; do
12350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12351    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12353    break 2
12354  fi
12355done
12356  done
12357IFS=$as_save_IFS
12358
12359  ;;
12360esac
12361fi
12362XARGS=$ac_cv_path_XARGS
12363if test -n "$XARGS"; then
12364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12365$as_echo "$XARGS" >&6; }
12366else
12367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12368$as_echo "no" >&6; }
12369fi
12370
12371
12372          if test "x$XARGS" = x; then
12373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12374          fi
12375        else
12376          # Otherwise we believe it is a complete path. Use it as it is.
12377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12378$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12380$as_echo_n "checking for XARGS... " >&6; }
12381          if test ! -x "$tool_specified"; then
12382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12383$as_echo "not found" >&6; }
12384            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12385          fi
12386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12387$as_echo "$tool_specified" >&6; }
12388        fi
12389      fi
12390    fi
12391
12392  fi
12393
12394
12395
12396  if test "x$XARGS" = x; then
12397    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12398  fi
12399
12400
12401
12402  # Then required tools that require some special treatment.
12403
12404
12405  # Publish this variable in the help.
12406
12407
12408  if [ -z "${AWK+x}" ]; then
12409    # The variable is not set by user, try to locate tool using the code snippet
12410    for ac_prog in gawk mawk nawk awk
12411do
12412  # Extract the first word of "$ac_prog", so it can be a program name with args.
12413set dummy $ac_prog; ac_word=$2
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12415$as_echo_n "checking for $ac_word... " >&6; }
12416if ${ac_cv_prog_AWK+:} false; then :
12417  $as_echo_n "(cached) " >&6
12418else
12419  if test -n "$AWK"; then
12420  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12421else
12422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH
12424do
12425  IFS=$as_save_IFS
12426  test -z "$as_dir" && as_dir=.
12427    for ac_exec_ext in '' $ac_executable_extensions; do
12428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12429    ac_cv_prog_AWK="$ac_prog"
12430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12431    break 2
12432  fi
12433done
12434  done
12435IFS=$as_save_IFS
12436
12437fi
12438fi
12439AWK=$ac_cv_prog_AWK
12440if test -n "$AWK"; then
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12442$as_echo "$AWK" >&6; }
12443else
12444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
12446fi
12447
12448
12449  test -n "$AWK" && break
12450done
12451
12452  else
12453    # The variable is set, but is it from the command line or the environment?
12454
12455    # Try to remove the string !AWK! from our list.
12456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12458      # If it failed, the variable was not from the command line. Ignore it,
12459      # but warn the user (except for BASH, which is always set by the calling BASH).
12460      if test "xAWK" != xBASH; then
12461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12462$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12463      fi
12464      # Try to locate tool using the code snippet
12465      for ac_prog in gawk mawk nawk awk
12466do
12467  # Extract the first word of "$ac_prog", so it can be a program name with args.
12468set dummy $ac_prog; ac_word=$2
12469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12470$as_echo_n "checking for $ac_word... " >&6; }
12471if ${ac_cv_prog_AWK+:} false; then :
12472  $as_echo_n "(cached) " >&6
12473else
12474  if test -n "$AWK"; then
12475  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12476else
12477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12478for as_dir in $PATH
12479do
12480  IFS=$as_save_IFS
12481  test -z "$as_dir" && as_dir=.
12482    for ac_exec_ext in '' $ac_executable_extensions; do
12483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12484    ac_cv_prog_AWK="$ac_prog"
12485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12486    break 2
12487  fi
12488done
12489  done
12490IFS=$as_save_IFS
12491
12492fi
12493fi
12494AWK=$ac_cv_prog_AWK
12495if test -n "$AWK"; then
12496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12497$as_echo "$AWK" >&6; }
12498else
12499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12500$as_echo "no" >&6; }
12501fi
12502
12503
12504  test -n "$AWK" && break
12505done
12506
12507    else
12508      # If it succeeded, then it was overridden by the user. We will use it
12509      # for the tool.
12510
12511      # First remove it from the list of overridden variables, so we can test
12512      # for unknown variables in the end.
12513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12514
12515      # Check if we try to supply an empty value
12516      if test "x$AWK" = x; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12518$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12520$as_echo_n "checking for AWK... " >&6; }
12521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12522$as_echo "disabled" >&6; }
12523      else
12524        # Check if the provided tool contains a complete path.
12525        tool_specified="$AWK"
12526        tool_basename="${tool_specified##*/}"
12527        if test "x$tool_basename" = "x$tool_specified"; then
12528          # A command without a complete path is provided, search $PATH.
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12530$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12531          # Extract the first word of "$tool_basename", so it can be a program name with args.
12532set dummy $tool_basename; ac_word=$2
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12534$as_echo_n "checking for $ac_word... " >&6; }
12535if ${ac_cv_path_AWK+:} false; then :
12536  $as_echo_n "(cached) " >&6
12537else
12538  case $AWK in
12539  [\\/]* | ?:[\\/]*)
12540  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12541  ;;
12542  *)
12543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12544for as_dir in $PATH
12545do
12546  IFS=$as_save_IFS
12547  test -z "$as_dir" && as_dir=.
12548    for ac_exec_ext in '' $ac_executable_extensions; do
12549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12550    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12552    break 2
12553  fi
12554done
12555  done
12556IFS=$as_save_IFS
12557
12558  ;;
12559esac
12560fi
12561AWK=$ac_cv_path_AWK
12562if test -n "$AWK"; then
12563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12564$as_echo "$AWK" >&6; }
12565else
12566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
12568fi
12569
12570
12571          if test "x$AWK" = x; then
12572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12573          fi
12574        else
12575          # Otherwise we believe it is a complete path. Use it as it is.
12576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12577$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12579$as_echo_n "checking for AWK... " >&6; }
12580          if test ! -x "$tool_specified"; then
12581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12582$as_echo "not found" >&6; }
12583            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12584          fi
12585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12586$as_echo "$tool_specified" >&6; }
12587        fi
12588      fi
12589    fi
12590
12591  fi
12592
12593
12594  if test "x$AWK" = x; then
12595    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12596  fi
12597
12598
12599
12600
12601  # Publish this variable in the help.
12602
12603
12604  if [ -z "${GREP+x}" ]; then
12605    # The variable is not set by user, try to locate tool using the code snippet
12606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12607$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12608if ${ac_cv_path_GREP+:} false; then :
12609  $as_echo_n "(cached) " >&6
12610else
12611  if test -z "$GREP"; then
12612  ac_path_GREP_found=false
12613  # Loop through the user's path and test for each of PROGNAME-LIST
12614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12615for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12616do
12617  IFS=$as_save_IFS
12618  test -z "$as_dir" && as_dir=.
12619    for ac_prog in grep ggrep; do
12620    for ac_exec_ext in '' $ac_executable_extensions; do
12621      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12622      as_fn_executable_p "$ac_path_GREP" || continue
12623# Check for GNU ac_path_GREP and select it if it is found.
12624  # Check for GNU $ac_path_GREP
12625case `"$ac_path_GREP" --version 2>&1` in
12626*GNU*)
12627  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12628*)
12629  ac_count=0
12630  $as_echo_n 0123456789 >"conftest.in"
12631  while :
12632  do
12633    cat "conftest.in" "conftest.in" >"conftest.tmp"
12634    mv "conftest.tmp" "conftest.in"
12635    cp "conftest.in" "conftest.nl"
12636    $as_echo 'GREP' >> "conftest.nl"
12637    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12639    as_fn_arith $ac_count + 1 && ac_count=$as_val
12640    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12641      # Best one so far, save it but keep looking for a better one
12642      ac_cv_path_GREP="$ac_path_GREP"
12643      ac_path_GREP_max=$ac_count
12644    fi
12645    # 10*(2^10) chars as input seems more than enough
12646    test $ac_count -gt 10 && break
12647  done
12648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12649esac
12650
12651      $ac_path_GREP_found && break 3
12652    done
12653  done
12654  done
12655IFS=$as_save_IFS
12656  if test -z "$ac_cv_path_GREP"; then
12657    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12658  fi
12659else
12660  ac_cv_path_GREP=$GREP
12661fi
12662
12663fi
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12665$as_echo "$ac_cv_path_GREP" >&6; }
12666 GREP="$ac_cv_path_GREP"
12667
12668
12669  else
12670    # The variable is set, but is it from the command line or the environment?
12671
12672    # Try to remove the string !GREP! from our list.
12673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12675      # If it failed, the variable was not from the command line. Ignore it,
12676      # but warn the user (except for BASH, which is always set by the calling BASH).
12677      if test "xGREP" != xBASH; then
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12679$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12680      fi
12681      # Try to locate tool using the code snippet
12682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12683$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12684if ${ac_cv_path_GREP+:} false; then :
12685  $as_echo_n "(cached) " >&6
12686else
12687  if test -z "$GREP"; then
12688  ac_path_GREP_found=false
12689  # Loop through the user's path and test for each of PROGNAME-LIST
12690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12691for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12692do
12693  IFS=$as_save_IFS
12694  test -z "$as_dir" && as_dir=.
12695    for ac_prog in grep ggrep; do
12696    for ac_exec_ext in '' $ac_executable_extensions; do
12697      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12698      as_fn_executable_p "$ac_path_GREP" || continue
12699# Check for GNU ac_path_GREP and select it if it is found.
12700  # Check for GNU $ac_path_GREP
12701case `"$ac_path_GREP" --version 2>&1` in
12702*GNU*)
12703  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12704*)
12705  ac_count=0
12706  $as_echo_n 0123456789 >"conftest.in"
12707  while :
12708  do
12709    cat "conftest.in" "conftest.in" >"conftest.tmp"
12710    mv "conftest.tmp" "conftest.in"
12711    cp "conftest.in" "conftest.nl"
12712    $as_echo 'GREP' >> "conftest.nl"
12713    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12714    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12715    as_fn_arith $ac_count + 1 && ac_count=$as_val
12716    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12717      # Best one so far, save it but keep looking for a better one
12718      ac_cv_path_GREP="$ac_path_GREP"
12719      ac_path_GREP_max=$ac_count
12720    fi
12721    # 10*(2^10) chars as input seems more than enough
12722    test $ac_count -gt 10 && break
12723  done
12724  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12725esac
12726
12727      $ac_path_GREP_found && break 3
12728    done
12729  done
12730  done
12731IFS=$as_save_IFS
12732  if test -z "$ac_cv_path_GREP"; then
12733    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12734  fi
12735else
12736  ac_cv_path_GREP=$GREP
12737fi
12738
12739fi
12740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12741$as_echo "$ac_cv_path_GREP" >&6; }
12742 GREP="$ac_cv_path_GREP"
12743
12744
12745    else
12746      # If it succeeded, then it was overridden by the user. We will use it
12747      # for the tool.
12748
12749      # First remove it from the list of overridden variables, so we can test
12750      # for unknown variables in the end.
12751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12752
12753      # Check if we try to supply an empty value
12754      if test "x$GREP" = x; then
12755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12756$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12758$as_echo_n "checking for GREP... " >&6; }
12759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12760$as_echo "disabled" >&6; }
12761      else
12762        # Check if the provided tool contains a complete path.
12763        tool_specified="$GREP"
12764        tool_basename="${tool_specified##*/}"
12765        if test "x$tool_basename" = "x$tool_specified"; then
12766          # A command without a complete path is provided, search $PATH.
12767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12768$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12769          # Extract the first word of "$tool_basename", so it can be a program name with args.
12770set dummy $tool_basename; ac_word=$2
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12772$as_echo_n "checking for $ac_word... " >&6; }
12773if ${ac_cv_path_GREP+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  case $GREP in
12777  [\\/]* | ?:[\\/]*)
12778  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12779  ;;
12780  *)
12781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12782for as_dir in $PATH
12783do
12784  IFS=$as_save_IFS
12785  test -z "$as_dir" && as_dir=.
12786    for ac_exec_ext in '' $ac_executable_extensions; do
12787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12788    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12790    break 2
12791  fi
12792done
12793  done
12794IFS=$as_save_IFS
12795
12796  ;;
12797esac
12798fi
12799GREP=$ac_cv_path_GREP
12800if test -n "$GREP"; then
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12802$as_echo "$GREP" >&6; }
12803else
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12805$as_echo "no" >&6; }
12806fi
12807
12808
12809          if test "x$GREP" = x; then
12810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12811          fi
12812        else
12813          # Otherwise we believe it is a complete path. Use it as it is.
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12815$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12817$as_echo_n "checking for GREP... " >&6; }
12818          if test ! -x "$tool_specified"; then
12819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12820$as_echo "not found" >&6; }
12821            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12822          fi
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12824$as_echo "$tool_specified" >&6; }
12825        fi
12826      fi
12827    fi
12828
12829  fi
12830
12831
12832  if test "x$GREP" = x; then
12833    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12834  fi
12835
12836
12837
12838
12839  # Publish this variable in the help.
12840
12841
12842  if [ -z "${EGREP+x}" ]; then
12843    # The variable is not set by user, try to locate tool using the code snippet
12844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12845$as_echo_n "checking for egrep... " >&6; }
12846if ${ac_cv_path_EGREP+:} false; then :
12847  $as_echo_n "(cached) " >&6
12848else
12849  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12850   then ac_cv_path_EGREP="$GREP -E"
12851   else
12852     if test -z "$EGREP"; then
12853  ac_path_EGREP_found=false
12854  # Loop through the user's path and test for each of PROGNAME-LIST
12855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12857do
12858  IFS=$as_save_IFS
12859  test -z "$as_dir" && as_dir=.
12860    for ac_prog in egrep; do
12861    for ac_exec_ext in '' $ac_executable_extensions; do
12862      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12863      as_fn_executable_p "$ac_path_EGREP" || continue
12864# Check for GNU ac_path_EGREP and select it if it is found.
12865  # Check for GNU $ac_path_EGREP
12866case `"$ac_path_EGREP" --version 2>&1` in
12867*GNU*)
12868  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12869*)
12870  ac_count=0
12871  $as_echo_n 0123456789 >"conftest.in"
12872  while :
12873  do
12874    cat "conftest.in" "conftest.in" >"conftest.tmp"
12875    mv "conftest.tmp" "conftest.in"
12876    cp "conftest.in" "conftest.nl"
12877    $as_echo 'EGREP' >> "conftest.nl"
12878    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12879    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12880    as_fn_arith $ac_count + 1 && ac_count=$as_val
12881    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12882      # Best one so far, save it but keep looking for a better one
12883      ac_cv_path_EGREP="$ac_path_EGREP"
12884      ac_path_EGREP_max=$ac_count
12885    fi
12886    # 10*(2^10) chars as input seems more than enough
12887    test $ac_count -gt 10 && break
12888  done
12889  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12890esac
12891
12892      $ac_path_EGREP_found && break 3
12893    done
12894  done
12895  done
12896IFS=$as_save_IFS
12897  if test -z "$ac_cv_path_EGREP"; then
12898    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12899  fi
12900else
12901  ac_cv_path_EGREP=$EGREP
12902fi
12903
12904   fi
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12907$as_echo "$ac_cv_path_EGREP" >&6; }
12908 EGREP="$ac_cv_path_EGREP"
12909
12910
12911  else
12912    # The variable is set, but is it from the command line or the environment?
12913
12914    # Try to remove the string !EGREP! from our list.
12915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12917      # If it failed, the variable was not from the command line. Ignore it,
12918      # but warn the user (except for BASH, which is always set by the calling BASH).
12919      if test "xEGREP" != xBASH; then
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12921$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12922      fi
12923      # Try to locate tool using the code snippet
12924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12925$as_echo_n "checking for egrep... " >&6; }
12926if ${ac_cv_path_EGREP+:} false; then :
12927  $as_echo_n "(cached) " >&6
12928else
12929  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12930   then ac_cv_path_EGREP="$GREP -E"
12931   else
12932     if test -z "$EGREP"; then
12933  ac_path_EGREP_found=false
12934  # Loop through the user's path and test for each of PROGNAME-LIST
12935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12936for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12937do
12938  IFS=$as_save_IFS
12939  test -z "$as_dir" && as_dir=.
12940    for ac_prog in egrep; do
12941    for ac_exec_ext in '' $ac_executable_extensions; do
12942      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12943      as_fn_executable_p "$ac_path_EGREP" || continue
12944# Check for GNU ac_path_EGREP and select it if it is found.
12945  # Check for GNU $ac_path_EGREP
12946case `"$ac_path_EGREP" --version 2>&1` in
12947*GNU*)
12948  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12949*)
12950  ac_count=0
12951  $as_echo_n 0123456789 >"conftest.in"
12952  while :
12953  do
12954    cat "conftest.in" "conftest.in" >"conftest.tmp"
12955    mv "conftest.tmp" "conftest.in"
12956    cp "conftest.in" "conftest.nl"
12957    $as_echo 'EGREP' >> "conftest.nl"
12958    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12959    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12960    as_fn_arith $ac_count + 1 && ac_count=$as_val
12961    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12962      # Best one so far, save it but keep looking for a better one
12963      ac_cv_path_EGREP="$ac_path_EGREP"
12964      ac_path_EGREP_max=$ac_count
12965    fi
12966    # 10*(2^10) chars as input seems more than enough
12967    test $ac_count -gt 10 && break
12968  done
12969  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12970esac
12971
12972      $ac_path_EGREP_found && break 3
12973    done
12974  done
12975  done
12976IFS=$as_save_IFS
12977  if test -z "$ac_cv_path_EGREP"; then
12978    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12979  fi
12980else
12981  ac_cv_path_EGREP=$EGREP
12982fi
12983
12984   fi
12985fi
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12987$as_echo "$ac_cv_path_EGREP" >&6; }
12988 EGREP="$ac_cv_path_EGREP"
12989
12990
12991    else
12992      # If it succeeded, then it was overridden by the user. We will use it
12993      # for the tool.
12994
12995      # First remove it from the list of overridden variables, so we can test
12996      # for unknown variables in the end.
12997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12998
12999      # Check if we try to supply an empty value
13000      if test "x$EGREP" = x; then
13001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13002$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13004$as_echo_n "checking for EGREP... " >&6; }
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13006$as_echo "disabled" >&6; }
13007      else
13008        # Check if the provided tool contains a complete path.
13009        tool_specified="$EGREP"
13010        tool_basename="${tool_specified##*/}"
13011        if test "x$tool_basename" = "x$tool_specified"; then
13012          # A command without a complete path is provided, search $PATH.
13013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13014$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13015          # Extract the first word of "$tool_basename", so it can be a program name with args.
13016set dummy $tool_basename; ac_word=$2
13017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13018$as_echo_n "checking for $ac_word... " >&6; }
13019if ${ac_cv_path_EGREP+:} false; then :
13020  $as_echo_n "(cached) " >&6
13021else
13022  case $EGREP in
13023  [\\/]* | ?:[\\/]*)
13024  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13025  ;;
13026  *)
13027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13028for as_dir in $PATH
13029do
13030  IFS=$as_save_IFS
13031  test -z "$as_dir" && as_dir=.
13032    for ac_exec_ext in '' $ac_executable_extensions; do
13033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13034    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13036    break 2
13037  fi
13038done
13039  done
13040IFS=$as_save_IFS
13041
13042  ;;
13043esac
13044fi
13045EGREP=$ac_cv_path_EGREP
13046if test -n "$EGREP"; then
13047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13048$as_echo "$EGREP" >&6; }
13049else
13050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13051$as_echo "no" >&6; }
13052fi
13053
13054
13055          if test "x$EGREP" = x; then
13056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13057          fi
13058        else
13059          # Otherwise we believe it is a complete path. Use it as it is.
13060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13061$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13063$as_echo_n "checking for EGREP... " >&6; }
13064          if test ! -x "$tool_specified"; then
13065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13066$as_echo "not found" >&6; }
13067            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13068          fi
13069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13070$as_echo "$tool_specified" >&6; }
13071        fi
13072      fi
13073    fi
13074
13075  fi
13076
13077
13078  if test "x$EGREP" = x; then
13079    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13080  fi
13081
13082
13083
13084
13085  # Publish this variable in the help.
13086
13087
13088  if [ -z "${FGREP+x}" ]; then
13089    # The variable is not set by user, try to locate tool using the code snippet
13090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13091$as_echo_n "checking for fgrep... " >&6; }
13092if ${ac_cv_path_FGREP+:} false; then :
13093  $as_echo_n "(cached) " >&6
13094else
13095  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13096   then ac_cv_path_FGREP="$GREP -F"
13097   else
13098     if test -z "$FGREP"; then
13099  ac_path_FGREP_found=false
13100  # Loop through the user's path and test for each of PROGNAME-LIST
13101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13102for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13103do
13104  IFS=$as_save_IFS
13105  test -z "$as_dir" && as_dir=.
13106    for ac_prog in fgrep; do
13107    for ac_exec_ext in '' $ac_executable_extensions; do
13108      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13109      as_fn_executable_p "$ac_path_FGREP" || continue
13110# Check for GNU ac_path_FGREP and select it if it is found.
13111  # Check for GNU $ac_path_FGREP
13112case `"$ac_path_FGREP" --version 2>&1` in
13113*GNU*)
13114  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13115*)
13116  ac_count=0
13117  $as_echo_n 0123456789 >"conftest.in"
13118  while :
13119  do
13120    cat "conftest.in" "conftest.in" >"conftest.tmp"
13121    mv "conftest.tmp" "conftest.in"
13122    cp "conftest.in" "conftest.nl"
13123    $as_echo 'FGREP' >> "conftest.nl"
13124    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13125    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13126    as_fn_arith $ac_count + 1 && ac_count=$as_val
13127    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13128      # Best one so far, save it but keep looking for a better one
13129      ac_cv_path_FGREP="$ac_path_FGREP"
13130      ac_path_FGREP_max=$ac_count
13131    fi
13132    # 10*(2^10) chars as input seems more than enough
13133    test $ac_count -gt 10 && break
13134  done
13135  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13136esac
13137
13138      $ac_path_FGREP_found && break 3
13139    done
13140  done
13141  done
13142IFS=$as_save_IFS
13143  if test -z "$ac_cv_path_FGREP"; then
13144    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13145  fi
13146else
13147  ac_cv_path_FGREP=$FGREP
13148fi
13149
13150   fi
13151fi
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13153$as_echo "$ac_cv_path_FGREP" >&6; }
13154 FGREP="$ac_cv_path_FGREP"
13155
13156
13157  else
13158    # The variable is set, but is it from the command line or the environment?
13159
13160    # Try to remove the string !FGREP! from our list.
13161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13163      # If it failed, the variable was not from the command line. Ignore it,
13164      # but warn the user (except for BASH, which is always set by the calling BASH).
13165      if test "xFGREP" != xBASH; then
13166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13167$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13168      fi
13169      # Try to locate tool using the code snippet
13170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13171$as_echo_n "checking for fgrep... " >&6; }
13172if ${ac_cv_path_FGREP+:} false; then :
13173  $as_echo_n "(cached) " >&6
13174else
13175  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13176   then ac_cv_path_FGREP="$GREP -F"
13177   else
13178     if test -z "$FGREP"; then
13179  ac_path_FGREP_found=false
13180  # Loop through the user's path and test for each of PROGNAME-LIST
13181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13182for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13183do
13184  IFS=$as_save_IFS
13185  test -z "$as_dir" && as_dir=.
13186    for ac_prog in fgrep; do
13187    for ac_exec_ext in '' $ac_executable_extensions; do
13188      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13189      as_fn_executable_p "$ac_path_FGREP" || continue
13190# Check for GNU ac_path_FGREP and select it if it is found.
13191  # Check for GNU $ac_path_FGREP
13192case `"$ac_path_FGREP" --version 2>&1` in
13193*GNU*)
13194  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13195*)
13196  ac_count=0
13197  $as_echo_n 0123456789 >"conftest.in"
13198  while :
13199  do
13200    cat "conftest.in" "conftest.in" >"conftest.tmp"
13201    mv "conftest.tmp" "conftest.in"
13202    cp "conftest.in" "conftest.nl"
13203    $as_echo 'FGREP' >> "conftest.nl"
13204    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13205    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13206    as_fn_arith $ac_count + 1 && ac_count=$as_val
13207    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13208      # Best one so far, save it but keep looking for a better one
13209      ac_cv_path_FGREP="$ac_path_FGREP"
13210      ac_path_FGREP_max=$ac_count
13211    fi
13212    # 10*(2^10) chars as input seems more than enough
13213    test $ac_count -gt 10 && break
13214  done
13215  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13216esac
13217
13218      $ac_path_FGREP_found && break 3
13219    done
13220  done
13221  done
13222IFS=$as_save_IFS
13223  if test -z "$ac_cv_path_FGREP"; then
13224    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13225  fi
13226else
13227  ac_cv_path_FGREP=$FGREP
13228fi
13229
13230   fi
13231fi
13232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13233$as_echo "$ac_cv_path_FGREP" >&6; }
13234 FGREP="$ac_cv_path_FGREP"
13235
13236
13237    else
13238      # If it succeeded, then it was overridden by the user. We will use it
13239      # for the tool.
13240
13241      # First remove it from the list of overridden variables, so we can test
13242      # for unknown variables in the end.
13243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13244
13245      # Check if we try to supply an empty value
13246      if test "x$FGREP" = x; then
13247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13248$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13250$as_echo_n "checking for FGREP... " >&6; }
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13252$as_echo "disabled" >&6; }
13253      else
13254        # Check if the provided tool contains a complete path.
13255        tool_specified="$FGREP"
13256        tool_basename="${tool_specified##*/}"
13257        if test "x$tool_basename" = "x$tool_specified"; then
13258          # A command without a complete path is provided, search $PATH.
13259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13260$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13261          # Extract the first word of "$tool_basename", so it can be a program name with args.
13262set dummy $tool_basename; ac_word=$2
13263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13264$as_echo_n "checking for $ac_word... " >&6; }
13265if ${ac_cv_path_FGREP+:} false; then :
13266  $as_echo_n "(cached) " >&6
13267else
13268  case $FGREP in
13269  [\\/]* | ?:[\\/]*)
13270  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13271  ;;
13272  *)
13273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13274for as_dir in $PATH
13275do
13276  IFS=$as_save_IFS
13277  test -z "$as_dir" && as_dir=.
13278    for ac_exec_ext in '' $ac_executable_extensions; do
13279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13280    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13282    break 2
13283  fi
13284done
13285  done
13286IFS=$as_save_IFS
13287
13288  ;;
13289esac
13290fi
13291FGREP=$ac_cv_path_FGREP
13292if test -n "$FGREP"; then
13293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13294$as_echo "$FGREP" >&6; }
13295else
13296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13297$as_echo "no" >&6; }
13298fi
13299
13300
13301          if test "x$FGREP" = x; then
13302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13303          fi
13304        else
13305          # Otherwise we believe it is a complete path. Use it as it is.
13306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13307$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13309$as_echo_n "checking for FGREP... " >&6; }
13310          if test ! -x "$tool_specified"; then
13311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13312$as_echo "not found" >&6; }
13313            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13314          fi
13315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13316$as_echo "$tool_specified" >&6; }
13317        fi
13318      fi
13319    fi
13320
13321  fi
13322
13323
13324  if test "x$FGREP" = x; then
13325    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13326  fi
13327
13328
13329
13330
13331  # Publish this variable in the help.
13332
13333
13334  if [ -z "${SED+x}" ]; then
13335    # The variable is not set by user, try to locate tool using the code snippet
13336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13337$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13338if ${ac_cv_path_SED+:} false; then :
13339  $as_echo_n "(cached) " >&6
13340else
13341            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13342     for ac_i in 1 2 3 4 5 6 7; do
13343       ac_script="$ac_script$as_nl$ac_script"
13344     done
13345     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13346     { ac_script=; unset ac_script;}
13347     if test -z "$SED"; then
13348  ac_path_SED_found=false
13349  # Loop through the user's path and test for each of PROGNAME-LIST
13350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13351for as_dir in $PATH
13352do
13353  IFS=$as_save_IFS
13354  test -z "$as_dir" && as_dir=.
13355    for ac_prog in sed gsed; do
13356    for ac_exec_ext in '' $ac_executable_extensions; do
13357      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13358      as_fn_executable_p "$ac_path_SED" || continue
13359# Check for GNU ac_path_SED and select it if it is found.
13360  # Check for GNU $ac_path_SED
13361case `"$ac_path_SED" --version 2>&1` in
13362*GNU*)
13363  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13364*)
13365  ac_count=0
13366  $as_echo_n 0123456789 >"conftest.in"
13367  while :
13368  do
13369    cat "conftest.in" "conftest.in" >"conftest.tmp"
13370    mv "conftest.tmp" "conftest.in"
13371    cp "conftest.in" "conftest.nl"
13372    $as_echo '' >> "conftest.nl"
13373    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13374    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13375    as_fn_arith $ac_count + 1 && ac_count=$as_val
13376    if test $ac_count -gt ${ac_path_SED_max-0}; then
13377      # Best one so far, save it but keep looking for a better one
13378      ac_cv_path_SED="$ac_path_SED"
13379      ac_path_SED_max=$ac_count
13380    fi
13381    # 10*(2^10) chars as input seems more than enough
13382    test $ac_count -gt 10 && break
13383  done
13384  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13385esac
13386
13387      $ac_path_SED_found && break 3
13388    done
13389  done
13390  done
13391IFS=$as_save_IFS
13392  if test -z "$ac_cv_path_SED"; then
13393    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13394  fi
13395else
13396  ac_cv_path_SED=$SED
13397fi
13398
13399fi
13400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13401$as_echo "$ac_cv_path_SED" >&6; }
13402 SED="$ac_cv_path_SED"
13403  rm -f conftest.sed
13404
13405  else
13406    # The variable is set, but is it from the command line or the environment?
13407
13408    # Try to remove the string !SED! from our list.
13409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13411      # If it failed, the variable was not from the command line. Ignore it,
13412      # but warn the user (except for BASH, which is always set by the calling BASH).
13413      if test "xSED" != xBASH; then
13414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13415$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13416      fi
13417      # Try to locate tool using the code snippet
13418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13419$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13420if ${ac_cv_path_SED+:} false; then :
13421  $as_echo_n "(cached) " >&6
13422else
13423            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13424     for ac_i in 1 2 3 4 5 6 7; do
13425       ac_script="$ac_script$as_nl$ac_script"
13426     done
13427     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13428     { ac_script=; unset ac_script;}
13429     if test -z "$SED"; then
13430  ac_path_SED_found=false
13431  # Loop through the user's path and test for each of PROGNAME-LIST
13432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13433for as_dir in $PATH
13434do
13435  IFS=$as_save_IFS
13436  test -z "$as_dir" && as_dir=.
13437    for ac_prog in sed gsed; do
13438    for ac_exec_ext in '' $ac_executable_extensions; do
13439      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13440      as_fn_executable_p "$ac_path_SED" || continue
13441# Check for GNU ac_path_SED and select it if it is found.
13442  # Check for GNU $ac_path_SED
13443case `"$ac_path_SED" --version 2>&1` in
13444*GNU*)
13445  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13446*)
13447  ac_count=0
13448  $as_echo_n 0123456789 >"conftest.in"
13449  while :
13450  do
13451    cat "conftest.in" "conftest.in" >"conftest.tmp"
13452    mv "conftest.tmp" "conftest.in"
13453    cp "conftest.in" "conftest.nl"
13454    $as_echo '' >> "conftest.nl"
13455    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13456    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13457    as_fn_arith $ac_count + 1 && ac_count=$as_val
13458    if test $ac_count -gt ${ac_path_SED_max-0}; then
13459      # Best one so far, save it but keep looking for a better one
13460      ac_cv_path_SED="$ac_path_SED"
13461      ac_path_SED_max=$ac_count
13462    fi
13463    # 10*(2^10) chars as input seems more than enough
13464    test $ac_count -gt 10 && break
13465  done
13466  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13467esac
13468
13469      $ac_path_SED_found && break 3
13470    done
13471  done
13472  done
13473IFS=$as_save_IFS
13474  if test -z "$ac_cv_path_SED"; then
13475    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13476  fi
13477else
13478  ac_cv_path_SED=$SED
13479fi
13480
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13483$as_echo "$ac_cv_path_SED" >&6; }
13484 SED="$ac_cv_path_SED"
13485  rm -f conftest.sed
13486
13487    else
13488      # If it succeeded, then it was overridden by the user. We will use it
13489      # for the tool.
13490
13491      # First remove it from the list of overridden variables, so we can test
13492      # for unknown variables in the end.
13493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13494
13495      # Check if we try to supply an empty value
13496      if test "x$SED" = x; then
13497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13498$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13500$as_echo_n "checking for SED... " >&6; }
13501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13502$as_echo "disabled" >&6; }
13503      else
13504        # Check if the provided tool contains a complete path.
13505        tool_specified="$SED"
13506        tool_basename="${tool_specified##*/}"
13507        if test "x$tool_basename" = "x$tool_specified"; then
13508          # A command without a complete path is provided, search $PATH.
13509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13510$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13511          # Extract the first word of "$tool_basename", so it can be a program name with args.
13512set dummy $tool_basename; ac_word=$2
13513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13514$as_echo_n "checking for $ac_word... " >&6; }
13515if ${ac_cv_path_SED+:} false; then :
13516  $as_echo_n "(cached) " >&6
13517else
13518  case $SED in
13519  [\\/]* | ?:[\\/]*)
13520  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13521  ;;
13522  *)
13523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13524for as_dir in $PATH
13525do
13526  IFS=$as_save_IFS
13527  test -z "$as_dir" && as_dir=.
13528    for ac_exec_ext in '' $ac_executable_extensions; do
13529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13530    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13532    break 2
13533  fi
13534done
13535  done
13536IFS=$as_save_IFS
13537
13538  ;;
13539esac
13540fi
13541SED=$ac_cv_path_SED
13542if test -n "$SED"; then
13543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13544$as_echo "$SED" >&6; }
13545else
13546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13547$as_echo "no" >&6; }
13548fi
13549
13550
13551          if test "x$SED" = x; then
13552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13553          fi
13554        else
13555          # Otherwise we believe it is a complete path. Use it as it is.
13556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13557$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13559$as_echo_n "checking for SED... " >&6; }
13560          if test ! -x "$tool_specified"; then
13561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13562$as_echo "not found" >&6; }
13563            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13564          fi
13565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13566$as_echo "$tool_specified" >&6; }
13567        fi
13568      fi
13569    fi
13570
13571  fi
13572
13573
13574  if test "x$SED" = x; then
13575    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13576  fi
13577
13578
13579
13580  # Always force rm.
13581  RM="$RM -f"
13582
13583  # pwd behaves differently on various platforms and some don't support the -L flag.
13584  # Always use the bash builtin pwd to get uniform behavior.
13585  THEPWDCMD=pwd
13586
13587  # These are not required on all platforms
13588
13589
13590  # Publish this variable in the help.
13591
13592
13593  if [ -z "${CYGPATH+x}" ]; then
13594    # The variable is not set by user, try to locate tool using the code snippet
13595    for ac_prog in cygpath
13596do
13597  # Extract the first word of "$ac_prog", so it can be a program name with args.
13598set dummy $ac_prog; ac_word=$2
13599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13600$as_echo_n "checking for $ac_word... " >&6; }
13601if ${ac_cv_path_CYGPATH+:} false; then :
13602  $as_echo_n "(cached) " >&6
13603else
13604  case $CYGPATH in
13605  [\\/]* | ?:[\\/]*)
13606  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13607  ;;
13608  *)
13609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13610for as_dir in $PATH
13611do
13612  IFS=$as_save_IFS
13613  test -z "$as_dir" && as_dir=.
13614    for ac_exec_ext in '' $ac_executable_extensions; do
13615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13616    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13618    break 2
13619  fi
13620done
13621  done
13622IFS=$as_save_IFS
13623
13624  ;;
13625esac
13626fi
13627CYGPATH=$ac_cv_path_CYGPATH
13628if test -n "$CYGPATH"; then
13629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13630$as_echo "$CYGPATH" >&6; }
13631else
13632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13633$as_echo "no" >&6; }
13634fi
13635
13636
13637  test -n "$CYGPATH" && break
13638done
13639
13640  else
13641    # The variable is set, but is it from the command line or the environment?
13642
13643    # Try to remove the string !CYGPATH! from our list.
13644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13646      # If it failed, the variable was not from the command line. Ignore it,
13647      # but warn the user (except for BASH, which is always set by the calling BASH).
13648      if test "xCYGPATH" != xBASH; then
13649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13650$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13651      fi
13652      # Try to locate tool using the code snippet
13653      for ac_prog in cygpath
13654do
13655  # Extract the first word of "$ac_prog", so it can be a program name with args.
13656set dummy $ac_prog; ac_word=$2
13657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13658$as_echo_n "checking for $ac_word... " >&6; }
13659if ${ac_cv_path_CYGPATH+:} false; then :
13660  $as_echo_n "(cached) " >&6
13661else
13662  case $CYGPATH in
13663  [\\/]* | ?:[\\/]*)
13664  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13665  ;;
13666  *)
13667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13668for as_dir in $PATH
13669do
13670  IFS=$as_save_IFS
13671  test -z "$as_dir" && as_dir=.
13672    for ac_exec_ext in '' $ac_executable_extensions; do
13673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13674    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13676    break 2
13677  fi
13678done
13679  done
13680IFS=$as_save_IFS
13681
13682  ;;
13683esac
13684fi
13685CYGPATH=$ac_cv_path_CYGPATH
13686if test -n "$CYGPATH"; then
13687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13688$as_echo "$CYGPATH" >&6; }
13689else
13690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13691$as_echo "no" >&6; }
13692fi
13693
13694
13695  test -n "$CYGPATH" && break
13696done
13697
13698    else
13699      # If it succeeded, then it was overridden by the user. We will use it
13700      # for the tool.
13701
13702      # First remove it from the list of overridden variables, so we can test
13703      # for unknown variables in the end.
13704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13705
13706      # Check if we try to supply an empty value
13707      if test "x$CYGPATH" = x; then
13708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13709$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13711$as_echo_n "checking for CYGPATH... " >&6; }
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13713$as_echo "disabled" >&6; }
13714      else
13715        # Check if the provided tool contains a complete path.
13716        tool_specified="$CYGPATH"
13717        tool_basename="${tool_specified##*/}"
13718        if test "x$tool_basename" = "x$tool_specified"; then
13719          # A command without a complete path is provided, search $PATH.
13720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13721$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13722          # Extract the first word of "$tool_basename", so it can be a program name with args.
13723set dummy $tool_basename; ac_word=$2
13724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13725$as_echo_n "checking for $ac_word... " >&6; }
13726if ${ac_cv_path_CYGPATH+:} false; then :
13727  $as_echo_n "(cached) " >&6
13728else
13729  case $CYGPATH in
13730  [\\/]* | ?:[\\/]*)
13731  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13732  ;;
13733  *)
13734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735for as_dir in $PATH
13736do
13737  IFS=$as_save_IFS
13738  test -z "$as_dir" && as_dir=.
13739    for ac_exec_ext in '' $ac_executable_extensions; do
13740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13741    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13743    break 2
13744  fi
13745done
13746  done
13747IFS=$as_save_IFS
13748
13749  ;;
13750esac
13751fi
13752CYGPATH=$ac_cv_path_CYGPATH
13753if test -n "$CYGPATH"; then
13754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13755$as_echo "$CYGPATH" >&6; }
13756else
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758$as_echo "no" >&6; }
13759fi
13760
13761
13762          if test "x$CYGPATH" = x; then
13763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13764          fi
13765        else
13766          # Otherwise we believe it is a complete path. Use it as it is.
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13768$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13770$as_echo_n "checking for CYGPATH... " >&6; }
13771          if test ! -x "$tool_specified"; then
13772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13773$as_echo "not found" >&6; }
13774            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13775          fi
13776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13777$as_echo "$tool_specified" >&6; }
13778        fi
13779      fi
13780    fi
13781
13782  fi
13783
13784
13785
13786
13787  # Publish this variable in the help.
13788
13789
13790  if [ -z "${READLINK+x}" ]; then
13791    # The variable is not set by user, try to locate tool using the code snippet
13792    for ac_prog in greadlink readlink
13793do
13794  # Extract the first word of "$ac_prog", so it can be a program name with args.
13795set dummy $ac_prog; ac_word=$2
13796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13797$as_echo_n "checking for $ac_word... " >&6; }
13798if ${ac_cv_path_READLINK+:} false; then :
13799  $as_echo_n "(cached) " >&6
13800else
13801  case $READLINK in
13802  [\\/]* | ?:[\\/]*)
13803  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13804  ;;
13805  *)
13806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13807for as_dir in $PATH
13808do
13809  IFS=$as_save_IFS
13810  test -z "$as_dir" && as_dir=.
13811    for ac_exec_ext in '' $ac_executable_extensions; do
13812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13813    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13815    break 2
13816  fi
13817done
13818  done
13819IFS=$as_save_IFS
13820
13821  ;;
13822esac
13823fi
13824READLINK=$ac_cv_path_READLINK
13825if test -n "$READLINK"; then
13826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13827$as_echo "$READLINK" >&6; }
13828else
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13830$as_echo "no" >&6; }
13831fi
13832
13833
13834  test -n "$READLINK" && break
13835done
13836
13837  else
13838    # The variable is set, but is it from the command line or the environment?
13839
13840    # Try to remove the string !READLINK! from our list.
13841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13843      # If it failed, the variable was not from the command line. Ignore it,
13844      # but warn the user (except for BASH, which is always set by the calling BASH).
13845      if test "xREADLINK" != xBASH; then
13846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13847$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13848      fi
13849      # Try to locate tool using the code snippet
13850      for ac_prog in greadlink readlink
13851do
13852  # Extract the first word of "$ac_prog", so it can be a program name with args.
13853set dummy $ac_prog; ac_word=$2
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13855$as_echo_n "checking for $ac_word... " >&6; }
13856if ${ac_cv_path_READLINK+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  case $READLINK in
13860  [\\/]* | ?:[\\/]*)
13861  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13862  ;;
13863  *)
13864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13865for as_dir in $PATH
13866do
13867  IFS=$as_save_IFS
13868  test -z "$as_dir" && as_dir=.
13869    for ac_exec_ext in '' $ac_executable_extensions; do
13870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13871    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13873    break 2
13874  fi
13875done
13876  done
13877IFS=$as_save_IFS
13878
13879  ;;
13880esac
13881fi
13882READLINK=$ac_cv_path_READLINK
13883if test -n "$READLINK"; then
13884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13885$as_echo "$READLINK" >&6; }
13886else
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; }
13889fi
13890
13891
13892  test -n "$READLINK" && break
13893done
13894
13895    else
13896      # If it succeeded, then it was overridden by the user. We will use it
13897      # for the tool.
13898
13899      # First remove it from the list of overridden variables, so we can test
13900      # for unknown variables in the end.
13901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13902
13903      # Check if we try to supply an empty value
13904      if test "x$READLINK" = x; then
13905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13906$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13908$as_echo_n "checking for READLINK... " >&6; }
13909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13910$as_echo "disabled" >&6; }
13911      else
13912        # Check if the provided tool contains a complete path.
13913        tool_specified="$READLINK"
13914        tool_basename="${tool_specified##*/}"
13915        if test "x$tool_basename" = "x$tool_specified"; then
13916          # A command without a complete path is provided, search $PATH.
13917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13918$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13919          # Extract the first word of "$tool_basename", so it can be a program name with args.
13920set dummy $tool_basename; ac_word=$2
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13922$as_echo_n "checking for $ac_word... " >&6; }
13923if ${ac_cv_path_READLINK+:} false; then :
13924  $as_echo_n "(cached) " >&6
13925else
13926  case $READLINK in
13927  [\\/]* | ?:[\\/]*)
13928  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13929  ;;
13930  *)
13931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13932for as_dir in $PATH
13933do
13934  IFS=$as_save_IFS
13935  test -z "$as_dir" && as_dir=.
13936    for ac_exec_ext in '' $ac_executable_extensions; do
13937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13938    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13940    break 2
13941  fi
13942done
13943  done
13944IFS=$as_save_IFS
13945
13946  ;;
13947esac
13948fi
13949READLINK=$ac_cv_path_READLINK
13950if test -n "$READLINK"; then
13951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13952$as_echo "$READLINK" >&6; }
13953else
13954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955$as_echo "no" >&6; }
13956fi
13957
13958
13959          if test "x$READLINK" = x; then
13960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13961          fi
13962        else
13963          # Otherwise we believe it is a complete path. Use it as it is.
13964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13965$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13967$as_echo_n "checking for READLINK... " >&6; }
13968          if test ! -x "$tool_specified"; then
13969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13970$as_echo "not found" >&6; }
13971            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13972          fi
13973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13974$as_echo "$tool_specified" >&6; }
13975        fi
13976      fi
13977    fi
13978
13979  fi
13980
13981
13982
13983
13984  # Publish this variable in the help.
13985
13986
13987  if [ -z "${DF+x}" ]; then
13988    # The variable is not set by user, try to locate tool using the code snippet
13989    for ac_prog in df
13990do
13991  # Extract the first word of "$ac_prog", so it can be a program name with args.
13992set dummy $ac_prog; ac_word=$2
13993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13994$as_echo_n "checking for $ac_word... " >&6; }
13995if ${ac_cv_path_DF+:} false; then :
13996  $as_echo_n "(cached) " >&6
13997else
13998  case $DF in
13999  [\\/]* | ?:[\\/]*)
14000  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14001  ;;
14002  *)
14003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14004for as_dir in $PATH
14005do
14006  IFS=$as_save_IFS
14007  test -z "$as_dir" && as_dir=.
14008    for ac_exec_ext in '' $ac_executable_extensions; do
14009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14010    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14012    break 2
14013  fi
14014done
14015  done
14016IFS=$as_save_IFS
14017
14018  ;;
14019esac
14020fi
14021DF=$ac_cv_path_DF
14022if test -n "$DF"; then
14023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14024$as_echo "$DF" >&6; }
14025else
14026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14027$as_echo "no" >&6; }
14028fi
14029
14030
14031  test -n "$DF" && break
14032done
14033
14034  else
14035    # The variable is set, but is it from the command line or the environment?
14036
14037    # Try to remove the string !DF! from our list.
14038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14040      # If it failed, the variable was not from the command line. Ignore it,
14041      # but warn the user (except for BASH, which is always set by the calling BASH).
14042      if test "xDF" != xBASH; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14044$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14045      fi
14046      # Try to locate tool using the code snippet
14047      for ac_prog in df
14048do
14049  # Extract the first word of "$ac_prog", so it can be a program name with args.
14050set dummy $ac_prog; ac_word=$2
14051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14052$as_echo_n "checking for $ac_word... " >&6; }
14053if ${ac_cv_path_DF+:} false; then :
14054  $as_echo_n "(cached) " >&6
14055else
14056  case $DF in
14057  [\\/]* | ?:[\\/]*)
14058  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14059  ;;
14060  *)
14061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14062for as_dir in $PATH
14063do
14064  IFS=$as_save_IFS
14065  test -z "$as_dir" && as_dir=.
14066    for ac_exec_ext in '' $ac_executable_extensions; do
14067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14068    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14070    break 2
14071  fi
14072done
14073  done
14074IFS=$as_save_IFS
14075
14076  ;;
14077esac
14078fi
14079DF=$ac_cv_path_DF
14080if test -n "$DF"; then
14081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14082$as_echo "$DF" >&6; }
14083else
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14085$as_echo "no" >&6; }
14086fi
14087
14088
14089  test -n "$DF" && break
14090done
14091
14092    else
14093      # If it succeeded, then it was overridden by the user. We will use it
14094      # for the tool.
14095
14096      # First remove it from the list of overridden variables, so we can test
14097      # for unknown variables in the end.
14098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14099
14100      # Check if we try to supply an empty value
14101      if test "x$DF" = x; then
14102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14103$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14105$as_echo_n "checking for DF... " >&6; }
14106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14107$as_echo "disabled" >&6; }
14108      else
14109        # Check if the provided tool contains a complete path.
14110        tool_specified="$DF"
14111        tool_basename="${tool_specified##*/}"
14112        if test "x$tool_basename" = "x$tool_specified"; then
14113          # A command without a complete path is provided, search $PATH.
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14115$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14116          # Extract the first word of "$tool_basename", so it can be a program name with args.
14117set dummy $tool_basename; ac_word=$2
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14119$as_echo_n "checking for $ac_word... " >&6; }
14120if ${ac_cv_path_DF+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123  case $DF in
14124  [\\/]* | ?:[\\/]*)
14125  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14126  ;;
14127  *)
14128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129for as_dir in $PATH
14130do
14131  IFS=$as_save_IFS
14132  test -z "$as_dir" && as_dir=.
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14135    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14137    break 2
14138  fi
14139done
14140  done
14141IFS=$as_save_IFS
14142
14143  ;;
14144esac
14145fi
14146DF=$ac_cv_path_DF
14147if test -n "$DF"; then
14148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14149$as_echo "$DF" >&6; }
14150else
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14152$as_echo "no" >&6; }
14153fi
14154
14155
14156          if test "x$DF" = x; then
14157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14158          fi
14159        else
14160          # Otherwise we believe it is a complete path. Use it as it is.
14161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14162$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14164$as_echo_n "checking for DF... " >&6; }
14165          if test ! -x "$tool_specified"; then
14166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14167$as_echo "not found" >&6; }
14168            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14169          fi
14170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14171$as_echo "$tool_specified" >&6; }
14172        fi
14173      fi
14174    fi
14175
14176  fi
14177
14178
14179
14180
14181  # Publish this variable in the help.
14182
14183
14184  if [ -z "${CPIO+x}" ]; then
14185    # The variable is not set by user, try to locate tool using the code snippet
14186    for ac_prog in cpio bsdcpio
14187do
14188  # Extract the first word of "$ac_prog", so it can be a program name with args.
14189set dummy $ac_prog; ac_word=$2
14190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14191$as_echo_n "checking for $ac_word... " >&6; }
14192if ${ac_cv_path_CPIO+:} false; then :
14193  $as_echo_n "(cached) " >&6
14194else
14195  case $CPIO in
14196  [\\/]* | ?:[\\/]*)
14197  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14198  ;;
14199  *)
14200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14201for as_dir in $PATH
14202do
14203  IFS=$as_save_IFS
14204  test -z "$as_dir" && as_dir=.
14205    for ac_exec_ext in '' $ac_executable_extensions; do
14206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14207    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14209    break 2
14210  fi
14211done
14212  done
14213IFS=$as_save_IFS
14214
14215  ;;
14216esac
14217fi
14218CPIO=$ac_cv_path_CPIO
14219if test -n "$CPIO"; then
14220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14221$as_echo "$CPIO" >&6; }
14222else
14223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14224$as_echo "no" >&6; }
14225fi
14226
14227
14228  test -n "$CPIO" && break
14229done
14230
14231  else
14232    # The variable is set, but is it from the command line or the environment?
14233
14234    # Try to remove the string !CPIO! from our list.
14235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14237      # If it failed, the variable was not from the command line. Ignore it,
14238      # but warn the user (except for BASH, which is always set by the calling BASH).
14239      if test "xCPIO" != xBASH; then
14240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14241$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14242      fi
14243      # Try to locate tool using the code snippet
14244      for ac_prog in cpio bsdcpio
14245do
14246  # Extract the first word of "$ac_prog", so it can be a program name with args.
14247set dummy $ac_prog; ac_word=$2
14248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14249$as_echo_n "checking for $ac_word... " >&6; }
14250if ${ac_cv_path_CPIO+:} false; then :
14251  $as_echo_n "(cached) " >&6
14252else
14253  case $CPIO in
14254  [\\/]* | ?:[\\/]*)
14255  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14256  ;;
14257  *)
14258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14259for as_dir in $PATH
14260do
14261  IFS=$as_save_IFS
14262  test -z "$as_dir" && as_dir=.
14263    for ac_exec_ext in '' $ac_executable_extensions; do
14264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14265    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14267    break 2
14268  fi
14269done
14270  done
14271IFS=$as_save_IFS
14272
14273  ;;
14274esac
14275fi
14276CPIO=$ac_cv_path_CPIO
14277if test -n "$CPIO"; then
14278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14279$as_echo "$CPIO" >&6; }
14280else
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14282$as_echo "no" >&6; }
14283fi
14284
14285
14286  test -n "$CPIO" && break
14287done
14288
14289    else
14290      # If it succeeded, then it was overridden by the user. We will use it
14291      # for the tool.
14292
14293      # First remove it from the list of overridden variables, so we can test
14294      # for unknown variables in the end.
14295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14296
14297      # Check if we try to supply an empty value
14298      if test "x$CPIO" = x; then
14299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14300$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14302$as_echo_n "checking for CPIO... " >&6; }
14303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14304$as_echo "disabled" >&6; }
14305      else
14306        # Check if the provided tool contains a complete path.
14307        tool_specified="$CPIO"
14308        tool_basename="${tool_specified##*/}"
14309        if test "x$tool_basename" = "x$tool_specified"; then
14310          # A command without a complete path is provided, search $PATH.
14311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14312$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14313          # Extract the first word of "$tool_basename", so it can be a program name with args.
14314set dummy $tool_basename; ac_word=$2
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316$as_echo_n "checking for $ac_word... " >&6; }
14317if ${ac_cv_path_CPIO+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $CPIO in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14323  ;;
14324  *)
14325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326for as_dir in $PATH
14327do
14328  IFS=$as_save_IFS
14329  test -z "$as_dir" && as_dir=.
14330    for ac_exec_ext in '' $ac_executable_extensions; do
14331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334    break 2
14335  fi
14336done
14337  done
14338IFS=$as_save_IFS
14339
14340  ;;
14341esac
14342fi
14343CPIO=$ac_cv_path_CPIO
14344if test -n "$CPIO"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14346$as_echo "$CPIO" >&6; }
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351
14352
14353          if test "x$CPIO" = x; then
14354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14355          fi
14356        else
14357          # Otherwise we believe it is a complete path. Use it as it is.
14358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14359$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14361$as_echo_n "checking for CPIO... " >&6; }
14362          if test ! -x "$tool_specified"; then
14363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14364$as_echo "not found" >&6; }
14365            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14366          fi
14367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14368$as_echo "$tool_specified" >&6; }
14369        fi
14370      fi
14371    fi
14372
14373  fi
14374
14375
14376
14377
14378  # Publish this variable in the help.
14379
14380
14381  if [ -z "${NICE+x}" ]; then
14382    # The variable is not set by user, try to locate tool using the code snippet
14383    for ac_prog in nice
14384do
14385  # Extract the first word of "$ac_prog", so it can be a program name with args.
14386set dummy $ac_prog; ac_word=$2
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14388$as_echo_n "checking for $ac_word... " >&6; }
14389if ${ac_cv_path_NICE+:} false; then :
14390  $as_echo_n "(cached) " >&6
14391else
14392  case $NICE in
14393  [\\/]* | ?:[\\/]*)
14394  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14395  ;;
14396  *)
14397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14398for as_dir in $PATH
14399do
14400  IFS=$as_save_IFS
14401  test -z "$as_dir" && as_dir=.
14402    for ac_exec_ext in '' $ac_executable_extensions; do
14403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14404    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14406    break 2
14407  fi
14408done
14409  done
14410IFS=$as_save_IFS
14411
14412  ;;
14413esac
14414fi
14415NICE=$ac_cv_path_NICE
14416if test -n "$NICE"; then
14417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14418$as_echo "$NICE" >&6; }
14419else
14420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14421$as_echo "no" >&6; }
14422fi
14423
14424
14425  test -n "$NICE" && break
14426done
14427
14428  else
14429    # The variable is set, but is it from the command line or the environment?
14430
14431    # Try to remove the string !NICE! from our list.
14432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14434      # If it failed, the variable was not from the command line. Ignore it,
14435      # but warn the user (except for BASH, which is always set by the calling BASH).
14436      if test "xNICE" != xBASH; then
14437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14438$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14439      fi
14440      # Try to locate tool using the code snippet
14441      for ac_prog in nice
14442do
14443  # Extract the first word of "$ac_prog", so it can be a program name with args.
14444set dummy $ac_prog; ac_word=$2
14445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14446$as_echo_n "checking for $ac_word... " >&6; }
14447if ${ac_cv_path_NICE+:} false; then :
14448  $as_echo_n "(cached) " >&6
14449else
14450  case $NICE in
14451  [\\/]* | ?:[\\/]*)
14452  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14453  ;;
14454  *)
14455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14456for as_dir in $PATH
14457do
14458  IFS=$as_save_IFS
14459  test -z "$as_dir" && as_dir=.
14460    for ac_exec_ext in '' $ac_executable_extensions; do
14461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14462    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14464    break 2
14465  fi
14466done
14467  done
14468IFS=$as_save_IFS
14469
14470  ;;
14471esac
14472fi
14473NICE=$ac_cv_path_NICE
14474if test -n "$NICE"; then
14475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14476$as_echo "$NICE" >&6; }
14477else
14478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14479$as_echo "no" >&6; }
14480fi
14481
14482
14483  test -n "$NICE" && break
14484done
14485
14486    else
14487      # If it succeeded, then it was overridden by the user. We will use it
14488      # for the tool.
14489
14490      # First remove it from the list of overridden variables, so we can test
14491      # for unknown variables in the end.
14492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14493
14494      # Check if we try to supply an empty value
14495      if test "x$NICE" = x; then
14496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14497$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14499$as_echo_n "checking for NICE... " >&6; }
14500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14501$as_echo "disabled" >&6; }
14502      else
14503        # Check if the provided tool contains a complete path.
14504        tool_specified="$NICE"
14505        tool_basename="${tool_specified##*/}"
14506        if test "x$tool_basename" = "x$tool_specified"; then
14507          # A command without a complete path is provided, search $PATH.
14508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14509$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14510          # Extract the first word of "$tool_basename", so it can be a program name with args.
14511set dummy $tool_basename; ac_word=$2
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14513$as_echo_n "checking for $ac_word... " >&6; }
14514if ${ac_cv_path_NICE+:} false; then :
14515  $as_echo_n "(cached) " >&6
14516else
14517  case $NICE in
14518  [\\/]* | ?:[\\/]*)
14519  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14520  ;;
14521  *)
14522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14523for as_dir in $PATH
14524do
14525  IFS=$as_save_IFS
14526  test -z "$as_dir" && as_dir=.
14527    for ac_exec_ext in '' $ac_executable_extensions; do
14528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14529    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14531    break 2
14532  fi
14533done
14534  done
14535IFS=$as_save_IFS
14536
14537  ;;
14538esac
14539fi
14540NICE=$ac_cv_path_NICE
14541if test -n "$NICE"; then
14542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14543$as_echo "$NICE" >&6; }
14544else
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546$as_echo "no" >&6; }
14547fi
14548
14549
14550          if test "x$NICE" = x; then
14551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14552          fi
14553        else
14554          # Otherwise we believe it is a complete path. Use it as it is.
14555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14556$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14558$as_echo_n "checking for NICE... " >&6; }
14559          if test ! -x "$tool_specified"; then
14560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14561$as_echo "not found" >&6; }
14562            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14563          fi
14564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14565$as_echo "$tool_specified" >&6; }
14566        fi
14567      fi
14568    fi
14569
14570  fi
14571
14572
14573
14574
14575# Now we can determine OpenJDK build and target platforms. This is required to
14576# have early on.
14577# Make sure we can run config.sub.
14578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14580
14581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14582$as_echo_n "checking build system type... " >&6; }
14583if ${ac_cv_build+:} false; then :
14584  $as_echo_n "(cached) " >&6
14585else
14586  ac_build_alias=$build_alias
14587test "x$ac_build_alias" = x &&
14588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14589test "x$ac_build_alias" = x &&
14590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14593
14594fi
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14596$as_echo "$ac_cv_build" >&6; }
14597case $ac_cv_build in
14598*-*-*) ;;
14599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14600esac
14601build=$ac_cv_build
14602ac_save_IFS=$IFS; IFS='-'
14603set x $ac_cv_build
14604shift
14605build_cpu=$1
14606build_vendor=$2
14607shift; shift
14608# Remember, the first character of IFS is used to create $*,
14609# except with old shells:
14610build_os=$*
14611IFS=$ac_save_IFS
14612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14613
14614
14615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14616$as_echo_n "checking host system type... " >&6; }
14617if ${ac_cv_host+:} false; then :
14618  $as_echo_n "(cached) " >&6
14619else
14620  if test "x$host_alias" = x; then
14621  ac_cv_host=$ac_cv_build
14622else
14623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14625fi
14626
14627fi
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14629$as_echo "$ac_cv_host" >&6; }
14630case $ac_cv_host in
14631*-*-*) ;;
14632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14633esac
14634host=$ac_cv_host
14635ac_save_IFS=$IFS; IFS='-'
14636set x $ac_cv_host
14637shift
14638host_cpu=$1
14639host_vendor=$2
14640shift; shift
14641# Remember, the first character of IFS is used to create $*,
14642# except with old shells:
14643host_os=$*
14644IFS=$ac_save_IFS
14645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14646
14647
14648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14649$as_echo_n "checking target system type... " >&6; }
14650if ${ac_cv_target+:} false; then :
14651  $as_echo_n "(cached) " >&6
14652else
14653  if test "x$target_alias" = x; then
14654  ac_cv_target=$ac_cv_host
14655else
14656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14658fi
14659
14660fi
14661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14662$as_echo "$ac_cv_target" >&6; }
14663case $ac_cv_target in
14664*-*-*) ;;
14665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14666esac
14667target=$ac_cv_target
14668ac_save_IFS=$IFS; IFS='-'
14669set x $ac_cv_target
14670shift
14671target_cpu=$1
14672target_vendor=$2
14673shift; shift
14674# Remember, the first character of IFS is used to create $*,
14675# except with old shells:
14676target_os=$*
14677IFS=$ac_save_IFS
14678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14679
14680
14681# The aliases save the names the user supplied, while $host etc.
14682# will get canonicalized.
14683test -n "$target_alias" &&
14684  test "$program_prefix$program_suffix$program_transform_name" = \
14685    NONENONEs,x,x, &&
14686  program_prefix=${target_alias}-
14687
14688  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14689  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14690  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14691  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14692  # to use the configure naming style.
14693
14694
14695
14696
14697
14698  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14699  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14700  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14701  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14702  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14703  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14704
14705
14706
14707  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14708
14709  case "$build_os" in
14710    *linux*)
14711      VAR_OS=linux
14712      VAR_OS_TYPE=unix
14713      ;;
14714    *solaris*)
14715      VAR_OS=solaris
14716      VAR_OS_TYPE=unix
14717      ;;
14718    *darwin*)
14719      VAR_OS=macosx
14720      VAR_OS_TYPE=unix
14721      ;;
14722    *bsd*)
14723      VAR_OS=bsd
14724      VAR_OS_TYPE=unix
14725      ;;
14726    *cygwin*)
14727      VAR_OS=windows
14728      VAR_OS_ENV=windows.cygwin
14729      ;;
14730    *mingw*)
14731      VAR_OS=windows
14732      VAR_OS_ENV=windows.msys
14733      ;;
14734    *aix*)
14735      VAR_OS=aix
14736      VAR_OS_TYPE=unix
14737      ;;
14738    *)
14739      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14740      ;;
14741  esac
14742
14743
14744  # First argument is the cpu name from the trip/quad
14745  case "$build_cpu" in
14746    x86_64)
14747      VAR_CPU=x86_64
14748      VAR_CPU_ARCH=x86
14749      VAR_CPU_BITS=64
14750      VAR_CPU_ENDIAN=little
14751      ;;
14752    i?86)
14753      VAR_CPU=x86
14754      VAR_CPU_ARCH=x86
14755      VAR_CPU_BITS=32
14756      VAR_CPU_ENDIAN=little
14757      ;;
14758    arm*)
14759      VAR_CPU=arm
14760      VAR_CPU_ARCH=arm
14761      VAR_CPU_BITS=32
14762      VAR_CPU_ENDIAN=little
14763      ;;
14764    aarch64)
14765      VAR_CPU=aarch64
14766      VAR_CPU_ARCH=aarch64
14767      VAR_CPU_BITS=64
14768      VAR_CPU_ENDIAN=little
14769      ;;
14770    powerpc)
14771      VAR_CPU=ppc
14772      VAR_CPU_ARCH=ppc
14773      VAR_CPU_BITS=32
14774      VAR_CPU_ENDIAN=big
14775      ;;
14776    powerpc64)
14777      VAR_CPU=ppc64
14778      VAR_CPU_ARCH=ppc
14779      VAR_CPU_BITS=64
14780      VAR_CPU_ENDIAN=big
14781      ;;
14782    powerpc64le)
14783      VAR_CPU=ppc64
14784      VAR_CPU_ARCH=ppc
14785      VAR_CPU_BITS=64
14786      VAR_CPU_ENDIAN=little
14787      ;;
14788    s390)
14789      VAR_CPU=s390
14790      VAR_CPU_ARCH=s390
14791      VAR_CPU_BITS=32
14792      VAR_CPU_ENDIAN=big
14793      ;;
14794    s390x)
14795      VAR_CPU=s390x
14796      VAR_CPU_ARCH=s390
14797      VAR_CPU_BITS=64
14798      VAR_CPU_ENDIAN=big
14799      ;;
14800    sparc)
14801      VAR_CPU=sparc
14802      VAR_CPU_ARCH=sparc
14803      VAR_CPU_BITS=32
14804      VAR_CPU_ENDIAN=big
14805      ;;
14806    sparcv9|sparc64)
14807      VAR_CPU=sparcv9
14808      VAR_CPU_ARCH=sparc
14809      VAR_CPU_BITS=64
14810      VAR_CPU_ENDIAN=big
14811      ;;
14812    *)
14813      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14814      ;;
14815  esac
14816
14817  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14818  OPENJDK_BUILD_OS="$VAR_OS"
14819  if test "x$VAR_OS_TYPE" != x; then
14820    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14821  else
14822    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14823  fi
14824  if test "x$VAR_OS_ENV" != x; then
14825    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14826  else
14827    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14828  fi
14829  OPENJDK_BUILD_CPU="$VAR_CPU"
14830  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14831  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14832  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14833
14834
14835
14836
14837
14838
14839
14840
14841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14842$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14844$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14845
14846  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14847
14848  case "$host_os" in
14849    *linux*)
14850      VAR_OS=linux
14851      VAR_OS_TYPE=unix
14852      ;;
14853    *solaris*)
14854      VAR_OS=solaris
14855      VAR_OS_TYPE=unix
14856      ;;
14857    *darwin*)
14858      VAR_OS=macosx
14859      VAR_OS_TYPE=unix
14860      ;;
14861    *bsd*)
14862      VAR_OS=bsd
14863      VAR_OS_TYPE=unix
14864      ;;
14865    *cygwin*)
14866      VAR_OS=windows
14867      VAR_OS_ENV=windows.cygwin
14868      ;;
14869    *mingw*)
14870      VAR_OS=windows
14871      VAR_OS_ENV=windows.msys
14872      ;;
14873    *aix*)
14874      VAR_OS=aix
14875      VAR_OS_TYPE=unix
14876      ;;
14877    *)
14878      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14879      ;;
14880  esac
14881
14882
14883  # First argument is the cpu name from the trip/quad
14884  case "$host_cpu" in
14885    x86_64)
14886      VAR_CPU=x86_64
14887      VAR_CPU_ARCH=x86
14888      VAR_CPU_BITS=64
14889      VAR_CPU_ENDIAN=little
14890      ;;
14891    i?86)
14892      VAR_CPU=x86
14893      VAR_CPU_ARCH=x86
14894      VAR_CPU_BITS=32
14895      VAR_CPU_ENDIAN=little
14896      ;;
14897    arm*)
14898      VAR_CPU=arm
14899      VAR_CPU_ARCH=arm
14900      VAR_CPU_BITS=32
14901      VAR_CPU_ENDIAN=little
14902      ;;
14903    aarch64)
14904      VAR_CPU=aarch64
14905      VAR_CPU_ARCH=aarch64
14906      VAR_CPU_BITS=64
14907      VAR_CPU_ENDIAN=little
14908      ;;
14909    powerpc)
14910      VAR_CPU=ppc
14911      VAR_CPU_ARCH=ppc
14912      VAR_CPU_BITS=32
14913      VAR_CPU_ENDIAN=big
14914      ;;
14915    powerpc64)
14916      VAR_CPU=ppc64
14917      VAR_CPU_ARCH=ppc
14918      VAR_CPU_BITS=64
14919      VAR_CPU_ENDIAN=big
14920      ;;
14921    powerpc64le)
14922      VAR_CPU=ppc64
14923      VAR_CPU_ARCH=ppc
14924      VAR_CPU_BITS=64
14925      VAR_CPU_ENDIAN=little
14926      ;;
14927    s390)
14928      VAR_CPU=s390
14929      VAR_CPU_ARCH=s390
14930      VAR_CPU_BITS=32
14931      VAR_CPU_ENDIAN=big
14932      ;;
14933    s390x)
14934      VAR_CPU=s390x
14935      VAR_CPU_ARCH=s390
14936      VAR_CPU_BITS=64
14937      VAR_CPU_ENDIAN=big
14938      ;;
14939    sparc)
14940      VAR_CPU=sparc
14941      VAR_CPU_ARCH=sparc
14942      VAR_CPU_BITS=32
14943      VAR_CPU_ENDIAN=big
14944      ;;
14945    sparcv9|sparc64)
14946      VAR_CPU=sparcv9
14947      VAR_CPU_ARCH=sparc
14948      VAR_CPU_BITS=64
14949      VAR_CPU_ENDIAN=big
14950      ;;
14951    *)
14952      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14953      ;;
14954  esac
14955
14956  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14957  OPENJDK_TARGET_OS="$VAR_OS"
14958  if test "x$VAR_OS_TYPE" != x; then
14959    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14960  else
14961    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14962  fi
14963  if test "x$VAR_OS_ENV" != x; then
14964    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14965  else
14966    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14967  fi
14968  OPENJDK_TARGET_CPU="$VAR_CPU"
14969  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14970  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14971  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14972
14973
14974
14975
14976
14977
14978
14979
14980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14981$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14983$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14984
14985
14986
14987# Check whether --with-target-bits was given.
14988if test "${with_target_bits+set}" = set; then :
14989  withval=$with_target_bits;
14990fi
14991
14992
14993  # We have three types of compiles:
14994  # native  == normal compilation, target system == build system
14995  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14996  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14997  #
14998  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14999    # We're doing a proper cross-compilation
15000    COMPILE_TYPE="cross"
15001  else
15002    COMPILE_TYPE="native"
15003  fi
15004
15005  if test "x$with_target_bits" != x; then
15006    if test "x$COMPILE_TYPE" = "xcross"; then
15007      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15008    fi
15009
15010    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15011      # A reduced build is requested
15012      COMPILE_TYPE="reduced"
15013      OPENJDK_TARGET_CPU_BITS=32
15014      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15015        OPENJDK_TARGET_CPU=x86
15016      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15017        OPENJDK_TARGET_CPU=sparc
15018      else
15019        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15020      fi
15021    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15022      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
15023    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15024      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15025$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15026    else
15027      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15028    fi
15029  fi
15030
15031
15032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15033$as_echo_n "checking compilation type... " >&6; }
15034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15035$as_echo "$COMPILE_TYPE" >&6; }
15036
15037
15038  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15039    REQUIRED_OS_NAME=SunOS
15040    REQUIRED_OS_VERSION=5.10
15041  fi
15042  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15043    REQUIRED_OS_NAME=Linux
15044    REQUIRED_OS_VERSION=2.6
15045  fi
15046  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15047    REQUIRED_OS_NAME=Windows
15048    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15049      REQUIRED_OS_VERSION=5.2
15050    else
15051      REQUIRED_OS_VERSION=5.1
15052    fi
15053  fi
15054  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15055    REQUIRED_OS_NAME=Darwin
15056    REQUIRED_OS_VERSION=11.2
15057  fi
15058
15059
15060
15061
15062
15063  # Also store the legacy naming of the cpu.
15064  # Ie i586 and amd64 instead of x86 and x86_64
15065  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15066  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15067    OPENJDK_TARGET_CPU_LEGACY="i586"
15068  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15069    # On all platforms except MacOSX replace x86_64 with amd64.
15070    OPENJDK_TARGET_CPU_LEGACY="amd64"
15071  fi
15072
15073
15074  # And the second legacy naming of the cpu.
15075  # Ie i386 and amd64 instead of x86 and x86_64.
15076  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15077  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15078    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15079  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15080    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15081  fi
15082
15083
15084  # This is the name of the cpu (but using i386 and amd64 instead of
15085  # x86 and x86_64, respectively), preceeded by a /, to be used when
15086  # locating libraries. On macosx, it's empty, though.
15087  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15088  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15089    OPENJDK_TARGET_CPU_LIBDIR=""
15090  fi
15091
15092
15093  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15094  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15095  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15096  OPENJDK_TARGET_CPU_ISADIR=""
15097  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15098    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15099      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15100    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15101      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15102    fi
15103  fi
15104
15105
15106  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15107  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15108  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15109    # On linux only, we replace x86 with i386.
15110    OPENJDK_TARGET_CPU_OSARCH="i386"
15111  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15112    # On all platforms except macosx, we replace x86_64 with amd64.
15113    OPENJDK_TARGET_CPU_OSARCH="amd64"
15114  fi
15115
15116
15117  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15118  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15119    OPENJDK_TARGET_CPU_JLI="i386"
15120  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15121    # On all platforms except macosx, we replace x86_64 with amd64.
15122    OPENJDK_TARGET_CPU_JLI="amd64"
15123  fi
15124  # Now setup the -D flags for building libjli.
15125  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15126  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15127    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15128      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15129    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15130      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15131    fi
15132  fi
15133
15134
15135  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15136      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15137  else
15138      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15139  fi
15140
15141
15142  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15143    A_LP64="LP64:="
15144    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15145    # unpack200.exe
15146    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15147      ADD_LP64="-D_LP64=1"
15148    fi
15149  fi
15150  LP64=$A_LP64
15151
15152
15153  if test "x$COMPILE_TYPE" = "xcross"; then
15154    # FIXME: ... or should this include reduced builds..?
15155    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15156  else
15157    DEFINE_CROSS_COMPILE_ARCH=""
15158  fi
15159
15160
15161  # ZERO_ARCHDEF is used to enable architecture-specific code
15162  case "${OPENJDK_TARGET_CPU}" in
15163    ppc)     ZERO_ARCHDEF=PPC32 ;;
15164    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15165    s390*)   ZERO_ARCHDEF=S390  ;;
15166    sparc*)  ZERO_ARCHDEF=SPARC ;;
15167    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15168    x86)     ZERO_ARCHDEF=IA32  ;;
15169    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15170  esac
15171
15172
15173
15174
15175# Continue setting up basic stuff. Most remaining code require fundamental tools.
15176
15177  # Save the current directory this script was started from
15178  CURDIR="$PWD"
15179
15180  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15181  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15182  # was not available at that time.
15183  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15184  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15185    ORIGINAL_PATH="$REWRITTEN_PATH"
15186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15187$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15188  fi
15189
15190  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15191    PATH_SEP=";"
15192
15193  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15194  if test $SRC_ROOT_LENGTH -gt 100; then
15195    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15196  fi
15197
15198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15200$as_echo_n "checking cygwin release... " >&6; }
15201    CYGWIN_VERSION=`$UNAME -r`
15202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15203$as_echo "$CYGWIN_VERSION" >&6; }
15204    WINDOWS_ENV_VENDOR='cygwin'
15205    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15206
15207    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15208    if test "x$CYGWIN_VERSION_OLD" != x; then
15209      { $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
15210$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;}
15211      as_fn_error $? "Cannot continue" "$LINENO" 5
15212    fi
15213    if test "x$CYGPATH" = x; then
15214      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15215    fi
15216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15217$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15218    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15219    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15220    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15221    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15223$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15224    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15225    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15226    if test "x$test_cygdrive_prefix" = x; then
15227      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15228    fi
15229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15231$as_echo_n "checking msys release... " >&6; }
15232    MSYS_VERSION=`$UNAME -r`
15233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15234$as_echo "$MSYS_VERSION" >&6; }
15235
15236    WINDOWS_ENV_VENDOR='msys'
15237    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15238
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15240$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15241    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15242    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15243
15244  windows_path="$MSYS_ROOT_PATH"
15245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15246    unix_path=`$CYGPATH -u "$windows_path"`
15247    MSYS_ROOT_PATH="$unix_path"
15248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15250    MSYS_ROOT_PATH="$unix_path"
15251  fi
15252
15253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15254$as_echo "$MSYS_ROOT_PATH" >&6; }
15255    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15256  else
15257    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15258  fi
15259
15260  # Test if windows or unix (cygwin/msys) find is first in path.
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15262$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15263  FIND_BINARY_OUTPUT=`find --version 2>&1`
15264  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15266$as_echo "unix style" >&6; }
15267  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15269$as_echo "Windows" >&6; }
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15271$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15272    { $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
15273$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15274    as_fn_error $? "Cannot continue" "$LINENO" 5
15275  else
15276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15277$as_echo "unknown" >&6; }
15278    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15279$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15280  fi
15281
15282  else
15283    PATH_SEP=":"
15284  fi
15285
15286
15287  # We get the top-level directory from the supporting wrappers.
15288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15289$as_echo_n "checking for top-level directory... " >&6; }
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15291$as_echo "$TOPDIR" >&6; }
15292
15293
15294  # Save the original version of TOPDIR for string comparisons
15295  ORIGINAL_TOPDIR="$TOPDIR"
15296
15297
15298  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15299
15300  # Only process if variable expands to non-empty
15301
15302  if test "x$CURDIR" != x; then
15303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15304
15305  # Input might be given as Windows format, start by converting to
15306  # unix format.
15307  path="$CURDIR"
15308  new_path=`$CYGPATH -u "$path"`
15309
15310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15313  # "foo.exe" is OK but "foo" is an error.
15314  #
15315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15316  # It is also a way to make sure we got the proper file name for the real test later on.
15317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15318  if test "x$test_shortpath" = x; then
15319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15320$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15321    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15322  fi
15323
15324  # Call helper function which possibly converts this using DOS-style short mode.
15325  # If so, the updated path is stored in $new_path.
15326
15327  input_path="$new_path"
15328  # Check if we need to convert this using DOS-style short mode. If the path
15329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15330  # take no chances and rewrite it.
15331  # Note: m4 eats our [], so we need to use [ and ] instead.
15332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15333  if test "x$has_forbidden_chars" != x; then
15334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15338      # Going to short mode and back again did indeed matter. Since short mode is
15339      # case insensitive, let's make it lowercase to improve readability.
15340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15341      # Now convert it back to Unix-style (cygpath)
15342      input_path=`$CYGPATH -u "$shortmode_path"`
15343      new_path="$input_path"
15344    fi
15345  fi
15346
15347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15348  if test "x$test_cygdrive_prefix" = x; then
15349    # As a simple fix, exclude /usr/bin since it's not a real path.
15350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15352      # a path prefixed by /cygdrive for fixpath to work.
15353      new_path="$CYGWIN_ROOT_PATH$input_path"
15354    fi
15355  fi
15356
15357
15358  if test "x$path" != "x$new_path"; then
15359    CURDIR="$new_path"
15360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15361$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15362  fi
15363
15364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15365
15366  path="$CURDIR"
15367  has_colon=`$ECHO $path | $GREP ^.:`
15368  new_path="$path"
15369  if test "x$has_colon" = x; then
15370    # Not in mixed or Windows style, start by that.
15371    new_path=`cmd //c echo $path`
15372  fi
15373
15374
15375  input_path="$new_path"
15376  # Check if we need to convert this using DOS-style short mode. If the path
15377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15378  # take no chances and rewrite it.
15379  # Note: m4 eats our [], so we need to use [ and ] instead.
15380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15381  if test "x$has_forbidden_chars" != x; then
15382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15384  fi
15385
15386
15387  windows_path="$new_path"
15388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15389    unix_path=`$CYGPATH -u "$windows_path"`
15390    new_path="$unix_path"
15391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15393    new_path="$unix_path"
15394  fi
15395
15396  if test "x$path" != "x$new_path"; then
15397    CURDIR="$new_path"
15398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15399$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15400  fi
15401
15402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15404
15405    else
15406      # We're on a unix platform. Hooray! :)
15407      path="$CURDIR"
15408      has_space=`$ECHO "$path" | $GREP " "`
15409      if test "x$has_space" != x; then
15410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15411$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15413      fi
15414
15415      # Use eval to expand a potential ~
15416      eval path="$path"
15417      if test ! -f "$path" && test ! -d "$path"; then
15418        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15419      fi
15420
15421      if test -d "$path"; then
15422        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15423      else
15424        dir="`$DIRNAME "$path"`"
15425        base="`$BASENAME "$path"`"
15426        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15427      fi
15428    fi
15429  fi
15430
15431
15432  # Only process if variable expands to non-empty
15433
15434  if test "x$TOPDIR" != x; then
15435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15436
15437  # Input might be given as Windows format, start by converting to
15438  # unix format.
15439  path="$TOPDIR"
15440  new_path=`$CYGPATH -u "$path"`
15441
15442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15445  # "foo.exe" is OK but "foo" is an error.
15446  #
15447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15448  # It is also a way to make sure we got the proper file name for the real test later on.
15449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15450  if test "x$test_shortpath" = x; then
15451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15452$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15453    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15454  fi
15455
15456  # Call helper function which possibly converts this using DOS-style short mode.
15457  # If so, the updated path is stored in $new_path.
15458
15459  input_path="$new_path"
15460  # Check if we need to convert this using DOS-style short mode. If the path
15461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15462  # take no chances and rewrite it.
15463  # Note: m4 eats our [], so we need to use [ and ] instead.
15464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15465  if test "x$has_forbidden_chars" != x; then
15466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15470      # Going to short mode and back again did indeed matter. Since short mode is
15471      # case insensitive, let's make it lowercase to improve readability.
15472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15473      # Now convert it back to Unix-style (cygpath)
15474      input_path=`$CYGPATH -u "$shortmode_path"`
15475      new_path="$input_path"
15476    fi
15477  fi
15478
15479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15480  if test "x$test_cygdrive_prefix" = x; then
15481    # As a simple fix, exclude /usr/bin since it's not a real path.
15482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15484      # a path prefixed by /cygdrive for fixpath to work.
15485      new_path="$CYGWIN_ROOT_PATH$input_path"
15486    fi
15487  fi
15488
15489
15490  if test "x$path" != "x$new_path"; then
15491    TOPDIR="$new_path"
15492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15493$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15494  fi
15495
15496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15497
15498  path="$TOPDIR"
15499  has_colon=`$ECHO $path | $GREP ^.:`
15500  new_path="$path"
15501  if test "x$has_colon" = x; then
15502    # Not in mixed or Windows style, start by that.
15503    new_path=`cmd //c echo $path`
15504  fi
15505
15506
15507  input_path="$new_path"
15508  # Check if we need to convert this using DOS-style short mode. If the path
15509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15510  # take no chances and rewrite it.
15511  # Note: m4 eats our [], so we need to use [ and ] instead.
15512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15513  if test "x$has_forbidden_chars" != x; then
15514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15516  fi
15517
15518
15519  windows_path="$new_path"
15520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15521    unix_path=`$CYGPATH -u "$windows_path"`
15522    new_path="$unix_path"
15523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15525    new_path="$unix_path"
15526  fi
15527
15528  if test "x$path" != "x$new_path"; then
15529    TOPDIR="$new_path"
15530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15531$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15532  fi
15533
15534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15536
15537    else
15538      # We're on a unix platform. Hooray! :)
15539      path="$TOPDIR"
15540      has_space=`$ECHO "$path" | $GREP " "`
15541      if test "x$has_space" != x; then
15542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15543$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15545      fi
15546
15547      # Use eval to expand a potential ~
15548      eval path="$path"
15549      if test ! -f "$path" && test ! -d "$path"; then
15550        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15551      fi
15552
15553      if test -d "$path"; then
15554        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15555      else
15556        dir="`$DIRNAME "$path"`"
15557        base="`$BASENAME "$path"`"
15558        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15559      fi
15560    fi
15561  fi
15562
15563  # SRC_ROOT is a traditional alias for TOPDIR.
15564  SRC_ROOT=$TOPDIR
15565
15566  # Calculate a canonical version of TOPDIR for string comparisons
15567  CANONICAL_TOPDIR=$TOPDIR
15568
15569  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15570    # Follow a chain of symbolic links. Use readlink
15571    # where it exists, else fall back to horribly
15572    # complicated shell code.
15573    if test "x$READLINK_TESTED" != yes; then
15574      # On MacOSX there is a readlink tool with a different
15575      # purpose than the GNU readlink tool. Check the found readlink.
15576      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15577      if test "x$ISGNU" = x; then
15578        # A readlink that we do not know how to use.
15579        # Are there other non-GNU readlinks out there?
15580        READLINK_TESTED=yes
15581        READLINK=
15582      fi
15583    fi
15584
15585    if test "x$READLINK" != x; then
15586      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15587    else
15588      # Save the current directory for restoring afterwards
15589      STARTDIR=$PWD
15590      COUNTER=0
15591      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15592      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15593      cd $sym_link_dir
15594      # Use -P flag to resolve symlinks in directories.
15595      cd `$THEPWDCMD -P`
15596      sym_link_dir=`$THEPWDCMD -P`
15597      # Resolve file symlinks
15598      while test $COUNTER -lt 20; do
15599        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15600        if test "x$ISLINK" == x; then
15601          # This is not a symbolic link! We are done!
15602          break
15603        fi
15604        # Again resolve directory symlinks since the target of the just found
15605        # link could be in a different directory
15606        cd `$DIRNAME $ISLINK`
15607        sym_link_dir=`$THEPWDCMD -P`
15608        sym_link_file=`$BASENAME $ISLINK`
15609        let COUNTER=COUNTER+1
15610      done
15611      cd $STARTDIR
15612      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15613    fi
15614  fi
15615
15616
15617
15618  # Locate the directory of this script.
15619  AUTOCONF_DIR=$TOPDIR/common/autoconf
15620
15621
15622# Check if it's a pure open build or if custom sources are to be used.
15623
15624  # Check whether --enable-openjdk-only was given.
15625if test "${enable_openjdk_only+set}" = set; then :
15626  enableval=$enable_openjdk_only;
15627else
15628  enable_openjdk_only="no"
15629fi
15630
15631
15632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15633$as_echo_n "checking for presence of closed sources... " >&6; }
15634  if test -d "$SRC_ROOT/jdk/src/closed"; then
15635    CLOSED_SOURCE_PRESENT=yes
15636  else
15637    CLOSED_SOURCE_PRESENT=no
15638  fi
15639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15640$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15641
15642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15643$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15644  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15646$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15647
15648  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15649    OPENJDK=true
15650    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15651      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15652$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15653    fi
15654  else
15655    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15656      OPENJDK=true
15657    else
15658      OPENJDK=false
15659    fi
15660  fi
15661
15662  if test "x$OPENJDK" = "xtrue"; then
15663    SET_OPENJDK="OPENJDK=true"
15664  fi
15665
15666
15667
15668  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15669  # the IncludeCustomExtension macro.
15670
15671
15672# Check whether --with-custom-make-dir was given.
15673if test "${with_custom_make_dir+set}" = set; then :
15674  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
15675$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15676fi
15677
15678
15679
15680
15681# These are needed to be able to create a configuration name (and thus the output directory)
15682
15683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15684$as_echo_n "checking which variant of the JDK to build... " >&6; }
15685
15686# Check whether --with-jdk-variant was given.
15687if test "${with_jdk_variant+set}" = set; then :
15688  withval=$with_jdk_variant;
15689fi
15690
15691
15692  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15693    JDK_VARIANT="normal"
15694  else
15695    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15696  fi
15697
15698
15699
15700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15701$as_echo "$JDK_VARIANT" >&6; }
15702
15703
15704
15705# Check whether --with-jvm-interpreter was given.
15706if test "${with_jvm_interpreter+set}" = set; then :
15707  withval=$with_jvm_interpreter;
15708fi
15709
15710
15711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15712$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15713  if test "x$with_jvm_interpreter" = x; then
15714    JVM_INTERPRETER="template"
15715  else
15716    JVM_INTERPRETER="$with_jvm_interpreter"
15717  fi
15718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15719$as_echo "$JVM_INTERPRETER" >&6; }
15720
15721  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15722    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15723  fi
15724
15725
15726
15727
15728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15729$as_echo_n "checking which variants of the JVM to build... " >&6; }
15730
15731# Check whether --with-jvm-variants was given.
15732if test "${with_jvm_variants+set}" = set; then :
15733  withval=$with_jvm_variants;
15734fi
15735
15736
15737  if test "x$with_jvm_variants" = x; then
15738    with_jvm_variants="server"
15739  fi
15740
15741  JVM_VARIANTS=",$with_jvm_variants,"
15742  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15743
15744  if test "x$TEST_VARIANTS" != "x,"; then
15745    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15746  fi
15747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15748$as_echo "$with_jvm_variants" >&6; }
15749
15750  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15751  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15752  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15753  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15754  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15755  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15756
15757  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15758    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15759      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15760    fi
15761  fi
15762  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15763    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15764      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15765    fi
15766  fi
15767
15768  # Replace the commas with AND for use in the build directory name.
15769  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15770  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/'`
15771  if test "x$COUNT_VARIANTS" != "x,1"; then
15772    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15773  else
15774    BUILDING_MULTIPLE_JVM_VARIANTS=no
15775  fi
15776
15777  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15778    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15779  fi
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789  INCLUDE_SA=true
15790  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15791    INCLUDE_SA=false
15792  fi
15793  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15794    INCLUDE_SA=false
15795  fi
15796  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15797    INCLUDE_SA=false
15798  fi
15799  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15800    INCLUDE_SA=false
15801  fi
15802
15803
15804  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15805    MACOSX_UNIVERSAL="true"
15806  fi
15807
15808
15809
15810
15811  DEBUG_LEVEL="release"
15812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15813$as_echo_n "checking which debug level to use... " >&6; }
15814  # Check whether --enable-debug was given.
15815if test "${enable_debug+set}" = set; then :
15816  enableval=$enable_debug;
15817        ENABLE_DEBUG="${enableval}"
15818        DEBUG_LEVEL="fastdebug"
15819
15820else
15821  ENABLE_DEBUG="no"
15822fi
15823
15824
15825
15826# Check whether --with-debug-level was given.
15827if test "${with_debug_level+set}" = set; then :
15828  withval=$with_debug_level;
15829        DEBUG_LEVEL="${withval}"
15830        if test "x$ENABLE_DEBUG" = xyes; then
15831          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15832        fi
15833
15834fi
15835
15836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15837$as_echo "$DEBUG_LEVEL" >&6; }
15838
15839  if test "x$DEBUG_LEVEL" != xrelease && \
15840      test "x$DEBUG_LEVEL" != xoptimized && \
15841      test "x$DEBUG_LEVEL" != xfastdebug && \
15842      test "x$DEBUG_LEVEL" != xslowdebug; then
15843    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15844  fi
15845
15846
15847  case $DEBUG_LEVEL in
15848    release )
15849      VARIANT="OPT"
15850      FASTDEBUG="false"
15851      DEBUG_CLASSFILES="false"
15852      BUILD_VARIANT_RELEASE=""
15853      HOTSPOT_DEBUG_LEVEL="product"
15854      HOTSPOT_EXPORT="product"
15855      ;;
15856    fastdebug )
15857      VARIANT="DBG"
15858      FASTDEBUG="true"
15859      DEBUG_CLASSFILES="true"
15860      BUILD_VARIANT_RELEASE="-fastdebug"
15861      HOTSPOT_DEBUG_LEVEL="fastdebug"
15862      HOTSPOT_EXPORT="fastdebug"
15863      ;;
15864    slowdebug )
15865      VARIANT="DBG"
15866      FASTDEBUG="false"
15867      DEBUG_CLASSFILES="true"
15868      BUILD_VARIANT_RELEASE="-debug"
15869      HOTSPOT_DEBUG_LEVEL="debug"
15870      HOTSPOT_EXPORT="debug"
15871      ;;
15872    optimized )
15873      VARIANT="OPT"
15874      FASTDEBUG="false"
15875      DEBUG_CLASSFILES="false"
15876      BUILD_VARIANT_RELEASE="-optimized"
15877      HOTSPOT_DEBUG_LEVEL="optimized"
15878      HOTSPOT_EXPORT="optimized"
15879      ;;
15880  esac
15881
15882  # The debug level 'optimized' is a little special because it is currently only
15883  # applicable to the HotSpot build where it means to build a completely
15884  # optimized version of the VM without any debugging code (like for the
15885  # 'release' debug level which is called 'product' in the HotSpot build) but
15886  # with the exception that it can contain additional code which is otherwise
15887  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15888  # test new and/or experimental features which are not intended for customer
15889  # shipment. Because these new features need to be tested and benchmarked in
15890  # real world scenarios, we want to build the containing JDK at the 'release'
15891  # debug level.
15892  if test "x$DEBUG_LEVEL" = xoptimized; then
15893    DEBUG_LEVEL="release"
15894  fi
15895
15896  #####
15897  # Generate the legacy makefile targets for hotspot.
15898  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15899  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15900  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15901  # But until then ...
15902  HOTSPOT_TARGET=""
15903
15904  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15905    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15906  fi
15907
15908  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15909    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15910  fi
15911
15912  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15913    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15914  fi
15915
15916  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15917    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15918  fi
15919
15920  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15921    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15922  fi
15923
15924  if test "x$JVM_VARIANT_CORE" = xtrue; then
15925    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15926  fi
15927
15928  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15929
15930  # On Macosx universal binaries are produced, but they only contain
15931  # 64 bit intel. This invalidates control of which jvms are built
15932  # from configure, but only server is valid anyway. Fix this
15933  # when hotspot makefiles are rewritten.
15934  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15935    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15936  fi
15937
15938  #####
15939
15940
15941
15942
15943
15944
15945
15946
15947# With basic setup done, call the custom early hook.
15948
15949
15950# Check if we have devkits, extra paths or sysroot set.
15951
15952
15953# Check whether --with-devkit was given.
15954if test "${with_devkit+set}" = set; then :
15955  withval=$with_devkit;
15956
15957  # Only process if variable expands to non-empty
15958
15959  if test "x$with_devkit" != x; then
15960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15961
15962  # Input might be given as Windows format, start by converting to
15963  # unix format.
15964  path="$with_devkit"
15965  new_path=`$CYGPATH -u "$path"`
15966
15967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15970  # "foo.exe" is OK but "foo" is an error.
15971  #
15972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15973  # It is also a way to make sure we got the proper file name for the real test later on.
15974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15975  if test "x$test_shortpath" = x; then
15976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15977$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15978    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15979  fi
15980
15981  # Call helper function which possibly converts this using DOS-style short mode.
15982  # If so, the updated path is stored in $new_path.
15983
15984  input_path="$new_path"
15985  # Check if we need to convert this using DOS-style short mode. If the path
15986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987  # take no chances and rewrite it.
15988  # Note: m4 eats our [], so we need to use [ and ] instead.
15989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15990  if test "x$has_forbidden_chars" != x; then
15991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15995      # Going to short mode and back again did indeed matter. Since short mode is
15996      # case insensitive, let's make it lowercase to improve readability.
15997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15998      # Now convert it back to Unix-style (cygpath)
15999      input_path=`$CYGPATH -u "$shortmode_path"`
16000      new_path="$input_path"
16001    fi
16002  fi
16003
16004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16005  if test "x$test_cygdrive_prefix" = x; then
16006    # As a simple fix, exclude /usr/bin since it's not a real path.
16007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16009      # a path prefixed by /cygdrive for fixpath to work.
16010      new_path="$CYGWIN_ROOT_PATH$input_path"
16011    fi
16012  fi
16013
16014
16015  if test "x$path" != "x$new_path"; then
16016    with_devkit="$new_path"
16017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16018$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16019  fi
16020
16021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16022
16023  path="$with_devkit"
16024  has_colon=`$ECHO $path | $GREP ^.:`
16025  new_path="$path"
16026  if test "x$has_colon" = x; then
16027    # Not in mixed or Windows style, start by that.
16028    new_path=`cmd //c echo $path`
16029  fi
16030
16031
16032  input_path="$new_path"
16033  # Check if we need to convert this using DOS-style short mode. If the path
16034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16035  # take no chances and rewrite it.
16036  # Note: m4 eats our [], so we need to use [ and ] instead.
16037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16038  if test "x$has_forbidden_chars" != x; then
16039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16041  fi
16042
16043
16044  windows_path="$new_path"
16045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16046    unix_path=`$CYGPATH -u "$windows_path"`
16047    new_path="$unix_path"
16048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16050    new_path="$unix_path"
16051  fi
16052
16053  if test "x$path" != "x$new_path"; then
16054    with_devkit="$new_path"
16055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16056$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16057  fi
16058
16059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16061
16062    else
16063      # We're on a unix platform. Hooray! :)
16064      path="$with_devkit"
16065      has_space=`$ECHO "$path" | $GREP " "`
16066      if test "x$has_space" != x; then
16067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16068$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16070      fi
16071
16072      # Use eval to expand a potential ~
16073      eval path="$path"
16074      if test ! -f "$path" && test ! -d "$path"; then
16075        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16076      fi
16077
16078      if test -d "$path"; then
16079        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16080      else
16081        dir="`$DIRNAME "$path"`"
16082        base="`$BASENAME "$path"`"
16083        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16084      fi
16085    fi
16086  fi
16087
16088        DEVKIT_ROOT="$with_devkit"
16089        # Check for a meta data info file in the root of the devkit
16090        if test -f "$DEVKIT_ROOT/devkit.info"; then
16091          . $DEVKIT_ROOT/devkit.info
16092          # This potentially sets the following:
16093          # A descriptive name of the devkit
16094
16095  if test "x$DEVKIT_NAME" = x; then
16096    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16097  fi
16098
16099          # Corresponds to --with-extra-path
16100
16101  if test "x$DEVKIT_EXTRA_PATH" = x; then
16102    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16103  fi
16104
16105          # Corresponds to --with-toolchain-path
16106
16107  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16108    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16109  fi
16110
16111          # Corresponds to --with-sysroot
16112
16113  if test "x$DEVKIT_SYSROOT" = x; then
16114    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16115  fi
16116
16117
16118          # Identifies the Visual Studio version in the devkit
16119
16120  if test "x$DEVKIT_VS_VERSION" = x; then
16121    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16122  fi
16123
16124          # The Visual Studio include environment variable
16125
16126  if test "x$DEVKIT_VS_INCLUDE" = x; then
16127    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16128  fi
16129
16130          # The Visual Studio lib environment variable
16131
16132  if test "x$DEVKIT_VS_LIB" = x; then
16133    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16134  fi
16135
16136          # Corresponds to --with-msvcr-dll
16137
16138  if test "x$DEVKIT_MSVCR_DLL" = x; then
16139    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16140  fi
16141
16142          # Corresponds to --with-msvcp-dll
16143
16144  if test "x$DEVKIT_MSVCP_DLL" = x; then
16145    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16146  fi
16147
16148        fi
16149
16150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16151$as_echo_n "checking for devkit... " >&6; }
16152        if test "x$DEVKIT_NAME" != x; then
16153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16154$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16155        else
16156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16157$as_echo "$DEVKIT_ROOT" >&6; }
16158        fi
16159
16160
16161  if test "x$DEVKIT_EXTRA_PATH" != x; then
16162    if test "x$EXTRA_PATH" = x; then
16163      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16164    else
16165      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16166    fi
16167  fi
16168
16169
16170        # Fallback default of just /bin if DEVKIT_PATH is not defined
16171        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16172          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16173        fi
16174
16175  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16176    if test "x$TOOLCHAIN_PATH" = x; then
16177      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16178    else
16179      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16180    fi
16181  fi
16182
16183
16184        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16185        # places for backwards compatiblity.
16186        if test "x$DEVKIT_SYSROOT" != x; then
16187          SYSROOT="$DEVKIT_SYSROOT"
16188        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16189          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16190        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16191          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16192        fi
16193
16194
16195fi
16196
16197
16198  # You can force the sysroot if the sysroot encoded into the compiler tools
16199  # is not correct.
16200
16201# Check whether --with-sys-root was given.
16202if test "${with_sys_root+set}" = set; then :
16203  withval=$with_sys_root; SYSROOT=$with_sys_root
16204
16205fi
16206
16207
16208
16209# Check whether --with-sysroot was given.
16210if test "${with_sysroot+set}" = set; then :
16211  withval=$with_sysroot; SYSROOT=$with_sysroot
16212
16213fi
16214
16215
16216
16217# Check whether --with-tools-dir was given.
16218if test "${with_tools_dir+set}" = set; then :
16219  withval=$with_tools_dir;
16220  if test "x$with_tools_dir" != x; then
16221    if test "x$TOOLCHAIN_PATH" = x; then
16222      TOOLCHAIN_PATH="$with_tools_dir"
16223    else
16224      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16225    fi
16226  fi
16227
16228
16229fi
16230
16231
16232
16233# Check whether --with-toolchain-path was given.
16234if test "${with_toolchain_path+set}" = set; then :
16235  withval=$with_toolchain_path;
16236  if test "x$with_toolchain_path" != x; then
16237    if test "x$TOOLCHAIN_PATH" = x; then
16238      TOOLCHAIN_PATH="$with_toolchain_path"
16239    else
16240      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16241    fi
16242  fi
16243
16244
16245fi
16246
16247
16248
16249# Check whether --with-extra-path was given.
16250if test "${with_extra_path+set}" = set; then :
16251  withval=$with_extra_path;
16252  if test "x$with_extra_path" != x; then
16253    if test "x$EXTRA_PATH" = x; then
16254      EXTRA_PATH="$with_extra_path"
16255    else
16256      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16257    fi
16258  fi
16259
16260
16261fi
16262
16263
16264  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16265    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16266    # If not, detect if Xcode is installed by running xcodebuild -version
16267    # if no Xcode installed, xcodebuild exits with 1
16268    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16269    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16270      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16271      # fall back on the stub binary in /usr/bin/xcodebuild
16272      # Extract the first word of "xcodebuild", so it can be a program name with args.
16273set dummy xcodebuild; ac_word=$2
16274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16275$as_echo_n "checking for $ac_word... " >&6; }
16276if ${ac_cv_path_XCODEBUILD+:} false; then :
16277  $as_echo_n "(cached) " >&6
16278else
16279  case $XCODEBUILD in
16280  [\\/]* | ?:[\\/]*)
16281  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16282  ;;
16283  *)
16284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16285for as_dir in $TOOLCHAIN_PATH
16286do
16287  IFS=$as_save_IFS
16288  test -z "$as_dir" && as_dir=.
16289    for ac_exec_ext in '' $ac_executable_extensions; do
16290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16291    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16293    break 2
16294  fi
16295done
16296  done
16297IFS=$as_save_IFS
16298
16299  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16300  ;;
16301esac
16302fi
16303XCODEBUILD=$ac_cv_path_XCODEBUILD
16304if test -n "$XCODEBUILD"; then
16305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16306$as_echo "$XCODEBUILD" >&6; }
16307else
16308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16309$as_echo "no" >&6; }
16310fi
16311
16312
16313    else
16314      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16315      # when only the command line tools are installed there are no SDKs, so headers
16316      # are copied into the system frameworks
16317      XCODEBUILD=
16318
16319    fi
16320
16321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16322$as_echo_n "checking for sdk name... " >&6; }
16323
16324# Check whether --with-sdk-name was given.
16325if test "${with_sdk_name+set}" = set; then :
16326  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16327
16328fi
16329
16330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16331$as_echo "$SDKNAME" >&6; }
16332
16333    # if toolchain path is specified then don't rely on system headers, they may not compile
16334    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16335    test -z "$TOOLCHAIN_PATH" && \
16336      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16337
16338    if test -z "$SYSROOT"; then
16339      if test -n "$XCODEBUILD"; then
16340        # if we don't have system headers, use default SDK name (last resort)
16341        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16342          SDKNAME=${SDKNAME:-macosx}
16343        fi
16344
16345        if test -n "$SDKNAME"; then
16346          # Call xcodebuild to determine SYSROOT
16347          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16348        fi
16349      else
16350        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16351          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
16352        fi
16353      fi
16354    else
16355      # warn user if --with-sdk-name was also set
16356      if test -n "$with_sdk_name"; then
16357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16358$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16359      fi
16360    fi
16361
16362    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16363      # If no system framework headers, then SYSROOT must be set, or we won't build
16364      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
16365    fi
16366
16367    # Perform a basic sanity test
16368    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16369      if test -z "$SYSROOT"; then
16370        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
16371      else
16372        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16373      fi
16374    fi
16375
16376    # set SDKROOT too, Xcode tools will pick it up
16377    SDKROOT=$SYSROOT
16378
16379  fi
16380
16381  # Prepend the extra path to the global path
16382
16383  if test "x$EXTRA_PATH" != x; then
16384    if test "x$PATH" = x; then
16385      PATH="$EXTRA_PATH"
16386    else
16387      PATH="$EXTRA_PATH:$PATH"
16388    fi
16389  fi
16390
16391
16392  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16393    # Add extra search paths on solaris for utilities like ar and as etc...
16394    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16395  fi
16396
16397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16398$as_echo_n "checking for sysroot... " >&6; }
16399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16400$as_echo "$SYSROOT" >&6; }
16401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16402$as_echo_n "checking for toolchain path... " >&6; }
16403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16404$as_echo "$TOOLCHAIN_PATH" >&6; }
16405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16406$as_echo_n "checking for extra path... " >&6; }
16407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16408$as_echo "$EXTRA_PATH" >&6; }
16409
16410
16411# To properly create a configuration name, we need to have the OpenJDK target
16412# and options (variants and debug level) parsed.
16413
16414
16415
16416# Check whether --with-conf-name was given.
16417if test "${with_conf_name+set}" = set; then :
16418  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16419fi
16420
16421
16422  # Test from where we are running configure, in or outside of src root.
16423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16424$as_echo_n "checking where to store configuration... " >&6; }
16425  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16426      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16427      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16428    # We are running configure from the src root.
16429    # Create a default ./build/target-variant-debuglevel output root.
16430    if test "x${CONF_NAME}" = x; then
16431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16432$as_echo "in default location" >&6; }
16433      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16434    else
16435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16436$as_echo "in build directory with custom name" >&6; }
16437    fi
16438    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16439    $MKDIR -p "$OUTPUT_ROOT"
16440    if test ! -d "$OUTPUT_ROOT"; then
16441      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16442    fi
16443  else
16444    # We are running configure from outside of the src dir.
16445    # Then use the current directory as output dir!
16446    # If configuration is situated in normal build directory, just use the build
16447    # directory name as configuration name, otherwise use the complete path.
16448    if test "x${CONF_NAME}" = x; then
16449      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16450    fi
16451    OUTPUT_ROOT="$CURDIR"
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16453$as_echo "in current directory" >&6; }
16454
16455    # WARNING: This might be a bad thing to do. You need to be sure you want to
16456    # have a configuration in this directory. Do some sanity checks!
16457
16458    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16459      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16460      # other files
16461      files_present=`$LS $OUTPUT_ROOT`
16462      # Configure has already touched config.log and confdefs.h in the current dir when this check
16463      # is performed.
16464      filtered_files=`$ECHO "$files_present" \
16465          | $SED -e 's/config.log//g' \
16466              -e 's/configure.log//g' \
16467              -e 's/confdefs.h//g' \
16468              -e 's/ //g' \
16469          | $TR -d '\n'`
16470      if test "x$filtered_files" != x; then
16471        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16472$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16473        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16474$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16475        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16476$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16478$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16479        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16480$as_echo "$as_me: seriously mess up just about everything." >&6;}
16481        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16482$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16483        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16484$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16485        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16486      fi
16487    fi
16488  fi
16489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16490$as_echo_n "checking what configuration name to use... " >&6; }
16491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16492$as_echo "$CONF_NAME" >&6; }
16493
16494
16495  # Only process if variable expands to non-empty
16496
16497  if test "x$OUTPUT_ROOT" != x; then
16498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16499
16500  # Input might be given as Windows format, start by converting to
16501  # unix format.
16502  path="$OUTPUT_ROOT"
16503  new_path=`$CYGPATH -u "$path"`
16504
16505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16508  # "foo.exe" is OK but "foo" is an error.
16509  #
16510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16511  # It is also a way to make sure we got the proper file name for the real test later on.
16512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16513  if test "x$test_shortpath" = x; then
16514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16515$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16516    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16517  fi
16518
16519  # Call helper function which possibly converts this using DOS-style short mode.
16520  # If so, the updated path is stored in $new_path.
16521
16522  input_path="$new_path"
16523  # Check if we need to convert this using DOS-style short mode. If the path
16524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16525  # take no chances and rewrite it.
16526  # Note: m4 eats our [], so we need to use [ and ] instead.
16527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16528  if test "x$has_forbidden_chars" != x; then
16529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16533      # Going to short mode and back again did indeed matter. Since short mode is
16534      # case insensitive, let's make it lowercase to improve readability.
16535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16536      # Now convert it back to Unix-style (cygpath)
16537      input_path=`$CYGPATH -u "$shortmode_path"`
16538      new_path="$input_path"
16539    fi
16540  fi
16541
16542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16543  if test "x$test_cygdrive_prefix" = x; then
16544    # As a simple fix, exclude /usr/bin since it's not a real path.
16545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16547      # a path prefixed by /cygdrive for fixpath to work.
16548      new_path="$CYGWIN_ROOT_PATH$input_path"
16549    fi
16550  fi
16551
16552
16553  if test "x$path" != "x$new_path"; then
16554    OUTPUT_ROOT="$new_path"
16555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16556$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16557  fi
16558
16559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16560
16561  path="$OUTPUT_ROOT"
16562  has_colon=`$ECHO $path | $GREP ^.:`
16563  new_path="$path"
16564  if test "x$has_colon" = x; then
16565    # Not in mixed or Windows style, start by that.
16566    new_path=`cmd //c echo $path`
16567  fi
16568
16569
16570  input_path="$new_path"
16571  # Check if we need to convert this using DOS-style short mode. If the path
16572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16573  # take no chances and rewrite it.
16574  # Note: m4 eats our [], so we need to use [ and ] instead.
16575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16576  if test "x$has_forbidden_chars" != x; then
16577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16579  fi
16580
16581
16582  windows_path="$new_path"
16583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16584    unix_path=`$CYGPATH -u "$windows_path"`
16585    new_path="$unix_path"
16586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16588    new_path="$unix_path"
16589  fi
16590
16591  if test "x$path" != "x$new_path"; then
16592    OUTPUT_ROOT="$new_path"
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16594$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16595  fi
16596
16597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16599
16600    else
16601      # We're on a unix platform. Hooray! :)
16602      path="$OUTPUT_ROOT"
16603      has_space=`$ECHO "$path" | $GREP " "`
16604      if test "x$has_space" != x; then
16605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16606$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16608      fi
16609
16610      # Use eval to expand a potential ~
16611      eval path="$path"
16612      if test ! -f "$path" && test ! -d "$path"; then
16613        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16614      fi
16615
16616      if test -d "$path"; then
16617        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16618      else
16619        dir="`$DIRNAME "$path"`"
16620        base="`$BASENAME "$path"`"
16621        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16622      fi
16623    fi
16624  fi
16625
16626
16627  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16628  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16629
16630  SPEC=$OUTPUT_ROOT/spec.gmk
16631
16632  CONF_NAME=$CONF_NAME
16633
16634  OUTPUT_ROOT=$OUTPUT_ROOT
16635
16636
16637
16638  # The spec.gmk file contains all variables for the make system.
16639  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16640
16641  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16642  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16643
16644  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16645  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16646
16647  # The compare.sh is used to compare the build output to other builds.
16648  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16649
16650  # The generated Makefile knows where the spec.gmk is and where the source is.
16651  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16652  # which will look for generated configurations
16653  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16654
16655
16656
16657# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16658
16659  for ac_prog in apt-get yum port pkgutil pkgadd
16660do
16661  # Extract the first word of "$ac_prog", so it can be a program name with args.
16662set dummy $ac_prog; ac_word=$2
16663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16664$as_echo_n "checking for $ac_word... " >&6; }
16665if ${ac_cv_prog_PKGHANDLER+:} false; then :
16666  $as_echo_n "(cached) " >&6
16667else
16668  if test -n "$PKGHANDLER"; then
16669  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16670else
16671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16672for as_dir in $PATH
16673do
16674  IFS=$as_save_IFS
16675  test -z "$as_dir" && as_dir=.
16676    for ac_exec_ext in '' $ac_executable_extensions; do
16677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16678    ac_cv_prog_PKGHANDLER="$ac_prog"
16679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16680    break 2
16681  fi
16682done
16683  done
16684IFS=$as_save_IFS
16685
16686fi
16687fi
16688PKGHANDLER=$ac_cv_prog_PKGHANDLER
16689if test -n "$PKGHANDLER"; then
16690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16691$as_echo "$PKGHANDLER" >&6; }
16692else
16693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16694$as_echo "no" >&6; }
16695fi
16696
16697
16698  test -n "$PKGHANDLER" && break
16699done
16700
16701
16702
16703# Setup tools that requires more complex handling, or that is not needed by the configure script.
16704
16705
16706
16707  # Publish this variable in the help.
16708
16709
16710  if [ -z "${MAKE+x}" ]; then
16711    # The variable is not set by user, try to locate tool using the code snippet
16712
16713    # Try our hardest to locate a correct version of GNU make
16714    for ac_prog in gmake
16715do
16716  # Extract the first word of "$ac_prog", so it can be a program name with args.
16717set dummy $ac_prog; ac_word=$2
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16719$as_echo_n "checking for $ac_word... " >&6; }
16720if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16721  $as_echo_n "(cached) " >&6
16722else
16723  case $CHECK_GMAKE in
16724  [\\/]* | ?:[\\/]*)
16725  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16726  ;;
16727  *)
16728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16729for as_dir in $PATH
16730do
16731  IFS=$as_save_IFS
16732  test -z "$as_dir" && as_dir=.
16733    for ac_exec_ext in '' $ac_executable_extensions; do
16734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16735    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16737    break 2
16738  fi
16739done
16740  done
16741IFS=$as_save_IFS
16742
16743  ;;
16744esac
16745fi
16746CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16747if test -n "$CHECK_GMAKE"; then
16748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16749$as_echo "$CHECK_GMAKE" >&6; }
16750else
16751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16752$as_echo "no" >&6; }
16753fi
16754
16755
16756  test -n "$CHECK_GMAKE" && break
16757done
16758
16759
16760  MAKE_CANDIDATE=""$CHECK_GMAKE""
16761  DESCRIPTION="gmake in PATH"
16762
16763  # On Cygwin, we require a newer version of make than on other platforms
16764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16765    MAKE_VERSION_EXPR="-e 4\."
16766    MAKE_REQUIRED_VERSION="4.0"
16767   else
16768    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16769    MAKE_REQUIRED_VERSION="3.81"
16770  fi
16771
16772  if test "x$MAKE_CANDIDATE" != x; then
16773    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16774$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16775    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16776    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16777    if test "x$IS_GNU_MAKE" = x; then
16778      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16779$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16780    else
16781      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16782      if test "x$IS_MODERN_MAKE" = x; then
16783        { $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
16784$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;}
16785      else
16786        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16787          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16788            MAKE_EXPECTED_ENV='cygwin'
16789          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790            MAKE_EXPECTED_ENV='msys'
16791          else
16792            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16793          fi
16794          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16795          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16796        else
16797          # Not relevant for non-Windows
16798          IS_MAKE_CORRECT_ENV=true
16799        fi
16800        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16801          { $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
16802$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;}
16803        else
16804          FOUND_MAKE=$MAKE_CANDIDATE
16805
16806  # Only process if variable expands to non-empty
16807
16808  if test "x$FOUND_MAKE" != x; then
16809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810
16811  # First separate the path from the arguments. This will split at the first
16812  # space.
16813  complete="$FOUND_MAKE"
16814  path="${complete%% *}"
16815  tmp="$complete EOL"
16816  arguments="${tmp#* }"
16817
16818  # Input might be given as Windows format, start by converting to
16819  # unix format.
16820  new_path=`$CYGPATH -u "$path"`
16821
16822  # Now try to locate executable using which
16823  new_path=`$WHICH "$new_path" 2> /dev/null`
16824  # bat and cmd files are not always considered executable in cygwin causing which
16825  # to not find them
16826  if test "x$new_path" = x \
16827      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16828      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16829    new_path=`$CYGPATH -u "$path"`
16830  fi
16831  if test "x$new_path" = x; then
16832    # Oops. Which didn't find the executable.
16833    # The splitting of arguments from the executable at a space might have been incorrect,
16834    # since paths with space are more likely in Windows. Give it another try with the whole
16835    # argument.
16836    path="$complete"
16837    arguments="EOL"
16838    new_path=`$CYGPATH -u "$path"`
16839    new_path=`$WHICH "$new_path" 2> /dev/null`
16840    # bat and cmd files are not always considered executable in cygwin causing which
16841    # to not find them
16842    if test "x$new_path" = x \
16843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16845      new_path=`$CYGPATH -u "$path"`
16846    fi
16847    if test "x$new_path" = x; then
16848      # It's still not found. Now this is an unrecoverable error.
16849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16851      has_space=`$ECHO "$complete" | $GREP " "`
16852      if test "x$has_space" != x; then
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16855      fi
16856      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16857    fi
16858  fi
16859
16860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16863  # "foo.exe" is OK but "foo" is an error.
16864  #
16865  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16866  # It is also a way to make sure we got the proper file name for the real test later on.
16867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16868  if test "x$test_shortpath" = x; then
16869    # Short path failed, file does not exist as specified.
16870    # Try adding .exe or .cmd
16871    if test -f "${new_path}.exe"; then
16872      input_to_shortpath="${new_path}.exe"
16873    elif test -f "${new_path}.cmd"; then
16874      input_to_shortpath="${new_path}.cmd"
16875    else
16876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16877$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16878      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16879$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16881    fi
16882  else
16883    input_to_shortpath="$new_path"
16884  fi
16885
16886  # Call helper function which possibly converts this using DOS-style short mode.
16887  # If so, the updated path is stored in $new_path.
16888  new_path="$input_to_shortpath"
16889
16890  input_path="$input_to_shortpath"
16891  # Check if we need to convert this using DOS-style short mode. If the path
16892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16893  # take no chances and rewrite it.
16894  # Note: m4 eats our [], so we need to use [ and ] instead.
16895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16896  if test "x$has_forbidden_chars" != x; then
16897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16901      # Going to short mode and back again did indeed matter. Since short mode is
16902      # case insensitive, let's make it lowercase to improve readability.
16903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16904      # Now convert it back to Unix-style (cygpath)
16905      input_path=`$CYGPATH -u "$shortmode_path"`
16906      new_path="$input_path"
16907    fi
16908  fi
16909
16910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16911  if test "x$test_cygdrive_prefix" = x; then
16912    # As a simple fix, exclude /usr/bin since it's not a real path.
16913    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16915      # a path prefixed by /cygdrive for fixpath to work.
16916      new_path="$CYGWIN_ROOT_PATH$input_path"
16917    fi
16918  fi
16919
16920  # remove trailing .exe if any
16921  new_path="${new_path/%.exe/}"
16922
16923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16924
16925  # First separate the path from the arguments. This will split at the first
16926  # space.
16927  complete="$FOUND_MAKE"
16928  path="${complete%% *}"
16929  tmp="$complete EOL"
16930  arguments="${tmp#* }"
16931
16932  # Input might be given as Windows format, start by converting to
16933  # unix format.
16934  new_path="$path"
16935
16936  windows_path="$new_path"
16937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16938    unix_path=`$CYGPATH -u "$windows_path"`
16939    new_path="$unix_path"
16940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16942    new_path="$unix_path"
16943  fi
16944
16945
16946  # Now try to locate executable using which
16947  new_path=`$WHICH "$new_path" 2> /dev/null`
16948
16949  if test "x$new_path" = x; then
16950    # Oops. Which didn't find the executable.
16951    # The splitting of arguments from the executable at a space might have been incorrect,
16952    # since paths with space are more likely in Windows. Give it another try with the whole
16953    # argument.
16954    path="$complete"
16955    arguments="EOL"
16956    new_path="$path"
16957
16958  windows_path="$new_path"
16959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16960    unix_path=`$CYGPATH -u "$windows_path"`
16961    new_path="$unix_path"
16962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16964    new_path="$unix_path"
16965  fi
16966
16967
16968    new_path=`$WHICH "$new_path" 2> /dev/null`
16969    # bat and cmd files are not always considered executable in MSYS causing which
16970    # to not find them
16971    if test "x$new_path" = x \
16972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
16986
16987    if test "x$new_path" = x; then
16988      # It's still not found. Now this is an unrecoverable error.
16989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16990$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16991      has_space=`$ECHO "$complete" | $GREP " "`
16992      if test "x$has_space" != x; then
16993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16995      fi
16996      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16997    fi
16998  fi
16999
17000  # Now new_path has a complete unix path to the binary
17001  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17002    # Keep paths in /bin as-is, but remove trailing .exe if any
17003    new_path="${new_path/%.exe/}"
17004    # Do not save /bin paths to all_fixpath_prefixes!
17005  else
17006    # Not in mixed or Windows style, start by that.
17007    new_path=`cmd //c echo $new_path`
17008
17009  input_path="$new_path"
17010  # Check if we need to convert this using DOS-style short mode. If the path
17011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17012  # take no chances and rewrite it.
17013  # Note: m4 eats our [], so we need to use [ and ] instead.
17014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17015  if test "x$has_forbidden_chars" != x; then
17016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17018  fi
17019
17020    # Output is in $new_path
17021
17022  windows_path="$new_path"
17023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17024    unix_path=`$CYGPATH -u "$windows_path"`
17025    new_path="$unix_path"
17026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17028    new_path="$unix_path"
17029  fi
17030
17031    # remove trailing .exe if any
17032    new_path="${new_path/%.exe/}"
17033
17034    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17035    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17036  fi
17037
17038    else
17039      # We're on a unix platform. Hooray! :)
17040      # First separate the path from the arguments. This will split at the first
17041      # space.
17042      complete="$FOUND_MAKE"
17043      path="${complete%% *}"
17044      tmp="$complete EOL"
17045      arguments="${tmp#* }"
17046
17047      # Cannot rely on the command "which" here since it doesn't always work.
17048      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17049      if test -z "$is_absolute_path"; then
17050        # Path to executable is not absolute. Find it.
17051        IFS_save="$IFS"
17052        IFS=:
17053        for p in $PATH; do
17054          if test -f "$p/$path" && test -x "$p/$path"; then
17055            new_path="$p/$path"
17056            break
17057          fi
17058        done
17059        IFS="$IFS_save"
17060      else
17061        # This is an absolute path, we can use it without further modifications.
17062        new_path="$path"
17063      fi
17064
17065      if test "x$new_path" = x; then
17066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17068        has_space=`$ECHO "$complete" | $GREP " "`
17069        if test "x$has_space" != x; then
17070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17072        fi
17073        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17074      fi
17075    fi
17076
17077    # Now join together the path and the arguments once again
17078    if test "x$arguments" != xEOL; then
17079      new_complete="$new_path ${arguments% *}"
17080    else
17081      new_complete="$new_path"
17082    fi
17083
17084    if test "x$complete" != "x$new_complete"; then
17085      FOUND_MAKE="$new_complete"
17086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17087$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17088    fi
17089  fi
17090
17091        fi
17092      fi
17093    fi
17094  fi
17095
17096
17097    if test "x$FOUND_MAKE" = x; then
17098      for ac_prog in make
17099do
17100  # Extract the first word of "$ac_prog", so it can be a program name with args.
17101set dummy $ac_prog; ac_word=$2
17102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17103$as_echo_n "checking for $ac_word... " >&6; }
17104if ${ac_cv_path_CHECK_MAKE+:} false; then :
17105  $as_echo_n "(cached) " >&6
17106else
17107  case $CHECK_MAKE in
17108  [\\/]* | ?:[\\/]*)
17109  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17110  ;;
17111  *)
17112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17113for as_dir in $PATH
17114do
17115  IFS=$as_save_IFS
17116  test -z "$as_dir" && as_dir=.
17117    for ac_exec_ext in '' $ac_executable_extensions; do
17118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17119    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17121    break 2
17122  fi
17123done
17124  done
17125IFS=$as_save_IFS
17126
17127  ;;
17128esac
17129fi
17130CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17131if test -n "$CHECK_MAKE"; then
17132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17133$as_echo "$CHECK_MAKE" >&6; }
17134else
17135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17136$as_echo "no" >&6; }
17137fi
17138
17139
17140  test -n "$CHECK_MAKE" && break
17141done
17142
17143
17144  MAKE_CANDIDATE=""$CHECK_MAKE""
17145  DESCRIPTION="make in PATH"
17146
17147  # On Cygwin, we require a newer version of make than on other platforms
17148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149    MAKE_VERSION_EXPR="-e 4\."
17150    MAKE_REQUIRED_VERSION="4.0"
17151   else
17152    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17153    MAKE_REQUIRED_VERSION="3.81"
17154  fi
17155
17156  if test "x$MAKE_CANDIDATE" != x; then
17157    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17158$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17159    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17160    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17161    if test "x$IS_GNU_MAKE" = x; then
17162      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17163$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17164    else
17165      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17166      if test "x$IS_MODERN_MAKE" = x; then
17167        { $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
17168$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;}
17169      else
17170        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17171          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17172            MAKE_EXPECTED_ENV='cygwin'
17173          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17174            MAKE_EXPECTED_ENV='msys'
17175          else
17176            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17177          fi
17178          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17179          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17180        else
17181          # Not relevant for non-Windows
17182          IS_MAKE_CORRECT_ENV=true
17183        fi
17184        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17185          { $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
17186$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;}
17187        else
17188          FOUND_MAKE=$MAKE_CANDIDATE
17189
17190  # Only process if variable expands to non-empty
17191
17192  if test "x$FOUND_MAKE" != x; then
17193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17194
17195  # First separate the path from the arguments. This will split at the first
17196  # space.
17197  complete="$FOUND_MAKE"
17198  path="${complete%% *}"
17199  tmp="$complete EOL"
17200  arguments="${tmp#* }"
17201
17202  # Input might be given as Windows format, start by converting to
17203  # unix format.
17204  new_path=`$CYGPATH -u "$path"`
17205
17206  # Now try to locate executable using which
17207  new_path=`$WHICH "$new_path" 2> /dev/null`
17208  # bat and cmd files are not always considered executable in cygwin causing which
17209  # to not find them
17210  if test "x$new_path" = x \
17211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17213    new_path=`$CYGPATH -u "$path"`
17214  fi
17215  if test "x$new_path" = x; then
17216    # Oops. Which didn't find the executable.
17217    # The splitting of arguments from the executable at a space might have been incorrect,
17218    # since paths with space are more likely in Windows. Give it another try with the whole
17219    # argument.
17220    path="$complete"
17221    arguments="EOL"
17222    new_path=`$CYGPATH -u "$path"`
17223    new_path=`$WHICH "$new_path" 2> /dev/null`
17224    # bat and cmd files are not always considered executable in cygwin causing which
17225    # to not find them
17226    if test "x$new_path" = x \
17227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17229      new_path=`$CYGPATH -u "$path"`
17230    fi
17231    if test "x$new_path" = x; then
17232      # It's still not found. Now this is an unrecoverable error.
17233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17234$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17235      has_space=`$ECHO "$complete" | $GREP " "`
17236      if test "x$has_space" != x; then
17237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17239      fi
17240      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17241    fi
17242  fi
17243
17244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17247  # "foo.exe" is OK but "foo" is an error.
17248  #
17249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17250  # It is also a way to make sure we got the proper file name for the real test later on.
17251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17252  if test "x$test_shortpath" = x; then
17253    # Short path failed, file does not exist as specified.
17254    # Try adding .exe or .cmd
17255    if test -f "${new_path}.exe"; then
17256      input_to_shortpath="${new_path}.exe"
17257    elif test -f "${new_path}.cmd"; then
17258      input_to_shortpath="${new_path}.cmd"
17259    else
17260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17261$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17264      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17265    fi
17266  else
17267    input_to_shortpath="$new_path"
17268  fi
17269
17270  # Call helper function which possibly converts this using DOS-style short mode.
17271  # If so, the updated path is stored in $new_path.
17272  new_path="$input_to_shortpath"
17273
17274  input_path="$input_to_shortpath"
17275  # Check if we need to convert this using DOS-style short mode. If the path
17276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17277  # take no chances and rewrite it.
17278  # Note: m4 eats our [], so we need to use [ and ] instead.
17279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17280  if test "x$has_forbidden_chars" != x; then
17281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17285      # Going to short mode and back again did indeed matter. Since short mode is
17286      # case insensitive, let's make it lowercase to improve readability.
17287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17288      # Now convert it back to Unix-style (cygpath)
17289      input_path=`$CYGPATH -u "$shortmode_path"`
17290      new_path="$input_path"
17291    fi
17292  fi
17293
17294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17295  if test "x$test_cygdrive_prefix" = x; then
17296    # As a simple fix, exclude /usr/bin since it's not a real path.
17297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17299      # a path prefixed by /cygdrive for fixpath to work.
17300      new_path="$CYGWIN_ROOT_PATH$input_path"
17301    fi
17302  fi
17303
17304  # remove trailing .exe if any
17305  new_path="${new_path/%.exe/}"
17306
17307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17308
17309  # First separate the path from the arguments. This will split at the first
17310  # space.
17311  complete="$FOUND_MAKE"
17312  path="${complete%% *}"
17313  tmp="$complete EOL"
17314  arguments="${tmp#* }"
17315
17316  # Input might be given as Windows format, start by converting to
17317  # unix format.
17318  new_path="$path"
17319
17320  windows_path="$new_path"
17321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17322    unix_path=`$CYGPATH -u "$windows_path"`
17323    new_path="$unix_path"
17324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17326    new_path="$unix_path"
17327  fi
17328
17329
17330  # Now try to locate executable using which
17331  new_path=`$WHICH "$new_path" 2> /dev/null`
17332
17333  if test "x$new_path" = x; then
17334    # Oops. Which didn't find the executable.
17335    # The splitting of arguments from the executable at a space might have been incorrect,
17336    # since paths with space are more likely in Windows. Give it another try with the whole
17337    # argument.
17338    path="$complete"
17339    arguments="EOL"
17340    new_path="$path"
17341
17342  windows_path="$new_path"
17343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17344    unix_path=`$CYGPATH -u "$windows_path"`
17345    new_path="$unix_path"
17346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17348    new_path="$unix_path"
17349  fi
17350
17351
17352    new_path=`$WHICH "$new_path" 2> /dev/null`
17353    # bat and cmd files are not always considered executable in MSYS causing which
17354    # to not find them
17355    if test "x$new_path" = x \
17356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
17370
17371    if test "x$new_path" = x; then
17372      # It's still not found. Now this is an unrecoverable error.
17373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17375      has_space=`$ECHO "$complete" | $GREP " "`
17376      if test "x$has_space" != x; then
17377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17379      fi
17380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17381    fi
17382  fi
17383
17384  # Now new_path has a complete unix path to the binary
17385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17386    # Keep paths in /bin as-is, but remove trailing .exe if any
17387    new_path="${new_path/%.exe/}"
17388    # Do not save /bin paths to all_fixpath_prefixes!
17389  else
17390    # Not in mixed or Windows style, start by that.
17391    new_path=`cmd //c echo $new_path`
17392
17393  input_path="$new_path"
17394  # Check if we need to convert this using DOS-style short mode. If the path
17395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17396  # take no chances and rewrite it.
17397  # Note: m4 eats our [], so we need to use [ and ] instead.
17398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17399  if test "x$has_forbidden_chars" != x; then
17400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17402  fi
17403
17404    # Output is in $new_path
17405
17406  windows_path="$new_path"
17407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408    unix_path=`$CYGPATH -u "$windows_path"`
17409    new_path="$unix_path"
17410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17412    new_path="$unix_path"
17413  fi
17414
17415    # remove trailing .exe if any
17416    new_path="${new_path/%.exe/}"
17417
17418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17420  fi
17421
17422    else
17423      # We're on a unix platform. Hooray! :)
17424      # First separate the path from the arguments. This will split at the first
17425      # space.
17426      complete="$FOUND_MAKE"
17427      path="${complete%% *}"
17428      tmp="$complete EOL"
17429      arguments="${tmp#* }"
17430
17431      # Cannot rely on the command "which" here since it doesn't always work.
17432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17433      if test -z "$is_absolute_path"; then
17434        # Path to executable is not absolute. Find it.
17435        IFS_save="$IFS"
17436        IFS=:
17437        for p in $PATH; do
17438          if test -f "$p/$path" && test -x "$p/$path"; then
17439            new_path="$p/$path"
17440            break
17441          fi
17442        done
17443        IFS="$IFS_save"
17444      else
17445        # This is an absolute path, we can use it without further modifications.
17446        new_path="$path"
17447      fi
17448
17449      if test "x$new_path" = x; then
17450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17451$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17452        has_space=`$ECHO "$complete" | $GREP " "`
17453        if test "x$has_space" != x; then
17454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17456        fi
17457        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17458      fi
17459    fi
17460
17461    # Now join together the path and the arguments once again
17462    if test "x$arguments" != xEOL; then
17463      new_complete="$new_path ${arguments% *}"
17464    else
17465      new_complete="$new_path"
17466    fi
17467
17468    if test "x$complete" != "x$new_complete"; then
17469      FOUND_MAKE="$new_complete"
17470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17471$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17472    fi
17473  fi
17474
17475        fi
17476      fi
17477    fi
17478  fi
17479
17480    fi
17481
17482    if test "x$FOUND_MAKE" = x; then
17483      if test "x$TOOLCHAIN_PATH" != x; then
17484        # We have a toolchain path, check that as well before giving up.
17485        OLD_PATH=$PATH
17486        PATH=$TOOLCHAIN_PATH:$PATH
17487        for ac_prog in gmake
17488do
17489  # Extract the first word of "$ac_prog", so it can be a program name with args.
17490set dummy $ac_prog; ac_word=$2
17491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17492$as_echo_n "checking for $ac_word... " >&6; }
17493if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17494  $as_echo_n "(cached) " >&6
17495else
17496  case $CHECK_TOOLSDIR_GMAKE in
17497  [\\/]* | ?:[\\/]*)
17498  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17499  ;;
17500  *)
17501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17502for as_dir in $PATH
17503do
17504  IFS=$as_save_IFS
17505  test -z "$as_dir" && as_dir=.
17506    for ac_exec_ext in '' $ac_executable_extensions; do
17507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17508    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17510    break 2
17511  fi
17512done
17513  done
17514IFS=$as_save_IFS
17515
17516  ;;
17517esac
17518fi
17519CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17520if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17522$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17523else
17524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17525$as_echo "no" >&6; }
17526fi
17527
17528
17529  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17530done
17531
17532
17533  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17534  DESCRIPTION="gmake in tools-dir"
17535
17536  # On Cygwin, we require a newer version of make than on other platforms
17537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17538    MAKE_VERSION_EXPR="-e 4\."
17539    MAKE_REQUIRED_VERSION="4.0"
17540   else
17541    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17542    MAKE_REQUIRED_VERSION="3.81"
17543  fi
17544
17545  if test "x$MAKE_CANDIDATE" != x; then
17546    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17547$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17548    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17549    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17550    if test "x$IS_GNU_MAKE" = x; then
17551      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17552$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17553    else
17554      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17555      if test "x$IS_MODERN_MAKE" = x; then
17556        { $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
17557$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;}
17558      else
17559        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17560          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17561            MAKE_EXPECTED_ENV='cygwin'
17562          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17563            MAKE_EXPECTED_ENV='msys'
17564          else
17565            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17566          fi
17567          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17568          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17569        else
17570          # Not relevant for non-Windows
17571          IS_MAKE_CORRECT_ENV=true
17572        fi
17573        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17574          { $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
17575$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;}
17576        else
17577          FOUND_MAKE=$MAKE_CANDIDATE
17578
17579  # Only process if variable expands to non-empty
17580
17581  if test "x$FOUND_MAKE" != x; then
17582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17583
17584  # First separate the path from the arguments. This will split at the first
17585  # space.
17586  complete="$FOUND_MAKE"
17587  path="${complete%% *}"
17588  tmp="$complete EOL"
17589  arguments="${tmp#* }"
17590
17591  # Input might be given as Windows format, start by converting to
17592  # unix format.
17593  new_path=`$CYGPATH -u "$path"`
17594
17595  # Now try to locate executable using which
17596  new_path=`$WHICH "$new_path" 2> /dev/null`
17597  # bat and cmd files are not always considered executable in cygwin causing which
17598  # to not find them
17599  if test "x$new_path" = x \
17600      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17601      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17602    new_path=`$CYGPATH -u "$path"`
17603  fi
17604  if test "x$new_path" = x; then
17605    # Oops. Which didn't find the executable.
17606    # The splitting of arguments from the executable at a space might have been incorrect,
17607    # since paths with space are more likely in Windows. Give it another try with the whole
17608    # argument.
17609    path="$complete"
17610    arguments="EOL"
17611    new_path=`$CYGPATH -u "$path"`
17612    new_path=`$WHICH "$new_path" 2> /dev/null`
17613    # bat and cmd files are not always considered executable in cygwin causing which
17614    # to not find them
17615    if test "x$new_path" = x \
17616        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17617        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17618      new_path=`$CYGPATH -u "$path"`
17619    fi
17620    if test "x$new_path" = x; then
17621      # It's still not found. Now this is an unrecoverable error.
17622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17624      has_space=`$ECHO "$complete" | $GREP " "`
17625      if test "x$has_space" != x; then
17626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17628      fi
17629      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17630    fi
17631  fi
17632
17633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17636  # "foo.exe" is OK but "foo" is an error.
17637  #
17638  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17639  # It is also a way to make sure we got the proper file name for the real test later on.
17640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17641  if test "x$test_shortpath" = x; then
17642    # Short path failed, file does not exist as specified.
17643    # Try adding .exe or .cmd
17644    if test -f "${new_path}.exe"; then
17645      input_to_shortpath="${new_path}.exe"
17646    elif test -f "${new_path}.cmd"; then
17647      input_to_shortpath="${new_path}.cmd"
17648    else
17649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17650$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17651      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17652$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17654    fi
17655  else
17656    input_to_shortpath="$new_path"
17657  fi
17658
17659  # Call helper function which possibly converts this using DOS-style short mode.
17660  # If so, the updated path is stored in $new_path.
17661  new_path="$input_to_shortpath"
17662
17663  input_path="$input_to_shortpath"
17664  # Check if we need to convert this using DOS-style short mode. If the path
17665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17666  # take no chances and rewrite it.
17667  # Note: m4 eats our [], so we need to use [ and ] instead.
17668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17669  if test "x$has_forbidden_chars" != x; then
17670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17674      # Going to short mode and back again did indeed matter. Since short mode is
17675      # case insensitive, let's make it lowercase to improve readability.
17676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17677      # Now convert it back to Unix-style (cygpath)
17678      input_path=`$CYGPATH -u "$shortmode_path"`
17679      new_path="$input_path"
17680    fi
17681  fi
17682
17683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17684  if test "x$test_cygdrive_prefix" = x; then
17685    # As a simple fix, exclude /usr/bin since it's not a real path.
17686    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17688      # a path prefixed by /cygdrive for fixpath to work.
17689      new_path="$CYGWIN_ROOT_PATH$input_path"
17690    fi
17691  fi
17692
17693  # remove trailing .exe if any
17694  new_path="${new_path/%.exe/}"
17695
17696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17697
17698  # First separate the path from the arguments. This will split at the first
17699  # space.
17700  complete="$FOUND_MAKE"
17701  path="${complete%% *}"
17702  tmp="$complete EOL"
17703  arguments="${tmp#* }"
17704
17705  # Input might be given as Windows format, start by converting to
17706  # unix format.
17707  new_path="$path"
17708
17709  windows_path="$new_path"
17710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711    unix_path=`$CYGPATH -u "$windows_path"`
17712    new_path="$unix_path"
17713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17715    new_path="$unix_path"
17716  fi
17717
17718
17719  # Now try to locate executable using which
17720  new_path=`$WHICH "$new_path" 2> /dev/null`
17721
17722  if test "x$new_path" = x; then
17723    # Oops. Which didn't find the executable.
17724    # The splitting of arguments from the executable at a space might have been incorrect,
17725    # since paths with space are more likely in Windows. Give it another try with the whole
17726    # argument.
17727    path="$complete"
17728    arguments="EOL"
17729    new_path="$path"
17730
17731  windows_path="$new_path"
17732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17733    unix_path=`$CYGPATH -u "$windows_path"`
17734    new_path="$unix_path"
17735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17737    new_path="$unix_path"
17738  fi
17739
17740
17741    new_path=`$WHICH "$new_path" 2> /dev/null`
17742    # bat and cmd files are not always considered executable in MSYS causing which
17743    # to not find them
17744    if test "x$new_path" = x \
17745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
17759
17760    if test "x$new_path" = x; then
17761      # It's still not found. Now this is an unrecoverable error.
17762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17764      has_space=`$ECHO "$complete" | $GREP " "`
17765      if test "x$has_space" != x; then
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17768      fi
17769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17770    fi
17771  fi
17772
17773  # Now new_path has a complete unix path to the binary
17774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17775    # Keep paths in /bin as-is, but remove trailing .exe if any
17776    new_path="${new_path/%.exe/}"
17777    # Do not save /bin paths to all_fixpath_prefixes!
17778  else
17779    # Not in mixed or Windows style, start by that.
17780    new_path=`cmd //c echo $new_path`
17781
17782  input_path="$new_path"
17783  # Check if we need to convert this using DOS-style short mode. If the path
17784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17785  # take no chances and rewrite it.
17786  # Note: m4 eats our [], so we need to use [ and ] instead.
17787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17788  if test "x$has_forbidden_chars" != x; then
17789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17791  fi
17792
17793    # Output is in $new_path
17794
17795  windows_path="$new_path"
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797    unix_path=`$CYGPATH -u "$windows_path"`
17798    new_path="$unix_path"
17799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801    new_path="$unix_path"
17802  fi
17803
17804    # remove trailing .exe if any
17805    new_path="${new_path/%.exe/}"
17806
17807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17809  fi
17810
17811    else
17812      # We're on a unix platform. Hooray! :)
17813      # First separate the path from the arguments. This will split at the first
17814      # space.
17815      complete="$FOUND_MAKE"
17816      path="${complete%% *}"
17817      tmp="$complete EOL"
17818      arguments="${tmp#* }"
17819
17820      # Cannot rely on the command "which" here since it doesn't always work.
17821      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17822      if test -z "$is_absolute_path"; then
17823        # Path to executable is not absolute. Find it.
17824        IFS_save="$IFS"
17825        IFS=:
17826        for p in $PATH; do
17827          if test -f "$p/$path" && test -x "$p/$path"; then
17828            new_path="$p/$path"
17829            break
17830          fi
17831        done
17832        IFS="$IFS_save"
17833      else
17834        # This is an absolute path, we can use it without further modifications.
17835        new_path="$path"
17836      fi
17837
17838      if test "x$new_path" = x; then
17839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17841        has_space=`$ECHO "$complete" | $GREP " "`
17842        if test "x$has_space" != x; then
17843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17845        fi
17846        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17847      fi
17848    fi
17849
17850    # Now join together the path and the arguments once again
17851    if test "x$arguments" != xEOL; then
17852      new_complete="$new_path ${arguments% *}"
17853    else
17854      new_complete="$new_path"
17855    fi
17856
17857    if test "x$complete" != "x$new_complete"; then
17858      FOUND_MAKE="$new_complete"
17859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17860$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17861    fi
17862  fi
17863
17864        fi
17865      fi
17866    fi
17867  fi
17868
17869        if test "x$FOUND_MAKE" = x; then
17870          for ac_prog in make
17871do
17872  # Extract the first word of "$ac_prog", so it can be a program name with args.
17873set dummy $ac_prog; ac_word=$2
17874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17875$as_echo_n "checking for $ac_word... " >&6; }
17876if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17877  $as_echo_n "(cached) " >&6
17878else
17879  case $CHECK_TOOLSDIR_MAKE in
17880  [\\/]* | ?:[\\/]*)
17881  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17882  ;;
17883  *)
17884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17885for as_dir in $PATH
17886do
17887  IFS=$as_save_IFS
17888  test -z "$as_dir" && as_dir=.
17889    for ac_exec_ext in '' $ac_executable_extensions; do
17890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17891    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17893    break 2
17894  fi
17895done
17896  done
17897IFS=$as_save_IFS
17898
17899  ;;
17900esac
17901fi
17902CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17903if test -n "$CHECK_TOOLSDIR_MAKE"; then
17904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17905$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17906else
17907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17908$as_echo "no" >&6; }
17909fi
17910
17911
17912  test -n "$CHECK_TOOLSDIR_MAKE" && break
17913done
17914
17915
17916  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17917  DESCRIPTION="make in tools-dir"
17918
17919  # On Cygwin, we require a newer version of make than on other platforms
17920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17921    MAKE_VERSION_EXPR="-e 4\."
17922    MAKE_REQUIRED_VERSION="4.0"
17923   else
17924    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17925    MAKE_REQUIRED_VERSION="3.81"
17926  fi
17927
17928  if test "x$MAKE_CANDIDATE" != x; then
17929    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17930$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17931    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17932    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17933    if test "x$IS_GNU_MAKE" = x; then
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17935$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17936    else
17937      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17938      if test "x$IS_MODERN_MAKE" = x; then
17939        { $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
17940$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;}
17941      else
17942        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17943          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17944            MAKE_EXPECTED_ENV='cygwin'
17945          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17946            MAKE_EXPECTED_ENV='msys'
17947          else
17948            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17949          fi
17950          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17951          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17952        else
17953          # Not relevant for non-Windows
17954          IS_MAKE_CORRECT_ENV=true
17955        fi
17956        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17957          { $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
17958$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;}
17959        else
17960          FOUND_MAKE=$MAKE_CANDIDATE
17961
17962  # Only process if variable expands to non-empty
17963
17964  if test "x$FOUND_MAKE" != x; then
17965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966
17967  # First separate the path from the arguments. This will split at the first
17968  # space.
17969  complete="$FOUND_MAKE"
17970  path="${complete%% *}"
17971  tmp="$complete EOL"
17972  arguments="${tmp#* }"
17973
17974  # Input might be given as Windows format, start by converting to
17975  # unix format.
17976  new_path=`$CYGPATH -u "$path"`
17977
17978  # Now try to locate executable using which
17979  new_path=`$WHICH "$new_path" 2> /dev/null`
17980  # bat and cmd files are not always considered executable in cygwin causing which
17981  # to not find them
17982  if test "x$new_path" = x \
17983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17985    new_path=`$CYGPATH -u "$path"`
17986  fi
17987  if test "x$new_path" = x; then
17988    # Oops. Which didn't find the executable.
17989    # The splitting of arguments from the executable at a space might have been incorrect,
17990    # since paths with space are more likely in Windows. Give it another try with the whole
17991    # argument.
17992    path="$complete"
17993    arguments="EOL"
17994    new_path=`$CYGPATH -u "$path"`
17995    new_path=`$WHICH "$new_path" 2> /dev/null`
17996    # bat and cmd files are not always considered executable in cygwin causing which
17997    # to not find them
17998    if test "x$new_path" = x \
17999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18001      new_path=`$CYGPATH -u "$path"`
18002    fi
18003    if test "x$new_path" = x; then
18004      # It's still not found. Now this is an unrecoverable error.
18005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18007      has_space=`$ECHO "$complete" | $GREP " "`
18008      if test "x$has_space" != x; then
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18011      fi
18012      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18013    fi
18014  fi
18015
18016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18019  # "foo.exe" is OK but "foo" is an error.
18020  #
18021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18022  # It is also a way to make sure we got the proper file name for the real test later on.
18023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18024  if test "x$test_shortpath" = x; then
18025    # Short path failed, file does not exist as specified.
18026    # Try adding .exe or .cmd
18027    if test -f "${new_path}.exe"; then
18028      input_to_shortpath="${new_path}.exe"
18029    elif test -f "${new_path}.cmd"; then
18030      input_to_shortpath="${new_path}.cmd"
18031    else
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18037    fi
18038  else
18039    input_to_shortpath="$new_path"
18040  fi
18041
18042  # Call helper function which possibly converts this using DOS-style short mode.
18043  # If so, the updated path is stored in $new_path.
18044  new_path="$input_to_shortpath"
18045
18046  input_path="$input_to_shortpath"
18047  # Check if we need to convert this using DOS-style short mode. If the path
18048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18049  # take no chances and rewrite it.
18050  # Note: m4 eats our [], so we need to use [ and ] instead.
18051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18052  if test "x$has_forbidden_chars" != x; then
18053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18057      # Going to short mode and back again did indeed matter. Since short mode is
18058      # case insensitive, let's make it lowercase to improve readability.
18059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18060      # Now convert it back to Unix-style (cygpath)
18061      input_path=`$CYGPATH -u "$shortmode_path"`
18062      new_path="$input_path"
18063    fi
18064  fi
18065
18066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18067  if test "x$test_cygdrive_prefix" = x; then
18068    # As a simple fix, exclude /usr/bin since it's not a real path.
18069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18071      # a path prefixed by /cygdrive for fixpath to work.
18072      new_path="$CYGWIN_ROOT_PATH$input_path"
18073    fi
18074  fi
18075
18076  # remove trailing .exe if any
18077  new_path="${new_path/%.exe/}"
18078
18079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080
18081  # First separate the path from the arguments. This will split at the first
18082  # space.
18083  complete="$FOUND_MAKE"
18084  path="${complete%% *}"
18085  tmp="$complete EOL"
18086  arguments="${tmp#* }"
18087
18088  # Input might be given as Windows format, start by converting to
18089  # unix format.
18090  new_path="$path"
18091
18092  windows_path="$new_path"
18093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18094    unix_path=`$CYGPATH -u "$windows_path"`
18095    new_path="$unix_path"
18096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18098    new_path="$unix_path"
18099  fi
18100
18101
18102  # Now try to locate executable using which
18103  new_path=`$WHICH "$new_path" 2> /dev/null`
18104
18105  if test "x$new_path" = x; then
18106    # Oops. Which didn't find the executable.
18107    # The splitting of arguments from the executable at a space might have been incorrect,
18108    # since paths with space are more likely in Windows. Give it another try with the whole
18109    # argument.
18110    path="$complete"
18111    arguments="EOL"
18112    new_path="$path"
18113
18114  windows_path="$new_path"
18115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18116    unix_path=`$CYGPATH -u "$windows_path"`
18117    new_path="$unix_path"
18118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18120    new_path="$unix_path"
18121  fi
18122
18123
18124    new_path=`$WHICH "$new_path" 2> /dev/null`
18125    # bat and cmd files are not always considered executable in MSYS causing which
18126    # to not find them
18127    if test "x$new_path" = x \
18128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
18142
18143    if test "x$new_path" = x; then
18144      # It's still not found. Now this is an unrecoverable error.
18145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18147      has_space=`$ECHO "$complete" | $GREP " "`
18148      if test "x$has_space" != x; then
18149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18151      fi
18152      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18153    fi
18154  fi
18155
18156  # Now new_path has a complete unix path to the binary
18157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18158    # Keep paths in /bin as-is, but remove trailing .exe if any
18159    new_path="${new_path/%.exe/}"
18160    # Do not save /bin paths to all_fixpath_prefixes!
18161  else
18162    # Not in mixed or Windows style, start by that.
18163    new_path=`cmd //c echo $new_path`
18164
18165  input_path="$new_path"
18166  # Check if we need to convert this using DOS-style short mode. If the path
18167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18168  # take no chances and rewrite it.
18169  # Note: m4 eats our [], so we need to use [ and ] instead.
18170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18171  if test "x$has_forbidden_chars" != x; then
18172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18174  fi
18175
18176    # Output is in $new_path
18177
18178  windows_path="$new_path"
18179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18180    unix_path=`$CYGPATH -u "$windows_path"`
18181    new_path="$unix_path"
18182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18184    new_path="$unix_path"
18185  fi
18186
18187    # remove trailing .exe if any
18188    new_path="${new_path/%.exe/}"
18189
18190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18192  fi
18193
18194    else
18195      # We're on a unix platform. Hooray! :)
18196      # First separate the path from the arguments. This will split at the first
18197      # space.
18198      complete="$FOUND_MAKE"
18199      path="${complete%% *}"
18200      tmp="$complete EOL"
18201      arguments="${tmp#* }"
18202
18203      # Cannot rely on the command "which" here since it doesn't always work.
18204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18205      if test -z "$is_absolute_path"; then
18206        # Path to executable is not absolute. Find it.
18207        IFS_save="$IFS"
18208        IFS=:
18209        for p in $PATH; do
18210          if test -f "$p/$path" && test -x "$p/$path"; then
18211            new_path="$p/$path"
18212            break
18213          fi
18214        done
18215        IFS="$IFS_save"
18216      else
18217        # This is an absolute path, we can use it without further modifications.
18218        new_path="$path"
18219      fi
18220
18221      if test "x$new_path" = x; then
18222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18224        has_space=`$ECHO "$complete" | $GREP " "`
18225        if test "x$has_space" != x; then
18226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18228        fi
18229        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18230      fi
18231    fi
18232
18233    # Now join together the path and the arguments once again
18234    if test "x$arguments" != xEOL; then
18235      new_complete="$new_path ${arguments% *}"
18236    else
18237      new_complete="$new_path"
18238    fi
18239
18240    if test "x$complete" != "x$new_complete"; then
18241      FOUND_MAKE="$new_complete"
18242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18243$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18244    fi
18245  fi
18246
18247        fi
18248      fi
18249    fi
18250  fi
18251
18252        fi
18253        PATH=$OLD_PATH
18254      fi
18255    fi
18256
18257    if test "x$FOUND_MAKE" = x; then
18258      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
18259    fi
18260
18261  else
18262    # The variable is set, but is it from the command line or the environment?
18263
18264    # Try to remove the string !MAKE! from our list.
18265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18267      # If it failed, the variable was not from the command line. Ignore it,
18268      # but warn the user (except for BASH, which is always set by the calling BASH).
18269      if test "xMAKE" != xBASH; then
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18271$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18272      fi
18273      # Try to locate tool using the code snippet
18274
18275    # Try our hardest to locate a correct version of GNU make
18276    for ac_prog in gmake
18277do
18278  # Extract the first word of "$ac_prog", so it can be a program name with args.
18279set dummy $ac_prog; ac_word=$2
18280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18281$as_echo_n "checking for $ac_word... " >&6; }
18282if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18283  $as_echo_n "(cached) " >&6
18284else
18285  case $CHECK_GMAKE in
18286  [\\/]* | ?:[\\/]*)
18287  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18288  ;;
18289  *)
18290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18291for as_dir in $PATH
18292do
18293  IFS=$as_save_IFS
18294  test -z "$as_dir" && as_dir=.
18295    for ac_exec_ext in '' $ac_executable_extensions; do
18296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18297    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18299    break 2
18300  fi
18301done
18302  done
18303IFS=$as_save_IFS
18304
18305  ;;
18306esac
18307fi
18308CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18309if test -n "$CHECK_GMAKE"; then
18310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18311$as_echo "$CHECK_GMAKE" >&6; }
18312else
18313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18314$as_echo "no" >&6; }
18315fi
18316
18317
18318  test -n "$CHECK_GMAKE" && break
18319done
18320
18321
18322  MAKE_CANDIDATE=""$CHECK_GMAKE""
18323  DESCRIPTION="gmake in PATH"
18324
18325  # On Cygwin, we require a newer version of make than on other platforms
18326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18327    MAKE_VERSION_EXPR="-e 4\."
18328    MAKE_REQUIRED_VERSION="4.0"
18329   else
18330    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18331    MAKE_REQUIRED_VERSION="3.81"
18332  fi
18333
18334  if test "x$MAKE_CANDIDATE" != x; then
18335    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18336$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18337    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18338    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18339    if test "x$IS_GNU_MAKE" = x; then
18340      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18341$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18342    else
18343      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18344      if test "x$IS_MODERN_MAKE" = x; then
18345        { $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
18346$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;}
18347      else
18348        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18349          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18350            MAKE_EXPECTED_ENV='cygwin'
18351          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18352            MAKE_EXPECTED_ENV='msys'
18353          else
18354            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18355          fi
18356          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18357          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18358        else
18359          # Not relevant for non-Windows
18360          IS_MAKE_CORRECT_ENV=true
18361        fi
18362        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18363          { $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
18364$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;}
18365        else
18366          FOUND_MAKE=$MAKE_CANDIDATE
18367
18368  # Only process if variable expands to non-empty
18369
18370  if test "x$FOUND_MAKE" != x; then
18371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18372
18373  # First separate the path from the arguments. This will split at the first
18374  # space.
18375  complete="$FOUND_MAKE"
18376  path="${complete%% *}"
18377  tmp="$complete EOL"
18378  arguments="${tmp#* }"
18379
18380  # Input might be given as Windows format, start by converting to
18381  # unix format.
18382  new_path=`$CYGPATH -u "$path"`
18383
18384  # Now try to locate executable using which
18385  new_path=`$WHICH "$new_path" 2> /dev/null`
18386  # bat and cmd files are not always considered executable in cygwin causing which
18387  # to not find them
18388  if test "x$new_path" = x \
18389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18391    new_path=`$CYGPATH -u "$path"`
18392  fi
18393  if test "x$new_path" = x; then
18394    # Oops. Which didn't find the executable.
18395    # The splitting of arguments from the executable at a space might have been incorrect,
18396    # since paths with space are more likely in Windows. Give it another try with the whole
18397    # argument.
18398    path="$complete"
18399    arguments="EOL"
18400    new_path=`$CYGPATH -u "$path"`
18401    new_path=`$WHICH "$new_path" 2> /dev/null`
18402    # bat and cmd files are not always considered executable in cygwin causing which
18403    # to not find them
18404    if test "x$new_path" = x \
18405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18407      new_path=`$CYGPATH -u "$path"`
18408    fi
18409    if test "x$new_path" = x; then
18410      # It's still not found. Now this is an unrecoverable error.
18411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18413      has_space=`$ECHO "$complete" | $GREP " "`
18414      if test "x$has_space" != x; then
18415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18417      fi
18418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18419    fi
18420  fi
18421
18422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18425  # "foo.exe" is OK but "foo" is an error.
18426  #
18427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18428  # It is also a way to make sure we got the proper file name for the real test later on.
18429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18430  if test "x$test_shortpath" = x; then
18431    # Short path failed, file does not exist as specified.
18432    # Try adding .exe or .cmd
18433    if test -f "${new_path}.exe"; then
18434      input_to_shortpath="${new_path}.exe"
18435    elif test -f "${new_path}.cmd"; then
18436      input_to_shortpath="${new_path}.cmd"
18437    else
18438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18442      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18443    fi
18444  else
18445    input_to_shortpath="$new_path"
18446  fi
18447
18448  # Call helper function which possibly converts this using DOS-style short mode.
18449  # If so, the updated path is stored in $new_path.
18450  new_path="$input_to_shortpath"
18451
18452  input_path="$input_to_shortpath"
18453  # Check if we need to convert this using DOS-style short mode. If the path
18454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18455  # take no chances and rewrite it.
18456  # Note: m4 eats our [], so we need to use [ and ] instead.
18457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18458  if test "x$has_forbidden_chars" != x; then
18459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18463      # Going to short mode and back again did indeed matter. Since short mode is
18464      # case insensitive, let's make it lowercase to improve readability.
18465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18466      # Now convert it back to Unix-style (cygpath)
18467      input_path=`$CYGPATH -u "$shortmode_path"`
18468      new_path="$input_path"
18469    fi
18470  fi
18471
18472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18473  if test "x$test_cygdrive_prefix" = x; then
18474    # As a simple fix, exclude /usr/bin since it's not a real path.
18475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18477      # a path prefixed by /cygdrive for fixpath to work.
18478      new_path="$CYGWIN_ROOT_PATH$input_path"
18479    fi
18480  fi
18481
18482  # remove trailing .exe if any
18483  new_path="${new_path/%.exe/}"
18484
18485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18486
18487  # First separate the path from the arguments. This will split at the first
18488  # space.
18489  complete="$FOUND_MAKE"
18490  path="${complete%% *}"
18491  tmp="$complete EOL"
18492  arguments="${tmp#* }"
18493
18494  # Input might be given as Windows format, start by converting to
18495  # unix format.
18496  new_path="$path"
18497
18498  windows_path="$new_path"
18499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18500    unix_path=`$CYGPATH -u "$windows_path"`
18501    new_path="$unix_path"
18502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18504    new_path="$unix_path"
18505  fi
18506
18507
18508  # Now try to locate executable using which
18509  new_path=`$WHICH "$new_path" 2> /dev/null`
18510
18511  if test "x$new_path" = x; then
18512    # Oops. Which didn't find the executable.
18513    # The splitting of arguments from the executable at a space might have been incorrect,
18514    # since paths with space are more likely in Windows. Give it another try with the whole
18515    # argument.
18516    path="$complete"
18517    arguments="EOL"
18518    new_path="$path"
18519
18520  windows_path="$new_path"
18521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18522    unix_path=`$CYGPATH -u "$windows_path"`
18523    new_path="$unix_path"
18524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18526    new_path="$unix_path"
18527  fi
18528
18529
18530    new_path=`$WHICH "$new_path" 2> /dev/null`
18531    # bat and cmd files are not always considered executable in MSYS causing which
18532    # to not find them
18533    if test "x$new_path" = x \
18534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
18548
18549    if test "x$new_path" = x; then
18550      # It's still not found. Now this is an unrecoverable error.
18551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18552$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18553      has_space=`$ECHO "$complete" | $GREP " "`
18554      if test "x$has_space" != x; then
18555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18557      fi
18558      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18559    fi
18560  fi
18561
18562  # Now new_path has a complete unix path to the binary
18563  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18564    # Keep paths in /bin as-is, but remove trailing .exe if any
18565    new_path="${new_path/%.exe/}"
18566    # Do not save /bin paths to all_fixpath_prefixes!
18567  else
18568    # Not in mixed or Windows style, start by that.
18569    new_path=`cmd //c echo $new_path`
18570
18571  input_path="$new_path"
18572  # Check if we need to convert this using DOS-style short mode. If the path
18573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18574  # take no chances and rewrite it.
18575  # Note: m4 eats our [], so we need to use [ and ] instead.
18576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18577  if test "x$has_forbidden_chars" != x; then
18578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18580  fi
18581
18582    # Output is in $new_path
18583
18584  windows_path="$new_path"
18585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18586    unix_path=`$CYGPATH -u "$windows_path"`
18587    new_path="$unix_path"
18588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18590    new_path="$unix_path"
18591  fi
18592
18593    # remove trailing .exe if any
18594    new_path="${new_path/%.exe/}"
18595
18596    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18597    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18598  fi
18599
18600    else
18601      # We're on a unix platform. Hooray! :)
18602      # First separate the path from the arguments. This will split at the first
18603      # space.
18604      complete="$FOUND_MAKE"
18605      path="${complete%% *}"
18606      tmp="$complete EOL"
18607      arguments="${tmp#* }"
18608
18609      # Cannot rely on the command "which" here since it doesn't always work.
18610      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18611      if test -z "$is_absolute_path"; then
18612        # Path to executable is not absolute. Find it.
18613        IFS_save="$IFS"
18614        IFS=:
18615        for p in $PATH; do
18616          if test -f "$p/$path" && test -x "$p/$path"; then
18617            new_path="$p/$path"
18618            break
18619          fi
18620        done
18621        IFS="$IFS_save"
18622      else
18623        # This is an absolute path, we can use it without further modifications.
18624        new_path="$path"
18625      fi
18626
18627      if test "x$new_path" = x; then
18628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18630        has_space=`$ECHO "$complete" | $GREP " "`
18631        if test "x$has_space" != x; then
18632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18634        fi
18635        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18636      fi
18637    fi
18638
18639    # Now join together the path and the arguments once again
18640    if test "x$arguments" != xEOL; then
18641      new_complete="$new_path ${arguments% *}"
18642    else
18643      new_complete="$new_path"
18644    fi
18645
18646    if test "x$complete" != "x$new_complete"; then
18647      FOUND_MAKE="$new_complete"
18648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18649$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18650    fi
18651  fi
18652
18653        fi
18654      fi
18655    fi
18656  fi
18657
18658
18659    if test "x$FOUND_MAKE" = x; then
18660      for ac_prog in make
18661do
18662  # Extract the first word of "$ac_prog", so it can be a program name with args.
18663set dummy $ac_prog; ac_word=$2
18664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18665$as_echo_n "checking for $ac_word... " >&6; }
18666if ${ac_cv_path_CHECK_MAKE+:} false; then :
18667  $as_echo_n "(cached) " >&6
18668else
18669  case $CHECK_MAKE in
18670  [\\/]* | ?:[\\/]*)
18671  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18672  ;;
18673  *)
18674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18675for as_dir in $PATH
18676do
18677  IFS=$as_save_IFS
18678  test -z "$as_dir" && as_dir=.
18679    for ac_exec_ext in '' $ac_executable_extensions; do
18680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18681    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18683    break 2
18684  fi
18685done
18686  done
18687IFS=$as_save_IFS
18688
18689  ;;
18690esac
18691fi
18692CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18693if test -n "$CHECK_MAKE"; then
18694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18695$as_echo "$CHECK_MAKE" >&6; }
18696else
18697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18698$as_echo "no" >&6; }
18699fi
18700
18701
18702  test -n "$CHECK_MAKE" && break
18703done
18704
18705
18706  MAKE_CANDIDATE=""$CHECK_MAKE""
18707  DESCRIPTION="make in PATH"
18708
18709  # On Cygwin, we require a newer version of make than on other platforms
18710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18711    MAKE_VERSION_EXPR="-e 4\."
18712    MAKE_REQUIRED_VERSION="4.0"
18713   else
18714    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18715    MAKE_REQUIRED_VERSION="3.81"
18716  fi
18717
18718  if test "x$MAKE_CANDIDATE" != x; then
18719    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18720$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18721    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18722    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18723    if test "x$IS_GNU_MAKE" = x; then
18724      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18725$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18726    else
18727      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18728      if test "x$IS_MODERN_MAKE" = x; then
18729        { $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
18730$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;}
18731      else
18732        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18733          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18734            MAKE_EXPECTED_ENV='cygwin'
18735          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18736            MAKE_EXPECTED_ENV='msys'
18737          else
18738            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18739          fi
18740          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18741          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18742        else
18743          # Not relevant for non-Windows
18744          IS_MAKE_CORRECT_ENV=true
18745        fi
18746        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18747          { $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
18748$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;}
18749        else
18750          FOUND_MAKE=$MAKE_CANDIDATE
18751
18752  # Only process if variable expands to non-empty
18753
18754  if test "x$FOUND_MAKE" != x; then
18755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18756
18757  # First separate the path from the arguments. This will split at the first
18758  # space.
18759  complete="$FOUND_MAKE"
18760  path="${complete%% *}"
18761  tmp="$complete EOL"
18762  arguments="${tmp#* }"
18763
18764  # Input might be given as Windows format, start by converting to
18765  # unix format.
18766  new_path=`$CYGPATH -u "$path"`
18767
18768  # Now try to locate executable using which
18769  new_path=`$WHICH "$new_path" 2> /dev/null`
18770  # bat and cmd files are not always considered executable in cygwin causing which
18771  # to not find them
18772  if test "x$new_path" = x \
18773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18775    new_path=`$CYGPATH -u "$path"`
18776  fi
18777  if test "x$new_path" = x; then
18778    # Oops. Which didn't find the executable.
18779    # The splitting of arguments from the executable at a space might have been incorrect,
18780    # since paths with space are more likely in Windows. Give it another try with the whole
18781    # argument.
18782    path="$complete"
18783    arguments="EOL"
18784    new_path=`$CYGPATH -u "$path"`
18785    new_path=`$WHICH "$new_path" 2> /dev/null`
18786    # bat and cmd files are not always considered executable in cygwin causing which
18787    # to not find them
18788    if test "x$new_path" = x \
18789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18791      new_path=`$CYGPATH -u "$path"`
18792    fi
18793    if test "x$new_path" = x; then
18794      # It's still not found. Now this is an unrecoverable error.
18795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18797      has_space=`$ECHO "$complete" | $GREP " "`
18798      if test "x$has_space" != x; then
18799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18801      fi
18802      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18803    fi
18804  fi
18805
18806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18809  # "foo.exe" is OK but "foo" is an error.
18810  #
18811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18812  # It is also a way to make sure we got the proper file name for the real test later on.
18813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18814  if test "x$test_shortpath" = x; then
18815    # Short path failed, file does not exist as specified.
18816    # Try adding .exe or .cmd
18817    if test -f "${new_path}.exe"; then
18818      input_to_shortpath="${new_path}.exe"
18819    elif test -f "${new_path}.cmd"; then
18820      input_to_shortpath="${new_path}.cmd"
18821    else
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18827    fi
18828  else
18829    input_to_shortpath="$new_path"
18830  fi
18831
18832  # Call helper function which possibly converts this using DOS-style short mode.
18833  # If so, the updated path is stored in $new_path.
18834  new_path="$input_to_shortpath"
18835
18836  input_path="$input_to_shortpath"
18837  # Check if we need to convert this using DOS-style short mode. If the path
18838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18839  # take no chances and rewrite it.
18840  # Note: m4 eats our [], so we need to use [ and ] instead.
18841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18842  if test "x$has_forbidden_chars" != x; then
18843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18847      # Going to short mode and back again did indeed matter. Since short mode is
18848      # case insensitive, let's make it lowercase to improve readability.
18849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18850      # Now convert it back to Unix-style (cygpath)
18851      input_path=`$CYGPATH -u "$shortmode_path"`
18852      new_path="$input_path"
18853    fi
18854  fi
18855
18856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18857  if test "x$test_cygdrive_prefix" = x; then
18858    # As a simple fix, exclude /usr/bin since it's not a real path.
18859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18861      # a path prefixed by /cygdrive for fixpath to work.
18862      new_path="$CYGWIN_ROOT_PATH$input_path"
18863    fi
18864  fi
18865
18866  # remove trailing .exe if any
18867  new_path="${new_path/%.exe/}"
18868
18869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18870
18871  # First separate the path from the arguments. This will split at the first
18872  # space.
18873  complete="$FOUND_MAKE"
18874  path="${complete%% *}"
18875  tmp="$complete EOL"
18876  arguments="${tmp#* }"
18877
18878  # Input might be given as Windows format, start by converting to
18879  # unix format.
18880  new_path="$path"
18881
18882  windows_path="$new_path"
18883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18884    unix_path=`$CYGPATH -u "$windows_path"`
18885    new_path="$unix_path"
18886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18888    new_path="$unix_path"
18889  fi
18890
18891
18892  # Now try to locate executable using which
18893  new_path=`$WHICH "$new_path" 2> /dev/null`
18894
18895  if test "x$new_path" = x; then
18896    # Oops. Which didn't find the executable.
18897    # The splitting of arguments from the executable at a space might have been incorrect,
18898    # since paths with space are more likely in Windows. Give it another try with the whole
18899    # argument.
18900    path="$complete"
18901    arguments="EOL"
18902    new_path="$path"
18903
18904  windows_path="$new_path"
18905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18906    unix_path=`$CYGPATH -u "$windows_path"`
18907    new_path="$unix_path"
18908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18910    new_path="$unix_path"
18911  fi
18912
18913
18914    new_path=`$WHICH "$new_path" 2> /dev/null`
18915    # bat and cmd files are not always considered executable in MSYS causing which
18916    # to not find them
18917    if test "x$new_path" = x \
18918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
18932
18933    if test "x$new_path" = x; then
18934      # It's still not found. Now this is an unrecoverable error.
18935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18936$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18937      has_space=`$ECHO "$complete" | $GREP " "`
18938      if test "x$has_space" != x; then
18939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18941      fi
18942      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18943    fi
18944  fi
18945
18946  # Now new_path has a complete unix path to the binary
18947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18948    # Keep paths in /bin as-is, but remove trailing .exe if any
18949    new_path="${new_path/%.exe/}"
18950    # Do not save /bin paths to all_fixpath_prefixes!
18951  else
18952    # Not in mixed or Windows style, start by that.
18953    new_path=`cmd //c echo $new_path`
18954
18955  input_path="$new_path"
18956  # Check if we need to convert this using DOS-style short mode. If the path
18957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18958  # take no chances and rewrite it.
18959  # Note: m4 eats our [], so we need to use [ and ] instead.
18960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18961  if test "x$has_forbidden_chars" != x; then
18962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18964  fi
18965
18966    # Output is in $new_path
18967
18968  windows_path="$new_path"
18969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18970    unix_path=`$CYGPATH -u "$windows_path"`
18971    new_path="$unix_path"
18972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18974    new_path="$unix_path"
18975  fi
18976
18977    # remove trailing .exe if any
18978    new_path="${new_path/%.exe/}"
18979
18980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18982  fi
18983
18984    else
18985      # We're on a unix platform. Hooray! :)
18986      # First separate the path from the arguments. This will split at the first
18987      # space.
18988      complete="$FOUND_MAKE"
18989      path="${complete%% *}"
18990      tmp="$complete EOL"
18991      arguments="${tmp#* }"
18992
18993      # Cannot rely on the command "which" here since it doesn't always work.
18994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18995      if test -z "$is_absolute_path"; then
18996        # Path to executable is not absolute. Find it.
18997        IFS_save="$IFS"
18998        IFS=:
18999        for p in $PATH; do
19000          if test -f "$p/$path" && test -x "$p/$path"; then
19001            new_path="$p/$path"
19002            break
19003          fi
19004        done
19005        IFS="$IFS_save"
19006      else
19007        # This is an absolute path, we can use it without further modifications.
19008        new_path="$path"
19009      fi
19010
19011      if test "x$new_path" = x; then
19012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19013$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19014        has_space=`$ECHO "$complete" | $GREP " "`
19015        if test "x$has_space" != x; then
19016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19018        fi
19019        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19020      fi
19021    fi
19022
19023    # Now join together the path and the arguments once again
19024    if test "x$arguments" != xEOL; then
19025      new_complete="$new_path ${arguments% *}"
19026    else
19027      new_complete="$new_path"
19028    fi
19029
19030    if test "x$complete" != "x$new_complete"; then
19031      FOUND_MAKE="$new_complete"
19032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19033$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19034    fi
19035  fi
19036
19037        fi
19038      fi
19039    fi
19040  fi
19041
19042    fi
19043
19044    if test "x$FOUND_MAKE" = x; then
19045      if test "x$TOOLCHAIN_PATH" != x; then
19046        # We have a toolchain path, check that as well before giving up.
19047        OLD_PATH=$PATH
19048        PATH=$TOOLCHAIN_PATH:$PATH
19049        for ac_prog in gmake
19050do
19051  # Extract the first word of "$ac_prog", so it can be a program name with args.
19052set dummy $ac_prog; ac_word=$2
19053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19054$as_echo_n "checking for $ac_word... " >&6; }
19055if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19056  $as_echo_n "(cached) " >&6
19057else
19058  case $CHECK_TOOLSDIR_GMAKE in
19059  [\\/]* | ?:[\\/]*)
19060  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19061  ;;
19062  *)
19063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19064for as_dir in $PATH
19065do
19066  IFS=$as_save_IFS
19067  test -z "$as_dir" && as_dir=.
19068    for ac_exec_ext in '' $ac_executable_extensions; do
19069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19070    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19072    break 2
19073  fi
19074done
19075  done
19076IFS=$as_save_IFS
19077
19078  ;;
19079esac
19080fi
19081CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19082if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19084$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19085else
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19087$as_echo "no" >&6; }
19088fi
19089
19090
19091  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19092done
19093
19094
19095  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19096  DESCRIPTION="gmake in tools-dir"
19097
19098  # On Cygwin, we require a newer version of make than on other platforms
19099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19100    MAKE_VERSION_EXPR="-e 4\."
19101    MAKE_REQUIRED_VERSION="4.0"
19102   else
19103    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19104    MAKE_REQUIRED_VERSION="3.81"
19105  fi
19106
19107  if test "x$MAKE_CANDIDATE" != x; then
19108    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19109$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19110    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19111    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19112    if test "x$IS_GNU_MAKE" = x; then
19113      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19114$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19115    else
19116      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19117      if test "x$IS_MODERN_MAKE" = x; then
19118        { $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
19119$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;}
19120      else
19121        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19122          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19123            MAKE_EXPECTED_ENV='cygwin'
19124          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19125            MAKE_EXPECTED_ENV='msys'
19126          else
19127            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19128          fi
19129          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19130          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19131        else
19132          # Not relevant for non-Windows
19133          IS_MAKE_CORRECT_ENV=true
19134        fi
19135        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19136          { $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
19137$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;}
19138        else
19139          FOUND_MAKE=$MAKE_CANDIDATE
19140
19141  # Only process if variable expands to non-empty
19142
19143  if test "x$FOUND_MAKE" != x; then
19144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19145
19146  # First separate the path from the arguments. This will split at the first
19147  # space.
19148  complete="$FOUND_MAKE"
19149  path="${complete%% *}"
19150  tmp="$complete EOL"
19151  arguments="${tmp#* }"
19152
19153  # Input might be given as Windows format, start by converting to
19154  # unix format.
19155  new_path=`$CYGPATH -u "$path"`
19156
19157  # Now try to locate executable using which
19158  new_path=`$WHICH "$new_path" 2> /dev/null`
19159  # bat and cmd files are not always considered executable in cygwin causing which
19160  # to not find them
19161  if test "x$new_path" = x \
19162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19164    new_path=`$CYGPATH -u "$path"`
19165  fi
19166  if test "x$new_path" = x; then
19167    # Oops. Which didn't find the executable.
19168    # The splitting of arguments from the executable at a space might have been incorrect,
19169    # since paths with space are more likely in Windows. Give it another try with the whole
19170    # argument.
19171    path="$complete"
19172    arguments="EOL"
19173    new_path=`$CYGPATH -u "$path"`
19174    new_path=`$WHICH "$new_path" 2> /dev/null`
19175    # bat and cmd files are not always considered executable in cygwin causing which
19176    # to not find them
19177    if test "x$new_path" = x \
19178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19180      new_path=`$CYGPATH -u "$path"`
19181    fi
19182    if test "x$new_path" = x; then
19183      # It's still not found. Now this is an unrecoverable error.
19184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19185$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19186      has_space=`$ECHO "$complete" | $GREP " "`
19187      if test "x$has_space" != x; then
19188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19190      fi
19191      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19192    fi
19193  fi
19194
19195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19198  # "foo.exe" is OK but "foo" is an error.
19199  #
19200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19201  # It is also a way to make sure we got the proper file name for the real test later on.
19202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19203  if test "x$test_shortpath" = x; then
19204    # Short path failed, file does not exist as specified.
19205    # Try adding .exe or .cmd
19206    if test -f "${new_path}.exe"; then
19207      input_to_shortpath="${new_path}.exe"
19208    elif test -f "${new_path}.cmd"; then
19209      input_to_shortpath="${new_path}.cmd"
19210    else
19211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19215      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19216    fi
19217  else
19218    input_to_shortpath="$new_path"
19219  fi
19220
19221  # Call helper function which possibly converts this using DOS-style short mode.
19222  # If so, the updated path is stored in $new_path.
19223  new_path="$input_to_shortpath"
19224
19225  input_path="$input_to_shortpath"
19226  # Check if we need to convert this using DOS-style short mode. If the path
19227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19228  # take no chances and rewrite it.
19229  # Note: m4 eats our [], so we need to use [ and ] instead.
19230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19231  if test "x$has_forbidden_chars" != x; then
19232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19236      # Going to short mode and back again did indeed matter. Since short mode is
19237      # case insensitive, let's make it lowercase to improve readability.
19238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19239      # Now convert it back to Unix-style (cygpath)
19240      input_path=`$CYGPATH -u "$shortmode_path"`
19241      new_path="$input_path"
19242    fi
19243  fi
19244
19245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19246  if test "x$test_cygdrive_prefix" = x; then
19247    # As a simple fix, exclude /usr/bin since it's not a real path.
19248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19250      # a path prefixed by /cygdrive for fixpath to work.
19251      new_path="$CYGWIN_ROOT_PATH$input_path"
19252    fi
19253  fi
19254
19255  # remove trailing .exe if any
19256  new_path="${new_path/%.exe/}"
19257
19258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19259
19260  # First separate the path from the arguments. This will split at the first
19261  # space.
19262  complete="$FOUND_MAKE"
19263  path="${complete%% *}"
19264  tmp="$complete EOL"
19265  arguments="${tmp#* }"
19266
19267  # Input might be given as Windows format, start by converting to
19268  # unix format.
19269  new_path="$path"
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280
19281  # Now try to locate executable using which
19282  new_path=`$WHICH "$new_path" 2> /dev/null`
19283
19284  if test "x$new_path" = x; then
19285    # Oops. Which didn't find the executable.
19286    # The splitting of arguments from the executable at a space might have been incorrect,
19287    # since paths with space are more likely in Windows. Give it another try with the whole
19288    # argument.
19289    path="$complete"
19290    arguments="EOL"
19291    new_path="$path"
19292
19293  windows_path="$new_path"
19294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19295    unix_path=`$CYGPATH -u "$windows_path"`
19296    new_path="$unix_path"
19297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19299    new_path="$unix_path"
19300  fi
19301
19302
19303    new_path=`$WHICH "$new_path" 2> /dev/null`
19304    # bat and cmd files are not always considered executable in MSYS causing which
19305    # to not find them
19306    if test "x$new_path" = x \
19307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
19321
19322    if test "x$new_path" = x; then
19323      # It's still not found. Now this is an unrecoverable error.
19324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19325$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19326      has_space=`$ECHO "$complete" | $GREP " "`
19327      if test "x$has_space" != x; then
19328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19330      fi
19331      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19332    fi
19333  fi
19334
19335  # Now new_path has a complete unix path to the binary
19336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19337    # Keep paths in /bin as-is, but remove trailing .exe if any
19338    new_path="${new_path/%.exe/}"
19339    # Do not save /bin paths to all_fixpath_prefixes!
19340  else
19341    # Not in mixed or Windows style, start by that.
19342    new_path=`cmd //c echo $new_path`
19343
19344  input_path="$new_path"
19345  # Check if we need to convert this using DOS-style short mode. If the path
19346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19347  # take no chances and rewrite it.
19348  # Note: m4 eats our [], so we need to use [ and ] instead.
19349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19350  if test "x$has_forbidden_chars" != x; then
19351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19353  fi
19354
19355    # Output is in $new_path
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366    # remove trailing .exe if any
19367    new_path="${new_path/%.exe/}"
19368
19369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19371  fi
19372
19373    else
19374      # We're on a unix platform. Hooray! :)
19375      # First separate the path from the arguments. This will split at the first
19376      # space.
19377      complete="$FOUND_MAKE"
19378      path="${complete%% *}"
19379      tmp="$complete EOL"
19380      arguments="${tmp#* }"
19381
19382      # Cannot rely on the command "which" here since it doesn't always work.
19383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19384      if test -z "$is_absolute_path"; then
19385        # Path to executable is not absolute. Find it.
19386        IFS_save="$IFS"
19387        IFS=:
19388        for p in $PATH; do
19389          if test -f "$p/$path" && test -x "$p/$path"; then
19390            new_path="$p/$path"
19391            break
19392          fi
19393        done
19394        IFS="$IFS_save"
19395      else
19396        # This is an absolute path, we can use it without further modifications.
19397        new_path="$path"
19398      fi
19399
19400      if test "x$new_path" = x; then
19401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19402$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19403        has_space=`$ECHO "$complete" | $GREP " "`
19404        if test "x$has_space" != x; then
19405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19407        fi
19408        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19409      fi
19410    fi
19411
19412    # Now join together the path and the arguments once again
19413    if test "x$arguments" != xEOL; then
19414      new_complete="$new_path ${arguments% *}"
19415    else
19416      new_complete="$new_path"
19417    fi
19418
19419    if test "x$complete" != "x$new_complete"; then
19420      FOUND_MAKE="$new_complete"
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19422$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19423    fi
19424  fi
19425
19426        fi
19427      fi
19428    fi
19429  fi
19430
19431        if test "x$FOUND_MAKE" = x; then
19432          for ac_prog in make
19433do
19434  # Extract the first word of "$ac_prog", so it can be a program name with args.
19435set dummy $ac_prog; ac_word=$2
19436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19437$as_echo_n "checking for $ac_word... " >&6; }
19438if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19439  $as_echo_n "(cached) " >&6
19440else
19441  case $CHECK_TOOLSDIR_MAKE in
19442  [\\/]* | ?:[\\/]*)
19443  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19444  ;;
19445  *)
19446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19447for as_dir in $PATH
19448do
19449  IFS=$as_save_IFS
19450  test -z "$as_dir" && as_dir=.
19451    for ac_exec_ext in '' $ac_executable_extensions; do
19452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19453    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19455    break 2
19456  fi
19457done
19458  done
19459IFS=$as_save_IFS
19460
19461  ;;
19462esac
19463fi
19464CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19465if test -n "$CHECK_TOOLSDIR_MAKE"; then
19466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19467$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19468else
19469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19470$as_echo "no" >&6; }
19471fi
19472
19473
19474  test -n "$CHECK_TOOLSDIR_MAKE" && break
19475done
19476
19477
19478  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19479  DESCRIPTION="make in tools-dir"
19480
19481  # On Cygwin, we require a newer version of make than on other platforms
19482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19483    MAKE_VERSION_EXPR="-e 4\."
19484    MAKE_REQUIRED_VERSION="4.0"
19485   else
19486    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19487    MAKE_REQUIRED_VERSION="3.81"
19488  fi
19489
19490  if test "x$MAKE_CANDIDATE" != x; then
19491    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19492$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19493    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19494    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19495    if test "x$IS_GNU_MAKE" = x; then
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19497$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19498    else
19499      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19500      if test "x$IS_MODERN_MAKE" = x; then
19501        { $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
19502$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;}
19503      else
19504        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19505          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506            MAKE_EXPECTED_ENV='cygwin'
19507          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19508            MAKE_EXPECTED_ENV='msys'
19509          else
19510            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19511          fi
19512          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19513          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19514        else
19515          # Not relevant for non-Windows
19516          IS_MAKE_CORRECT_ENV=true
19517        fi
19518        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19519          { $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
19520$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;}
19521        else
19522          FOUND_MAKE=$MAKE_CANDIDATE
19523
19524  # Only process if variable expands to non-empty
19525
19526  if test "x$FOUND_MAKE" != x; then
19527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528
19529  # First separate the path from the arguments. This will split at the first
19530  # space.
19531  complete="$FOUND_MAKE"
19532  path="${complete%% *}"
19533  tmp="$complete EOL"
19534  arguments="${tmp#* }"
19535
19536  # Input might be given as Windows format, start by converting to
19537  # unix format.
19538  new_path=`$CYGPATH -u "$path"`
19539
19540  # Now try to locate executable using which
19541  new_path=`$WHICH "$new_path" 2> /dev/null`
19542  # bat and cmd files are not always considered executable in cygwin causing which
19543  # to not find them
19544  if test "x$new_path" = x \
19545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19547    new_path=`$CYGPATH -u "$path"`
19548  fi
19549  if test "x$new_path" = x; then
19550    # Oops. Which didn't find the executable.
19551    # The splitting of arguments from the executable at a space might have been incorrect,
19552    # since paths with space are more likely in Windows. Give it another try with the whole
19553    # argument.
19554    path="$complete"
19555    arguments="EOL"
19556    new_path=`$CYGPATH -u "$path"`
19557    new_path=`$WHICH "$new_path" 2> /dev/null`
19558    # bat and cmd files are not always considered executable in cygwin causing which
19559    # to not find them
19560    if test "x$new_path" = x \
19561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19563      new_path=`$CYGPATH -u "$path"`
19564    fi
19565    if test "x$new_path" = x; then
19566      # It's still not found. Now this is an unrecoverable error.
19567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19568$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19569      has_space=`$ECHO "$complete" | $GREP " "`
19570      if test "x$has_space" != x; then
19571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19573      fi
19574      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19575    fi
19576  fi
19577
19578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19581  # "foo.exe" is OK but "foo" is an error.
19582  #
19583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19584  # It is also a way to make sure we got the proper file name for the real test later on.
19585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19586  if test "x$test_shortpath" = x; then
19587    # Short path failed, file does not exist as specified.
19588    # Try adding .exe or .cmd
19589    if test -f "${new_path}.exe"; then
19590      input_to_shortpath="${new_path}.exe"
19591    elif test -f "${new_path}.cmd"; then
19592      input_to_shortpath="${new_path}.cmd"
19593    else
19594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19598      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19599    fi
19600  else
19601    input_to_shortpath="$new_path"
19602  fi
19603
19604  # Call helper function which possibly converts this using DOS-style short mode.
19605  # If so, the updated path is stored in $new_path.
19606  new_path="$input_to_shortpath"
19607
19608  input_path="$input_to_shortpath"
19609  # Check if we need to convert this using DOS-style short mode. If the path
19610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19611  # take no chances and rewrite it.
19612  # Note: m4 eats our [], so we need to use [ and ] instead.
19613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19614  if test "x$has_forbidden_chars" != x; then
19615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19619      # Going to short mode and back again did indeed matter. Since short mode is
19620      # case insensitive, let's make it lowercase to improve readability.
19621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19622      # Now convert it back to Unix-style (cygpath)
19623      input_path=`$CYGPATH -u "$shortmode_path"`
19624      new_path="$input_path"
19625    fi
19626  fi
19627
19628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19629  if test "x$test_cygdrive_prefix" = x; then
19630    # As a simple fix, exclude /usr/bin since it's not a real path.
19631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19633      # a path prefixed by /cygdrive for fixpath to work.
19634      new_path="$CYGWIN_ROOT_PATH$input_path"
19635    fi
19636  fi
19637
19638  # remove trailing .exe if any
19639  new_path="${new_path/%.exe/}"
19640
19641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642
19643  # First separate the path from the arguments. This will split at the first
19644  # space.
19645  complete="$FOUND_MAKE"
19646  path="${complete%% *}"
19647  tmp="$complete EOL"
19648  arguments="${tmp#* }"
19649
19650  # Input might be given as Windows format, start by converting to
19651  # unix format.
19652  new_path="$path"
19653
19654  windows_path="$new_path"
19655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19656    unix_path=`$CYGPATH -u "$windows_path"`
19657    new_path="$unix_path"
19658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19660    new_path="$unix_path"
19661  fi
19662
19663
19664  # Now try to locate executable using which
19665  new_path=`$WHICH "$new_path" 2> /dev/null`
19666
19667  if test "x$new_path" = x; then
19668    # Oops. Which didn't find the executable.
19669    # The splitting of arguments from the executable at a space might have been incorrect,
19670    # since paths with space are more likely in Windows. Give it another try with the whole
19671    # argument.
19672    path="$complete"
19673    arguments="EOL"
19674    new_path="$path"
19675
19676  windows_path="$new_path"
19677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19678    unix_path=`$CYGPATH -u "$windows_path"`
19679    new_path="$unix_path"
19680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19682    new_path="$unix_path"
19683  fi
19684
19685
19686    new_path=`$WHICH "$new_path" 2> /dev/null`
19687    # bat and cmd files are not always considered executable in MSYS causing which
19688    # to not find them
19689    if test "x$new_path" = x \
19690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
19704
19705    if test "x$new_path" = x; then
19706      # It's still not found. Now this is an unrecoverable error.
19707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19709      has_space=`$ECHO "$complete" | $GREP " "`
19710      if test "x$has_space" != x; then
19711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19713      fi
19714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19715    fi
19716  fi
19717
19718  # Now new_path has a complete unix path to the binary
19719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19720    # Keep paths in /bin as-is, but remove trailing .exe if any
19721    new_path="${new_path/%.exe/}"
19722    # Do not save /bin paths to all_fixpath_prefixes!
19723  else
19724    # Not in mixed or Windows style, start by that.
19725    new_path=`cmd //c echo $new_path`
19726
19727  input_path="$new_path"
19728  # Check if we need to convert this using DOS-style short mode. If the path
19729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19730  # take no chances and rewrite it.
19731  # Note: m4 eats our [], so we need to use [ and ] instead.
19732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19733  if test "x$has_forbidden_chars" != x; then
19734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19736  fi
19737
19738    # Output is in $new_path
19739
19740  windows_path="$new_path"
19741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19742    unix_path=`$CYGPATH -u "$windows_path"`
19743    new_path="$unix_path"
19744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19746    new_path="$unix_path"
19747  fi
19748
19749    # remove trailing .exe if any
19750    new_path="${new_path/%.exe/}"
19751
19752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19754  fi
19755
19756    else
19757      # We're on a unix platform. Hooray! :)
19758      # First separate the path from the arguments. This will split at the first
19759      # space.
19760      complete="$FOUND_MAKE"
19761      path="${complete%% *}"
19762      tmp="$complete EOL"
19763      arguments="${tmp#* }"
19764
19765      # Cannot rely on the command "which" here since it doesn't always work.
19766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19767      if test -z "$is_absolute_path"; then
19768        # Path to executable is not absolute. Find it.
19769        IFS_save="$IFS"
19770        IFS=:
19771        for p in $PATH; do
19772          if test -f "$p/$path" && test -x "$p/$path"; then
19773            new_path="$p/$path"
19774            break
19775          fi
19776        done
19777        IFS="$IFS_save"
19778      else
19779        # This is an absolute path, we can use it without further modifications.
19780        new_path="$path"
19781      fi
19782
19783      if test "x$new_path" = x; then
19784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19785$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19786        has_space=`$ECHO "$complete" | $GREP " "`
19787        if test "x$has_space" != x; then
19788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19790        fi
19791        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19792      fi
19793    fi
19794
19795    # Now join together the path and the arguments once again
19796    if test "x$arguments" != xEOL; then
19797      new_complete="$new_path ${arguments% *}"
19798    else
19799      new_complete="$new_path"
19800    fi
19801
19802    if test "x$complete" != "x$new_complete"; then
19803      FOUND_MAKE="$new_complete"
19804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19805$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19806    fi
19807  fi
19808
19809        fi
19810      fi
19811    fi
19812  fi
19813
19814        fi
19815        PATH=$OLD_PATH
19816      fi
19817    fi
19818
19819    if test "x$FOUND_MAKE" = x; then
19820      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
19821    fi
19822
19823    else
19824      # If it succeeded, then it was overridden by the user. We will use it
19825      # for the tool.
19826
19827      # First remove it from the list of overridden variables, so we can test
19828      # for unknown variables in the end.
19829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19830
19831      # Check if we try to supply an empty value
19832      if test "x$MAKE" = x; then
19833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19834$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19836$as_echo_n "checking for MAKE... " >&6; }
19837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19838$as_echo "disabled" >&6; }
19839      else
19840        # Check if the provided tool contains a complete path.
19841        tool_specified="$MAKE"
19842        tool_basename="${tool_specified##*/}"
19843        if test "x$tool_basename" = "x$tool_specified"; then
19844          # A command without a complete path is provided, search $PATH.
19845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19846$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19847          # Extract the first word of "$tool_basename", so it can be a program name with args.
19848set dummy $tool_basename; ac_word=$2
19849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19850$as_echo_n "checking for $ac_word... " >&6; }
19851if ${ac_cv_path_MAKE+:} false; then :
19852  $as_echo_n "(cached) " >&6
19853else
19854  case $MAKE in
19855  [\\/]* | ?:[\\/]*)
19856  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19857  ;;
19858  *)
19859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19860for as_dir in $PATH
19861do
19862  IFS=$as_save_IFS
19863  test -z "$as_dir" && as_dir=.
19864    for ac_exec_ext in '' $ac_executable_extensions; do
19865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19866    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19868    break 2
19869  fi
19870done
19871  done
19872IFS=$as_save_IFS
19873
19874  ;;
19875esac
19876fi
19877MAKE=$ac_cv_path_MAKE
19878if test -n "$MAKE"; then
19879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19880$as_echo "$MAKE" >&6; }
19881else
19882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19883$as_echo "no" >&6; }
19884fi
19885
19886
19887          if test "x$MAKE" = x; then
19888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19889          fi
19890        else
19891          # Otherwise we believe it is a complete path. Use it as it is.
19892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19893$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19895$as_echo_n "checking for MAKE... " >&6; }
19896          if test ! -x "$tool_specified"; then
19897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19898$as_echo "not found" >&6; }
19899            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19900          fi
19901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19902$as_echo "$tool_specified" >&6; }
19903        fi
19904      fi
19905    fi
19906
19907    # If MAKE was set by user, verify the version
19908
19909  MAKE_CANDIDATE=""$MAKE""
19910  DESCRIPTION="user supplied MAKE=$MAKE"
19911
19912  # On Cygwin, we require a newer version of make than on other platforms
19913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19914    MAKE_VERSION_EXPR="-e 4\."
19915    MAKE_REQUIRED_VERSION="4.0"
19916   else
19917    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19918    MAKE_REQUIRED_VERSION="3.81"
19919  fi
19920
19921  if test "x$MAKE_CANDIDATE" != x; then
19922    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19923$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19924    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19925    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19926    if test "x$IS_GNU_MAKE" = x; then
19927      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19928$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19929    else
19930      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19931      if test "x$IS_MODERN_MAKE" = x; then
19932        { $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
19933$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;}
19934      else
19935        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19936          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19937            MAKE_EXPECTED_ENV='cygwin'
19938          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19939            MAKE_EXPECTED_ENV='msys'
19940          else
19941            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19942          fi
19943          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19944          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19945        else
19946          # Not relevant for non-Windows
19947          IS_MAKE_CORRECT_ENV=true
19948        fi
19949        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19950          { $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
19951$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;}
19952        else
19953          FOUND_MAKE=$MAKE_CANDIDATE
19954
19955  # Only process if variable expands to non-empty
19956
19957  if test "x$FOUND_MAKE" != x; then
19958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19959
19960  # First separate the path from the arguments. This will split at the first
19961  # space.
19962  complete="$FOUND_MAKE"
19963  path="${complete%% *}"
19964  tmp="$complete EOL"
19965  arguments="${tmp#* }"
19966
19967  # Input might be given as Windows format, start by converting to
19968  # unix format.
19969  new_path=`$CYGPATH -u "$path"`
19970
19971  # Now try to locate executable using which
19972  new_path=`$WHICH "$new_path" 2> /dev/null`
19973  # bat and cmd files are not always considered executable in cygwin causing which
19974  # to not find them
19975  if test "x$new_path" = x \
19976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19978    new_path=`$CYGPATH -u "$path"`
19979  fi
19980  if test "x$new_path" = x; then
19981    # Oops. Which didn't find the executable.
19982    # The splitting of arguments from the executable at a space might have been incorrect,
19983    # since paths with space are more likely in Windows. Give it another try with the whole
19984    # argument.
19985    path="$complete"
19986    arguments="EOL"
19987    new_path=`$CYGPATH -u "$path"`
19988    new_path=`$WHICH "$new_path" 2> /dev/null`
19989    # bat and cmd files are not always considered executable in cygwin causing which
19990    # to not find them
19991    if test "x$new_path" = x \
19992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19994      new_path=`$CYGPATH -u "$path"`
19995    fi
19996    if test "x$new_path" = x; then
19997      # It's still not found. Now this is an unrecoverable error.
19998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20000      has_space=`$ECHO "$complete" | $GREP " "`
20001      if test "x$has_space" != x; then
20002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20004      fi
20005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20006    fi
20007  fi
20008
20009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20012  # "foo.exe" is OK but "foo" is an error.
20013  #
20014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20015  # It is also a way to make sure we got the proper file name for the real test later on.
20016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20017  if test "x$test_shortpath" = x; then
20018    # Short path failed, file does not exist as specified.
20019    # Try adding .exe or .cmd
20020    if test -f "${new_path}.exe"; then
20021      input_to_shortpath="${new_path}.exe"
20022    elif test -f "${new_path}.cmd"; then
20023      input_to_shortpath="${new_path}.cmd"
20024    else
20025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20030    fi
20031  else
20032    input_to_shortpath="$new_path"
20033  fi
20034
20035  # Call helper function which possibly converts this using DOS-style short mode.
20036  # If so, the updated path is stored in $new_path.
20037  new_path="$input_to_shortpath"
20038
20039  input_path="$input_to_shortpath"
20040  # Check if we need to convert this using DOS-style short mode. If the path
20041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20042  # take no chances and rewrite it.
20043  # Note: m4 eats our [], so we need to use [ and ] instead.
20044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20045  if test "x$has_forbidden_chars" != x; then
20046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20050      # Going to short mode and back again did indeed matter. Since short mode is
20051      # case insensitive, let's make it lowercase to improve readability.
20052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20053      # Now convert it back to Unix-style (cygpath)
20054      input_path=`$CYGPATH -u "$shortmode_path"`
20055      new_path="$input_path"
20056    fi
20057  fi
20058
20059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20060  if test "x$test_cygdrive_prefix" = x; then
20061    # As a simple fix, exclude /usr/bin since it's not a real path.
20062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20064      # a path prefixed by /cygdrive for fixpath to work.
20065      new_path="$CYGWIN_ROOT_PATH$input_path"
20066    fi
20067  fi
20068
20069  # remove trailing .exe if any
20070  new_path="${new_path/%.exe/}"
20071
20072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20073
20074  # First separate the path from the arguments. This will split at the first
20075  # space.
20076  complete="$FOUND_MAKE"
20077  path="${complete%% *}"
20078  tmp="$complete EOL"
20079  arguments="${tmp#* }"
20080
20081  # Input might be given as Windows format, start by converting to
20082  # unix format.
20083  new_path="$path"
20084
20085  windows_path="$new_path"
20086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20087    unix_path=`$CYGPATH -u "$windows_path"`
20088    new_path="$unix_path"
20089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20091    new_path="$unix_path"
20092  fi
20093
20094
20095  # Now try to locate executable using which
20096  new_path=`$WHICH "$new_path" 2> /dev/null`
20097
20098  if test "x$new_path" = x; then
20099    # Oops. Which didn't find the executable.
20100    # The splitting of arguments from the executable at a space might have been incorrect,
20101    # since paths with space are more likely in Windows. Give it another try with the whole
20102    # argument.
20103    path="$complete"
20104    arguments="EOL"
20105    new_path="$path"
20106
20107  windows_path="$new_path"
20108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20109    unix_path=`$CYGPATH -u "$windows_path"`
20110    new_path="$unix_path"
20111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20113    new_path="$unix_path"
20114  fi
20115
20116
20117    new_path=`$WHICH "$new_path" 2> /dev/null`
20118    # bat and cmd files are not always considered executable in MSYS causing which
20119    # to not find them
20120    if test "x$new_path" = x \
20121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
20135
20136    if test "x$new_path" = x; then
20137      # It's still not found. Now this is an unrecoverable error.
20138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20139$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20140      has_space=`$ECHO "$complete" | $GREP " "`
20141      if test "x$has_space" != x; then
20142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20144      fi
20145      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20146    fi
20147  fi
20148
20149  # Now new_path has a complete unix path to the binary
20150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20151    # Keep paths in /bin as-is, but remove trailing .exe if any
20152    new_path="${new_path/%.exe/}"
20153    # Do not save /bin paths to all_fixpath_prefixes!
20154  else
20155    # Not in mixed or Windows style, start by that.
20156    new_path=`cmd //c echo $new_path`
20157
20158  input_path="$new_path"
20159  # Check if we need to convert this using DOS-style short mode. If the path
20160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20161  # take no chances and rewrite it.
20162  # Note: m4 eats our [], so we need to use [ and ] instead.
20163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20164  if test "x$has_forbidden_chars" != x; then
20165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20167  fi
20168
20169    # Output is in $new_path
20170
20171  windows_path="$new_path"
20172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20173    unix_path=`$CYGPATH -u "$windows_path"`
20174    new_path="$unix_path"
20175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20177    new_path="$unix_path"
20178  fi
20179
20180    # remove trailing .exe if any
20181    new_path="${new_path/%.exe/}"
20182
20183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20185  fi
20186
20187    else
20188      # We're on a unix platform. Hooray! :)
20189      # First separate the path from the arguments. This will split at the first
20190      # space.
20191      complete="$FOUND_MAKE"
20192      path="${complete%% *}"
20193      tmp="$complete EOL"
20194      arguments="${tmp#* }"
20195
20196      # Cannot rely on the command "which" here since it doesn't always work.
20197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20198      if test -z "$is_absolute_path"; then
20199        # Path to executable is not absolute. Find it.
20200        IFS_save="$IFS"
20201        IFS=:
20202        for p in $PATH; do
20203          if test -f "$p/$path" && test -x "$p/$path"; then
20204            new_path="$p/$path"
20205            break
20206          fi
20207        done
20208        IFS="$IFS_save"
20209      else
20210        # This is an absolute path, we can use it without further modifications.
20211        new_path="$path"
20212      fi
20213
20214      if test "x$new_path" = x; then
20215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20217        has_space=`$ECHO "$complete" | $GREP " "`
20218        if test "x$has_space" != x; then
20219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20221        fi
20222        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20223      fi
20224    fi
20225
20226    # Now join together the path and the arguments once again
20227    if test "x$arguments" != xEOL; then
20228      new_complete="$new_path ${arguments% *}"
20229    else
20230      new_complete="$new_path"
20231    fi
20232
20233    if test "x$complete" != "x$new_complete"; then
20234      FOUND_MAKE="$new_complete"
20235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20236$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20237    fi
20238  fi
20239
20240        fi
20241      fi
20242    fi
20243  fi
20244
20245    if test "x$FOUND_MAKE" = x; then
20246      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20247    fi
20248
20249  fi
20250
20251
20252  MAKE=$FOUND_MAKE
20253
20254  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20255$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20256
20257
20258  # Check if make supports the output sync option and if so, setup using it.
20259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20260$as_echo_n "checking if make --output-sync is supported... " >&6; }
20261  if $MAKE --version -O > /dev/null 2>&1; then
20262    OUTPUT_SYNC_SUPPORTED=true
20263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20264$as_echo "yes" >&6; }
20265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20266$as_echo_n "checking for output-sync value... " >&6; }
20267
20268# Check whether --with-output-sync was given.
20269if test "${with_output_sync+set}" = set; then :
20270  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20271fi
20272
20273    if test "x$OUTPUT_SYNC" = "x"; then
20274      OUTPUT_SYNC=none
20275    fi
20276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20277$as_echo "$OUTPUT_SYNC" >&6; }
20278    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20279      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20280    fi
20281  else
20282    OUTPUT_SYNC_SUPPORTED=false
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20284$as_echo "no" >&6; }
20285  fi
20286
20287
20288
20289
20290
20291
20292  # Test if find supports -delete
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20294$as_echo_n "checking if find supports -delete... " >&6; }
20295  FIND_DELETE="-delete"
20296
20297  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20298
20299  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20300
20301  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20302  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20303    # No, it does not.
20304    rm $DELETEDIR/TestIfFindSupportsDelete
20305    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20306      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20307      FIND_DELETE="-print | xargs rm"
20308    else
20309      FIND_DELETE="-exec rm \{\} \+"
20310    fi
20311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20312$as_echo "no" >&6; }
20313  else
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20315$as_echo "yes" >&6; }
20316  fi
20317  rmdir $DELETEDIR
20318
20319
20320
20321  # These tools might not be installed by default,
20322  # need hint on how to install them.
20323
20324
20325
20326  # Publish this variable in the help.
20327
20328
20329  if [ -z "${UNZIP+x}" ]; then
20330    # The variable is not set by user, try to locate tool using the code snippet
20331    for ac_prog in unzip
20332do
20333  # Extract the first word of "$ac_prog", so it can be a program name with args.
20334set dummy $ac_prog; ac_word=$2
20335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20336$as_echo_n "checking for $ac_word... " >&6; }
20337if ${ac_cv_path_UNZIP+:} false; then :
20338  $as_echo_n "(cached) " >&6
20339else
20340  case $UNZIP in
20341  [\\/]* | ?:[\\/]*)
20342  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20343  ;;
20344  *)
20345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20346for as_dir in $PATH
20347do
20348  IFS=$as_save_IFS
20349  test -z "$as_dir" && as_dir=.
20350    for ac_exec_ext in '' $ac_executable_extensions; do
20351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20352    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20354    break 2
20355  fi
20356done
20357  done
20358IFS=$as_save_IFS
20359
20360  ;;
20361esac
20362fi
20363UNZIP=$ac_cv_path_UNZIP
20364if test -n "$UNZIP"; then
20365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20366$as_echo "$UNZIP" >&6; }
20367else
20368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20369$as_echo "no" >&6; }
20370fi
20371
20372
20373  test -n "$UNZIP" && break
20374done
20375
20376  else
20377    # The variable is set, but is it from the command line or the environment?
20378
20379    # Try to remove the string !UNZIP! from our list.
20380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20382      # If it failed, the variable was not from the command line. Ignore it,
20383      # but warn the user (except for BASH, which is always set by the calling BASH).
20384      if test "xUNZIP" != xBASH; then
20385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20386$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20387      fi
20388      # Try to locate tool using the code snippet
20389      for ac_prog in unzip
20390do
20391  # Extract the first word of "$ac_prog", so it can be a program name with args.
20392set dummy $ac_prog; ac_word=$2
20393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20394$as_echo_n "checking for $ac_word... " >&6; }
20395if ${ac_cv_path_UNZIP+:} false; then :
20396  $as_echo_n "(cached) " >&6
20397else
20398  case $UNZIP in
20399  [\\/]* | ?:[\\/]*)
20400  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20401  ;;
20402  *)
20403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20404for as_dir in $PATH
20405do
20406  IFS=$as_save_IFS
20407  test -z "$as_dir" && as_dir=.
20408    for ac_exec_ext in '' $ac_executable_extensions; do
20409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20410    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20412    break 2
20413  fi
20414done
20415  done
20416IFS=$as_save_IFS
20417
20418  ;;
20419esac
20420fi
20421UNZIP=$ac_cv_path_UNZIP
20422if test -n "$UNZIP"; then
20423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20424$as_echo "$UNZIP" >&6; }
20425else
20426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20427$as_echo "no" >&6; }
20428fi
20429
20430
20431  test -n "$UNZIP" && break
20432done
20433
20434    else
20435      # If it succeeded, then it was overridden by the user. We will use it
20436      # for the tool.
20437
20438      # First remove it from the list of overridden variables, so we can test
20439      # for unknown variables in the end.
20440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20441
20442      # Check if we try to supply an empty value
20443      if test "x$UNZIP" = x; then
20444        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20445$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20447$as_echo_n "checking for UNZIP... " >&6; }
20448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20449$as_echo "disabled" >&6; }
20450      else
20451        # Check if the provided tool contains a complete path.
20452        tool_specified="$UNZIP"
20453        tool_basename="${tool_specified##*/}"
20454        if test "x$tool_basename" = "x$tool_specified"; then
20455          # A command without a complete path is provided, search $PATH.
20456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20457$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20458          # Extract the first word of "$tool_basename", so it can be a program name with args.
20459set dummy $tool_basename; ac_word=$2
20460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20461$as_echo_n "checking for $ac_word... " >&6; }
20462if ${ac_cv_path_UNZIP+:} false; then :
20463  $as_echo_n "(cached) " >&6
20464else
20465  case $UNZIP in
20466  [\\/]* | ?:[\\/]*)
20467  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20468  ;;
20469  *)
20470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20471for as_dir in $PATH
20472do
20473  IFS=$as_save_IFS
20474  test -z "$as_dir" && as_dir=.
20475    for ac_exec_ext in '' $ac_executable_extensions; do
20476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20477    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20479    break 2
20480  fi
20481done
20482  done
20483IFS=$as_save_IFS
20484
20485  ;;
20486esac
20487fi
20488UNZIP=$ac_cv_path_UNZIP
20489if test -n "$UNZIP"; then
20490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20491$as_echo "$UNZIP" >&6; }
20492else
20493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20494$as_echo "no" >&6; }
20495fi
20496
20497
20498          if test "x$UNZIP" = x; then
20499            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20500          fi
20501        else
20502          # Otherwise we believe it is a complete path. Use it as it is.
20503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20504$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20505          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20506$as_echo_n "checking for UNZIP... " >&6; }
20507          if test ! -x "$tool_specified"; then
20508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20509$as_echo "not found" >&6; }
20510            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20511          fi
20512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20513$as_echo "$tool_specified" >&6; }
20514        fi
20515      fi
20516    fi
20517
20518  fi
20519
20520
20521
20522  if test "x$UNZIP" = x; then
20523    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20524  fi
20525
20526
20527
20528
20529
20530  # Publish this variable in the help.
20531
20532
20533  if [ -z "${ZIP+x}" ]; then
20534    # The variable is not set by user, try to locate tool using the code snippet
20535    for ac_prog in zip
20536do
20537  # Extract the first word of "$ac_prog", so it can be a program name with args.
20538set dummy $ac_prog; ac_word=$2
20539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20540$as_echo_n "checking for $ac_word... " >&6; }
20541if ${ac_cv_path_ZIP+:} false; then :
20542  $as_echo_n "(cached) " >&6
20543else
20544  case $ZIP in
20545  [\\/]* | ?:[\\/]*)
20546  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20547  ;;
20548  *)
20549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20550for as_dir in $PATH
20551do
20552  IFS=$as_save_IFS
20553  test -z "$as_dir" && as_dir=.
20554    for ac_exec_ext in '' $ac_executable_extensions; do
20555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20556    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20558    break 2
20559  fi
20560done
20561  done
20562IFS=$as_save_IFS
20563
20564  ;;
20565esac
20566fi
20567ZIP=$ac_cv_path_ZIP
20568if test -n "$ZIP"; then
20569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20570$as_echo "$ZIP" >&6; }
20571else
20572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20573$as_echo "no" >&6; }
20574fi
20575
20576
20577  test -n "$ZIP" && break
20578done
20579
20580  else
20581    # The variable is set, but is it from the command line or the environment?
20582
20583    # Try to remove the string !ZIP! from our list.
20584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20586      # If it failed, the variable was not from the command line. Ignore it,
20587      # but warn the user (except for BASH, which is always set by the calling BASH).
20588      if test "xZIP" != xBASH; then
20589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20590$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20591      fi
20592      # Try to locate tool using the code snippet
20593      for ac_prog in zip
20594do
20595  # Extract the first word of "$ac_prog", so it can be a program name with args.
20596set dummy $ac_prog; ac_word=$2
20597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20598$as_echo_n "checking for $ac_word... " >&6; }
20599if ${ac_cv_path_ZIP+:} false; then :
20600  $as_echo_n "(cached) " >&6
20601else
20602  case $ZIP in
20603  [\\/]* | ?:[\\/]*)
20604  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20605  ;;
20606  *)
20607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20608for as_dir in $PATH
20609do
20610  IFS=$as_save_IFS
20611  test -z "$as_dir" && as_dir=.
20612    for ac_exec_ext in '' $ac_executable_extensions; do
20613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20614    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20616    break 2
20617  fi
20618done
20619  done
20620IFS=$as_save_IFS
20621
20622  ;;
20623esac
20624fi
20625ZIP=$ac_cv_path_ZIP
20626if test -n "$ZIP"; then
20627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20628$as_echo "$ZIP" >&6; }
20629else
20630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20631$as_echo "no" >&6; }
20632fi
20633
20634
20635  test -n "$ZIP" && break
20636done
20637
20638    else
20639      # If it succeeded, then it was overridden by the user. We will use it
20640      # for the tool.
20641
20642      # First remove it from the list of overridden variables, so we can test
20643      # for unknown variables in the end.
20644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20645
20646      # Check if we try to supply an empty value
20647      if test "x$ZIP" = x; then
20648        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20649$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20651$as_echo_n "checking for ZIP... " >&6; }
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20653$as_echo "disabled" >&6; }
20654      else
20655        # Check if the provided tool contains a complete path.
20656        tool_specified="$ZIP"
20657        tool_basename="${tool_specified##*/}"
20658        if test "x$tool_basename" = "x$tool_specified"; then
20659          # A command without a complete path is provided, search $PATH.
20660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20661$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20662          # Extract the first word of "$tool_basename", so it can be a program name with args.
20663set dummy $tool_basename; ac_word=$2
20664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20665$as_echo_n "checking for $ac_word... " >&6; }
20666if ${ac_cv_path_ZIP+:} false; then :
20667  $as_echo_n "(cached) " >&6
20668else
20669  case $ZIP in
20670  [\\/]* | ?:[\\/]*)
20671  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20672  ;;
20673  *)
20674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20675for as_dir in $PATH
20676do
20677  IFS=$as_save_IFS
20678  test -z "$as_dir" && as_dir=.
20679    for ac_exec_ext in '' $ac_executable_extensions; do
20680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20681    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20683    break 2
20684  fi
20685done
20686  done
20687IFS=$as_save_IFS
20688
20689  ;;
20690esac
20691fi
20692ZIP=$ac_cv_path_ZIP
20693if test -n "$ZIP"; then
20694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20695$as_echo "$ZIP" >&6; }
20696else
20697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20698$as_echo "no" >&6; }
20699fi
20700
20701
20702          if test "x$ZIP" = x; then
20703            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20704          fi
20705        else
20706          # Otherwise we believe it is a complete path. Use it as it is.
20707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20708$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20710$as_echo_n "checking for ZIP... " >&6; }
20711          if test ! -x "$tool_specified"; then
20712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20713$as_echo "not found" >&6; }
20714            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20715          fi
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20717$as_echo "$tool_specified" >&6; }
20718        fi
20719      fi
20720    fi
20721
20722  fi
20723
20724
20725
20726  if test "x$ZIP" = x; then
20727    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20728  fi
20729
20730
20731
20732  # Non-required basic tools
20733
20734
20735
20736  # Publish this variable in the help.
20737
20738
20739  if [ -z "${LDD+x}" ]; then
20740    # The variable is not set by user, try to locate tool using the code snippet
20741    for ac_prog in ldd
20742do
20743  # Extract the first word of "$ac_prog", so it can be a program name with args.
20744set dummy $ac_prog; ac_word=$2
20745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20746$as_echo_n "checking for $ac_word... " >&6; }
20747if ${ac_cv_path_LDD+:} false; then :
20748  $as_echo_n "(cached) " >&6
20749else
20750  case $LDD in
20751  [\\/]* | ?:[\\/]*)
20752  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20753  ;;
20754  *)
20755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20756for as_dir in $PATH
20757do
20758  IFS=$as_save_IFS
20759  test -z "$as_dir" && as_dir=.
20760    for ac_exec_ext in '' $ac_executable_extensions; do
20761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20762    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20764    break 2
20765  fi
20766done
20767  done
20768IFS=$as_save_IFS
20769
20770  ;;
20771esac
20772fi
20773LDD=$ac_cv_path_LDD
20774if test -n "$LDD"; then
20775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20776$as_echo "$LDD" >&6; }
20777else
20778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20779$as_echo "no" >&6; }
20780fi
20781
20782
20783  test -n "$LDD" && break
20784done
20785
20786  else
20787    # The variable is set, but is it from the command line or the environment?
20788
20789    # Try to remove the string !LDD! from our list.
20790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20792      # If it failed, the variable was not from the command line. Ignore it,
20793      # but warn the user (except for BASH, which is always set by the calling BASH).
20794      if test "xLDD" != xBASH; then
20795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20796$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20797      fi
20798      # Try to locate tool using the code snippet
20799      for ac_prog in ldd
20800do
20801  # Extract the first word of "$ac_prog", so it can be a program name with args.
20802set dummy $ac_prog; ac_word=$2
20803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20804$as_echo_n "checking for $ac_word... " >&6; }
20805if ${ac_cv_path_LDD+:} false; then :
20806  $as_echo_n "(cached) " >&6
20807else
20808  case $LDD in
20809  [\\/]* | ?:[\\/]*)
20810  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20811  ;;
20812  *)
20813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20814for as_dir in $PATH
20815do
20816  IFS=$as_save_IFS
20817  test -z "$as_dir" && as_dir=.
20818    for ac_exec_ext in '' $ac_executable_extensions; do
20819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20820    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20822    break 2
20823  fi
20824done
20825  done
20826IFS=$as_save_IFS
20827
20828  ;;
20829esac
20830fi
20831LDD=$ac_cv_path_LDD
20832if test -n "$LDD"; then
20833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20834$as_echo "$LDD" >&6; }
20835else
20836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20837$as_echo "no" >&6; }
20838fi
20839
20840
20841  test -n "$LDD" && break
20842done
20843
20844    else
20845      # If it succeeded, then it was overridden by the user. We will use it
20846      # for the tool.
20847
20848      # First remove it from the list of overridden variables, so we can test
20849      # for unknown variables in the end.
20850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20851
20852      # Check if we try to supply an empty value
20853      if test "x$LDD" = x; then
20854        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20855$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20857$as_echo_n "checking for LDD... " >&6; }
20858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20859$as_echo "disabled" >&6; }
20860      else
20861        # Check if the provided tool contains a complete path.
20862        tool_specified="$LDD"
20863        tool_basename="${tool_specified##*/}"
20864        if test "x$tool_basename" = "x$tool_specified"; then
20865          # A command without a complete path is provided, search $PATH.
20866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20867$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20868          # Extract the first word of "$tool_basename", so it can be a program name with args.
20869set dummy $tool_basename; ac_word=$2
20870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20871$as_echo_n "checking for $ac_word... " >&6; }
20872if ${ac_cv_path_LDD+:} false; then :
20873  $as_echo_n "(cached) " >&6
20874else
20875  case $LDD in
20876  [\\/]* | ?:[\\/]*)
20877  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20878  ;;
20879  *)
20880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20881for as_dir in $PATH
20882do
20883  IFS=$as_save_IFS
20884  test -z "$as_dir" && as_dir=.
20885    for ac_exec_ext in '' $ac_executable_extensions; do
20886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20887    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20889    break 2
20890  fi
20891done
20892  done
20893IFS=$as_save_IFS
20894
20895  ;;
20896esac
20897fi
20898LDD=$ac_cv_path_LDD
20899if test -n "$LDD"; then
20900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20901$as_echo "$LDD" >&6; }
20902else
20903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20904$as_echo "no" >&6; }
20905fi
20906
20907
20908          if test "x$LDD" = x; then
20909            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20910          fi
20911        else
20912          # Otherwise we believe it is a complete path. Use it as it is.
20913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20914$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20915          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20916$as_echo_n "checking for LDD... " >&6; }
20917          if test ! -x "$tool_specified"; then
20918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20919$as_echo "not found" >&6; }
20920            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20921          fi
20922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20923$as_echo "$tool_specified" >&6; }
20924        fi
20925      fi
20926    fi
20927
20928  fi
20929
20930
20931  if test "x$LDD" = "x"; then
20932    # List shared lib dependencies is used for
20933    # debug output and checking for forbidden dependencies.
20934    # We can build without it.
20935    LDD="true"
20936  fi
20937
20938
20939  # Publish this variable in the help.
20940
20941
20942  if [ -z "${OTOOL+x}" ]; then
20943    # The variable is not set by user, try to locate tool using the code snippet
20944    for ac_prog in otool
20945do
20946  # Extract the first word of "$ac_prog", so it can be a program name with args.
20947set dummy $ac_prog; ac_word=$2
20948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20949$as_echo_n "checking for $ac_word... " >&6; }
20950if ${ac_cv_path_OTOOL+:} false; then :
20951  $as_echo_n "(cached) " >&6
20952else
20953  case $OTOOL in
20954  [\\/]* | ?:[\\/]*)
20955  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20956  ;;
20957  *)
20958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20959for as_dir in $PATH
20960do
20961  IFS=$as_save_IFS
20962  test -z "$as_dir" && as_dir=.
20963    for ac_exec_ext in '' $ac_executable_extensions; do
20964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20965    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20967    break 2
20968  fi
20969done
20970  done
20971IFS=$as_save_IFS
20972
20973  ;;
20974esac
20975fi
20976OTOOL=$ac_cv_path_OTOOL
20977if test -n "$OTOOL"; then
20978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20979$as_echo "$OTOOL" >&6; }
20980else
20981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20982$as_echo "no" >&6; }
20983fi
20984
20985
20986  test -n "$OTOOL" && break
20987done
20988
20989  else
20990    # The variable is set, but is it from the command line or the environment?
20991
20992    # Try to remove the string !OTOOL! from our list.
20993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20995      # If it failed, the variable was not from the command line. Ignore it,
20996      # but warn the user (except for BASH, which is always set by the calling BASH).
20997      if test "xOTOOL" != xBASH; then
20998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20999$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21000      fi
21001      # Try to locate tool using the code snippet
21002      for ac_prog in otool
21003do
21004  # Extract the first word of "$ac_prog", so it can be a program name with args.
21005set dummy $ac_prog; ac_word=$2
21006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21007$as_echo_n "checking for $ac_word... " >&6; }
21008if ${ac_cv_path_OTOOL+:} false; then :
21009  $as_echo_n "(cached) " >&6
21010else
21011  case $OTOOL in
21012  [\\/]* | ?:[\\/]*)
21013  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21014  ;;
21015  *)
21016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21017for as_dir in $PATH
21018do
21019  IFS=$as_save_IFS
21020  test -z "$as_dir" && as_dir=.
21021    for ac_exec_ext in '' $ac_executable_extensions; do
21022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21023    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21025    break 2
21026  fi
21027done
21028  done
21029IFS=$as_save_IFS
21030
21031  ;;
21032esac
21033fi
21034OTOOL=$ac_cv_path_OTOOL
21035if test -n "$OTOOL"; then
21036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21037$as_echo "$OTOOL" >&6; }
21038else
21039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21040$as_echo "no" >&6; }
21041fi
21042
21043
21044  test -n "$OTOOL" && break
21045done
21046
21047    else
21048      # If it succeeded, then it was overridden by the user. We will use it
21049      # for the tool.
21050
21051      # First remove it from the list of overridden variables, so we can test
21052      # for unknown variables in the end.
21053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21054
21055      # Check if we try to supply an empty value
21056      if test "x$OTOOL" = x; then
21057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21058$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21060$as_echo_n "checking for OTOOL... " >&6; }
21061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21062$as_echo "disabled" >&6; }
21063      else
21064        # Check if the provided tool contains a complete path.
21065        tool_specified="$OTOOL"
21066        tool_basename="${tool_specified##*/}"
21067        if test "x$tool_basename" = "x$tool_specified"; then
21068          # A command without a complete path is provided, search $PATH.
21069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21070$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21071          # Extract the first word of "$tool_basename", so it can be a program name with args.
21072set dummy $tool_basename; ac_word=$2
21073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21074$as_echo_n "checking for $ac_word... " >&6; }
21075if ${ac_cv_path_OTOOL+:} false; then :
21076  $as_echo_n "(cached) " >&6
21077else
21078  case $OTOOL in
21079  [\\/]* | ?:[\\/]*)
21080  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21081  ;;
21082  *)
21083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21084for as_dir in $PATH
21085do
21086  IFS=$as_save_IFS
21087  test -z "$as_dir" && as_dir=.
21088    for ac_exec_ext in '' $ac_executable_extensions; do
21089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21090    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21092    break 2
21093  fi
21094done
21095  done
21096IFS=$as_save_IFS
21097
21098  ;;
21099esac
21100fi
21101OTOOL=$ac_cv_path_OTOOL
21102if test -n "$OTOOL"; then
21103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21104$as_echo "$OTOOL" >&6; }
21105else
21106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21107$as_echo "no" >&6; }
21108fi
21109
21110
21111          if test "x$OTOOL" = x; then
21112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21113          fi
21114        else
21115          # Otherwise we believe it is a complete path. Use it as it is.
21116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21117$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21119$as_echo_n "checking for OTOOL... " >&6; }
21120          if test ! -x "$tool_specified"; then
21121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21122$as_echo "not found" >&6; }
21123            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21124          fi
21125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21126$as_echo "$tool_specified" >&6; }
21127        fi
21128      fi
21129    fi
21130
21131  fi
21132
21133
21134  if test "x$OTOOL" = "x"; then
21135    OTOOL="true"
21136  fi
21137
21138
21139  # Publish this variable in the help.
21140
21141
21142  if [ -z "${READELF+x}" ]; then
21143    # The variable is not set by user, try to locate tool using the code snippet
21144    for ac_prog in greadelf readelf
21145do
21146  # Extract the first word of "$ac_prog", so it can be a program name with args.
21147set dummy $ac_prog; ac_word=$2
21148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21149$as_echo_n "checking for $ac_word... " >&6; }
21150if ${ac_cv_path_READELF+:} false; then :
21151  $as_echo_n "(cached) " >&6
21152else
21153  case $READELF in
21154  [\\/]* | ?:[\\/]*)
21155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21156  ;;
21157  *)
21158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21159for as_dir in $PATH
21160do
21161  IFS=$as_save_IFS
21162  test -z "$as_dir" && as_dir=.
21163    for ac_exec_ext in '' $ac_executable_extensions; do
21164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21167    break 2
21168  fi
21169done
21170  done
21171IFS=$as_save_IFS
21172
21173  ;;
21174esac
21175fi
21176READELF=$ac_cv_path_READELF
21177if test -n "$READELF"; then
21178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21179$as_echo "$READELF" >&6; }
21180else
21181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21182$as_echo "no" >&6; }
21183fi
21184
21185
21186  test -n "$READELF" && break
21187done
21188
21189  else
21190    # The variable is set, but is it from the command line or the environment?
21191
21192    # Try to remove the string !READELF! from our list.
21193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21195      # If it failed, the variable was not from the command line. Ignore it,
21196      # but warn the user (except for BASH, which is always set by the calling BASH).
21197      if test "xREADELF" != xBASH; then
21198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21199$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21200      fi
21201      # Try to locate tool using the code snippet
21202      for ac_prog in greadelf readelf
21203do
21204  # Extract the first word of "$ac_prog", so it can be a program name with args.
21205set dummy $ac_prog; ac_word=$2
21206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21207$as_echo_n "checking for $ac_word... " >&6; }
21208if ${ac_cv_path_READELF+:} false; then :
21209  $as_echo_n "(cached) " >&6
21210else
21211  case $READELF in
21212  [\\/]* | ?:[\\/]*)
21213  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21214  ;;
21215  *)
21216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21217for as_dir in $PATH
21218do
21219  IFS=$as_save_IFS
21220  test -z "$as_dir" && as_dir=.
21221    for ac_exec_ext in '' $ac_executable_extensions; do
21222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21223    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21225    break 2
21226  fi
21227done
21228  done
21229IFS=$as_save_IFS
21230
21231  ;;
21232esac
21233fi
21234READELF=$ac_cv_path_READELF
21235if test -n "$READELF"; then
21236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21237$as_echo "$READELF" >&6; }
21238else
21239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21240$as_echo "no" >&6; }
21241fi
21242
21243
21244  test -n "$READELF" && break
21245done
21246
21247    else
21248      # If it succeeded, then it was overridden by the user. We will use it
21249      # for the tool.
21250
21251      # First remove it from the list of overridden variables, so we can test
21252      # for unknown variables in the end.
21253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21254
21255      # Check if we try to supply an empty value
21256      if test "x$READELF" = x; then
21257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21258$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21260$as_echo_n "checking for READELF... " >&6; }
21261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21262$as_echo "disabled" >&6; }
21263      else
21264        # Check if the provided tool contains a complete path.
21265        tool_specified="$READELF"
21266        tool_basename="${tool_specified##*/}"
21267        if test "x$tool_basename" = "x$tool_specified"; then
21268          # A command without a complete path is provided, search $PATH.
21269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21270$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21271          # Extract the first word of "$tool_basename", so it can be a program name with args.
21272set dummy $tool_basename; ac_word=$2
21273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21274$as_echo_n "checking for $ac_word... " >&6; }
21275if ${ac_cv_path_READELF+:} false; then :
21276  $as_echo_n "(cached) " >&6
21277else
21278  case $READELF in
21279  [\\/]* | ?:[\\/]*)
21280  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21281  ;;
21282  *)
21283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21284for as_dir in $PATH
21285do
21286  IFS=$as_save_IFS
21287  test -z "$as_dir" && as_dir=.
21288    for ac_exec_ext in '' $ac_executable_extensions; do
21289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21290    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21292    break 2
21293  fi
21294done
21295  done
21296IFS=$as_save_IFS
21297
21298  ;;
21299esac
21300fi
21301READELF=$ac_cv_path_READELF
21302if test -n "$READELF"; then
21303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21304$as_echo "$READELF" >&6; }
21305else
21306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21307$as_echo "no" >&6; }
21308fi
21309
21310
21311          if test "x$READELF" = x; then
21312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21313          fi
21314        else
21315          # Otherwise we believe it is a complete path. Use it as it is.
21316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21317$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21319$as_echo_n "checking for READELF... " >&6; }
21320          if test ! -x "$tool_specified"; then
21321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21322$as_echo "not found" >&6; }
21323            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21324          fi
21325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21326$as_echo "$tool_specified" >&6; }
21327        fi
21328      fi
21329    fi
21330
21331  fi
21332
21333
21334
21335
21336  # Publish this variable in the help.
21337
21338
21339  if [ -z "${HG+x}" ]; then
21340    # The variable is not set by user, try to locate tool using the code snippet
21341    for ac_prog in hg
21342do
21343  # Extract the first word of "$ac_prog", so it can be a program name with args.
21344set dummy $ac_prog; ac_word=$2
21345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21346$as_echo_n "checking for $ac_word... " >&6; }
21347if ${ac_cv_path_HG+:} false; then :
21348  $as_echo_n "(cached) " >&6
21349else
21350  case $HG in
21351  [\\/]* | ?:[\\/]*)
21352  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21353  ;;
21354  *)
21355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21356for as_dir in $PATH
21357do
21358  IFS=$as_save_IFS
21359  test -z "$as_dir" && as_dir=.
21360    for ac_exec_ext in '' $ac_executable_extensions; do
21361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21362    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21364    break 2
21365  fi
21366done
21367  done
21368IFS=$as_save_IFS
21369
21370  ;;
21371esac
21372fi
21373HG=$ac_cv_path_HG
21374if test -n "$HG"; then
21375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21376$as_echo "$HG" >&6; }
21377else
21378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21379$as_echo "no" >&6; }
21380fi
21381
21382
21383  test -n "$HG" && break
21384done
21385
21386  else
21387    # The variable is set, but is it from the command line or the environment?
21388
21389    # Try to remove the string !HG! from our list.
21390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21392      # If it failed, the variable was not from the command line. Ignore it,
21393      # but warn the user (except for BASH, which is always set by the calling BASH).
21394      if test "xHG" != xBASH; then
21395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21396$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21397      fi
21398      # Try to locate tool using the code snippet
21399      for ac_prog in hg
21400do
21401  # Extract the first word of "$ac_prog", so it can be a program name with args.
21402set dummy $ac_prog; ac_word=$2
21403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21404$as_echo_n "checking for $ac_word... " >&6; }
21405if ${ac_cv_path_HG+:} false; then :
21406  $as_echo_n "(cached) " >&6
21407else
21408  case $HG in
21409  [\\/]* | ?:[\\/]*)
21410  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21411  ;;
21412  *)
21413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21414for as_dir in $PATH
21415do
21416  IFS=$as_save_IFS
21417  test -z "$as_dir" && as_dir=.
21418    for ac_exec_ext in '' $ac_executable_extensions; do
21419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21420    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21422    break 2
21423  fi
21424done
21425  done
21426IFS=$as_save_IFS
21427
21428  ;;
21429esac
21430fi
21431HG=$ac_cv_path_HG
21432if test -n "$HG"; then
21433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21434$as_echo "$HG" >&6; }
21435else
21436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21437$as_echo "no" >&6; }
21438fi
21439
21440
21441  test -n "$HG" && break
21442done
21443
21444    else
21445      # If it succeeded, then it was overridden by the user. We will use it
21446      # for the tool.
21447
21448      # First remove it from the list of overridden variables, so we can test
21449      # for unknown variables in the end.
21450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21451
21452      # Check if we try to supply an empty value
21453      if test "x$HG" = x; then
21454        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21455$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21457$as_echo_n "checking for HG... " >&6; }
21458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21459$as_echo "disabled" >&6; }
21460      else
21461        # Check if the provided tool contains a complete path.
21462        tool_specified="$HG"
21463        tool_basename="${tool_specified##*/}"
21464        if test "x$tool_basename" = "x$tool_specified"; then
21465          # A command without a complete path is provided, search $PATH.
21466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21467$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21468          # Extract the first word of "$tool_basename", so it can be a program name with args.
21469set dummy $tool_basename; ac_word=$2
21470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21471$as_echo_n "checking for $ac_word... " >&6; }
21472if ${ac_cv_path_HG+:} false; then :
21473  $as_echo_n "(cached) " >&6
21474else
21475  case $HG in
21476  [\\/]* | ?:[\\/]*)
21477  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21478  ;;
21479  *)
21480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21481for as_dir in $PATH
21482do
21483  IFS=$as_save_IFS
21484  test -z "$as_dir" && as_dir=.
21485    for ac_exec_ext in '' $ac_executable_extensions; do
21486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21487    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21489    break 2
21490  fi
21491done
21492  done
21493IFS=$as_save_IFS
21494
21495  ;;
21496esac
21497fi
21498HG=$ac_cv_path_HG
21499if test -n "$HG"; then
21500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21501$as_echo "$HG" >&6; }
21502else
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21504$as_echo "no" >&6; }
21505fi
21506
21507
21508          if test "x$HG" = x; then
21509            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21510          fi
21511        else
21512          # Otherwise we believe it is a complete path. Use it as it is.
21513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21514$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21515          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21516$as_echo_n "checking for HG... " >&6; }
21517          if test ! -x "$tool_specified"; then
21518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21519$as_echo "not found" >&6; }
21520            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21521          fi
21522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21523$as_echo "$tool_specified" >&6; }
21524        fi
21525      fi
21526    fi
21527
21528  fi
21529
21530
21531
21532
21533  # Publish this variable in the help.
21534
21535
21536  if [ -z "${STAT+x}" ]; then
21537    # The variable is not set by user, try to locate tool using the code snippet
21538    for ac_prog in stat
21539do
21540  # Extract the first word of "$ac_prog", so it can be a program name with args.
21541set dummy $ac_prog; ac_word=$2
21542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21543$as_echo_n "checking for $ac_word... " >&6; }
21544if ${ac_cv_path_STAT+:} false; then :
21545  $as_echo_n "(cached) " >&6
21546else
21547  case $STAT in
21548  [\\/]* | ?:[\\/]*)
21549  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21550  ;;
21551  *)
21552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21553for as_dir in $PATH
21554do
21555  IFS=$as_save_IFS
21556  test -z "$as_dir" && as_dir=.
21557    for ac_exec_ext in '' $ac_executable_extensions; do
21558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21559    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21561    break 2
21562  fi
21563done
21564  done
21565IFS=$as_save_IFS
21566
21567  ;;
21568esac
21569fi
21570STAT=$ac_cv_path_STAT
21571if test -n "$STAT"; then
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21573$as_echo "$STAT" >&6; }
21574else
21575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21576$as_echo "no" >&6; }
21577fi
21578
21579
21580  test -n "$STAT" && break
21581done
21582
21583  else
21584    # The variable is set, but is it from the command line or the environment?
21585
21586    # Try to remove the string !STAT! from our list.
21587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21589      # If it failed, the variable was not from the command line. Ignore it,
21590      # but warn the user (except for BASH, which is always set by the calling BASH).
21591      if test "xSTAT" != xBASH; then
21592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21593$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21594      fi
21595      # Try to locate tool using the code snippet
21596      for ac_prog in stat
21597do
21598  # Extract the first word of "$ac_prog", so it can be a program name with args.
21599set dummy $ac_prog; ac_word=$2
21600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21601$as_echo_n "checking for $ac_word... " >&6; }
21602if ${ac_cv_path_STAT+:} false; then :
21603  $as_echo_n "(cached) " >&6
21604else
21605  case $STAT in
21606  [\\/]* | ?:[\\/]*)
21607  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21608  ;;
21609  *)
21610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21611for as_dir in $PATH
21612do
21613  IFS=$as_save_IFS
21614  test -z "$as_dir" && as_dir=.
21615    for ac_exec_ext in '' $ac_executable_extensions; do
21616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21617    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21619    break 2
21620  fi
21621done
21622  done
21623IFS=$as_save_IFS
21624
21625  ;;
21626esac
21627fi
21628STAT=$ac_cv_path_STAT
21629if test -n "$STAT"; then
21630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21631$as_echo "$STAT" >&6; }
21632else
21633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21634$as_echo "no" >&6; }
21635fi
21636
21637
21638  test -n "$STAT" && break
21639done
21640
21641    else
21642      # If it succeeded, then it was overridden by the user. We will use it
21643      # for the tool.
21644
21645      # First remove it from the list of overridden variables, so we can test
21646      # for unknown variables in the end.
21647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21648
21649      # Check if we try to supply an empty value
21650      if test "x$STAT" = x; then
21651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21652$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21654$as_echo_n "checking for STAT... " >&6; }
21655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21656$as_echo "disabled" >&6; }
21657      else
21658        # Check if the provided tool contains a complete path.
21659        tool_specified="$STAT"
21660        tool_basename="${tool_specified##*/}"
21661        if test "x$tool_basename" = "x$tool_specified"; then
21662          # A command without a complete path is provided, search $PATH.
21663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21664$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21665          # Extract the first word of "$tool_basename", so it can be a program name with args.
21666set dummy $tool_basename; ac_word=$2
21667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21668$as_echo_n "checking for $ac_word... " >&6; }
21669if ${ac_cv_path_STAT+:} false; then :
21670  $as_echo_n "(cached) " >&6
21671else
21672  case $STAT in
21673  [\\/]* | ?:[\\/]*)
21674  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21675  ;;
21676  *)
21677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21678for as_dir in $PATH
21679do
21680  IFS=$as_save_IFS
21681  test -z "$as_dir" && as_dir=.
21682    for ac_exec_ext in '' $ac_executable_extensions; do
21683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21684    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21686    break 2
21687  fi
21688done
21689  done
21690IFS=$as_save_IFS
21691
21692  ;;
21693esac
21694fi
21695STAT=$ac_cv_path_STAT
21696if test -n "$STAT"; then
21697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21698$as_echo "$STAT" >&6; }
21699else
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21701$as_echo "no" >&6; }
21702fi
21703
21704
21705          if test "x$STAT" = x; then
21706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21707          fi
21708        else
21709          # Otherwise we believe it is a complete path. Use it as it is.
21710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21711$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21713$as_echo_n "checking for STAT... " >&6; }
21714          if test ! -x "$tool_specified"; then
21715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21716$as_echo "not found" >&6; }
21717            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21718          fi
21719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21720$as_echo "$tool_specified" >&6; }
21721        fi
21722      fi
21723    fi
21724
21725  fi
21726
21727
21728
21729
21730  # Publish this variable in the help.
21731
21732
21733  if [ -z "${TIME+x}" ]; then
21734    # The variable is not set by user, try to locate tool using the code snippet
21735    for ac_prog in time
21736do
21737  # Extract the first word of "$ac_prog", so it can be a program name with args.
21738set dummy $ac_prog; ac_word=$2
21739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21740$as_echo_n "checking for $ac_word... " >&6; }
21741if ${ac_cv_path_TIME+:} false; then :
21742  $as_echo_n "(cached) " >&6
21743else
21744  case $TIME in
21745  [\\/]* | ?:[\\/]*)
21746  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21747  ;;
21748  *)
21749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21750for as_dir in $PATH
21751do
21752  IFS=$as_save_IFS
21753  test -z "$as_dir" && as_dir=.
21754    for ac_exec_ext in '' $ac_executable_extensions; do
21755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21756    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21758    break 2
21759  fi
21760done
21761  done
21762IFS=$as_save_IFS
21763
21764  ;;
21765esac
21766fi
21767TIME=$ac_cv_path_TIME
21768if test -n "$TIME"; then
21769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21770$as_echo "$TIME" >&6; }
21771else
21772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21773$as_echo "no" >&6; }
21774fi
21775
21776
21777  test -n "$TIME" && break
21778done
21779
21780  else
21781    # The variable is set, but is it from the command line or the environment?
21782
21783    # Try to remove the string !TIME! from our list.
21784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21786      # If it failed, the variable was not from the command line. Ignore it,
21787      # but warn the user (except for BASH, which is always set by the calling BASH).
21788      if test "xTIME" != xBASH; then
21789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21790$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21791      fi
21792      # Try to locate tool using the code snippet
21793      for ac_prog in time
21794do
21795  # Extract the first word of "$ac_prog", so it can be a program name with args.
21796set dummy $ac_prog; ac_word=$2
21797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21798$as_echo_n "checking for $ac_word... " >&6; }
21799if ${ac_cv_path_TIME+:} false; then :
21800  $as_echo_n "(cached) " >&6
21801else
21802  case $TIME in
21803  [\\/]* | ?:[\\/]*)
21804  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21805  ;;
21806  *)
21807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808for as_dir in $PATH
21809do
21810  IFS=$as_save_IFS
21811  test -z "$as_dir" && as_dir=.
21812    for ac_exec_ext in '' $ac_executable_extensions; do
21813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21816    break 2
21817  fi
21818done
21819  done
21820IFS=$as_save_IFS
21821
21822  ;;
21823esac
21824fi
21825TIME=$ac_cv_path_TIME
21826if test -n "$TIME"; then
21827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21828$as_echo "$TIME" >&6; }
21829else
21830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831$as_echo "no" >&6; }
21832fi
21833
21834
21835  test -n "$TIME" && break
21836done
21837
21838    else
21839      # If it succeeded, then it was overridden by the user. We will use it
21840      # for the tool.
21841
21842      # First remove it from the list of overridden variables, so we can test
21843      # for unknown variables in the end.
21844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21845
21846      # Check if we try to supply an empty value
21847      if test "x$TIME" = x; then
21848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21849$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21851$as_echo_n "checking for TIME... " >&6; }
21852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21853$as_echo "disabled" >&6; }
21854      else
21855        # Check if the provided tool contains a complete path.
21856        tool_specified="$TIME"
21857        tool_basename="${tool_specified##*/}"
21858        if test "x$tool_basename" = "x$tool_specified"; then
21859          # A command without a complete path is provided, search $PATH.
21860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21861$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21862          # Extract the first word of "$tool_basename", so it can be a program name with args.
21863set dummy $tool_basename; ac_word=$2
21864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21865$as_echo_n "checking for $ac_word... " >&6; }
21866if ${ac_cv_path_TIME+:} false; then :
21867  $as_echo_n "(cached) " >&6
21868else
21869  case $TIME in
21870  [\\/]* | ?:[\\/]*)
21871  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21872  ;;
21873  *)
21874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21875for as_dir in $PATH
21876do
21877  IFS=$as_save_IFS
21878  test -z "$as_dir" && as_dir=.
21879    for ac_exec_ext in '' $ac_executable_extensions; do
21880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21881    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21883    break 2
21884  fi
21885done
21886  done
21887IFS=$as_save_IFS
21888
21889  ;;
21890esac
21891fi
21892TIME=$ac_cv_path_TIME
21893if test -n "$TIME"; then
21894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21895$as_echo "$TIME" >&6; }
21896else
21897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21898$as_echo "no" >&6; }
21899fi
21900
21901
21902          if test "x$TIME" = x; then
21903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21904          fi
21905        else
21906          # Otherwise we believe it is a complete path. Use it as it is.
21907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21908$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21910$as_echo_n "checking for TIME... " >&6; }
21911          if test ! -x "$tool_specified"; then
21912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21913$as_echo "not found" >&6; }
21914            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21915          fi
21916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21917$as_echo "$tool_specified" >&6; }
21918        fi
21919      fi
21920    fi
21921
21922  fi
21923
21924
21925
21926
21927  # Publish this variable in the help.
21928
21929
21930  if [ -z "${PATCH+x}" ]; then
21931    # The variable is not set by user, try to locate tool using the code snippet
21932    for ac_prog in gpatch patch
21933do
21934  # Extract the first word of "$ac_prog", so it can be a program name with args.
21935set dummy $ac_prog; ac_word=$2
21936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21937$as_echo_n "checking for $ac_word... " >&6; }
21938if ${ac_cv_path_PATCH+:} false; then :
21939  $as_echo_n "(cached) " >&6
21940else
21941  case $PATCH in
21942  [\\/]* | ?:[\\/]*)
21943  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21944  ;;
21945  *)
21946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21947for as_dir in $PATH
21948do
21949  IFS=$as_save_IFS
21950  test -z "$as_dir" && as_dir=.
21951    for ac_exec_ext in '' $ac_executable_extensions; do
21952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21953    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21955    break 2
21956  fi
21957done
21958  done
21959IFS=$as_save_IFS
21960
21961  ;;
21962esac
21963fi
21964PATCH=$ac_cv_path_PATCH
21965if test -n "$PATCH"; then
21966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21967$as_echo "$PATCH" >&6; }
21968else
21969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21970$as_echo "no" >&6; }
21971fi
21972
21973
21974  test -n "$PATCH" && break
21975done
21976
21977  else
21978    # The variable is set, but is it from the command line or the environment?
21979
21980    # Try to remove the string !PATCH! from our list.
21981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21983      # If it failed, the variable was not from the command line. Ignore it,
21984      # but warn the user (except for BASH, which is always set by the calling BASH).
21985      if test "xPATCH" != xBASH; then
21986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21987$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21988      fi
21989      # Try to locate tool using the code snippet
21990      for ac_prog in gpatch patch
21991do
21992  # Extract the first word of "$ac_prog", so it can be a program name with args.
21993set dummy $ac_prog; ac_word=$2
21994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21995$as_echo_n "checking for $ac_word... " >&6; }
21996if ${ac_cv_path_PATCH+:} false; then :
21997  $as_echo_n "(cached) " >&6
21998else
21999  case $PATCH in
22000  [\\/]* | ?:[\\/]*)
22001  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22002  ;;
22003  *)
22004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22005for as_dir in $PATH
22006do
22007  IFS=$as_save_IFS
22008  test -z "$as_dir" && as_dir=.
22009    for ac_exec_ext in '' $ac_executable_extensions; do
22010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22011    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22013    break 2
22014  fi
22015done
22016  done
22017IFS=$as_save_IFS
22018
22019  ;;
22020esac
22021fi
22022PATCH=$ac_cv_path_PATCH
22023if test -n "$PATCH"; then
22024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22025$as_echo "$PATCH" >&6; }
22026else
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22028$as_echo "no" >&6; }
22029fi
22030
22031
22032  test -n "$PATCH" && break
22033done
22034
22035    else
22036      # If it succeeded, then it was overridden by the user. We will use it
22037      # for the tool.
22038
22039      # First remove it from the list of overridden variables, so we can test
22040      # for unknown variables in the end.
22041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22042
22043      # Check if we try to supply an empty value
22044      if test "x$PATCH" = x; then
22045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22046$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22048$as_echo_n "checking for PATCH... " >&6; }
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22050$as_echo "disabled" >&6; }
22051      else
22052        # Check if the provided tool contains a complete path.
22053        tool_specified="$PATCH"
22054        tool_basename="${tool_specified##*/}"
22055        if test "x$tool_basename" = "x$tool_specified"; then
22056          # A command without a complete path is provided, search $PATH.
22057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22058$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22059          # Extract the first word of "$tool_basename", so it can be a program name with args.
22060set dummy $tool_basename; ac_word=$2
22061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22062$as_echo_n "checking for $ac_word... " >&6; }
22063if ${ac_cv_path_PATCH+:} false; then :
22064  $as_echo_n "(cached) " >&6
22065else
22066  case $PATCH in
22067  [\\/]* | ?:[\\/]*)
22068  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22069  ;;
22070  *)
22071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22072for as_dir in $PATH
22073do
22074  IFS=$as_save_IFS
22075  test -z "$as_dir" && as_dir=.
22076    for ac_exec_ext in '' $ac_executable_extensions; do
22077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22078    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22080    break 2
22081  fi
22082done
22083  done
22084IFS=$as_save_IFS
22085
22086  ;;
22087esac
22088fi
22089PATCH=$ac_cv_path_PATCH
22090if test -n "$PATCH"; then
22091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22092$as_echo "$PATCH" >&6; }
22093else
22094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22095$as_echo "no" >&6; }
22096fi
22097
22098
22099          if test "x$PATCH" = x; then
22100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22101          fi
22102        else
22103          # Otherwise we believe it is a complete path. Use it as it is.
22104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22105$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22107$as_echo_n "checking for PATCH... " >&6; }
22108          if test ! -x "$tool_specified"; then
22109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22110$as_echo "not found" >&6; }
22111            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22112          fi
22113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22114$as_echo "$tool_specified" >&6; }
22115        fi
22116      fi
22117    fi
22118
22119  fi
22120
22121
22122  # Check if it's GNU time
22123  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22124  if test "x$IS_GNU_TIME" != x; then
22125    IS_GNU_TIME=yes
22126  else
22127    IS_GNU_TIME=no
22128  fi
22129
22130
22131  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22132
22133
22134
22135  # Publish this variable in the help.
22136
22137
22138  if [ -z "${DSYMUTIL+x}" ]; then
22139    # The variable is not set by user, try to locate tool using the code snippet
22140    for ac_prog in dsymutil
22141do
22142  # Extract the first word of "$ac_prog", so it can be a program name with args.
22143set dummy $ac_prog; ac_word=$2
22144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22145$as_echo_n "checking for $ac_word... " >&6; }
22146if ${ac_cv_path_DSYMUTIL+:} false; then :
22147  $as_echo_n "(cached) " >&6
22148else
22149  case $DSYMUTIL in
22150  [\\/]* | ?:[\\/]*)
22151  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22152  ;;
22153  *)
22154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22155for as_dir in $PATH
22156do
22157  IFS=$as_save_IFS
22158  test -z "$as_dir" && as_dir=.
22159    for ac_exec_ext in '' $ac_executable_extensions; do
22160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22161    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22163    break 2
22164  fi
22165done
22166  done
22167IFS=$as_save_IFS
22168
22169  ;;
22170esac
22171fi
22172DSYMUTIL=$ac_cv_path_DSYMUTIL
22173if test -n "$DSYMUTIL"; then
22174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22175$as_echo "$DSYMUTIL" >&6; }
22176else
22177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22178$as_echo "no" >&6; }
22179fi
22180
22181
22182  test -n "$DSYMUTIL" && break
22183done
22184
22185  else
22186    # The variable is set, but is it from the command line or the environment?
22187
22188    # Try to remove the string !DSYMUTIL! from our list.
22189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22191      # If it failed, the variable was not from the command line. Ignore it,
22192      # but warn the user (except for BASH, which is always set by the calling BASH).
22193      if test "xDSYMUTIL" != xBASH; then
22194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22195$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22196      fi
22197      # Try to locate tool using the code snippet
22198      for ac_prog in dsymutil
22199do
22200  # Extract the first word of "$ac_prog", so it can be a program name with args.
22201set dummy $ac_prog; ac_word=$2
22202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22203$as_echo_n "checking for $ac_word... " >&6; }
22204if ${ac_cv_path_DSYMUTIL+:} false; then :
22205  $as_echo_n "(cached) " >&6
22206else
22207  case $DSYMUTIL in
22208  [\\/]* | ?:[\\/]*)
22209  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22210  ;;
22211  *)
22212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22213for as_dir in $PATH
22214do
22215  IFS=$as_save_IFS
22216  test -z "$as_dir" && as_dir=.
22217    for ac_exec_ext in '' $ac_executable_extensions; do
22218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22219    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22221    break 2
22222  fi
22223done
22224  done
22225IFS=$as_save_IFS
22226
22227  ;;
22228esac
22229fi
22230DSYMUTIL=$ac_cv_path_DSYMUTIL
22231if test -n "$DSYMUTIL"; then
22232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22233$as_echo "$DSYMUTIL" >&6; }
22234else
22235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22236$as_echo "no" >&6; }
22237fi
22238
22239
22240  test -n "$DSYMUTIL" && break
22241done
22242
22243    else
22244      # If it succeeded, then it was overridden by the user. We will use it
22245      # for the tool.
22246
22247      # First remove it from the list of overridden variables, so we can test
22248      # for unknown variables in the end.
22249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22250
22251      # Check if we try to supply an empty value
22252      if test "x$DSYMUTIL" = x; then
22253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22254$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22256$as_echo_n "checking for DSYMUTIL... " >&6; }
22257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22258$as_echo "disabled" >&6; }
22259      else
22260        # Check if the provided tool contains a complete path.
22261        tool_specified="$DSYMUTIL"
22262        tool_basename="${tool_specified##*/}"
22263        if test "x$tool_basename" = "x$tool_specified"; then
22264          # A command without a complete path is provided, search $PATH.
22265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22266$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22267          # Extract the first word of "$tool_basename", so it can be a program name with args.
22268set dummy $tool_basename; ac_word=$2
22269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22270$as_echo_n "checking for $ac_word... " >&6; }
22271if ${ac_cv_path_DSYMUTIL+:} false; then :
22272  $as_echo_n "(cached) " >&6
22273else
22274  case $DSYMUTIL in
22275  [\\/]* | ?:[\\/]*)
22276  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22277  ;;
22278  *)
22279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22280for as_dir in $PATH
22281do
22282  IFS=$as_save_IFS
22283  test -z "$as_dir" && as_dir=.
22284    for ac_exec_ext in '' $ac_executable_extensions; do
22285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22286    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22288    break 2
22289  fi
22290done
22291  done
22292IFS=$as_save_IFS
22293
22294  ;;
22295esac
22296fi
22297DSYMUTIL=$ac_cv_path_DSYMUTIL
22298if test -n "$DSYMUTIL"; then
22299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22300$as_echo "$DSYMUTIL" >&6; }
22301else
22302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22303$as_echo "no" >&6; }
22304fi
22305
22306
22307          if test "x$DSYMUTIL" = x; then
22308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22309          fi
22310        else
22311          # Otherwise we believe it is a complete path. Use it as it is.
22312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22313$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22315$as_echo_n "checking for DSYMUTIL... " >&6; }
22316          if test ! -x "$tool_specified"; then
22317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22318$as_echo "not found" >&6; }
22319            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22320          fi
22321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22322$as_echo "$tool_specified" >&6; }
22323        fi
22324      fi
22325    fi
22326
22327  fi
22328
22329
22330
22331  if test "x$DSYMUTIL" = x; then
22332    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22333  fi
22334
22335
22336
22337
22338
22339  # Publish this variable in the help.
22340
22341
22342  if [ -z "${XATTR+x}" ]; then
22343    # The variable is not set by user, try to locate tool using the code snippet
22344    for ac_prog in xattr
22345do
22346  # Extract the first word of "$ac_prog", so it can be a program name with args.
22347set dummy $ac_prog; ac_word=$2
22348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22349$as_echo_n "checking for $ac_word... " >&6; }
22350if ${ac_cv_path_XATTR+:} false; then :
22351  $as_echo_n "(cached) " >&6
22352else
22353  case $XATTR in
22354  [\\/]* | ?:[\\/]*)
22355  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22356  ;;
22357  *)
22358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22359for as_dir in $PATH
22360do
22361  IFS=$as_save_IFS
22362  test -z "$as_dir" && as_dir=.
22363    for ac_exec_ext in '' $ac_executable_extensions; do
22364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22365    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22367    break 2
22368  fi
22369done
22370  done
22371IFS=$as_save_IFS
22372
22373  ;;
22374esac
22375fi
22376XATTR=$ac_cv_path_XATTR
22377if test -n "$XATTR"; then
22378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22379$as_echo "$XATTR" >&6; }
22380else
22381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22382$as_echo "no" >&6; }
22383fi
22384
22385
22386  test -n "$XATTR" && break
22387done
22388
22389  else
22390    # The variable is set, but is it from the command line or the environment?
22391
22392    # Try to remove the string !XATTR! from our list.
22393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22395      # If it failed, the variable was not from the command line. Ignore it,
22396      # but warn the user (except for BASH, which is always set by the calling BASH).
22397      if test "xXATTR" != xBASH; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22399$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22400      fi
22401      # Try to locate tool using the code snippet
22402      for ac_prog in xattr
22403do
22404  # Extract the first word of "$ac_prog", so it can be a program name with args.
22405set dummy $ac_prog; ac_word=$2
22406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22407$as_echo_n "checking for $ac_word... " >&6; }
22408if ${ac_cv_path_XATTR+:} false; then :
22409  $as_echo_n "(cached) " >&6
22410else
22411  case $XATTR in
22412  [\\/]* | ?:[\\/]*)
22413  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22414  ;;
22415  *)
22416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22417for as_dir in $PATH
22418do
22419  IFS=$as_save_IFS
22420  test -z "$as_dir" && as_dir=.
22421    for ac_exec_ext in '' $ac_executable_extensions; do
22422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22423    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22425    break 2
22426  fi
22427done
22428  done
22429IFS=$as_save_IFS
22430
22431  ;;
22432esac
22433fi
22434XATTR=$ac_cv_path_XATTR
22435if test -n "$XATTR"; then
22436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22437$as_echo "$XATTR" >&6; }
22438else
22439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22440$as_echo "no" >&6; }
22441fi
22442
22443
22444  test -n "$XATTR" && break
22445done
22446
22447    else
22448      # If it succeeded, then it was overridden by the user. We will use it
22449      # for the tool.
22450
22451      # First remove it from the list of overridden variables, so we can test
22452      # for unknown variables in the end.
22453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22454
22455      # Check if we try to supply an empty value
22456      if test "x$XATTR" = x; then
22457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22458$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22460$as_echo_n "checking for XATTR... " >&6; }
22461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22462$as_echo "disabled" >&6; }
22463      else
22464        # Check if the provided tool contains a complete path.
22465        tool_specified="$XATTR"
22466        tool_basename="${tool_specified##*/}"
22467        if test "x$tool_basename" = "x$tool_specified"; then
22468          # A command without a complete path is provided, search $PATH.
22469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22470$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22471          # Extract the first word of "$tool_basename", so it can be a program name with args.
22472set dummy $tool_basename; ac_word=$2
22473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22474$as_echo_n "checking for $ac_word... " >&6; }
22475if ${ac_cv_path_XATTR+:} false; then :
22476  $as_echo_n "(cached) " >&6
22477else
22478  case $XATTR in
22479  [\\/]* | ?:[\\/]*)
22480  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22481  ;;
22482  *)
22483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22484for as_dir in $PATH
22485do
22486  IFS=$as_save_IFS
22487  test -z "$as_dir" && as_dir=.
22488    for ac_exec_ext in '' $ac_executable_extensions; do
22489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22490    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22492    break 2
22493  fi
22494done
22495  done
22496IFS=$as_save_IFS
22497
22498  ;;
22499esac
22500fi
22501XATTR=$ac_cv_path_XATTR
22502if test -n "$XATTR"; then
22503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22504$as_echo "$XATTR" >&6; }
22505else
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22507$as_echo "no" >&6; }
22508fi
22509
22510
22511          if test "x$XATTR" = x; then
22512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22513          fi
22514        else
22515          # Otherwise we believe it is a complete path. Use it as it is.
22516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22517$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22519$as_echo_n "checking for XATTR... " >&6; }
22520          if test ! -x "$tool_specified"; then
22521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22522$as_echo "not found" >&6; }
22523            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22524          fi
22525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22526$as_echo "$tool_specified" >&6; }
22527        fi
22528      fi
22529    fi
22530
22531  fi
22532
22533
22534
22535  if test "x$XATTR" = x; then
22536    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22537  fi
22538
22539
22540
22541
22542  # Publish this variable in the help.
22543
22544
22545  if [ -z "${CODESIGN+x}" ]; then
22546    # The variable is not set by user, try to locate tool using the code snippet
22547    for ac_prog in codesign
22548do
22549  # Extract the first word of "$ac_prog", so it can be a program name with args.
22550set dummy $ac_prog; ac_word=$2
22551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22552$as_echo_n "checking for $ac_word... " >&6; }
22553if ${ac_cv_path_CODESIGN+:} false; then :
22554  $as_echo_n "(cached) " >&6
22555else
22556  case $CODESIGN in
22557  [\\/]* | ?:[\\/]*)
22558  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22559  ;;
22560  *)
22561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22562for as_dir in $PATH
22563do
22564  IFS=$as_save_IFS
22565  test -z "$as_dir" && as_dir=.
22566    for ac_exec_ext in '' $ac_executable_extensions; do
22567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22568    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22570    break 2
22571  fi
22572done
22573  done
22574IFS=$as_save_IFS
22575
22576  ;;
22577esac
22578fi
22579CODESIGN=$ac_cv_path_CODESIGN
22580if test -n "$CODESIGN"; then
22581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22582$as_echo "$CODESIGN" >&6; }
22583else
22584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22585$as_echo "no" >&6; }
22586fi
22587
22588
22589  test -n "$CODESIGN" && break
22590done
22591
22592  else
22593    # The variable is set, but is it from the command line or the environment?
22594
22595    # Try to remove the string !CODESIGN! from our list.
22596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22598      # If it failed, the variable was not from the command line. Ignore it,
22599      # but warn the user (except for BASH, which is always set by the calling BASH).
22600      if test "xCODESIGN" != xBASH; then
22601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22602$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22603      fi
22604      # Try to locate tool using the code snippet
22605      for ac_prog in codesign
22606do
22607  # Extract the first word of "$ac_prog", so it can be a program name with args.
22608set dummy $ac_prog; ac_word=$2
22609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22610$as_echo_n "checking for $ac_word... " >&6; }
22611if ${ac_cv_path_CODESIGN+:} false; then :
22612  $as_echo_n "(cached) " >&6
22613else
22614  case $CODESIGN in
22615  [\\/]* | ?:[\\/]*)
22616  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22617  ;;
22618  *)
22619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22620for as_dir in $PATH
22621do
22622  IFS=$as_save_IFS
22623  test -z "$as_dir" && as_dir=.
22624    for ac_exec_ext in '' $ac_executable_extensions; do
22625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22626    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22628    break 2
22629  fi
22630done
22631  done
22632IFS=$as_save_IFS
22633
22634  ;;
22635esac
22636fi
22637CODESIGN=$ac_cv_path_CODESIGN
22638if test -n "$CODESIGN"; then
22639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22640$as_echo "$CODESIGN" >&6; }
22641else
22642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22643$as_echo "no" >&6; }
22644fi
22645
22646
22647  test -n "$CODESIGN" && break
22648done
22649
22650    else
22651      # If it succeeded, then it was overridden by the user. We will use it
22652      # for the tool.
22653
22654      # First remove it from the list of overridden variables, so we can test
22655      # for unknown variables in the end.
22656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22657
22658      # Check if we try to supply an empty value
22659      if test "x$CODESIGN" = x; then
22660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22661$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22663$as_echo_n "checking for CODESIGN... " >&6; }
22664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22665$as_echo "disabled" >&6; }
22666      else
22667        # Check if the provided tool contains a complete path.
22668        tool_specified="$CODESIGN"
22669        tool_basename="${tool_specified##*/}"
22670        if test "x$tool_basename" = "x$tool_specified"; then
22671          # A command without a complete path is provided, search $PATH.
22672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22673$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22674          # Extract the first word of "$tool_basename", so it can be a program name with args.
22675set dummy $tool_basename; ac_word=$2
22676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22677$as_echo_n "checking for $ac_word... " >&6; }
22678if ${ac_cv_path_CODESIGN+:} false; then :
22679  $as_echo_n "(cached) " >&6
22680else
22681  case $CODESIGN in
22682  [\\/]* | ?:[\\/]*)
22683  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22684  ;;
22685  *)
22686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22687for as_dir in $PATH
22688do
22689  IFS=$as_save_IFS
22690  test -z "$as_dir" && as_dir=.
22691    for ac_exec_ext in '' $ac_executable_extensions; do
22692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22693    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22695    break 2
22696  fi
22697done
22698  done
22699IFS=$as_save_IFS
22700
22701  ;;
22702esac
22703fi
22704CODESIGN=$ac_cv_path_CODESIGN
22705if test -n "$CODESIGN"; then
22706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22707$as_echo "$CODESIGN" >&6; }
22708else
22709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22710$as_echo "no" >&6; }
22711fi
22712
22713
22714          if test "x$CODESIGN" = x; then
22715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22716          fi
22717        else
22718          # Otherwise we believe it is a complete path. Use it as it is.
22719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22720$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22722$as_echo_n "checking for CODESIGN... " >&6; }
22723          if test ! -x "$tool_specified"; then
22724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22725$as_echo "not found" >&6; }
22726            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22727          fi
22728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22729$as_echo "$tool_specified" >&6; }
22730        fi
22731      fi
22732    fi
22733
22734  fi
22735
22736
22737    if test "x$CODESIGN" != "x"; then
22738      # Verify that the openjdk_codesign certificate is present
22739      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22740$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22741      rm -f codesign-testfile
22742      touch codesign-testfile
22743      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22744      rm -f codesign-testfile
22745      if test "x$CODESIGN" = x; then
22746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22747$as_echo "no" >&6; }
22748      else
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22750$as_echo "yes" >&6; }
22751      fi
22752    fi
22753
22754
22755
22756  # Publish this variable in the help.
22757
22758
22759  if [ -z "${SETFILE+x}" ]; then
22760    # The variable is not set by user, try to locate tool using the code snippet
22761    for ac_prog in SetFile
22762do
22763  # Extract the first word of "$ac_prog", so it can be a program name with args.
22764set dummy $ac_prog; ac_word=$2
22765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22766$as_echo_n "checking for $ac_word... " >&6; }
22767if ${ac_cv_path_SETFILE+:} false; then :
22768  $as_echo_n "(cached) " >&6
22769else
22770  case $SETFILE in
22771  [\\/]* | ?:[\\/]*)
22772  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22773  ;;
22774  *)
22775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22776for as_dir in $PATH
22777do
22778  IFS=$as_save_IFS
22779  test -z "$as_dir" && as_dir=.
22780    for ac_exec_ext in '' $ac_executable_extensions; do
22781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22782    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22784    break 2
22785  fi
22786done
22787  done
22788IFS=$as_save_IFS
22789
22790  ;;
22791esac
22792fi
22793SETFILE=$ac_cv_path_SETFILE
22794if test -n "$SETFILE"; then
22795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22796$as_echo "$SETFILE" >&6; }
22797else
22798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22799$as_echo "no" >&6; }
22800fi
22801
22802
22803  test -n "$SETFILE" && break
22804done
22805
22806  else
22807    # The variable is set, but is it from the command line or the environment?
22808
22809    # Try to remove the string !SETFILE! from our list.
22810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22812      # If it failed, the variable was not from the command line. Ignore it,
22813      # but warn the user (except for BASH, which is always set by the calling BASH).
22814      if test "xSETFILE" != xBASH; then
22815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22816$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22817      fi
22818      # Try to locate tool using the code snippet
22819      for ac_prog in SetFile
22820do
22821  # Extract the first word of "$ac_prog", so it can be a program name with args.
22822set dummy $ac_prog; ac_word=$2
22823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22824$as_echo_n "checking for $ac_word... " >&6; }
22825if ${ac_cv_path_SETFILE+:} false; then :
22826  $as_echo_n "(cached) " >&6
22827else
22828  case $SETFILE in
22829  [\\/]* | ?:[\\/]*)
22830  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22831  ;;
22832  *)
22833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22834for as_dir in $PATH
22835do
22836  IFS=$as_save_IFS
22837  test -z "$as_dir" && as_dir=.
22838    for ac_exec_ext in '' $ac_executable_extensions; do
22839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22840    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22842    break 2
22843  fi
22844done
22845  done
22846IFS=$as_save_IFS
22847
22848  ;;
22849esac
22850fi
22851SETFILE=$ac_cv_path_SETFILE
22852if test -n "$SETFILE"; then
22853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22854$as_echo "$SETFILE" >&6; }
22855else
22856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22857$as_echo "no" >&6; }
22858fi
22859
22860
22861  test -n "$SETFILE" && break
22862done
22863
22864    else
22865      # If it succeeded, then it was overridden by the user. We will use it
22866      # for the tool.
22867
22868      # First remove it from the list of overridden variables, so we can test
22869      # for unknown variables in the end.
22870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22871
22872      # Check if we try to supply an empty value
22873      if test "x$SETFILE" = x; then
22874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22875$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22877$as_echo_n "checking for SETFILE... " >&6; }
22878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22879$as_echo "disabled" >&6; }
22880      else
22881        # Check if the provided tool contains a complete path.
22882        tool_specified="$SETFILE"
22883        tool_basename="${tool_specified##*/}"
22884        if test "x$tool_basename" = "x$tool_specified"; then
22885          # A command without a complete path is provided, search $PATH.
22886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22887$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22888          # Extract the first word of "$tool_basename", so it can be a program name with args.
22889set dummy $tool_basename; ac_word=$2
22890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22891$as_echo_n "checking for $ac_word... " >&6; }
22892if ${ac_cv_path_SETFILE+:} false; then :
22893  $as_echo_n "(cached) " >&6
22894else
22895  case $SETFILE in
22896  [\\/]* | ?:[\\/]*)
22897  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22898  ;;
22899  *)
22900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22901for as_dir in $PATH
22902do
22903  IFS=$as_save_IFS
22904  test -z "$as_dir" && as_dir=.
22905    for ac_exec_ext in '' $ac_executable_extensions; do
22906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22907    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22909    break 2
22910  fi
22911done
22912  done
22913IFS=$as_save_IFS
22914
22915  ;;
22916esac
22917fi
22918SETFILE=$ac_cv_path_SETFILE
22919if test -n "$SETFILE"; then
22920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22921$as_echo "$SETFILE" >&6; }
22922else
22923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22924$as_echo "no" >&6; }
22925fi
22926
22927
22928          if test "x$SETFILE" = x; then
22929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22930          fi
22931        else
22932          # Otherwise we believe it is a complete path. Use it as it is.
22933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22934$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22936$as_echo_n "checking for SETFILE... " >&6; }
22937          if test ! -x "$tool_specified"; then
22938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22939$as_echo "not found" >&6; }
22940            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22941          fi
22942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22943$as_echo "$tool_specified" >&6; }
22944        fi
22945      fi
22946    fi
22947
22948  fi
22949
22950
22951
22952  if test "x$SETFILE" = x; then
22953    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22954  fi
22955
22956
22957  fi
22958
22959
22960  # Test if bash supports pipefail.
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22962$as_echo_n "checking if bash supports pipefail... " >&6; }
22963  if ${BASH} -c 'set -o pipefail'; then
22964    BASH_ARGS="$BASH_ARGS -o pipefail"
22965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22966$as_echo "yes" >&6; }
22967  else
22968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22969$as_echo "no" >&6; }
22970  fi
22971
22972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22973$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22974  if ${BASH} -e -c 'true'; then
22975    BASH_ARGS="$BASH_ARGS -e"
22976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22977$as_echo "yes" >&6; }
22978  else
22979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22980$as_echo "no" >&6; }
22981  fi
22982
22983
22984
22985
22986# Check if pkg-config is available.
22987
22988
22989if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22990	if test -n "$ac_tool_prefix"; then
22991  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22992set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22994$as_echo_n "checking for $ac_word... " >&6; }
22995if ${ac_cv_path_PKG_CONFIG+:} false; then :
22996  $as_echo_n "(cached) " >&6
22997else
22998  case $PKG_CONFIG in
22999  [\\/]* | ?:[\\/]*)
23000  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23001  ;;
23002  *)
23003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23004for as_dir in $PATH
23005do
23006  IFS=$as_save_IFS
23007  test -z "$as_dir" && as_dir=.
23008    for ac_exec_ext in '' $ac_executable_extensions; do
23009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23010    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23012    break 2
23013  fi
23014done
23015  done
23016IFS=$as_save_IFS
23017
23018  ;;
23019esac
23020fi
23021PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23022if test -n "$PKG_CONFIG"; then
23023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23024$as_echo "$PKG_CONFIG" >&6; }
23025else
23026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23027$as_echo "no" >&6; }
23028fi
23029
23030
23031fi
23032if test -z "$ac_cv_path_PKG_CONFIG"; then
23033  ac_pt_PKG_CONFIG=$PKG_CONFIG
23034  # Extract the first word of "pkg-config", so it can be a program name with args.
23035set dummy pkg-config; ac_word=$2
23036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23037$as_echo_n "checking for $ac_word... " >&6; }
23038if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23039  $as_echo_n "(cached) " >&6
23040else
23041  case $ac_pt_PKG_CONFIG in
23042  [\\/]* | ?:[\\/]*)
23043  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23044  ;;
23045  *)
23046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23047for as_dir in $PATH
23048do
23049  IFS=$as_save_IFS
23050  test -z "$as_dir" && as_dir=.
23051    for ac_exec_ext in '' $ac_executable_extensions; do
23052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23053    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23055    break 2
23056  fi
23057done
23058  done
23059IFS=$as_save_IFS
23060
23061  ;;
23062esac
23063fi
23064ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23065if test -n "$ac_pt_PKG_CONFIG"; then
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23067$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23068else
23069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23070$as_echo "no" >&6; }
23071fi
23072
23073  if test "x$ac_pt_PKG_CONFIG" = x; then
23074    PKG_CONFIG=""
23075  else
23076    case $cross_compiling:$ac_tool_warned in
23077yes:)
23078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23080ac_tool_warned=yes ;;
23081esac
23082    PKG_CONFIG=$ac_pt_PKG_CONFIG
23083  fi
23084else
23085  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23086fi
23087
23088fi
23089if test -n "$PKG_CONFIG"; then
23090	_pkg_min_version=0.9.0
23091	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23092$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23093	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23094		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23095$as_echo "yes" >&6; }
23096	else
23097		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23098$as_echo "no" >&6; }
23099		PKG_CONFIG=""
23100	fi
23101
23102fi
23103
23104# After basic tools have been setup, we can check build os specific details.
23105
23106  ###############################################################################
23107
23108  # Note that this is the build platform OS version!
23109
23110  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23111  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23112  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23113  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23114
23115
23116
23117
23118
23119# Misc basic settings
23120
23121
23122# Check whether --with-default-make-target was given.
23123if test "${with_default_make_target+set}" = set; then :
23124  withval=$with_default_make_target;
23125fi
23126
23127  if test "x$with_default_make_target" = "x" \
23128      || test "x$with_default_make_target" = "xyes"; then
23129    DEFAULT_MAKE_TARGET="exploded-image"
23130  elif test "x$with_default_make_target" = "xno"; then
23131    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23132  else
23133    DEFAULT_MAKE_TARGET="$with_default_make_target"
23134  fi
23135
23136
23137
23138
23139###############################################################################
23140#
23141# Determine OpenJDK variants, options and version numbers.
23142#
23143###############################################################################
23144
23145# We need build & target for this.
23146
23147  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23148  # We always build headless support.
23149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23150$as_echo_n "checking headful support... " >&6; }
23151  # Check whether --enable-headful was given.
23152if test "${enable_headful+set}" = set; then :
23153  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23154else
23155  SUPPORT_HEADFUL=yes
23156fi
23157
23158
23159  SUPPORT_HEADLESS=yes
23160  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23161
23162  if test "x$SUPPORT_HEADFUL" = xyes; then
23163    # We are building both headful and headless.
23164    headful_msg="include support for both headful and headless"
23165  fi
23166
23167  if test "x$SUPPORT_HEADFUL" = xno; then
23168    # Thus we are building headless only.
23169    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23170    headful_msg="headless only"
23171  fi
23172
23173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23174$as_echo "$headful_msg" >&6; }
23175
23176
23177
23178
23179
23180  # Choose cacerts source file
23181
23182# Check whether --with-cacerts-file was given.
23183if test "${with_cacerts_file+set}" = set; then :
23184  withval=$with_cacerts_file;
23185fi
23186
23187  if test "x$with_cacerts_file" != x; then
23188    CACERTS_FILE=$with_cacerts_file
23189  fi
23190
23191
23192  # Enable or disable unlimited crypto
23193  # Check whether --enable-unlimited-crypto was given.
23194if test "${enable_unlimited_crypto+set}" = set; then :
23195  enableval=$enable_unlimited_crypto;
23196else
23197  enable_unlimited_crypto=no
23198fi
23199
23200  if test "x$enable_unlimited_crypto" = "xyes"; then
23201    UNLIMITED_CRYPTO=true
23202  else
23203    UNLIMITED_CRYPTO=false
23204  fi
23205
23206
23207  # Compress jars
23208  COMPRESS_JARS=false
23209
23210
23211
23212  # Setup default copyright year. Mostly overridden when building close to a new year.
23213
23214# Check whether --with-copyright-year was given.
23215if test "${with_copyright_year+set}" = set; then :
23216  withval=$with_copyright_year;
23217fi
23218
23219  if test "x$with_copyright_year" = xyes; then
23220    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23221  elif test "x$with_copyright_year" != x; then
23222    COPYRIGHT_YEAR="$with_copyright_year"
23223  else
23224    COPYRIGHT_YEAR=`date +'%Y'`
23225  fi
23226
23227
23228
23229  # Control wether Hotspot runs Queens test after build.
23230  # Check whether --enable-hotspot-test-in-build was given.
23231if test "${enable_hotspot_test_in_build+set}" = set; then :
23232  enableval=$enable_hotspot_test_in_build;
23233else
23234  enable_hotspot_test_in_build=no
23235fi
23236
23237  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23238    TEST_IN_BUILD=true
23239  else
23240    TEST_IN_BUILD=false
23241  fi
23242
23243
23244
23245  # Warn user that old version arguments are deprecated.
23246
23247
23248# Check whether --with-milestone was given.
23249if test "${with_milestone+set}" = set; then :
23250  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23251$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23252fi
23253
23254
23255
23256
23257# Check whether --with-update-version was given.
23258if test "${with_update_version+set}" = set; then :
23259  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23260$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23261fi
23262
23263
23264
23265
23266# Check whether --with-user-release-suffix was given.
23267if test "${with_user_release_suffix+set}" = set; then :
23268  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
23269$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23270fi
23271
23272
23273
23274
23275# Check whether --with-build-number was given.
23276if test "${with_build_number+set}" = set; then :
23277  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23278$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23279fi
23280
23281
23282
23283  # Source the version numbers file
23284  . $AUTOCONF_DIR/version-numbers
23285
23286  # Some non-version number information is set in that file
23287
23288
23289
23290
23291
23292
23293
23294
23295  # Override version from arguments
23296
23297  # If --with-version-string is set, process it first. It is possible to
23298  # override parts with more specific flags, since these are processed later.
23299
23300# Check whether --with-version-string was given.
23301if test "${with_version_string+set}" = set; then :
23302  withval=$with_version_string;
23303fi
23304
23305  if test "x$with_version_string" = xyes; then
23306    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23307  elif test "x$with_version_string" != x; then
23308    # Additional [] needed to keep m4 from mangling shell constructs.
23309    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23310      VERSION_MAJOR=${BASH_REMATCH[1]}
23311      VERSION_MINOR=${BASH_REMATCH[3]}
23312      VERSION_SECURITY=${BASH_REMATCH[5]}
23313      VERSION_PATCH=${BASH_REMATCH[7]}
23314      VERSION_PRE=${BASH_REMATCH[9]}
23315      version_plus_separator=${BASH_REMATCH[11]}
23316      VERSION_BUILD=${BASH_REMATCH[12]}
23317      VERSION_OPT=${BASH_REMATCH[14]}
23318      # Unspecified numerical fields are interpreted as 0.
23319      if test "x$VERSION_MINOR" = x; then
23320        VERSION_MINOR=0
23321      fi
23322      if test "x$VERSION_SECURITY" = x; then
23323        VERSION_SECURITY=0
23324      fi
23325      if test "x$VERSION_PATCH" = x; then
23326        VERSION_PATCH=0
23327      fi
23328      if test "x$version_plus_separator" != x \
23329          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23330        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23331      fi
23332      # Stop the version part process from setting default values.
23333      # We still allow them to explicitely override though.
23334      NO_DEFAULT_VERSION_PARTS=true
23335    else
23336      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23337    fi
23338  fi
23339
23340
23341# Check whether --with-version-pre was given.
23342if test "${with_version_pre+set}" = set; then :
23343  withval=$with_version_pre; with_version_pre_present=true
23344else
23345  with_version_pre_present=false
23346fi
23347
23348
23349  if test "x$with_version_pre_present" = xtrue; then
23350    if test "x$with_version_pre" = xyes; then
23351      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23352    elif test "x$with_version_pre" = xno; then
23353      # Interpret --without-* as empty string instead of the literal "no"
23354      VERSION_PRE=
23355    else
23356      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23357       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23358      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23360$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23361      fi
23362    fi
23363  else
23364    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23365      # Default is to use "internal" as pre
23366      VERSION_PRE="internal"
23367    fi
23368  fi
23369
23370
23371# Check whether --with-version-opt was given.
23372if test "${with_version_opt+set}" = set; then :
23373  withval=$with_version_opt; with_version_opt_present=true
23374else
23375  with_version_opt_present=false
23376fi
23377
23378
23379  if test "x$with_version_opt_present" = xtrue; then
23380    if test "x$with_version_opt" = xyes; then
23381      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23382    elif test "x$with_version_opt" = xno; then
23383      # Interpret --without-* as empty string instead of the literal "no"
23384      VERSION_OPT=
23385    else
23386      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23387       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23388      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23390$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23391      fi
23392    fi
23393  else
23394    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23395      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23396      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23397      # Outer [ ] to quote m4.
23398       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23399       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23400      VERSION_OPT="$timestamp.$username.$basedirname"
23401    fi
23402  fi
23403
23404
23405# Check whether --with-version-build was given.
23406if test "${with_version_build+set}" = set; then :
23407  withval=$with_version_build; with_version_build_present=true
23408else
23409  with_version_build_present=false
23410fi
23411
23412
23413  if test "x$with_version_build_present" = xtrue; then
23414    if test "x$with_version_build" = xyes; then
23415      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23416    elif test "x$with_version_build" = xno; then
23417      # Interpret --without-* as empty string instead of the literal "no"
23418      VERSION_BUILD=
23419    elif test "x$with_version_build" = x; then
23420      VERSION_BUILD=
23421    else
23422
23423  # Additional [] needed to keep m4 from mangling shell constructs.
23424  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23425    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23426  fi
23427  # Extract the version number without leading zeros.
23428  cleaned_value=${BASH_REMATCH[1]}
23429  if test "x$cleaned_value" = x; then
23430    # Special case for zero
23431    cleaned_value=${BASH_REMATCH[2]}
23432  fi
23433
23434  if test $cleaned_value -gt 255; then
23435    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23436  fi
23437  if test "x$cleaned_value" != "x$with_version_build"; then
23438    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23439$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23440  fi
23441  VERSION_BUILD=$cleaned_value
23442
23443    fi
23444  else
23445    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23446      # Default is to not have a build number.
23447      VERSION_BUILD=""
23448      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23449      VERSION_BUILD=0
23450    fi
23451  fi
23452
23453
23454# Check whether --with-version-major was given.
23455if test "${with_version_major+set}" = set; then :
23456  withval=$with_version_major; with_version_major_present=true
23457else
23458  with_version_major_present=false
23459fi
23460
23461
23462  if test "x$with_version_major_present" = xtrue; then
23463    if test "x$with_version_major" = xyes; then
23464      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23465    else
23466
23467  # Additional [] needed to keep m4 from mangling shell constructs.
23468  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23469    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23470  fi
23471  # Extract the version number without leading zeros.
23472  cleaned_value=${BASH_REMATCH[1]}
23473  if test "x$cleaned_value" = x; then
23474    # Special case for zero
23475    cleaned_value=${BASH_REMATCH[2]}
23476  fi
23477
23478  if test $cleaned_value -gt 255; then
23479    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23480  fi
23481  if test "x$cleaned_value" != "x$with_version_major"; then
23482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23483$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23484  fi
23485  VERSION_MAJOR=$cleaned_value
23486
23487    fi
23488  else
23489    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23490      # Default is to get value from version-numbers
23491      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23492    fi
23493  fi
23494
23495
23496# Check whether --with-version-minor was given.
23497if test "${with_version_minor+set}" = set; then :
23498  withval=$with_version_minor; with_version_minor_present=true
23499else
23500  with_version_minor_present=false
23501fi
23502
23503
23504  if test "x$with_version_minor_present" = xtrue; then
23505    if test "x$with_version_minor" = xyes; then
23506      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23507    elif test "x$with_version_minor" = xno; then
23508      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23509      VERSION_MINOR=0
23510    elif test "x$with_version_minor" = x; then
23511      VERSION_MINOR=0
23512    else
23513
23514  # Additional [] needed to keep m4 from mangling shell constructs.
23515  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23516    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23517  fi
23518  # Extract the version number without leading zeros.
23519  cleaned_value=${BASH_REMATCH[1]}
23520  if test "x$cleaned_value" = x; then
23521    # Special case for zero
23522    cleaned_value=${BASH_REMATCH[2]}
23523  fi
23524
23525  if test $cleaned_value -gt 255; then
23526    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23527  fi
23528  if test "x$cleaned_value" != "x$with_version_minor"; then
23529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23530$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23531  fi
23532  VERSION_MINOR=$cleaned_value
23533
23534    fi
23535  else
23536    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23537      # Default is 0, if unspecified
23538      VERSION_MINOR=0
23539    fi
23540  fi
23541
23542
23543# Check whether --with-version-security was given.
23544if test "${with_version_security+set}" = set; then :
23545  withval=$with_version_security; with_version_security_present=true
23546else
23547  with_version_security_present=false
23548fi
23549
23550
23551  if test "x$with_version_security_present" = xtrue; then
23552    if test "x$with_version_security" = xyes; then
23553      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23554    elif test "x$with_version_security" = xno; then
23555      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23556      VERSION_SECURITY=0
23557    elif test "x$with_version_security" = x; then
23558      VERSION_SECURITY=0
23559    else
23560
23561  # Additional [] needed to keep m4 from mangling shell constructs.
23562  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23563    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23564  fi
23565  # Extract the version number without leading zeros.
23566  cleaned_value=${BASH_REMATCH[1]}
23567  if test "x$cleaned_value" = x; then
23568    # Special case for zero
23569    cleaned_value=${BASH_REMATCH[2]}
23570  fi
23571
23572  if test $cleaned_value -gt 255; then
23573    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23574  fi
23575  if test "x$cleaned_value" != "x$with_version_security"; then
23576    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23577$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23578  fi
23579  VERSION_SECURITY=$cleaned_value
23580
23581    fi
23582  else
23583    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23584      # Default is 0, if unspecified
23585      VERSION_SECURITY=0
23586    fi
23587  fi
23588
23589
23590# Check whether --with-version-patch was given.
23591if test "${with_version_patch+set}" = set; then :
23592  withval=$with_version_patch; with_version_patch_present=true
23593else
23594  with_version_patch_present=false
23595fi
23596
23597
23598  if test "x$with_version_patch_present" = xtrue; then
23599    if test "x$with_version_patch" = xyes; then
23600      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23601    elif test "x$with_version_patch" = xno; then
23602      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23603      VERSION_PATCH=0
23604    elif test "x$with_version_patch" = x; then
23605      VERSION_PATCH=0
23606    else
23607
23608  # Additional [] needed to keep m4 from mangling shell constructs.
23609  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23610    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23611  fi
23612  # Extract the version number without leading zeros.
23613  cleaned_value=${BASH_REMATCH[1]}
23614  if test "x$cleaned_value" = x; then
23615    # Special case for zero
23616    cleaned_value=${BASH_REMATCH[2]}
23617  fi
23618
23619  if test $cleaned_value -gt 255; then
23620    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23621  fi
23622  if test "x$cleaned_value" != "x$with_version_patch"; then
23623    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23624$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23625  fi
23626  VERSION_PATCH=$cleaned_value
23627
23628    fi
23629  else
23630    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23631      # Default is 0, if unspecified
23632      VERSION_PATCH=0
23633    fi
23634  fi
23635
23636  # Calculate derived version properties
23637
23638  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23639  if test "x$VERSION_PRE" = x; then
23640    VERSION_IS_GA=true
23641  else
23642    VERSION_IS_GA=false
23643  fi
23644
23645  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23646  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23647
23648  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23649  # Strip trailing zeroes from stripped_version_number
23650  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23651  VERSION_NUMBER=$stripped_version_number
23652
23653  # The complete version string, with additional build information
23654  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23655    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23656  else
23657    # If either build or opt is set, we need a + separator
23658    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23659  fi
23660
23661  # The short version string, just VERSION_NUMBER and PRE, if present.
23662  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23663
23664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23665$as_echo_n "checking for version string... " >&6; }
23666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23667$as_echo "$VERSION_STRING" >&6; }
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683###############################################################################
23684#
23685# Setup BootJDK, used to bootstrap the build.
23686#
23687###############################################################################
23688
23689
23690  BOOT_JDK_FOUND=no
23691
23692# Check whether --with-boot-jdk was given.
23693if test "${with_boot_jdk+set}" = set; then :
23694  withval=$with_boot_jdk;
23695fi
23696
23697
23698  # We look for the Boot JDK through various means, going from more certain to
23699  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23700  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23701  # must check if this is indeed valid; otherwise we'll continue looking.
23702
23703  # Test: Is bootjdk explicitely set by command line arguments?
23704
23705  if test "x$BOOT_JDK_FOUND" = xno; then
23706    # Now execute the test
23707
23708  if test "x$with_boot_jdk" != x; then
23709    BOOT_JDK=$with_boot_jdk
23710    BOOT_JDK_FOUND=maybe
23711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23712$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23713  fi
23714
23715
23716    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23717    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23718      # Do we have a bin/java?
23719      if test ! -x "$BOOT_JDK/bin/java"; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23722        BOOT_JDK_FOUND=no
23723      else
23724        # Do we have a bin/javac?
23725        if test ! -x "$BOOT_JDK/bin/javac"; then
23726          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23728          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23729$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23730          BOOT_JDK_FOUND=no
23731        else
23732          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23733          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23734
23735          # Extra M4 quote needed to protect [] in grep expression.
23736          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23737          if test "x$FOUND_CORRECT_VERSION" = x; then
23738            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23740            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23741$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23742            BOOT_JDK_FOUND=no
23743          else
23744            # We're done! :-)
23745            BOOT_JDK_FOUND=yes
23746
23747  # Only process if variable expands to non-empty
23748
23749  if test "x$BOOT_JDK" != x; then
23750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751
23752  # Input might be given as Windows format, start by converting to
23753  # unix format.
23754  path="$BOOT_JDK"
23755  new_path=`$CYGPATH -u "$path"`
23756
23757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23760  # "foo.exe" is OK but "foo" is an error.
23761  #
23762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23763  # It is also a way to make sure we got the proper file name for the real test later on.
23764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23765  if test "x$test_shortpath" = x; then
23766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23768    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23769  fi
23770
23771  # Call helper function which possibly converts this using DOS-style short mode.
23772  # If so, the updated path is stored in $new_path.
23773
23774  input_path="$new_path"
23775  # Check if we need to convert this using DOS-style short mode. If the path
23776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23777  # take no chances and rewrite it.
23778  # Note: m4 eats our [], so we need to use [ and ] instead.
23779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23780  if test "x$has_forbidden_chars" != x; then
23781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23785      # Going to short mode and back again did indeed matter. Since short mode is
23786      # case insensitive, let's make it lowercase to improve readability.
23787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23788      # Now convert it back to Unix-style (cygpath)
23789      input_path=`$CYGPATH -u "$shortmode_path"`
23790      new_path="$input_path"
23791    fi
23792  fi
23793
23794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23795  if test "x$test_cygdrive_prefix" = x; then
23796    # As a simple fix, exclude /usr/bin since it's not a real path.
23797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23799      # a path prefixed by /cygdrive for fixpath to work.
23800      new_path="$CYGWIN_ROOT_PATH$input_path"
23801    fi
23802  fi
23803
23804
23805  if test "x$path" != "x$new_path"; then
23806    BOOT_JDK="$new_path"
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23809  fi
23810
23811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23812
23813  path="$BOOT_JDK"
23814  has_colon=`$ECHO $path | $GREP ^.:`
23815  new_path="$path"
23816  if test "x$has_colon" = x; then
23817    # Not in mixed or Windows style, start by that.
23818    new_path=`cmd //c echo $path`
23819  fi
23820
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831  fi
23832
23833
23834  windows_path="$new_path"
23835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23836    unix_path=`$CYGPATH -u "$windows_path"`
23837    new_path="$unix_path"
23838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23840    new_path="$unix_path"
23841  fi
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23851
23852    else
23853      # We're on a unix platform. Hooray! :)
23854      path="$BOOT_JDK"
23855      has_space=`$ECHO "$path" | $GREP " "`
23856      if test "x$has_space" != x; then
23857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23860      fi
23861
23862      # Use eval to expand a potential ~
23863      eval path="$path"
23864      if test ! -f "$path" && test ! -d "$path"; then
23865        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23866      fi
23867
23868      if test -d "$path"; then
23869        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23870      else
23871        dir="`$DIRNAME "$path"`"
23872        base="`$BASENAME "$path"`"
23873        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23874      fi
23875    fi
23876  fi
23877
23878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23879$as_echo_n "checking for Boot JDK... " >&6; }
23880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23881$as_echo "$BOOT_JDK" >&6; }
23882            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23883$as_echo_n "checking Boot JDK version... " >&6; }
23884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23886$as_echo "$BOOT_JDK_VERSION" >&6; }
23887          fi # end check jdk version
23888        fi # end check javac
23889      fi # end check java
23890    fi # end check boot jdk found
23891  fi
23892
23893  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23894    # Having specified an argument which is incorrect will produce an instant failure;
23895    # we should not go on looking
23896    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23897  fi
23898
23899  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23900
23901  if test "x$BOOT_JDK_FOUND" = xno; then
23902    # Now execute the test
23903
23904  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23905    # First check at user selected default
23906
23907  if test "x$BOOT_JDK_FOUND" = xno; then
23908    # Now execute the test
23909
23910  if test -x /usr/libexec/java_home; then
23911    BOOT_JDK=`/usr/libexec/java_home `
23912    BOOT_JDK_FOUND=maybe
23913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23914$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23915  fi
23916
23917
23918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23920      # Do we have a bin/java?
23921      if test ! -x "$BOOT_JDK/bin/java"; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23924        BOOT_JDK_FOUND=no
23925      else
23926        # Do we have a bin/javac?
23927        if test ! -x "$BOOT_JDK/bin/javac"; then
23928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23932          BOOT_JDK_FOUND=no
23933        else
23934          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23935          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23936
23937          # Extra M4 quote needed to protect [] in grep expression.
23938          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23939          if test "x$FOUND_CORRECT_VERSION" = x; then
23940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23942            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23943$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23944            BOOT_JDK_FOUND=no
23945          else
23946            # We're done! :-)
23947            BOOT_JDK_FOUND=yes
23948
23949  # Only process if variable expands to non-empty
23950
23951  if test "x$BOOT_JDK" != x; then
23952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23953
23954  # Input might be given as Windows format, start by converting to
23955  # unix format.
23956  path="$BOOT_JDK"
23957  new_path=`$CYGPATH -u "$path"`
23958
23959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23962  # "foo.exe" is OK but "foo" is an error.
23963  #
23964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23965  # It is also a way to make sure we got the proper file name for the real test later on.
23966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23967  if test "x$test_shortpath" = x; then
23968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23970    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23971  fi
23972
23973  # Call helper function which possibly converts this using DOS-style short mode.
23974  # If so, the updated path is stored in $new_path.
23975
23976  input_path="$new_path"
23977  # Check if we need to convert this using DOS-style short mode. If the path
23978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23979  # take no chances and rewrite it.
23980  # Note: m4 eats our [], so we need to use [ and ] instead.
23981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23982  if test "x$has_forbidden_chars" != x; then
23983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23987      # Going to short mode and back again did indeed matter. Since short mode is
23988      # case insensitive, let's make it lowercase to improve readability.
23989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23990      # Now convert it back to Unix-style (cygpath)
23991      input_path=`$CYGPATH -u "$shortmode_path"`
23992      new_path="$input_path"
23993    fi
23994  fi
23995
23996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23997  if test "x$test_cygdrive_prefix" = x; then
23998    # As a simple fix, exclude /usr/bin since it's not a real path.
23999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24001      # a path prefixed by /cygdrive for fixpath to work.
24002      new_path="$CYGWIN_ROOT_PATH$input_path"
24003    fi
24004  fi
24005
24006
24007  if test "x$path" != "x$new_path"; then
24008    BOOT_JDK="$new_path"
24009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24011  fi
24012
24013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24014
24015  path="$BOOT_JDK"
24016  has_colon=`$ECHO $path | $GREP ^.:`
24017  new_path="$path"
24018  if test "x$has_colon" = x; then
24019    # Not in mixed or Windows style, start by that.
24020    new_path=`cmd //c echo $path`
24021  fi
24022
24023
24024  input_path="$new_path"
24025  # Check if we need to convert this using DOS-style short mode. If the path
24026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24027  # take no chances and rewrite it.
24028  # Note: m4 eats our [], so we need to use [ and ] instead.
24029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24030  if test "x$has_forbidden_chars" != x; then
24031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24033  fi
24034
24035
24036  windows_path="$new_path"
24037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24038    unix_path=`$CYGPATH -u "$windows_path"`
24039    new_path="$unix_path"
24040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24042    new_path="$unix_path"
24043  fi
24044
24045  if test "x$path" != "x$new_path"; then
24046    BOOT_JDK="$new_path"
24047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24049  fi
24050
24051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24053
24054    else
24055      # We're on a unix platform. Hooray! :)
24056      path="$BOOT_JDK"
24057      has_space=`$ECHO "$path" | $GREP " "`
24058      if test "x$has_space" != x; then
24059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24062      fi
24063
24064      # Use eval to expand a potential ~
24065      eval path="$path"
24066      if test ! -f "$path" && test ! -d "$path"; then
24067        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24068      fi
24069
24070      if test -d "$path"; then
24071        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24072      else
24073        dir="`$DIRNAME "$path"`"
24074        base="`$BASENAME "$path"`"
24075        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24076      fi
24077    fi
24078  fi
24079
24080            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24081$as_echo_n "checking for Boot JDK... " >&6; }
24082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24083$as_echo "$BOOT_JDK" >&6; }
24084            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24085$as_echo_n "checking Boot JDK version... " >&6; }
24086            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24088$as_echo "$BOOT_JDK_VERSION" >&6; }
24089          fi # end check jdk version
24090        fi # end check javac
24091      fi # end check java
24092    fi # end check boot jdk found
24093  fi
24094
24095    # If that did not work out (e.g. too old), try explicit versions instead
24096
24097  if test "x$BOOT_JDK_FOUND" = xno; then
24098    # Now execute the test
24099
24100  if test -x /usr/libexec/java_home; then
24101    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24102    BOOT_JDK_FOUND=maybe
24103    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24104$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24105  fi
24106
24107
24108    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24109    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24110      # Do we have a bin/java?
24111      if test ! -x "$BOOT_JDK/bin/java"; then
24112        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24114        BOOT_JDK_FOUND=no
24115      else
24116        # Do we have a bin/javac?
24117        if test ! -x "$BOOT_JDK/bin/javac"; then
24118          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24120          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24121$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24122          BOOT_JDK_FOUND=no
24123        else
24124          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24125          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24126
24127          # Extra M4 quote needed to protect [] in grep expression.
24128          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24129          if test "x$FOUND_CORRECT_VERSION" = x; then
24130            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24132            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24133$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24134            BOOT_JDK_FOUND=no
24135          else
24136            # We're done! :-)
24137            BOOT_JDK_FOUND=yes
24138
24139  # Only process if variable expands to non-empty
24140
24141  if test "x$BOOT_JDK" != x; then
24142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24143
24144  # Input might be given as Windows format, start by converting to
24145  # unix format.
24146  path="$BOOT_JDK"
24147  new_path=`$CYGPATH -u "$path"`
24148
24149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24152  # "foo.exe" is OK but "foo" is an error.
24153  #
24154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24155  # It is also a way to make sure we got the proper file name for the real test later on.
24156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24157  if test "x$test_shortpath" = x; then
24158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24160    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24161  fi
24162
24163  # Call helper function which possibly converts this using DOS-style short mode.
24164  # If so, the updated path is stored in $new_path.
24165
24166  input_path="$new_path"
24167  # Check if we need to convert this using DOS-style short mode. If the path
24168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24169  # take no chances and rewrite it.
24170  # Note: m4 eats our [], so we need to use [ and ] instead.
24171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24172  if test "x$has_forbidden_chars" != x; then
24173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24177      # Going to short mode and back again did indeed matter. Since short mode is
24178      # case insensitive, let's make it lowercase to improve readability.
24179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24180      # Now convert it back to Unix-style (cygpath)
24181      input_path=`$CYGPATH -u "$shortmode_path"`
24182      new_path="$input_path"
24183    fi
24184  fi
24185
24186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24187  if test "x$test_cygdrive_prefix" = x; then
24188    # As a simple fix, exclude /usr/bin since it's not a real path.
24189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24191      # a path prefixed by /cygdrive for fixpath to work.
24192      new_path="$CYGWIN_ROOT_PATH$input_path"
24193    fi
24194  fi
24195
24196
24197  if test "x$path" != "x$new_path"; then
24198    BOOT_JDK="$new_path"
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24201  fi
24202
24203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24204
24205  path="$BOOT_JDK"
24206  has_colon=`$ECHO $path | $GREP ^.:`
24207  new_path="$path"
24208  if test "x$has_colon" = x; then
24209    # Not in mixed or Windows style, start by that.
24210    new_path=`cmd //c echo $path`
24211  fi
24212
24213
24214  input_path="$new_path"
24215  # Check if we need to convert this using DOS-style short mode. If the path
24216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24217  # take no chances and rewrite it.
24218  # Note: m4 eats our [], so we need to use [ and ] instead.
24219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24220  if test "x$has_forbidden_chars" != x; then
24221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24223  fi
24224
24225
24226  windows_path="$new_path"
24227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24228    unix_path=`$CYGPATH -u "$windows_path"`
24229    new_path="$unix_path"
24230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24232    new_path="$unix_path"
24233  fi
24234
24235  if test "x$path" != "x$new_path"; then
24236    BOOT_JDK="$new_path"
24237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24239  fi
24240
24241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24243
24244    else
24245      # We're on a unix platform. Hooray! :)
24246      path="$BOOT_JDK"
24247      has_space=`$ECHO "$path" | $GREP " "`
24248      if test "x$has_space" != x; then
24249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24252      fi
24253
24254      # Use eval to expand a potential ~
24255      eval path="$path"
24256      if test ! -f "$path" && test ! -d "$path"; then
24257        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24258      fi
24259
24260      if test -d "$path"; then
24261        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24262      else
24263        dir="`$DIRNAME "$path"`"
24264        base="`$BASENAME "$path"`"
24265        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24266      fi
24267    fi
24268  fi
24269
24270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24271$as_echo_n "checking for Boot JDK... " >&6; }
24272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24273$as_echo "$BOOT_JDK" >&6; }
24274            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24275$as_echo_n "checking Boot JDK version... " >&6; }
24276            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24278$as_echo "$BOOT_JDK_VERSION" >&6; }
24279          fi # end check jdk version
24280        fi # end check javac
24281      fi # end check java
24282    fi # end check boot jdk found
24283  fi
24284
24285
24286  if test "x$BOOT_JDK_FOUND" = xno; then
24287    # Now execute the test
24288
24289  if test -x /usr/libexec/java_home; then
24290    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24291    BOOT_JDK_FOUND=maybe
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24293$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24294  fi
24295
24296
24297    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24298    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24299      # Do we have a bin/java?
24300      if test ! -x "$BOOT_JDK/bin/java"; then
24301        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24303        BOOT_JDK_FOUND=no
24304      else
24305        # Do we have a bin/javac?
24306        if test ! -x "$BOOT_JDK/bin/javac"; then
24307          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24309          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24310$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24311          BOOT_JDK_FOUND=no
24312        else
24313          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24314          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24315
24316          # Extra M4 quote needed to protect [] in grep expression.
24317          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24318          if test "x$FOUND_CORRECT_VERSION" = x; then
24319            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24321            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24322$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24323            BOOT_JDK_FOUND=no
24324          else
24325            # We're done! :-)
24326            BOOT_JDK_FOUND=yes
24327
24328  # Only process if variable expands to non-empty
24329
24330  if test "x$BOOT_JDK" != x; then
24331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24332
24333  # Input might be given as Windows format, start by converting to
24334  # unix format.
24335  path="$BOOT_JDK"
24336  new_path=`$CYGPATH -u "$path"`
24337
24338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24341  # "foo.exe" is OK but "foo" is an error.
24342  #
24343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24344  # It is also a way to make sure we got the proper file name for the real test later on.
24345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24346  if test "x$test_shortpath" = x; then
24347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24348$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24349    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24350  fi
24351
24352  # Call helper function which possibly converts this using DOS-style short mode.
24353  # If so, the updated path is stored in $new_path.
24354
24355  input_path="$new_path"
24356  # Check if we need to convert this using DOS-style short mode. If the path
24357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24358  # take no chances and rewrite it.
24359  # Note: m4 eats our [], so we need to use [ and ] instead.
24360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24361  if test "x$has_forbidden_chars" != x; then
24362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24366      # Going to short mode and back again did indeed matter. Since short mode is
24367      # case insensitive, let's make it lowercase to improve readability.
24368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24369      # Now convert it back to Unix-style (cygpath)
24370      input_path=`$CYGPATH -u "$shortmode_path"`
24371      new_path="$input_path"
24372    fi
24373  fi
24374
24375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24376  if test "x$test_cygdrive_prefix" = x; then
24377    # As a simple fix, exclude /usr/bin since it's not a real path.
24378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24380      # a path prefixed by /cygdrive for fixpath to work.
24381      new_path="$CYGWIN_ROOT_PATH$input_path"
24382    fi
24383  fi
24384
24385
24386  if test "x$path" != "x$new_path"; then
24387    BOOT_JDK="$new_path"
24388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24390  fi
24391
24392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24393
24394  path="$BOOT_JDK"
24395  has_colon=`$ECHO $path | $GREP ^.:`
24396  new_path="$path"
24397  if test "x$has_colon" = x; then
24398    # Not in mixed or Windows style, start by that.
24399    new_path=`cmd //c echo $path`
24400  fi
24401
24402
24403  input_path="$new_path"
24404  # Check if we need to convert this using DOS-style short mode. If the path
24405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24406  # take no chances and rewrite it.
24407  # Note: m4 eats our [], so we need to use [ and ] instead.
24408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24409  if test "x$has_forbidden_chars" != x; then
24410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24412  fi
24413
24414
24415  windows_path="$new_path"
24416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24417    unix_path=`$CYGPATH -u "$windows_path"`
24418    new_path="$unix_path"
24419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24421    new_path="$unix_path"
24422  fi
24423
24424  if test "x$path" != "x$new_path"; then
24425    BOOT_JDK="$new_path"
24426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24428  fi
24429
24430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24432
24433    else
24434      # We're on a unix platform. Hooray! :)
24435      path="$BOOT_JDK"
24436      has_space=`$ECHO "$path" | $GREP " "`
24437      if test "x$has_space" != x; then
24438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24439$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24440        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24441      fi
24442
24443      # Use eval to expand a potential ~
24444      eval path="$path"
24445      if test ! -f "$path" && test ! -d "$path"; then
24446        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24447      fi
24448
24449      if test -d "$path"; then
24450        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24451      else
24452        dir="`$DIRNAME "$path"`"
24453        base="`$BASENAME "$path"`"
24454        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24455      fi
24456    fi
24457  fi
24458
24459            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24460$as_echo_n "checking for Boot JDK... " >&6; }
24461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24462$as_echo "$BOOT_JDK" >&6; }
24463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24464$as_echo_n "checking Boot JDK version... " >&6; }
24465            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24467$as_echo "$BOOT_JDK_VERSION" >&6; }
24468          fi # end check jdk version
24469        fi # end check javac
24470      fi # end check java
24471    fi # end check boot jdk found
24472  fi
24473
24474
24475  if test "x$BOOT_JDK_FOUND" = xno; then
24476    # Now execute the test
24477
24478  if test -x /usr/libexec/java_home; then
24479    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24480    BOOT_JDK_FOUND=maybe
24481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24482$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24483  fi
24484
24485
24486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24488      # Do we have a bin/java?
24489      if test ! -x "$BOOT_JDK/bin/java"; then
24490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24492        BOOT_JDK_FOUND=no
24493      else
24494        # Do we have a bin/javac?
24495        if test ! -x "$BOOT_JDK/bin/javac"; then
24496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24500          BOOT_JDK_FOUND=no
24501        else
24502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24504
24505          # Extra M4 quote needed to protect [] in grep expression.
24506          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24507          if test "x$FOUND_CORRECT_VERSION" = x; then
24508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24512            BOOT_JDK_FOUND=no
24513          else
24514            # We're done! :-)
24515            BOOT_JDK_FOUND=yes
24516
24517  # Only process if variable expands to non-empty
24518
24519  if test "x$BOOT_JDK" != x; then
24520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24521
24522  # Input might be given as Windows format, start by converting to
24523  # unix format.
24524  path="$BOOT_JDK"
24525  new_path=`$CYGPATH -u "$path"`
24526
24527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24530  # "foo.exe" is OK but "foo" is an error.
24531  #
24532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24533  # It is also a way to make sure we got the proper file name for the real test later on.
24534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24535  if test "x$test_shortpath" = x; then
24536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24539  fi
24540
24541  # Call helper function which possibly converts this using DOS-style short mode.
24542  # If so, the updated path is stored in $new_path.
24543
24544  input_path="$new_path"
24545  # Check if we need to convert this using DOS-style short mode. If the path
24546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24547  # take no chances and rewrite it.
24548  # Note: m4 eats our [], so we need to use [ and ] instead.
24549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24550  if test "x$has_forbidden_chars" != x; then
24551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24555      # Going to short mode and back again did indeed matter. Since short mode is
24556      # case insensitive, let's make it lowercase to improve readability.
24557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24558      # Now convert it back to Unix-style (cygpath)
24559      input_path=`$CYGPATH -u "$shortmode_path"`
24560      new_path="$input_path"
24561    fi
24562  fi
24563
24564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24565  if test "x$test_cygdrive_prefix" = x; then
24566    # As a simple fix, exclude /usr/bin since it's not a real path.
24567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24569      # a path prefixed by /cygdrive for fixpath to work.
24570      new_path="$CYGWIN_ROOT_PATH$input_path"
24571    fi
24572  fi
24573
24574
24575  if test "x$path" != "x$new_path"; then
24576    BOOT_JDK="$new_path"
24577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24579  fi
24580
24581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24582
24583  path="$BOOT_JDK"
24584  has_colon=`$ECHO $path | $GREP ^.:`
24585  new_path="$path"
24586  if test "x$has_colon" = x; then
24587    # Not in mixed or Windows style, start by that.
24588    new_path=`cmd //c echo $path`
24589  fi
24590
24591
24592  input_path="$new_path"
24593  # Check if we need to convert this using DOS-style short mode. If the path
24594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24595  # take no chances and rewrite it.
24596  # Note: m4 eats our [], so we need to use [ and ] instead.
24597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24598  if test "x$has_forbidden_chars" != x; then
24599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24601  fi
24602
24603
24604  windows_path="$new_path"
24605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24606    unix_path=`$CYGPATH -u "$windows_path"`
24607    new_path="$unix_path"
24608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24610    new_path="$unix_path"
24611  fi
24612
24613  if test "x$path" != "x$new_path"; then
24614    BOOT_JDK="$new_path"
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24617  fi
24618
24619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24621
24622    else
24623      # We're on a unix platform. Hooray! :)
24624      path="$BOOT_JDK"
24625      has_space=`$ECHO "$path" | $GREP " "`
24626      if test "x$has_space" != x; then
24627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24630      fi
24631
24632      # Use eval to expand a potential ~
24633      eval path="$path"
24634      if test ! -f "$path" && test ! -d "$path"; then
24635        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24636      fi
24637
24638      if test -d "$path"; then
24639        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24640      else
24641        dir="`$DIRNAME "$path"`"
24642        base="`$BASENAME "$path"`"
24643        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24644      fi
24645    fi
24646  fi
24647
24648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24649$as_echo_n "checking for Boot JDK... " >&6; }
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24651$as_echo "$BOOT_JDK" >&6; }
24652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24653$as_echo_n "checking Boot JDK version... " >&6; }
24654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24656$as_echo "$BOOT_JDK_VERSION" >&6; }
24657          fi # end check jdk version
24658        fi # end check javac
24659      fi # end check java
24660    fi # end check boot jdk found
24661  fi
24662
24663  fi
24664
24665
24666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24668      # Do we have a bin/java?
24669      if test ! -x "$BOOT_JDK/bin/java"; then
24670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24672        BOOT_JDK_FOUND=no
24673      else
24674        # Do we have a bin/javac?
24675        if test ! -x "$BOOT_JDK/bin/javac"; then
24676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24680          BOOT_JDK_FOUND=no
24681        else
24682          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24683          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24684
24685          # Extra M4 quote needed to protect [] in grep expression.
24686          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24687          if test "x$FOUND_CORRECT_VERSION" = x; then
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24690            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24691$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24692            BOOT_JDK_FOUND=no
24693          else
24694            # We're done! :-)
24695            BOOT_JDK_FOUND=yes
24696
24697  # Only process if variable expands to non-empty
24698
24699  if test "x$BOOT_JDK" != x; then
24700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24701
24702  # Input might be given as Windows format, start by converting to
24703  # unix format.
24704  path="$BOOT_JDK"
24705  new_path=`$CYGPATH -u "$path"`
24706
24707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24710  # "foo.exe" is OK but "foo" is an error.
24711  #
24712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24713  # It is also a way to make sure we got the proper file name for the real test later on.
24714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24715  if test "x$test_shortpath" = x; then
24716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24719  fi
24720
24721  # Call helper function which possibly converts this using DOS-style short mode.
24722  # If so, the updated path is stored in $new_path.
24723
24724  input_path="$new_path"
24725  # Check if we need to convert this using DOS-style short mode. If the path
24726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24727  # take no chances and rewrite it.
24728  # Note: m4 eats our [], so we need to use [ and ] instead.
24729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24730  if test "x$has_forbidden_chars" != x; then
24731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24735      # Going to short mode and back again did indeed matter. Since short mode is
24736      # case insensitive, let's make it lowercase to improve readability.
24737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24738      # Now convert it back to Unix-style (cygpath)
24739      input_path=`$CYGPATH -u "$shortmode_path"`
24740      new_path="$input_path"
24741    fi
24742  fi
24743
24744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24745  if test "x$test_cygdrive_prefix" = x; then
24746    # As a simple fix, exclude /usr/bin since it's not a real path.
24747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24749      # a path prefixed by /cygdrive for fixpath to work.
24750      new_path="$CYGWIN_ROOT_PATH$input_path"
24751    fi
24752  fi
24753
24754
24755  if test "x$path" != "x$new_path"; then
24756    BOOT_JDK="$new_path"
24757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24759  fi
24760
24761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24762
24763  path="$BOOT_JDK"
24764  has_colon=`$ECHO $path | $GREP ^.:`
24765  new_path="$path"
24766  if test "x$has_colon" = x; then
24767    # Not in mixed or Windows style, start by that.
24768    new_path=`cmd //c echo $path`
24769  fi
24770
24771
24772  input_path="$new_path"
24773  # Check if we need to convert this using DOS-style short mode. If the path
24774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24775  # take no chances and rewrite it.
24776  # Note: m4 eats our [], so we need to use [ and ] instead.
24777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24778  if test "x$has_forbidden_chars" != x; then
24779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24781  fi
24782
24783
24784  windows_path="$new_path"
24785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24786    unix_path=`$CYGPATH -u "$windows_path"`
24787    new_path="$unix_path"
24788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24790    new_path="$unix_path"
24791  fi
24792
24793  if test "x$path" != "x$new_path"; then
24794    BOOT_JDK="$new_path"
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24797  fi
24798
24799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24801
24802    else
24803      # We're on a unix platform. Hooray! :)
24804      path="$BOOT_JDK"
24805      has_space=`$ECHO "$path" | $GREP " "`
24806      if test "x$has_space" != x; then
24807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24810      fi
24811
24812      # Use eval to expand a potential ~
24813      eval path="$path"
24814      if test ! -f "$path" && test ! -d "$path"; then
24815        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24816      fi
24817
24818      if test -d "$path"; then
24819        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24820      else
24821        dir="`$DIRNAME "$path"`"
24822        base="`$BASENAME "$path"`"
24823        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24824      fi
24825    fi
24826  fi
24827
24828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24829$as_echo_n "checking for Boot JDK... " >&6; }
24830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24831$as_echo "$BOOT_JDK" >&6; }
24832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24833$as_echo_n "checking Boot JDK version... " >&6; }
24834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24836$as_echo "$BOOT_JDK_VERSION" >&6; }
24837          fi # end check jdk version
24838        fi # end check javac
24839      fi # end check java
24840    fi # end check boot jdk found
24841  fi
24842
24843
24844  # Test: Is $JAVA_HOME set?
24845
24846  if test "x$BOOT_JDK_FOUND" = xno; then
24847    # Now execute the test
24848
24849  if test "x$JAVA_HOME" != x; then
24850    JAVA_HOME_PROCESSED="$JAVA_HOME"
24851
24852  # Only process if variable expands to non-empty
24853
24854  if test "x$JAVA_HOME_PROCESSED" != x; then
24855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24856
24857  # Input might be given as Windows format, start by converting to
24858  # unix format.
24859  path="$JAVA_HOME_PROCESSED"
24860  new_path=`$CYGPATH -u "$path"`
24861
24862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24865  # "foo.exe" is OK but "foo" is an error.
24866  #
24867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24868  # It is also a way to make sure we got the proper file name for the real test later on.
24869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24870  if test "x$test_shortpath" = x; then
24871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24872$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24873    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24874  fi
24875
24876  # Call helper function which possibly converts this using DOS-style short mode.
24877  # If so, the updated path is stored in $new_path.
24878
24879  input_path="$new_path"
24880  # Check if we need to convert this using DOS-style short mode. If the path
24881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24882  # take no chances and rewrite it.
24883  # Note: m4 eats our [], so we need to use [ and ] instead.
24884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24885  if test "x$has_forbidden_chars" != x; then
24886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24890      # Going to short mode and back again did indeed matter. Since short mode is
24891      # case insensitive, let's make it lowercase to improve readability.
24892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24893      # Now convert it back to Unix-style (cygpath)
24894      input_path=`$CYGPATH -u "$shortmode_path"`
24895      new_path="$input_path"
24896    fi
24897  fi
24898
24899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24900  if test "x$test_cygdrive_prefix" = x; then
24901    # As a simple fix, exclude /usr/bin since it's not a real path.
24902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24904      # a path prefixed by /cygdrive for fixpath to work.
24905      new_path="$CYGWIN_ROOT_PATH$input_path"
24906    fi
24907  fi
24908
24909
24910  if test "x$path" != "x$new_path"; then
24911    JAVA_HOME_PROCESSED="$new_path"
24912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24913$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24914  fi
24915
24916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24917
24918  path="$JAVA_HOME_PROCESSED"
24919  has_colon=`$ECHO $path | $GREP ^.:`
24920  new_path="$path"
24921  if test "x$has_colon" = x; then
24922    # Not in mixed or Windows style, start by that.
24923    new_path=`cmd //c echo $path`
24924  fi
24925
24926
24927  input_path="$new_path"
24928  # Check if we need to convert this using DOS-style short mode. If the path
24929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24930  # take no chances and rewrite it.
24931  # Note: m4 eats our [], so we need to use [ and ] instead.
24932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24933  if test "x$has_forbidden_chars" != x; then
24934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24936  fi
24937
24938
24939  windows_path="$new_path"
24940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24941    unix_path=`$CYGPATH -u "$windows_path"`
24942    new_path="$unix_path"
24943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24945    new_path="$unix_path"
24946  fi
24947
24948  if test "x$path" != "x$new_path"; then
24949    JAVA_HOME_PROCESSED="$new_path"
24950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24951$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24952  fi
24953
24954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24956
24957    else
24958      # We're on a unix platform. Hooray! :)
24959      path="$JAVA_HOME_PROCESSED"
24960      has_space=`$ECHO "$path" | $GREP " "`
24961      if test "x$has_space" != x; then
24962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24963$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24965      fi
24966
24967      # Use eval to expand a potential ~
24968      eval path="$path"
24969      if test ! -f "$path" && test ! -d "$path"; then
24970        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24971      fi
24972
24973      if test -d "$path"; then
24974        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24975      else
24976        dir="`$DIRNAME "$path"`"
24977        base="`$BASENAME "$path"`"
24978        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
24979      fi
24980    fi
24981  fi
24982
24983    if test ! -d "$JAVA_HOME_PROCESSED"; then
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24985$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24986    else
24987      # Aha, the user has set a JAVA_HOME
24988      # let us use that as the Boot JDK.
24989      BOOT_JDK="$JAVA_HOME_PROCESSED"
24990      BOOT_JDK_FOUND=maybe
24991      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24992$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24993    fi
24994  fi
24995
24996
24997    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24998    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24999      # Do we have a bin/java?
25000      if test ! -x "$BOOT_JDK/bin/java"; then
25001        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25003        BOOT_JDK_FOUND=no
25004      else
25005        # Do we have a bin/javac?
25006        if test ! -x "$BOOT_JDK/bin/javac"; then
25007          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25009          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25010$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25011          BOOT_JDK_FOUND=no
25012        else
25013          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25014          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25015
25016          # Extra M4 quote needed to protect [] in grep expression.
25017          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25018          if test "x$FOUND_CORRECT_VERSION" = x; then
25019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25021            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25022$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25023            BOOT_JDK_FOUND=no
25024          else
25025            # We're done! :-)
25026            BOOT_JDK_FOUND=yes
25027
25028  # Only process if variable expands to non-empty
25029
25030  if test "x$BOOT_JDK" != x; then
25031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25032
25033  # Input might be given as Windows format, start by converting to
25034  # unix format.
25035  path="$BOOT_JDK"
25036  new_path=`$CYGPATH -u "$path"`
25037
25038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25041  # "foo.exe" is OK but "foo" is an error.
25042  #
25043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25044  # It is also a way to make sure we got the proper file name for the real test later on.
25045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25046  if test "x$test_shortpath" = x; then
25047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25050  fi
25051
25052  # Call helper function which possibly converts this using DOS-style short mode.
25053  # If so, the updated path is stored in $new_path.
25054
25055  input_path="$new_path"
25056  # Check if we need to convert this using DOS-style short mode. If the path
25057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25058  # take no chances and rewrite it.
25059  # Note: m4 eats our [], so we need to use [ and ] instead.
25060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25061  if test "x$has_forbidden_chars" != x; then
25062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25066      # Going to short mode and back again did indeed matter. Since short mode is
25067      # case insensitive, let's make it lowercase to improve readability.
25068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25069      # Now convert it back to Unix-style (cygpath)
25070      input_path=`$CYGPATH -u "$shortmode_path"`
25071      new_path="$input_path"
25072    fi
25073  fi
25074
25075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25076  if test "x$test_cygdrive_prefix" = x; then
25077    # As a simple fix, exclude /usr/bin since it's not a real path.
25078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25080      # a path prefixed by /cygdrive for fixpath to work.
25081      new_path="$CYGWIN_ROOT_PATH$input_path"
25082    fi
25083  fi
25084
25085
25086  if test "x$path" != "x$new_path"; then
25087    BOOT_JDK="$new_path"
25088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25090  fi
25091
25092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25093
25094  path="$BOOT_JDK"
25095  has_colon=`$ECHO $path | $GREP ^.:`
25096  new_path="$path"
25097  if test "x$has_colon" = x; then
25098    # Not in mixed or Windows style, start by that.
25099    new_path=`cmd //c echo $path`
25100  fi
25101
25102
25103  input_path="$new_path"
25104  # Check if we need to convert this using DOS-style short mode. If the path
25105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25106  # take no chances and rewrite it.
25107  # Note: m4 eats our [], so we need to use [ and ] instead.
25108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25109  if test "x$has_forbidden_chars" != x; then
25110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25112  fi
25113
25114
25115  windows_path="$new_path"
25116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25117    unix_path=`$CYGPATH -u "$windows_path"`
25118    new_path="$unix_path"
25119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25121    new_path="$unix_path"
25122  fi
25123
25124  if test "x$path" != "x$new_path"; then
25125    BOOT_JDK="$new_path"
25126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25128  fi
25129
25130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25132
25133    else
25134      # We're on a unix platform. Hooray! :)
25135      path="$BOOT_JDK"
25136      has_space=`$ECHO "$path" | $GREP " "`
25137      if test "x$has_space" != x; then
25138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25141      fi
25142
25143      # Use eval to expand a potential ~
25144      eval path="$path"
25145      if test ! -f "$path" && test ! -d "$path"; then
25146        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25147      fi
25148
25149      if test -d "$path"; then
25150        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25151      else
25152        dir="`$DIRNAME "$path"`"
25153        base="`$BASENAME "$path"`"
25154        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25155      fi
25156    fi
25157  fi
25158
25159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25160$as_echo_n "checking for Boot JDK... " >&6; }
25161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25162$as_echo "$BOOT_JDK" >&6; }
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25164$as_echo_n "checking Boot JDK version... " >&6; }
25165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25167$as_echo "$BOOT_JDK_VERSION" >&6; }
25168          fi # end check jdk version
25169        fi # end check javac
25170      fi # end check java
25171    fi # end check boot jdk found
25172  fi
25173
25174
25175  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25176
25177  if test "x$BOOT_JDK_FOUND" = xno; then
25178    # Now execute the test
25179
25180  # Extract the first word of "javac", so it can be a program name with args.
25181set dummy javac; ac_word=$2
25182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25183$as_echo_n "checking for $ac_word... " >&6; }
25184if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25185  $as_echo_n "(cached) " >&6
25186else
25187  case $JAVAC_CHECK in
25188  [\\/]* | ?:[\\/]*)
25189  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25190  ;;
25191  *)
25192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25193for as_dir in $PATH
25194do
25195  IFS=$as_save_IFS
25196  test -z "$as_dir" && as_dir=.
25197    for ac_exec_ext in '' $ac_executable_extensions; do
25198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25199    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25201    break 2
25202  fi
25203done
25204  done
25205IFS=$as_save_IFS
25206
25207  ;;
25208esac
25209fi
25210JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25211if test -n "$JAVAC_CHECK"; then
25212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25213$as_echo "$JAVAC_CHECK" >&6; }
25214else
25215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25216$as_echo "no" >&6; }
25217fi
25218
25219
25220  # Extract the first word of "java", so it can be a program name with args.
25221set dummy java; ac_word=$2
25222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25223$as_echo_n "checking for $ac_word... " >&6; }
25224if ${ac_cv_path_JAVA_CHECK+:} false; then :
25225  $as_echo_n "(cached) " >&6
25226else
25227  case $JAVA_CHECK in
25228  [\\/]* | ?:[\\/]*)
25229  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25230  ;;
25231  *)
25232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25233for as_dir in $PATH
25234do
25235  IFS=$as_save_IFS
25236  test -z "$as_dir" && as_dir=.
25237    for ac_exec_ext in '' $ac_executable_extensions; do
25238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25239    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25241    break 2
25242  fi
25243done
25244  done
25245IFS=$as_save_IFS
25246
25247  ;;
25248esac
25249fi
25250JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25251if test -n "$JAVA_CHECK"; then
25252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25253$as_echo "$JAVA_CHECK" >&6; }
25254else
25255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25256$as_echo "no" >&6; }
25257fi
25258
25259
25260  BINARY="$JAVAC_CHECK"
25261  if test "x$JAVAC_CHECK" = x; then
25262    BINARY="$JAVA_CHECK"
25263  fi
25264  if test "x$BINARY" != x; then
25265    # So there is a java(c) binary, it might be part of a JDK.
25266    # Lets find the JDK/JRE directory by following symbolic links.
25267    # Linux/GNU systems often have links from /usr/bin/java to
25268    # /etc/alternatives/java to the real JDK binary.
25269
25270  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25271    # Follow a chain of symbolic links. Use readlink
25272    # where it exists, else fall back to horribly
25273    # complicated shell code.
25274    if test "x$READLINK_TESTED" != yes; then
25275      # On MacOSX there is a readlink tool with a different
25276      # purpose than the GNU readlink tool. Check the found readlink.
25277      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25278      if test "x$ISGNU" = x; then
25279        # A readlink that we do not know how to use.
25280        # Are there other non-GNU readlinks out there?
25281        READLINK_TESTED=yes
25282        READLINK=
25283      fi
25284    fi
25285
25286    if test "x$READLINK" != x; then
25287      BINARY=`$READLINK -f $BINARY`
25288    else
25289      # Save the current directory for restoring afterwards
25290      STARTDIR=$PWD
25291      COUNTER=0
25292      sym_link_dir=`$DIRNAME $BINARY`
25293      sym_link_file=`$BASENAME $BINARY`
25294      cd $sym_link_dir
25295      # Use -P flag to resolve symlinks in directories.
25296      cd `$THEPWDCMD -P`
25297      sym_link_dir=`$THEPWDCMD -P`
25298      # Resolve file symlinks
25299      while test $COUNTER -lt 20; do
25300        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25301        if test "x$ISLINK" == x; then
25302          # This is not a symbolic link! We are done!
25303          break
25304        fi
25305        # Again resolve directory symlinks since the target of the just found
25306        # link could be in a different directory
25307        cd `$DIRNAME $ISLINK`
25308        sym_link_dir=`$THEPWDCMD -P`
25309        sym_link_file=`$BASENAME $ISLINK`
25310        let COUNTER=COUNTER+1
25311      done
25312      cd $STARTDIR
25313      BINARY=$sym_link_dir/$sym_link_file
25314    fi
25315  fi
25316
25317    BOOT_JDK=`dirname "$BINARY"`
25318    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25319    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25320      # Looks like we found ourselves an JDK
25321      BOOT_JDK_FOUND=maybe
25322      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25323$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25324    fi
25325  fi
25326
25327
25328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25330      # Do we have a bin/java?
25331      if test ! -x "$BOOT_JDK/bin/java"; then
25332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25334        BOOT_JDK_FOUND=no
25335      else
25336        # Do we have a bin/javac?
25337        if test ! -x "$BOOT_JDK/bin/javac"; then
25338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25342          BOOT_JDK_FOUND=no
25343        else
25344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25346
25347          # Extra M4 quote needed to protect [] in grep expression.
25348          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25349          if test "x$FOUND_CORRECT_VERSION" = x; then
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25354            BOOT_JDK_FOUND=no
25355          else
25356            # We're done! :-)
25357            BOOT_JDK_FOUND=yes
25358
25359  # Only process if variable expands to non-empty
25360
25361  if test "x$BOOT_JDK" != x; then
25362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25363
25364  # Input might be given as Windows format, start by converting to
25365  # unix format.
25366  path="$BOOT_JDK"
25367  new_path=`$CYGPATH -u "$path"`
25368
25369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25372  # "foo.exe" is OK but "foo" is an error.
25373  #
25374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25375  # It is also a way to make sure we got the proper file name for the real test later on.
25376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25377  if test "x$test_shortpath" = x; then
25378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25381  fi
25382
25383  # Call helper function which possibly converts this using DOS-style short mode.
25384  # If so, the updated path is stored in $new_path.
25385
25386  input_path="$new_path"
25387  # Check if we need to convert this using DOS-style short mode. If the path
25388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25389  # take no chances and rewrite it.
25390  # Note: m4 eats our [], so we need to use [ and ] instead.
25391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25392  if test "x$has_forbidden_chars" != x; then
25393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25397      # Going to short mode and back again did indeed matter. Since short mode is
25398      # case insensitive, let's make it lowercase to improve readability.
25399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25400      # Now convert it back to Unix-style (cygpath)
25401      input_path=`$CYGPATH -u "$shortmode_path"`
25402      new_path="$input_path"
25403    fi
25404  fi
25405
25406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25407  if test "x$test_cygdrive_prefix" = x; then
25408    # As a simple fix, exclude /usr/bin since it's not a real path.
25409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25411      # a path prefixed by /cygdrive for fixpath to work.
25412      new_path="$CYGWIN_ROOT_PATH$input_path"
25413    fi
25414  fi
25415
25416
25417  if test "x$path" != "x$new_path"; then
25418    BOOT_JDK="$new_path"
25419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25421  fi
25422
25423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25424
25425  path="$BOOT_JDK"
25426  has_colon=`$ECHO $path | $GREP ^.:`
25427  new_path="$path"
25428  if test "x$has_colon" = x; then
25429    # Not in mixed or Windows style, start by that.
25430    new_path=`cmd //c echo $path`
25431  fi
25432
25433
25434  input_path="$new_path"
25435  # Check if we need to convert this using DOS-style short mode. If the path
25436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25437  # take no chances and rewrite it.
25438  # Note: m4 eats our [], so we need to use [ and ] instead.
25439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25440  if test "x$has_forbidden_chars" != x; then
25441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25443  fi
25444
25445
25446  windows_path="$new_path"
25447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25448    unix_path=`$CYGPATH -u "$windows_path"`
25449    new_path="$unix_path"
25450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25452    new_path="$unix_path"
25453  fi
25454
25455  if test "x$path" != "x$new_path"; then
25456    BOOT_JDK="$new_path"
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25459  fi
25460
25461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25463
25464    else
25465      # We're on a unix platform. Hooray! :)
25466      path="$BOOT_JDK"
25467      has_space=`$ECHO "$path" | $GREP " "`
25468      if test "x$has_space" != x; then
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25472      fi
25473
25474      # Use eval to expand a potential ~
25475      eval path="$path"
25476      if test ! -f "$path" && test ! -d "$path"; then
25477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25478      fi
25479
25480      if test -d "$path"; then
25481        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25482      else
25483        dir="`$DIRNAME "$path"`"
25484        base="`$BASENAME "$path"`"
25485        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25486      fi
25487    fi
25488  fi
25489
25490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25491$as_echo_n "checking for Boot JDK... " >&6; }
25492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25493$as_echo "$BOOT_JDK" >&6; }
25494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25495$as_echo_n "checking Boot JDK version... " >&6; }
25496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25498$as_echo "$BOOT_JDK_VERSION" >&6; }
25499          fi # end check jdk version
25500        fi # end check javac
25501      fi # end check java
25502    fi # end check boot jdk found
25503  fi
25504
25505
25506  # Test: Is there a JDK installed in default, well-known locations?
25507
25508  if test "x$BOOT_JDK_FOUND" = xno; then
25509    # Now execute the test
25510
25511  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25512
25513  if test "x$BOOT_JDK_FOUND" = xno; then
25514    # Now execute the test
25515
25516  if test "x$ProgramW6432" != x; then
25517    VIRTUAL_DIR="$ProgramW6432/Java"
25518
25519  windows_path="$VIRTUAL_DIR"
25520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25521    unix_path=`$CYGPATH -u "$windows_path"`
25522    VIRTUAL_DIR="$unix_path"
25523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25525    VIRTUAL_DIR="$unix_path"
25526  fi
25527
25528
25529  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25530  BOOT_JDK_SUFFIX=""
25531  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25532  if test "x$ALL_JDKS_FOUND" != x; then
25533    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25534
25535  if test "x$BOOT_JDK_FOUND" = xno; then
25536    # Now execute the test
25537
25538        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25539        if test -d "$BOOT_JDK"; then
25540          BOOT_JDK_FOUND=maybe
25541          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25542$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25543        fi
25544
25545
25546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25548      # Do we have a bin/java?
25549      if test ! -x "$BOOT_JDK/bin/java"; then
25550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25552        BOOT_JDK_FOUND=no
25553      else
25554        # Do we have a bin/javac?
25555        if test ! -x "$BOOT_JDK/bin/javac"; then
25556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25560          BOOT_JDK_FOUND=no
25561        else
25562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25564
25565          # Extra M4 quote needed to protect [] in grep expression.
25566          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25567          if test "x$FOUND_CORRECT_VERSION" = x; then
25568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25572            BOOT_JDK_FOUND=no
25573          else
25574            # We're done! :-)
25575            BOOT_JDK_FOUND=yes
25576
25577  # Only process if variable expands to non-empty
25578
25579  if test "x$BOOT_JDK" != x; then
25580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25581
25582  # Input might be given as Windows format, start by converting to
25583  # unix format.
25584  path="$BOOT_JDK"
25585  new_path=`$CYGPATH -u "$path"`
25586
25587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25590  # "foo.exe" is OK but "foo" is an error.
25591  #
25592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25593  # It is also a way to make sure we got the proper file name for the real test later on.
25594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25595  if test "x$test_shortpath" = x; then
25596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25599  fi
25600
25601  # Call helper function which possibly converts this using DOS-style short mode.
25602  # If so, the updated path is stored in $new_path.
25603
25604  input_path="$new_path"
25605  # Check if we need to convert this using DOS-style short mode. If the path
25606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25607  # take no chances and rewrite it.
25608  # Note: m4 eats our [], so we need to use [ and ] instead.
25609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25610  if test "x$has_forbidden_chars" != x; then
25611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25615      # Going to short mode and back again did indeed matter. Since short mode is
25616      # case insensitive, let's make it lowercase to improve readability.
25617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25618      # Now convert it back to Unix-style (cygpath)
25619      input_path=`$CYGPATH -u "$shortmode_path"`
25620      new_path="$input_path"
25621    fi
25622  fi
25623
25624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25625  if test "x$test_cygdrive_prefix" = x; then
25626    # As a simple fix, exclude /usr/bin since it's not a real path.
25627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25629      # a path prefixed by /cygdrive for fixpath to work.
25630      new_path="$CYGWIN_ROOT_PATH$input_path"
25631    fi
25632  fi
25633
25634
25635  if test "x$path" != "x$new_path"; then
25636    BOOT_JDK="$new_path"
25637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25639  fi
25640
25641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25642
25643  path="$BOOT_JDK"
25644  has_colon=`$ECHO $path | $GREP ^.:`
25645  new_path="$path"
25646  if test "x$has_colon" = x; then
25647    # Not in mixed or Windows style, start by that.
25648    new_path=`cmd //c echo $path`
25649  fi
25650
25651
25652  input_path="$new_path"
25653  # Check if we need to convert this using DOS-style short mode. If the path
25654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25655  # take no chances and rewrite it.
25656  # Note: m4 eats our [], so we need to use [ and ] instead.
25657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25658  if test "x$has_forbidden_chars" != x; then
25659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25661  fi
25662
25663
25664  windows_path="$new_path"
25665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666    unix_path=`$CYGPATH -u "$windows_path"`
25667    new_path="$unix_path"
25668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670    new_path="$unix_path"
25671  fi
25672
25673  if test "x$path" != "x$new_path"; then
25674    BOOT_JDK="$new_path"
25675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25677  fi
25678
25679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25681
25682    else
25683      # We're on a unix platform. Hooray! :)
25684      path="$BOOT_JDK"
25685      has_space=`$ECHO "$path" | $GREP " "`
25686      if test "x$has_space" != x; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25690      fi
25691
25692      # Use eval to expand a potential ~
25693      eval path="$path"
25694      if test ! -f "$path" && test ! -d "$path"; then
25695        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25696      fi
25697
25698      if test -d "$path"; then
25699        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25700      else
25701        dir="`$DIRNAME "$path"`"
25702        base="`$BASENAME "$path"`"
25703        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25704      fi
25705    fi
25706  fi
25707
25708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25709$as_echo_n "checking for Boot JDK... " >&6; }
25710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25711$as_echo "$BOOT_JDK" >&6; }
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25713$as_echo_n "checking Boot JDK version... " >&6; }
25714            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25716$as_echo "$BOOT_JDK_VERSION" >&6; }
25717          fi # end check jdk version
25718        fi # end check javac
25719      fi # end check java
25720    fi # end check boot jdk found
25721  fi
25722
25723    done
25724  fi
25725
25726  fi
25727
25728
25729    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25730    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25731      # Do we have a bin/java?
25732      if test ! -x "$BOOT_JDK/bin/java"; then
25733        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25735        BOOT_JDK_FOUND=no
25736      else
25737        # Do we have a bin/javac?
25738        if test ! -x "$BOOT_JDK/bin/javac"; then
25739          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25741          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25742$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25743          BOOT_JDK_FOUND=no
25744        else
25745          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25746          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25747
25748          # Extra M4 quote needed to protect [] in grep expression.
25749          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25750          if test "x$FOUND_CORRECT_VERSION" = x; then
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25754$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25755            BOOT_JDK_FOUND=no
25756          else
25757            # We're done! :-)
25758            BOOT_JDK_FOUND=yes
25759
25760  # Only process if variable expands to non-empty
25761
25762  if test "x$BOOT_JDK" != x; then
25763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25764
25765  # Input might be given as Windows format, start by converting to
25766  # unix format.
25767  path="$BOOT_JDK"
25768  new_path=`$CYGPATH -u "$path"`
25769
25770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25773  # "foo.exe" is OK but "foo" is an error.
25774  #
25775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25776  # It is also a way to make sure we got the proper file name for the real test later on.
25777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25778  if test "x$test_shortpath" = x; then
25779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25781    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25782  fi
25783
25784  # Call helper function which possibly converts this using DOS-style short mode.
25785  # If so, the updated path is stored in $new_path.
25786
25787  input_path="$new_path"
25788  # Check if we need to convert this using DOS-style short mode. If the path
25789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25790  # take no chances and rewrite it.
25791  # Note: m4 eats our [], so we need to use [ and ] instead.
25792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25793  if test "x$has_forbidden_chars" != x; then
25794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25798      # Going to short mode and back again did indeed matter. Since short mode is
25799      # case insensitive, let's make it lowercase to improve readability.
25800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25801      # Now convert it back to Unix-style (cygpath)
25802      input_path=`$CYGPATH -u "$shortmode_path"`
25803      new_path="$input_path"
25804    fi
25805  fi
25806
25807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25808  if test "x$test_cygdrive_prefix" = x; then
25809    # As a simple fix, exclude /usr/bin since it's not a real path.
25810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25812      # a path prefixed by /cygdrive for fixpath to work.
25813      new_path="$CYGWIN_ROOT_PATH$input_path"
25814    fi
25815  fi
25816
25817
25818  if test "x$path" != "x$new_path"; then
25819    BOOT_JDK="$new_path"
25820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25822  fi
25823
25824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25825
25826  path="$BOOT_JDK"
25827  has_colon=`$ECHO $path | $GREP ^.:`
25828  new_path="$path"
25829  if test "x$has_colon" = x; then
25830    # Not in mixed or Windows style, start by that.
25831    new_path=`cmd //c echo $path`
25832  fi
25833
25834
25835  input_path="$new_path"
25836  # Check if we need to convert this using DOS-style short mode. If the path
25837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25838  # take no chances and rewrite it.
25839  # Note: m4 eats our [], so we need to use [ and ] instead.
25840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25841  if test "x$has_forbidden_chars" != x; then
25842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25844  fi
25845
25846
25847  windows_path="$new_path"
25848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25849    unix_path=`$CYGPATH -u "$windows_path"`
25850    new_path="$unix_path"
25851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25853    new_path="$unix_path"
25854  fi
25855
25856  if test "x$path" != "x$new_path"; then
25857    BOOT_JDK="$new_path"
25858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25860  fi
25861
25862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25864
25865    else
25866      # We're on a unix platform. Hooray! :)
25867      path="$BOOT_JDK"
25868      has_space=`$ECHO "$path" | $GREP " "`
25869      if test "x$has_space" != x; then
25870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25873      fi
25874
25875      # Use eval to expand a potential ~
25876      eval path="$path"
25877      if test ! -f "$path" && test ! -d "$path"; then
25878        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25879      fi
25880
25881      if test -d "$path"; then
25882        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25883      else
25884        dir="`$DIRNAME "$path"`"
25885        base="`$BASENAME "$path"`"
25886        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25887      fi
25888    fi
25889  fi
25890
25891            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25892$as_echo_n "checking for Boot JDK... " >&6; }
25893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25894$as_echo "$BOOT_JDK" >&6; }
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25896$as_echo_n "checking Boot JDK version... " >&6; }
25897            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25899$as_echo "$BOOT_JDK_VERSION" >&6; }
25900          fi # end check jdk version
25901        fi # end check javac
25902      fi # end check java
25903    fi # end check boot jdk found
25904  fi
25905
25906
25907  if test "x$BOOT_JDK_FOUND" = xno; then
25908    # Now execute the test
25909
25910  if test "x$PROGRAMW6432" != x; then
25911    VIRTUAL_DIR="$PROGRAMW6432/Java"
25912
25913  windows_path="$VIRTUAL_DIR"
25914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25915    unix_path=`$CYGPATH -u "$windows_path"`
25916    VIRTUAL_DIR="$unix_path"
25917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25919    VIRTUAL_DIR="$unix_path"
25920  fi
25921
25922
25923  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25924  BOOT_JDK_SUFFIX=""
25925  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25926  if test "x$ALL_JDKS_FOUND" != x; then
25927    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25928
25929  if test "x$BOOT_JDK_FOUND" = xno; then
25930    # Now execute the test
25931
25932        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25933        if test -d "$BOOT_JDK"; then
25934          BOOT_JDK_FOUND=maybe
25935          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25936$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25937        fi
25938
25939
25940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25942      # Do we have a bin/java?
25943      if test ! -x "$BOOT_JDK/bin/java"; then
25944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25946        BOOT_JDK_FOUND=no
25947      else
25948        # Do we have a bin/javac?
25949        if test ! -x "$BOOT_JDK/bin/javac"; then
25950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25954          BOOT_JDK_FOUND=no
25955        else
25956          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25957          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25958
25959          # Extra M4 quote needed to protect [] in grep expression.
25960          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25961          if test "x$FOUND_CORRECT_VERSION" = x; then
25962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25964            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25965$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25966            BOOT_JDK_FOUND=no
25967          else
25968            # We're done! :-)
25969            BOOT_JDK_FOUND=yes
25970
25971  # Only process if variable expands to non-empty
25972
25973  if test "x$BOOT_JDK" != x; then
25974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25975
25976  # Input might be given as Windows format, start by converting to
25977  # unix format.
25978  path="$BOOT_JDK"
25979  new_path=`$CYGPATH -u "$path"`
25980
25981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25984  # "foo.exe" is OK but "foo" is an error.
25985  #
25986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25987  # It is also a way to make sure we got the proper file name for the real test later on.
25988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25989  if test "x$test_shortpath" = x; then
25990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25992    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25993  fi
25994
25995  # Call helper function which possibly converts this using DOS-style short mode.
25996  # If so, the updated path is stored in $new_path.
25997
25998  input_path="$new_path"
25999  # Check if we need to convert this using DOS-style short mode. If the path
26000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26001  # take no chances and rewrite it.
26002  # Note: m4 eats our [], so we need to use [ and ] instead.
26003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26004  if test "x$has_forbidden_chars" != x; then
26005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26009      # Going to short mode and back again did indeed matter. Since short mode is
26010      # case insensitive, let's make it lowercase to improve readability.
26011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012      # Now convert it back to Unix-style (cygpath)
26013      input_path=`$CYGPATH -u "$shortmode_path"`
26014      new_path="$input_path"
26015    fi
26016  fi
26017
26018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26019  if test "x$test_cygdrive_prefix" = x; then
26020    # As a simple fix, exclude /usr/bin since it's not a real path.
26021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26023      # a path prefixed by /cygdrive for fixpath to work.
26024      new_path="$CYGWIN_ROOT_PATH$input_path"
26025    fi
26026  fi
26027
26028
26029  if test "x$path" != "x$new_path"; then
26030    BOOT_JDK="$new_path"
26031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26033  fi
26034
26035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26036
26037  path="$BOOT_JDK"
26038  has_colon=`$ECHO $path | $GREP ^.:`
26039  new_path="$path"
26040  if test "x$has_colon" = x; then
26041    # Not in mixed or Windows style, start by that.
26042    new_path=`cmd //c echo $path`
26043  fi
26044
26045
26046  input_path="$new_path"
26047  # Check if we need to convert this using DOS-style short mode. If the path
26048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26049  # take no chances and rewrite it.
26050  # Note: m4 eats our [], so we need to use [ and ] instead.
26051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26052  if test "x$has_forbidden_chars" != x; then
26053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26055  fi
26056
26057
26058  windows_path="$new_path"
26059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26060    unix_path=`$CYGPATH -u "$windows_path"`
26061    new_path="$unix_path"
26062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26064    new_path="$unix_path"
26065  fi
26066
26067  if test "x$path" != "x$new_path"; then
26068    BOOT_JDK="$new_path"
26069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26071  fi
26072
26073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26075
26076    else
26077      # We're on a unix platform. Hooray! :)
26078      path="$BOOT_JDK"
26079      has_space=`$ECHO "$path" | $GREP " "`
26080      if test "x$has_space" != x; then
26081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26084      fi
26085
26086      # Use eval to expand a potential ~
26087      eval path="$path"
26088      if test ! -f "$path" && test ! -d "$path"; then
26089        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26090      fi
26091
26092      if test -d "$path"; then
26093        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26094      else
26095        dir="`$DIRNAME "$path"`"
26096        base="`$BASENAME "$path"`"
26097        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26098      fi
26099    fi
26100  fi
26101
26102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26103$as_echo_n "checking for Boot JDK... " >&6; }
26104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26105$as_echo "$BOOT_JDK" >&6; }
26106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26107$as_echo_n "checking Boot JDK version... " >&6; }
26108            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26110$as_echo "$BOOT_JDK_VERSION" >&6; }
26111          fi # end check jdk version
26112        fi # end check javac
26113      fi # end check java
26114    fi # end check boot jdk found
26115  fi
26116
26117    done
26118  fi
26119
26120  fi
26121
26122
26123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26125      # Do we have a bin/java?
26126      if test ! -x "$BOOT_JDK/bin/java"; then
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26129        BOOT_JDK_FOUND=no
26130      else
26131        # Do we have a bin/javac?
26132        if test ! -x "$BOOT_JDK/bin/javac"; then
26133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26137          BOOT_JDK_FOUND=no
26138        else
26139          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26140          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26141
26142          # Extra M4 quote needed to protect [] in grep expression.
26143          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26144          if test "x$FOUND_CORRECT_VERSION" = x; then
26145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26147            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26148$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26149            BOOT_JDK_FOUND=no
26150          else
26151            # We're done! :-)
26152            BOOT_JDK_FOUND=yes
26153
26154  # Only process if variable expands to non-empty
26155
26156  if test "x$BOOT_JDK" != x; then
26157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26158
26159  # Input might be given as Windows format, start by converting to
26160  # unix format.
26161  path="$BOOT_JDK"
26162  new_path=`$CYGPATH -u "$path"`
26163
26164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26167  # "foo.exe" is OK but "foo" is an error.
26168  #
26169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26170  # It is also a way to make sure we got the proper file name for the real test later on.
26171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26172  if test "x$test_shortpath" = x; then
26173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26176  fi
26177
26178  # Call helper function which possibly converts this using DOS-style short mode.
26179  # If so, the updated path is stored in $new_path.
26180
26181  input_path="$new_path"
26182  # Check if we need to convert this using DOS-style short mode. If the path
26183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26184  # take no chances and rewrite it.
26185  # Note: m4 eats our [], so we need to use [ and ] instead.
26186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26187  if test "x$has_forbidden_chars" != x; then
26188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26192      # Going to short mode and back again did indeed matter. Since short mode is
26193      # case insensitive, let's make it lowercase to improve readability.
26194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26195      # Now convert it back to Unix-style (cygpath)
26196      input_path=`$CYGPATH -u "$shortmode_path"`
26197      new_path="$input_path"
26198    fi
26199  fi
26200
26201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26202  if test "x$test_cygdrive_prefix" = x; then
26203    # As a simple fix, exclude /usr/bin since it's not a real path.
26204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26206      # a path prefixed by /cygdrive for fixpath to work.
26207      new_path="$CYGWIN_ROOT_PATH$input_path"
26208    fi
26209  fi
26210
26211
26212  if test "x$path" != "x$new_path"; then
26213    BOOT_JDK="$new_path"
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26216  fi
26217
26218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26219
26220  path="$BOOT_JDK"
26221  has_colon=`$ECHO $path | $GREP ^.:`
26222  new_path="$path"
26223  if test "x$has_colon" = x; then
26224    # Not in mixed or Windows style, start by that.
26225    new_path=`cmd //c echo $path`
26226  fi
26227
26228
26229  input_path="$new_path"
26230  # Check if we need to convert this using DOS-style short mode. If the path
26231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26232  # take no chances and rewrite it.
26233  # Note: m4 eats our [], so we need to use [ and ] instead.
26234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26235  if test "x$has_forbidden_chars" != x; then
26236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26238  fi
26239
26240
26241  windows_path="$new_path"
26242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26243    unix_path=`$CYGPATH -u "$windows_path"`
26244    new_path="$unix_path"
26245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26247    new_path="$unix_path"
26248  fi
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26258
26259    else
26260      # We're on a unix platform. Hooray! :)
26261      path="$BOOT_JDK"
26262      has_space=`$ECHO "$path" | $GREP " "`
26263      if test "x$has_space" != x; then
26264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26267      fi
26268
26269      # Use eval to expand a potential ~
26270      eval path="$path"
26271      if test ! -f "$path" && test ! -d "$path"; then
26272        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26273      fi
26274
26275      if test -d "$path"; then
26276        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26277      else
26278        dir="`$DIRNAME "$path"`"
26279        base="`$BASENAME "$path"`"
26280        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26281      fi
26282    fi
26283  fi
26284
26285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26286$as_echo_n "checking for Boot JDK... " >&6; }
26287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26288$as_echo "$BOOT_JDK" >&6; }
26289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26290$as_echo_n "checking Boot JDK version... " >&6; }
26291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26293$as_echo "$BOOT_JDK_VERSION" >&6; }
26294          fi # end check jdk version
26295        fi # end check javac
26296      fi # end check java
26297    fi # end check boot jdk found
26298  fi
26299
26300
26301  if test "x$BOOT_JDK_FOUND" = xno; then
26302    # Now execute the test
26303
26304  if test "x$PROGRAMFILES" != x; then
26305    VIRTUAL_DIR="$PROGRAMFILES/Java"
26306
26307  windows_path="$VIRTUAL_DIR"
26308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26309    unix_path=`$CYGPATH -u "$windows_path"`
26310    VIRTUAL_DIR="$unix_path"
26311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26313    VIRTUAL_DIR="$unix_path"
26314  fi
26315
26316
26317  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26318  BOOT_JDK_SUFFIX=""
26319  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26320  if test "x$ALL_JDKS_FOUND" != x; then
26321    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26322
26323  if test "x$BOOT_JDK_FOUND" = xno; then
26324    # Now execute the test
26325
26326        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26327        if test -d "$BOOT_JDK"; then
26328          BOOT_JDK_FOUND=maybe
26329          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26330$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26331        fi
26332
26333
26334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26336      # Do we have a bin/java?
26337      if test ! -x "$BOOT_JDK/bin/java"; then
26338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26340        BOOT_JDK_FOUND=no
26341      else
26342        # Do we have a bin/javac?
26343        if test ! -x "$BOOT_JDK/bin/javac"; then
26344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26348          BOOT_JDK_FOUND=no
26349        else
26350          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26351          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26352
26353          # Extra M4 quote needed to protect [] in grep expression.
26354          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26355          if test "x$FOUND_CORRECT_VERSION" = x; then
26356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26358            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26360            BOOT_JDK_FOUND=no
26361          else
26362            # We're done! :-)
26363            BOOT_JDK_FOUND=yes
26364
26365  # Only process if variable expands to non-empty
26366
26367  if test "x$BOOT_JDK" != x; then
26368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26369
26370  # Input might be given as Windows format, start by converting to
26371  # unix format.
26372  path="$BOOT_JDK"
26373  new_path=`$CYGPATH -u "$path"`
26374
26375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26378  # "foo.exe" is OK but "foo" is an error.
26379  #
26380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26381  # It is also a way to make sure we got the proper file name for the real test later on.
26382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26383  if test "x$test_shortpath" = x; then
26384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26387  fi
26388
26389  # Call helper function which possibly converts this using DOS-style short mode.
26390  # If so, the updated path is stored in $new_path.
26391
26392  input_path="$new_path"
26393  # Check if we need to convert this using DOS-style short mode. If the path
26394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26395  # take no chances and rewrite it.
26396  # Note: m4 eats our [], so we need to use [ and ] instead.
26397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26398  if test "x$has_forbidden_chars" != x; then
26399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26403      # Going to short mode and back again did indeed matter. Since short mode is
26404      # case insensitive, let's make it lowercase to improve readability.
26405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26406      # Now convert it back to Unix-style (cygpath)
26407      input_path=`$CYGPATH -u "$shortmode_path"`
26408      new_path="$input_path"
26409    fi
26410  fi
26411
26412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26413  if test "x$test_cygdrive_prefix" = x; then
26414    # As a simple fix, exclude /usr/bin since it's not a real path.
26415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26417      # a path prefixed by /cygdrive for fixpath to work.
26418      new_path="$CYGWIN_ROOT_PATH$input_path"
26419    fi
26420  fi
26421
26422
26423  if test "x$path" != "x$new_path"; then
26424    BOOT_JDK="$new_path"
26425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26427  fi
26428
26429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26430
26431  path="$BOOT_JDK"
26432  has_colon=`$ECHO $path | $GREP ^.:`
26433  new_path="$path"
26434  if test "x$has_colon" = x; then
26435    # Not in mixed or Windows style, start by that.
26436    new_path=`cmd //c echo $path`
26437  fi
26438
26439
26440  input_path="$new_path"
26441  # Check if we need to convert this using DOS-style short mode. If the path
26442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26443  # take no chances and rewrite it.
26444  # Note: m4 eats our [], so we need to use [ and ] instead.
26445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26446  if test "x$has_forbidden_chars" != x; then
26447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26449  fi
26450
26451
26452  windows_path="$new_path"
26453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26454    unix_path=`$CYGPATH -u "$windows_path"`
26455    new_path="$unix_path"
26456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26458    new_path="$unix_path"
26459  fi
26460
26461  if test "x$path" != "x$new_path"; then
26462    BOOT_JDK="$new_path"
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26465  fi
26466
26467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26469
26470    else
26471      # We're on a unix platform. Hooray! :)
26472      path="$BOOT_JDK"
26473      has_space=`$ECHO "$path" | $GREP " "`
26474      if test "x$has_space" != x; then
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26478      fi
26479
26480      # Use eval to expand a potential ~
26481      eval path="$path"
26482      if test ! -f "$path" && test ! -d "$path"; then
26483        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26484      fi
26485
26486      if test -d "$path"; then
26487        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26488      else
26489        dir="`$DIRNAME "$path"`"
26490        base="`$BASENAME "$path"`"
26491        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26492      fi
26493    fi
26494  fi
26495
26496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26497$as_echo_n "checking for Boot JDK... " >&6; }
26498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26499$as_echo "$BOOT_JDK" >&6; }
26500            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26501$as_echo_n "checking Boot JDK version... " >&6; }
26502            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26503            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26504$as_echo "$BOOT_JDK_VERSION" >&6; }
26505          fi # end check jdk version
26506        fi # end check javac
26507      fi # end check java
26508    fi # end check boot jdk found
26509  fi
26510
26511    done
26512  fi
26513
26514  fi
26515
26516
26517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26519      # Do we have a bin/java?
26520      if test ! -x "$BOOT_JDK/bin/java"; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26523        BOOT_JDK_FOUND=no
26524      else
26525        # Do we have a bin/javac?
26526        if test ! -x "$BOOT_JDK/bin/javac"; then
26527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26531          BOOT_JDK_FOUND=no
26532        else
26533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26535
26536          # Extra M4 quote needed to protect [] in grep expression.
26537          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26538          if test "x$FOUND_CORRECT_VERSION" = x; then
26539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26543            BOOT_JDK_FOUND=no
26544          else
26545            # We're done! :-)
26546            BOOT_JDK_FOUND=yes
26547
26548  # Only process if variable expands to non-empty
26549
26550  if test "x$BOOT_JDK" != x; then
26551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552
26553  # Input might be given as Windows format, start by converting to
26554  # unix format.
26555  path="$BOOT_JDK"
26556  new_path=`$CYGPATH -u "$path"`
26557
26558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26561  # "foo.exe" is OK but "foo" is an error.
26562  #
26563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26564  # It is also a way to make sure we got the proper file name for the real test later on.
26565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26566  if test "x$test_shortpath" = x; then
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26570  fi
26571
26572  # Call helper function which possibly converts this using DOS-style short mode.
26573  # If so, the updated path is stored in $new_path.
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26586      # Going to short mode and back again did indeed matter. Since short mode is
26587      # case insensitive, let's make it lowercase to improve readability.
26588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26589      # Now convert it back to Unix-style (cygpath)
26590      input_path=`$CYGPATH -u "$shortmode_path"`
26591      new_path="$input_path"
26592    fi
26593  fi
26594
26595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26596  if test "x$test_cygdrive_prefix" = x; then
26597    # As a simple fix, exclude /usr/bin since it's not a real path.
26598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26600      # a path prefixed by /cygdrive for fixpath to work.
26601      new_path="$CYGWIN_ROOT_PATH$input_path"
26602    fi
26603  fi
26604
26605
26606  if test "x$path" != "x$new_path"; then
26607    BOOT_JDK="$new_path"
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26610  fi
26611
26612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26613
26614  path="$BOOT_JDK"
26615  has_colon=`$ECHO $path | $GREP ^.:`
26616  new_path="$path"
26617  if test "x$has_colon" = x; then
26618    # Not in mixed or Windows style, start by that.
26619    new_path=`cmd //c echo $path`
26620  fi
26621
26622
26623  input_path="$new_path"
26624  # Check if we need to convert this using DOS-style short mode. If the path
26625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626  # take no chances and rewrite it.
26627  # Note: m4 eats our [], so we need to use [ and ] instead.
26628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26629  if test "x$has_forbidden_chars" != x; then
26630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26632  fi
26633
26634
26635  windows_path="$new_path"
26636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26637    unix_path=`$CYGPATH -u "$windows_path"`
26638    new_path="$unix_path"
26639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26641    new_path="$unix_path"
26642  fi
26643
26644  if test "x$path" != "x$new_path"; then
26645    BOOT_JDK="$new_path"
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26648  fi
26649
26650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26652
26653    else
26654      # We're on a unix platform. Hooray! :)
26655      path="$BOOT_JDK"
26656      has_space=`$ECHO "$path" | $GREP " "`
26657      if test "x$has_space" != x; then
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26661      fi
26662
26663      # Use eval to expand a potential ~
26664      eval path="$path"
26665      if test ! -f "$path" && test ! -d "$path"; then
26666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26667      fi
26668
26669      if test -d "$path"; then
26670        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26671      else
26672        dir="`$DIRNAME "$path"`"
26673        base="`$BASENAME "$path"`"
26674        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26675      fi
26676    fi
26677  fi
26678
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26680$as_echo_n "checking for Boot JDK... " >&6; }
26681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26682$as_echo "$BOOT_JDK" >&6; }
26683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26684$as_echo_n "checking Boot JDK version... " >&6; }
26685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26687$as_echo "$BOOT_JDK_VERSION" >&6; }
26688          fi # end check jdk version
26689        fi # end check javac
26690      fi # end check java
26691    fi # end check boot jdk found
26692  fi
26693
26694
26695  if test "x$BOOT_JDK_FOUND" = xno; then
26696    # Now execute the test
26697
26698  if test "x$ProgramFiles" != x; then
26699    VIRTUAL_DIR="$ProgramFiles/Java"
26700
26701  windows_path="$VIRTUAL_DIR"
26702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26703    unix_path=`$CYGPATH -u "$windows_path"`
26704    VIRTUAL_DIR="$unix_path"
26705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26707    VIRTUAL_DIR="$unix_path"
26708  fi
26709
26710
26711  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26712  BOOT_JDK_SUFFIX=""
26713  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26714  if test "x$ALL_JDKS_FOUND" != x; then
26715    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26716
26717  if test "x$BOOT_JDK_FOUND" = xno; then
26718    # Now execute the test
26719
26720        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26721        if test -d "$BOOT_JDK"; then
26722          BOOT_JDK_FOUND=maybe
26723          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26724$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26725        fi
26726
26727
26728    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26729    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26730      # Do we have a bin/java?
26731      if test ! -x "$BOOT_JDK/bin/java"; then
26732        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26734        BOOT_JDK_FOUND=no
26735      else
26736        # Do we have a bin/javac?
26737        if test ! -x "$BOOT_JDK/bin/javac"; then
26738          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26740          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26741$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26742          BOOT_JDK_FOUND=no
26743        else
26744          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26745          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26746
26747          # Extra M4 quote needed to protect [] in grep expression.
26748          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26749          if test "x$FOUND_CORRECT_VERSION" = x; then
26750            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26752            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26753$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26754            BOOT_JDK_FOUND=no
26755          else
26756            # We're done! :-)
26757            BOOT_JDK_FOUND=yes
26758
26759  # Only process if variable expands to non-empty
26760
26761  if test "x$BOOT_JDK" != x; then
26762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26763
26764  # Input might be given as Windows format, start by converting to
26765  # unix format.
26766  path="$BOOT_JDK"
26767  new_path=`$CYGPATH -u "$path"`
26768
26769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26772  # "foo.exe" is OK but "foo" is an error.
26773  #
26774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26775  # It is also a way to make sure we got the proper file name for the real test later on.
26776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26777  if test "x$test_shortpath" = x; then
26778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26780    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26781  fi
26782
26783  # Call helper function which possibly converts this using DOS-style short mode.
26784  # If so, the updated path is stored in $new_path.
26785
26786  input_path="$new_path"
26787  # Check if we need to convert this using DOS-style short mode. If the path
26788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26789  # take no chances and rewrite it.
26790  # Note: m4 eats our [], so we need to use [ and ] instead.
26791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26792  if test "x$has_forbidden_chars" != x; then
26793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26797      # Going to short mode and back again did indeed matter. Since short mode is
26798      # case insensitive, let's make it lowercase to improve readability.
26799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26800      # Now convert it back to Unix-style (cygpath)
26801      input_path=`$CYGPATH -u "$shortmode_path"`
26802      new_path="$input_path"
26803    fi
26804  fi
26805
26806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26807  if test "x$test_cygdrive_prefix" = x; then
26808    # As a simple fix, exclude /usr/bin since it's not a real path.
26809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26811      # a path prefixed by /cygdrive for fixpath to work.
26812      new_path="$CYGWIN_ROOT_PATH$input_path"
26813    fi
26814  fi
26815
26816
26817  if test "x$path" != "x$new_path"; then
26818    BOOT_JDK="$new_path"
26819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26821  fi
26822
26823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26824
26825  path="$BOOT_JDK"
26826  has_colon=`$ECHO $path | $GREP ^.:`
26827  new_path="$path"
26828  if test "x$has_colon" = x; then
26829    # Not in mixed or Windows style, start by that.
26830    new_path=`cmd //c echo $path`
26831  fi
26832
26833
26834  input_path="$new_path"
26835  # Check if we need to convert this using DOS-style short mode. If the path
26836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26837  # take no chances and rewrite it.
26838  # Note: m4 eats our [], so we need to use [ and ] instead.
26839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26840  if test "x$has_forbidden_chars" != x; then
26841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26843  fi
26844
26845
26846  windows_path="$new_path"
26847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26848    unix_path=`$CYGPATH -u "$windows_path"`
26849    new_path="$unix_path"
26850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26852    new_path="$unix_path"
26853  fi
26854
26855  if test "x$path" != "x$new_path"; then
26856    BOOT_JDK="$new_path"
26857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26859  fi
26860
26861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26863
26864    else
26865      # We're on a unix platform. Hooray! :)
26866      path="$BOOT_JDK"
26867      has_space=`$ECHO "$path" | $GREP " "`
26868      if test "x$has_space" != x; then
26869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26872      fi
26873
26874      # Use eval to expand a potential ~
26875      eval path="$path"
26876      if test ! -f "$path" && test ! -d "$path"; then
26877        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26878      fi
26879
26880      if test -d "$path"; then
26881        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26882      else
26883        dir="`$DIRNAME "$path"`"
26884        base="`$BASENAME "$path"`"
26885        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26886      fi
26887    fi
26888  fi
26889
26890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26891$as_echo_n "checking for Boot JDK... " >&6; }
26892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26893$as_echo "$BOOT_JDK" >&6; }
26894            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26895$as_echo_n "checking Boot JDK version... " >&6; }
26896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26898$as_echo "$BOOT_JDK_VERSION" >&6; }
26899          fi # end check jdk version
26900        fi # end check javac
26901      fi # end check java
26902    fi # end check boot jdk found
26903  fi
26904
26905    done
26906  fi
26907
26908  fi
26909
26910
26911    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26912    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26913      # Do we have a bin/java?
26914      if test ! -x "$BOOT_JDK/bin/java"; then
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26917        BOOT_JDK_FOUND=no
26918      else
26919        # Do we have a bin/javac?
26920        if test ! -x "$BOOT_JDK/bin/javac"; then
26921          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26923          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26924$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26925          BOOT_JDK_FOUND=no
26926        else
26927          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26928          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26929
26930          # Extra M4 quote needed to protect [] in grep expression.
26931          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26932          if test "x$FOUND_CORRECT_VERSION" = x; then
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26935            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26936$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26937            BOOT_JDK_FOUND=no
26938          else
26939            # We're done! :-)
26940            BOOT_JDK_FOUND=yes
26941
26942  # Only process if variable expands to non-empty
26943
26944  if test "x$BOOT_JDK" != x; then
26945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946
26947  # Input might be given as Windows format, start by converting to
26948  # unix format.
26949  path="$BOOT_JDK"
26950  new_path=`$CYGPATH -u "$path"`
26951
26952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26955  # "foo.exe" is OK but "foo" is an error.
26956  #
26957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26958  # It is also a way to make sure we got the proper file name for the real test later on.
26959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26960  if test "x$test_shortpath" = x; then
26961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26963    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26964  fi
26965
26966  # Call helper function which possibly converts this using DOS-style short mode.
26967  # If so, the updated path is stored in $new_path.
26968
26969  input_path="$new_path"
26970  # Check if we need to convert this using DOS-style short mode. If the path
26971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26972  # take no chances and rewrite it.
26973  # Note: m4 eats our [], so we need to use [ and ] instead.
26974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26975  if test "x$has_forbidden_chars" != x; then
26976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26980      # Going to short mode and back again did indeed matter. Since short mode is
26981      # case insensitive, let's make it lowercase to improve readability.
26982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983      # Now convert it back to Unix-style (cygpath)
26984      input_path=`$CYGPATH -u "$shortmode_path"`
26985      new_path="$input_path"
26986    fi
26987  fi
26988
26989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26990  if test "x$test_cygdrive_prefix" = x; then
26991    # As a simple fix, exclude /usr/bin since it's not a real path.
26992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26994      # a path prefixed by /cygdrive for fixpath to work.
26995      new_path="$CYGWIN_ROOT_PATH$input_path"
26996    fi
26997  fi
26998
26999
27000  if test "x$path" != "x$new_path"; then
27001    BOOT_JDK="$new_path"
27002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27004  fi
27005
27006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27007
27008  path="$BOOT_JDK"
27009  has_colon=`$ECHO $path | $GREP ^.:`
27010  new_path="$path"
27011  if test "x$has_colon" = x; then
27012    # Not in mixed or Windows style, start by that.
27013    new_path=`cmd //c echo $path`
27014  fi
27015
27016
27017  input_path="$new_path"
27018  # Check if we need to convert this using DOS-style short mode. If the path
27019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27020  # take no chances and rewrite it.
27021  # Note: m4 eats our [], so we need to use [ and ] instead.
27022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27023  if test "x$has_forbidden_chars" != x; then
27024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27026  fi
27027
27028
27029  windows_path="$new_path"
27030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031    unix_path=`$CYGPATH -u "$windows_path"`
27032    new_path="$unix_path"
27033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27035    new_path="$unix_path"
27036  fi
27037
27038  if test "x$path" != "x$new_path"; then
27039    BOOT_JDK="$new_path"
27040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27042  fi
27043
27044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27046
27047    else
27048      # We're on a unix platform. Hooray! :)
27049      path="$BOOT_JDK"
27050      has_space=`$ECHO "$path" | $GREP " "`
27051      if test "x$has_space" != x; then
27052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27055      fi
27056
27057      # Use eval to expand a potential ~
27058      eval path="$path"
27059      if test ! -f "$path" && test ! -d "$path"; then
27060        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27061      fi
27062
27063      if test -d "$path"; then
27064        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27065      else
27066        dir="`$DIRNAME "$path"`"
27067        base="`$BASENAME "$path"`"
27068        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27069      fi
27070    fi
27071  fi
27072
27073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27074$as_echo_n "checking for Boot JDK... " >&6; }
27075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27076$as_echo "$BOOT_JDK" >&6; }
27077            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27078$as_echo_n "checking Boot JDK version... " >&6; }
27079            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27081$as_echo "$BOOT_JDK_VERSION" >&6; }
27082          fi # end check jdk version
27083        fi # end check javac
27084      fi # end check java
27085    fi # end check boot jdk found
27086  fi
27087
27088
27089  if test "x$BOOT_JDK_FOUND" = xno; then
27090    # Now execute the test
27091
27092  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27093  BOOT_JDK_SUFFIX=""
27094  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27095  if test "x$ALL_JDKS_FOUND" != x; then
27096    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27097
27098  if test "x$BOOT_JDK_FOUND" = xno; then
27099    # Now execute the test
27100
27101        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27102        if test -d "$BOOT_JDK"; then
27103          BOOT_JDK_FOUND=maybe
27104          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27105$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27106        fi
27107
27108
27109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27111      # Do we have a bin/java?
27112      if test ! -x "$BOOT_JDK/bin/java"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27115        BOOT_JDK_FOUND=no
27116      else
27117        # Do we have a bin/javac?
27118        if test ! -x "$BOOT_JDK/bin/javac"; then
27119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27123          BOOT_JDK_FOUND=no
27124        else
27125          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27126          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27127
27128          # Extra M4 quote needed to protect [] in grep expression.
27129          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27130          if test "x$FOUND_CORRECT_VERSION" = x; then
27131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27133            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27134$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27135            BOOT_JDK_FOUND=no
27136          else
27137            # We're done! :-)
27138            BOOT_JDK_FOUND=yes
27139
27140  # Only process if variable expands to non-empty
27141
27142  if test "x$BOOT_JDK" != x; then
27143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144
27145  # Input might be given as Windows format, start by converting to
27146  # unix format.
27147  path="$BOOT_JDK"
27148  new_path=`$CYGPATH -u "$path"`
27149
27150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27153  # "foo.exe" is OK but "foo" is an error.
27154  #
27155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27156  # It is also a way to make sure we got the proper file name for the real test later on.
27157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27158  if test "x$test_shortpath" = x; then
27159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27162  fi
27163
27164  # Call helper function which possibly converts this using DOS-style short mode.
27165  # If so, the updated path is stored in $new_path.
27166
27167  input_path="$new_path"
27168  # Check if we need to convert this using DOS-style short mode. If the path
27169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27170  # take no chances and rewrite it.
27171  # Note: m4 eats our [], so we need to use [ and ] instead.
27172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27173  if test "x$has_forbidden_chars" != x; then
27174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27178      # Going to short mode and back again did indeed matter. Since short mode is
27179      # case insensitive, let's make it lowercase to improve readability.
27180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27181      # Now convert it back to Unix-style (cygpath)
27182      input_path=`$CYGPATH -u "$shortmode_path"`
27183      new_path="$input_path"
27184    fi
27185  fi
27186
27187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27188  if test "x$test_cygdrive_prefix" = x; then
27189    # As a simple fix, exclude /usr/bin since it's not a real path.
27190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27192      # a path prefixed by /cygdrive for fixpath to work.
27193      new_path="$CYGWIN_ROOT_PATH$input_path"
27194    fi
27195  fi
27196
27197
27198  if test "x$path" != "x$new_path"; then
27199    BOOT_JDK="$new_path"
27200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27202  fi
27203
27204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205
27206  path="$BOOT_JDK"
27207  has_colon=`$ECHO $path | $GREP ^.:`
27208  new_path="$path"
27209  if test "x$has_colon" = x; then
27210    # Not in mixed or Windows style, start by that.
27211    new_path=`cmd //c echo $path`
27212  fi
27213
27214
27215  input_path="$new_path"
27216  # Check if we need to convert this using DOS-style short mode. If the path
27217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27218  # take no chances and rewrite it.
27219  # Note: m4 eats our [], so we need to use [ and ] instead.
27220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27221  if test "x$has_forbidden_chars" != x; then
27222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27224  fi
27225
27226
27227  windows_path="$new_path"
27228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229    unix_path=`$CYGPATH -u "$windows_path"`
27230    new_path="$unix_path"
27231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27233    new_path="$unix_path"
27234  fi
27235
27236  if test "x$path" != "x$new_path"; then
27237    BOOT_JDK="$new_path"
27238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27240  fi
27241
27242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27244
27245    else
27246      # We're on a unix platform. Hooray! :)
27247      path="$BOOT_JDK"
27248      has_space=`$ECHO "$path" | $GREP " "`
27249      if test "x$has_space" != x; then
27250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27253      fi
27254
27255      # Use eval to expand a potential ~
27256      eval path="$path"
27257      if test ! -f "$path" && test ! -d "$path"; then
27258        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27259      fi
27260
27261      if test -d "$path"; then
27262        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27263      else
27264        dir="`$DIRNAME "$path"`"
27265        base="`$BASENAME "$path"`"
27266        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27267      fi
27268    fi
27269  fi
27270
27271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27272$as_echo_n "checking for Boot JDK... " >&6; }
27273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27274$as_echo "$BOOT_JDK" >&6; }
27275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27276$as_echo_n "checking Boot JDK version... " >&6; }
27277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27279$as_echo "$BOOT_JDK_VERSION" >&6; }
27280          fi # end check jdk version
27281        fi # end check javac
27282      fi # end check java
27283    fi # end check boot jdk found
27284  fi
27285
27286    done
27287  fi
27288
27289
27290    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27291    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27292      # Do we have a bin/java?
27293      if test ! -x "$BOOT_JDK/bin/java"; then
27294        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27296        BOOT_JDK_FOUND=no
27297      else
27298        # Do we have a bin/javac?
27299        if test ! -x "$BOOT_JDK/bin/javac"; then
27300          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27302          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27303$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27304          BOOT_JDK_FOUND=no
27305        else
27306          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27307          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27308
27309          # Extra M4 quote needed to protect [] in grep expression.
27310          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27311          if test "x$FOUND_CORRECT_VERSION" = x; then
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27314            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27315$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27316            BOOT_JDK_FOUND=no
27317          else
27318            # We're done! :-)
27319            BOOT_JDK_FOUND=yes
27320
27321  # Only process if variable expands to non-empty
27322
27323  if test "x$BOOT_JDK" != x; then
27324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27325
27326  # Input might be given as Windows format, start by converting to
27327  # unix format.
27328  path="$BOOT_JDK"
27329  new_path=`$CYGPATH -u "$path"`
27330
27331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27334  # "foo.exe" is OK but "foo" is an error.
27335  #
27336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27337  # It is also a way to make sure we got the proper file name for the real test later on.
27338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27339  if test "x$test_shortpath" = x; then
27340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27342    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27343  fi
27344
27345  # Call helper function which possibly converts this using DOS-style short mode.
27346  # If so, the updated path is stored in $new_path.
27347
27348  input_path="$new_path"
27349  # Check if we need to convert this using DOS-style short mode. If the path
27350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27351  # take no chances and rewrite it.
27352  # Note: m4 eats our [], so we need to use [ and ] instead.
27353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27354  if test "x$has_forbidden_chars" != x; then
27355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27359      # Going to short mode and back again did indeed matter. Since short mode is
27360      # case insensitive, let's make it lowercase to improve readability.
27361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27362      # Now convert it back to Unix-style (cygpath)
27363      input_path=`$CYGPATH -u "$shortmode_path"`
27364      new_path="$input_path"
27365    fi
27366  fi
27367
27368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27369  if test "x$test_cygdrive_prefix" = x; then
27370    # As a simple fix, exclude /usr/bin since it's not a real path.
27371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27373      # a path prefixed by /cygdrive for fixpath to work.
27374      new_path="$CYGWIN_ROOT_PATH$input_path"
27375    fi
27376  fi
27377
27378
27379  if test "x$path" != "x$new_path"; then
27380    BOOT_JDK="$new_path"
27381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27382$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27383  fi
27384
27385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27386
27387  path="$BOOT_JDK"
27388  has_colon=`$ECHO $path | $GREP ^.:`
27389  new_path="$path"
27390  if test "x$has_colon" = x; then
27391    # Not in mixed or Windows style, start by that.
27392    new_path=`cmd //c echo $path`
27393  fi
27394
27395
27396  input_path="$new_path"
27397  # Check if we need to convert this using DOS-style short mode. If the path
27398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27399  # take no chances and rewrite it.
27400  # Note: m4 eats our [], so we need to use [ and ] instead.
27401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27402  if test "x$has_forbidden_chars" != x; then
27403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27405  fi
27406
27407
27408  windows_path="$new_path"
27409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27410    unix_path=`$CYGPATH -u "$windows_path"`
27411    new_path="$unix_path"
27412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27414    new_path="$unix_path"
27415  fi
27416
27417  if test "x$path" != "x$new_path"; then
27418    BOOT_JDK="$new_path"
27419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27421  fi
27422
27423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27425
27426    else
27427      # We're on a unix platform. Hooray! :)
27428      path="$BOOT_JDK"
27429      has_space=`$ECHO "$path" | $GREP " "`
27430      if test "x$has_space" != x; then
27431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27432$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27434      fi
27435
27436      # Use eval to expand a potential ~
27437      eval path="$path"
27438      if test ! -f "$path" && test ! -d "$path"; then
27439        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27440      fi
27441
27442      if test -d "$path"; then
27443        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27444      else
27445        dir="`$DIRNAME "$path"`"
27446        base="`$BASENAME "$path"`"
27447        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27448      fi
27449    fi
27450  fi
27451
27452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27453$as_echo_n "checking for Boot JDK... " >&6; }
27454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27455$as_echo "$BOOT_JDK" >&6; }
27456            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27457$as_echo_n "checking Boot JDK version... " >&6; }
27458            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27460$as_echo "$BOOT_JDK_VERSION" >&6; }
27461          fi # end check jdk version
27462        fi # end check javac
27463      fi # end check java
27464    fi # end check boot jdk found
27465  fi
27466
27467  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27468
27469  if test "x$BOOT_JDK_FOUND" = xno; then
27470    # Now execute the test
27471
27472  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27473  BOOT_JDK_SUFFIX="/Contents/Home"
27474  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27475  if test "x$ALL_JDKS_FOUND" != x; then
27476    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27477
27478  if test "x$BOOT_JDK_FOUND" = xno; then
27479    # Now execute the test
27480
27481        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27482        if test -d "$BOOT_JDK"; then
27483          BOOT_JDK_FOUND=maybe
27484          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27485$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27486        fi
27487
27488
27489    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27490    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27491      # Do we have a bin/java?
27492      if test ! -x "$BOOT_JDK/bin/java"; then
27493        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27495        BOOT_JDK_FOUND=no
27496      else
27497        # Do we have a bin/javac?
27498        if test ! -x "$BOOT_JDK/bin/javac"; then
27499          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27501          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27502$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27503          BOOT_JDK_FOUND=no
27504        else
27505          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27506          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27507
27508          # Extra M4 quote needed to protect [] in grep expression.
27509          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27510          if test "x$FOUND_CORRECT_VERSION" = x; then
27511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27513            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27514$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27515            BOOT_JDK_FOUND=no
27516          else
27517            # We're done! :-)
27518            BOOT_JDK_FOUND=yes
27519
27520  # Only process if variable expands to non-empty
27521
27522  if test "x$BOOT_JDK" != x; then
27523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27524
27525  # Input might be given as Windows format, start by converting to
27526  # unix format.
27527  path="$BOOT_JDK"
27528  new_path=`$CYGPATH -u "$path"`
27529
27530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27533  # "foo.exe" is OK but "foo" is an error.
27534  #
27535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27536  # It is also a way to make sure we got the proper file name for the real test later on.
27537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27538  if test "x$test_shortpath" = x; then
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27542  fi
27543
27544  # Call helper function which possibly converts this using DOS-style short mode.
27545  # If so, the updated path is stored in $new_path.
27546
27547  input_path="$new_path"
27548  # Check if we need to convert this using DOS-style short mode. If the path
27549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27550  # take no chances and rewrite it.
27551  # Note: m4 eats our [], so we need to use [ and ] instead.
27552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27553  if test "x$has_forbidden_chars" != x; then
27554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27558      # Going to short mode and back again did indeed matter. Since short mode is
27559      # case insensitive, let's make it lowercase to improve readability.
27560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27561      # Now convert it back to Unix-style (cygpath)
27562      input_path=`$CYGPATH -u "$shortmode_path"`
27563      new_path="$input_path"
27564    fi
27565  fi
27566
27567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27568  if test "x$test_cygdrive_prefix" = x; then
27569    # As a simple fix, exclude /usr/bin since it's not a real path.
27570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27572      # a path prefixed by /cygdrive for fixpath to work.
27573      new_path="$CYGWIN_ROOT_PATH$input_path"
27574    fi
27575  fi
27576
27577
27578  if test "x$path" != "x$new_path"; then
27579    BOOT_JDK="$new_path"
27580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27582  fi
27583
27584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27585
27586  path="$BOOT_JDK"
27587  has_colon=`$ECHO $path | $GREP ^.:`
27588  new_path="$path"
27589  if test "x$has_colon" = x; then
27590    # Not in mixed or Windows style, start by that.
27591    new_path=`cmd //c echo $path`
27592  fi
27593
27594
27595  input_path="$new_path"
27596  # Check if we need to convert this using DOS-style short mode. If the path
27597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27598  # take no chances and rewrite it.
27599  # Note: m4 eats our [], so we need to use [ and ] instead.
27600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27601  if test "x$has_forbidden_chars" != x; then
27602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27604  fi
27605
27606
27607  windows_path="$new_path"
27608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27609    unix_path=`$CYGPATH -u "$windows_path"`
27610    new_path="$unix_path"
27611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27613    new_path="$unix_path"
27614  fi
27615
27616  if test "x$path" != "x$new_path"; then
27617    BOOT_JDK="$new_path"
27618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27620  fi
27621
27622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27624
27625    else
27626      # We're on a unix platform. Hooray! :)
27627      path="$BOOT_JDK"
27628      has_space=`$ECHO "$path" | $GREP " "`
27629      if test "x$has_space" != x; then
27630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27633      fi
27634
27635      # Use eval to expand a potential ~
27636      eval path="$path"
27637      if test ! -f "$path" && test ! -d "$path"; then
27638        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27639      fi
27640
27641      if test -d "$path"; then
27642        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27643      else
27644        dir="`$DIRNAME "$path"`"
27645        base="`$BASENAME "$path"`"
27646        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27647      fi
27648    fi
27649  fi
27650
27651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27652$as_echo_n "checking for Boot JDK... " >&6; }
27653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27654$as_echo "$BOOT_JDK" >&6; }
27655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27656$as_echo_n "checking Boot JDK version... " >&6; }
27657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27659$as_echo "$BOOT_JDK_VERSION" >&6; }
27660          fi # end check jdk version
27661        fi # end check javac
27662      fi # end check java
27663    fi # end check boot jdk found
27664  fi
27665
27666    done
27667  fi
27668
27669
27670    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27671    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27672      # Do we have a bin/java?
27673      if test ! -x "$BOOT_JDK/bin/java"; then
27674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27676        BOOT_JDK_FOUND=no
27677      else
27678        # Do we have a bin/javac?
27679        if test ! -x "$BOOT_JDK/bin/javac"; then
27680          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27682          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27683$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27684          BOOT_JDK_FOUND=no
27685        else
27686          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27687          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27688
27689          # Extra M4 quote needed to protect [] in grep expression.
27690          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27691          if test "x$FOUND_CORRECT_VERSION" = x; then
27692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27694            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27695$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27696            BOOT_JDK_FOUND=no
27697          else
27698            # We're done! :-)
27699            BOOT_JDK_FOUND=yes
27700
27701  # Only process if variable expands to non-empty
27702
27703  if test "x$BOOT_JDK" != x; then
27704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27705
27706  # Input might be given as Windows format, start by converting to
27707  # unix format.
27708  path="$BOOT_JDK"
27709  new_path=`$CYGPATH -u "$path"`
27710
27711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27714  # "foo.exe" is OK but "foo" is an error.
27715  #
27716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27717  # It is also a way to make sure we got the proper file name for the real test later on.
27718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27719  if test "x$test_shortpath" = x; then
27720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27722    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27723  fi
27724
27725  # Call helper function which possibly converts this using DOS-style short mode.
27726  # If so, the updated path is stored in $new_path.
27727
27728  input_path="$new_path"
27729  # Check if we need to convert this using DOS-style short mode. If the path
27730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27731  # take no chances and rewrite it.
27732  # Note: m4 eats our [], so we need to use [ and ] instead.
27733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27734  if test "x$has_forbidden_chars" != x; then
27735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27739      # Going to short mode and back again did indeed matter. Since short mode is
27740      # case insensitive, let's make it lowercase to improve readability.
27741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27742      # Now convert it back to Unix-style (cygpath)
27743      input_path=`$CYGPATH -u "$shortmode_path"`
27744      new_path="$input_path"
27745    fi
27746  fi
27747
27748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27749  if test "x$test_cygdrive_prefix" = x; then
27750    # As a simple fix, exclude /usr/bin since it's not a real path.
27751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27753      # a path prefixed by /cygdrive for fixpath to work.
27754      new_path="$CYGWIN_ROOT_PATH$input_path"
27755    fi
27756  fi
27757
27758
27759  if test "x$path" != "x$new_path"; then
27760    BOOT_JDK="$new_path"
27761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27762$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27763  fi
27764
27765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766
27767  path="$BOOT_JDK"
27768  has_colon=`$ECHO $path | $GREP ^.:`
27769  new_path="$path"
27770  if test "x$has_colon" = x; then
27771    # Not in mixed or Windows style, start by that.
27772    new_path=`cmd //c echo $path`
27773  fi
27774
27775
27776  input_path="$new_path"
27777  # Check if we need to convert this using DOS-style short mode. If the path
27778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27779  # take no chances and rewrite it.
27780  # Note: m4 eats our [], so we need to use [ and ] instead.
27781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27782  if test "x$has_forbidden_chars" != x; then
27783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27785  fi
27786
27787
27788  windows_path="$new_path"
27789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27790    unix_path=`$CYGPATH -u "$windows_path"`
27791    new_path="$unix_path"
27792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27794    new_path="$unix_path"
27795  fi
27796
27797  if test "x$path" != "x$new_path"; then
27798    BOOT_JDK="$new_path"
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27801  fi
27802
27803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27805
27806    else
27807      # We're on a unix platform. Hooray! :)
27808      path="$BOOT_JDK"
27809      has_space=`$ECHO "$path" | $GREP " "`
27810      if test "x$has_space" != x; then
27811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27814      fi
27815
27816      # Use eval to expand a potential ~
27817      eval path="$path"
27818      if test ! -f "$path" && test ! -d "$path"; then
27819        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27820      fi
27821
27822      if test -d "$path"; then
27823        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27824      else
27825        dir="`$DIRNAME "$path"`"
27826        base="`$BASENAME "$path"`"
27827        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27828      fi
27829    fi
27830  fi
27831
27832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27833$as_echo_n "checking for Boot JDK... " >&6; }
27834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27835$as_echo "$BOOT_JDK" >&6; }
27836            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27837$as_echo_n "checking Boot JDK version... " >&6; }
27838            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27840$as_echo "$BOOT_JDK_VERSION" >&6; }
27841          fi # end check jdk version
27842        fi # end check javac
27843      fi # end check java
27844    fi # end check boot jdk found
27845  fi
27846
27847
27848  if test "x$BOOT_JDK_FOUND" = xno; then
27849    # Now execute the test
27850
27851  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27852  BOOT_JDK_SUFFIX="/Contents/Home"
27853  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27854  if test "x$ALL_JDKS_FOUND" != x; then
27855    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27856
27857  if test "x$BOOT_JDK_FOUND" = xno; then
27858    # Now execute the test
27859
27860        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27861        if test -d "$BOOT_JDK"; then
27862          BOOT_JDK_FOUND=maybe
27863          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27864$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27865        fi
27866
27867
27868    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27869    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27870      # Do we have a bin/java?
27871      if test ! -x "$BOOT_JDK/bin/java"; then
27872        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27874        BOOT_JDK_FOUND=no
27875      else
27876        # Do we have a bin/javac?
27877        if test ! -x "$BOOT_JDK/bin/javac"; then
27878          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27880          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27881$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27882          BOOT_JDK_FOUND=no
27883        else
27884          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27885          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27886
27887          # Extra M4 quote needed to protect [] in grep expression.
27888          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27889          if test "x$FOUND_CORRECT_VERSION" = x; then
27890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27892            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27893$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27894            BOOT_JDK_FOUND=no
27895          else
27896            # We're done! :-)
27897            BOOT_JDK_FOUND=yes
27898
27899  # Only process if variable expands to non-empty
27900
27901  if test "x$BOOT_JDK" != x; then
27902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903
27904  # Input might be given as Windows format, start by converting to
27905  # unix format.
27906  path="$BOOT_JDK"
27907  new_path=`$CYGPATH -u "$path"`
27908
27909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27912  # "foo.exe" is OK but "foo" is an error.
27913  #
27914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27915  # It is also a way to make sure we got the proper file name for the real test later on.
27916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27917  if test "x$test_shortpath" = x; then
27918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27920    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27921  fi
27922
27923  # Call helper function which possibly converts this using DOS-style short mode.
27924  # If so, the updated path is stored in $new_path.
27925
27926  input_path="$new_path"
27927  # Check if we need to convert this using DOS-style short mode. If the path
27928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27929  # take no chances and rewrite it.
27930  # Note: m4 eats our [], so we need to use [ and ] instead.
27931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27932  if test "x$has_forbidden_chars" != x; then
27933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27937      # Going to short mode and back again did indeed matter. Since short mode is
27938      # case insensitive, let's make it lowercase to improve readability.
27939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27940      # Now convert it back to Unix-style (cygpath)
27941      input_path=`$CYGPATH -u "$shortmode_path"`
27942      new_path="$input_path"
27943    fi
27944  fi
27945
27946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27947  if test "x$test_cygdrive_prefix" = x; then
27948    # As a simple fix, exclude /usr/bin since it's not a real path.
27949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27951      # a path prefixed by /cygdrive for fixpath to work.
27952      new_path="$CYGWIN_ROOT_PATH$input_path"
27953    fi
27954  fi
27955
27956
27957  if test "x$path" != "x$new_path"; then
27958    BOOT_JDK="$new_path"
27959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27960$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27961  fi
27962
27963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27964
27965  path="$BOOT_JDK"
27966  has_colon=`$ECHO $path | $GREP ^.:`
27967  new_path="$path"
27968  if test "x$has_colon" = x; then
27969    # Not in mixed or Windows style, start by that.
27970    new_path=`cmd //c echo $path`
27971  fi
27972
27973
27974  input_path="$new_path"
27975  # Check if we need to convert this using DOS-style short mode. If the path
27976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27977  # take no chances and rewrite it.
27978  # Note: m4 eats our [], so we need to use [ and ] instead.
27979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27980  if test "x$has_forbidden_chars" != x; then
27981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27983  fi
27984
27985
27986  windows_path="$new_path"
27987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27988    unix_path=`$CYGPATH -u "$windows_path"`
27989    new_path="$unix_path"
27990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27992    new_path="$unix_path"
27993  fi
27994
27995  if test "x$path" != "x$new_path"; then
27996    BOOT_JDK="$new_path"
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27999  fi
28000
28001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28003
28004    else
28005      # We're on a unix platform. Hooray! :)
28006      path="$BOOT_JDK"
28007      has_space=`$ECHO "$path" | $GREP " "`
28008      if test "x$has_space" != x; then
28009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28011        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28012      fi
28013
28014      # Use eval to expand a potential ~
28015      eval path="$path"
28016      if test ! -f "$path" && test ! -d "$path"; then
28017        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28018      fi
28019
28020      if test -d "$path"; then
28021        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28022      else
28023        dir="`$DIRNAME "$path"`"
28024        base="`$BASENAME "$path"`"
28025        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28026      fi
28027    fi
28028  fi
28029
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28031$as_echo_n "checking for Boot JDK... " >&6; }
28032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28033$as_echo "$BOOT_JDK" >&6; }
28034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28035$as_echo_n "checking Boot JDK version... " >&6; }
28036            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28038$as_echo "$BOOT_JDK_VERSION" >&6; }
28039          fi # end check jdk version
28040        fi # end check javac
28041      fi # end check java
28042    fi # end check boot jdk found
28043  fi
28044
28045    done
28046  fi
28047
28048
28049    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28050    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28051      # Do we have a bin/java?
28052      if test ! -x "$BOOT_JDK/bin/java"; then
28053        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28055        BOOT_JDK_FOUND=no
28056      else
28057        # Do we have a bin/javac?
28058        if test ! -x "$BOOT_JDK/bin/javac"; then
28059          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28061          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28062$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28063          BOOT_JDK_FOUND=no
28064        else
28065          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28066          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28067
28068          # Extra M4 quote needed to protect [] in grep expression.
28069          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28070          if test "x$FOUND_CORRECT_VERSION" = x; then
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28073            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28074$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28075            BOOT_JDK_FOUND=no
28076          else
28077            # We're done! :-)
28078            BOOT_JDK_FOUND=yes
28079
28080  # Only process if variable expands to non-empty
28081
28082  if test "x$BOOT_JDK" != x; then
28083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28084
28085  # Input might be given as Windows format, start by converting to
28086  # unix format.
28087  path="$BOOT_JDK"
28088  new_path=`$CYGPATH -u "$path"`
28089
28090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28093  # "foo.exe" is OK but "foo" is an error.
28094  #
28095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28096  # It is also a way to make sure we got the proper file name for the real test later on.
28097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28098  if test "x$test_shortpath" = x; then
28099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28102  fi
28103
28104  # Call helper function which possibly converts this using DOS-style short mode.
28105  # If so, the updated path is stored in $new_path.
28106
28107  input_path="$new_path"
28108  # Check if we need to convert this using DOS-style short mode. If the path
28109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28110  # take no chances and rewrite it.
28111  # Note: m4 eats our [], so we need to use [ and ] instead.
28112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28113  if test "x$has_forbidden_chars" != x; then
28114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28118      # Going to short mode and back again did indeed matter. Since short mode is
28119      # case insensitive, let's make it lowercase to improve readability.
28120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28121      # Now convert it back to Unix-style (cygpath)
28122      input_path=`$CYGPATH -u "$shortmode_path"`
28123      new_path="$input_path"
28124    fi
28125  fi
28126
28127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28128  if test "x$test_cygdrive_prefix" = x; then
28129    # As a simple fix, exclude /usr/bin since it's not a real path.
28130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28132      # a path prefixed by /cygdrive for fixpath to work.
28133      new_path="$CYGWIN_ROOT_PATH$input_path"
28134    fi
28135  fi
28136
28137
28138  if test "x$path" != "x$new_path"; then
28139    BOOT_JDK="$new_path"
28140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28142  fi
28143
28144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28145
28146  path="$BOOT_JDK"
28147  has_colon=`$ECHO $path | $GREP ^.:`
28148  new_path="$path"
28149  if test "x$has_colon" = x; then
28150    # Not in mixed or Windows style, start by that.
28151    new_path=`cmd //c echo $path`
28152  fi
28153
28154
28155  input_path="$new_path"
28156  # Check if we need to convert this using DOS-style short mode. If the path
28157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28158  # take no chances and rewrite it.
28159  # Note: m4 eats our [], so we need to use [ and ] instead.
28160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28161  if test "x$has_forbidden_chars" != x; then
28162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28164  fi
28165
28166
28167  windows_path="$new_path"
28168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28169    unix_path=`$CYGPATH -u "$windows_path"`
28170    new_path="$unix_path"
28171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28173    new_path="$unix_path"
28174  fi
28175
28176  if test "x$path" != "x$new_path"; then
28177    BOOT_JDK="$new_path"
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28180  fi
28181
28182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28184
28185    else
28186      # We're on a unix platform. Hooray! :)
28187      path="$BOOT_JDK"
28188      has_space=`$ECHO "$path" | $GREP " "`
28189      if test "x$has_space" != x; then
28190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28193      fi
28194
28195      # Use eval to expand a potential ~
28196      eval path="$path"
28197      if test ! -f "$path" && test ! -d "$path"; then
28198        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28199      fi
28200
28201      if test -d "$path"; then
28202        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28203      else
28204        dir="`$DIRNAME "$path"`"
28205        base="`$BASENAME "$path"`"
28206        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28207      fi
28208    fi
28209  fi
28210
28211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28212$as_echo_n "checking for Boot JDK... " >&6; }
28213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28214$as_echo "$BOOT_JDK" >&6; }
28215            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28216$as_echo_n "checking Boot JDK version... " >&6; }
28217            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28219$as_echo "$BOOT_JDK_VERSION" >&6; }
28220          fi # end check jdk version
28221        fi # end check javac
28222      fi # end check java
28223    fi # end check boot jdk found
28224  fi
28225
28226  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28227
28228  if test "x$BOOT_JDK_FOUND" = xno; then
28229    # Now execute the test
28230
28231  BOOT_JDK_PREFIX="/usr/lib/jvm"
28232  BOOT_JDK_SUFFIX=""
28233  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28234  if test "x$ALL_JDKS_FOUND" != x; then
28235    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28236
28237  if test "x$BOOT_JDK_FOUND" = xno; then
28238    # Now execute the test
28239
28240        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28241        if test -d "$BOOT_JDK"; then
28242          BOOT_JDK_FOUND=maybe
28243          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28244$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28245        fi
28246
28247
28248    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28249    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28250      # Do we have a bin/java?
28251      if test ! -x "$BOOT_JDK/bin/java"; then
28252        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28254        BOOT_JDK_FOUND=no
28255      else
28256        # Do we have a bin/javac?
28257        if test ! -x "$BOOT_JDK/bin/javac"; then
28258          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28260          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28261$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28262          BOOT_JDK_FOUND=no
28263        else
28264          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28265          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28266
28267          # Extra M4 quote needed to protect [] in grep expression.
28268          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28269          if test "x$FOUND_CORRECT_VERSION" = x; then
28270            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28272            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28273$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28274            BOOT_JDK_FOUND=no
28275          else
28276            # We're done! :-)
28277            BOOT_JDK_FOUND=yes
28278
28279  # Only process if variable expands to non-empty
28280
28281  if test "x$BOOT_JDK" != x; then
28282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28283
28284  # Input might be given as Windows format, start by converting to
28285  # unix format.
28286  path="$BOOT_JDK"
28287  new_path=`$CYGPATH -u "$path"`
28288
28289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28292  # "foo.exe" is OK but "foo" is an error.
28293  #
28294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28295  # It is also a way to make sure we got the proper file name for the real test later on.
28296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28297  if test "x$test_shortpath" = x; then
28298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28301  fi
28302
28303  # Call helper function which possibly converts this using DOS-style short mode.
28304  # If so, the updated path is stored in $new_path.
28305
28306  input_path="$new_path"
28307  # Check if we need to convert this using DOS-style short mode. If the path
28308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28309  # take no chances and rewrite it.
28310  # Note: m4 eats our [], so we need to use [ and ] instead.
28311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28312  if test "x$has_forbidden_chars" != x; then
28313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28317      # Going to short mode and back again did indeed matter. Since short mode is
28318      # case insensitive, let's make it lowercase to improve readability.
28319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28320      # Now convert it back to Unix-style (cygpath)
28321      input_path=`$CYGPATH -u "$shortmode_path"`
28322      new_path="$input_path"
28323    fi
28324  fi
28325
28326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28327  if test "x$test_cygdrive_prefix" = x; then
28328    # As a simple fix, exclude /usr/bin since it's not a real path.
28329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28331      # a path prefixed by /cygdrive for fixpath to work.
28332      new_path="$CYGWIN_ROOT_PATH$input_path"
28333    fi
28334  fi
28335
28336
28337  if test "x$path" != "x$new_path"; then
28338    BOOT_JDK="$new_path"
28339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28341  fi
28342
28343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28344
28345  path="$BOOT_JDK"
28346  has_colon=`$ECHO $path | $GREP ^.:`
28347  new_path="$path"
28348  if test "x$has_colon" = x; then
28349    # Not in mixed or Windows style, start by that.
28350    new_path=`cmd //c echo $path`
28351  fi
28352
28353
28354  input_path="$new_path"
28355  # Check if we need to convert this using DOS-style short mode. If the path
28356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357  # take no chances and rewrite it.
28358  # Note: m4 eats our [], so we need to use [ and ] instead.
28359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28360  if test "x$has_forbidden_chars" != x; then
28361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28363  fi
28364
28365
28366  windows_path="$new_path"
28367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28368    unix_path=`$CYGPATH -u "$windows_path"`
28369    new_path="$unix_path"
28370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28372    new_path="$unix_path"
28373  fi
28374
28375  if test "x$path" != "x$new_path"; then
28376    BOOT_JDK="$new_path"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379  fi
28380
28381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28383
28384    else
28385      # We're on a unix platform. Hooray! :)
28386      path="$BOOT_JDK"
28387      has_space=`$ECHO "$path" | $GREP " "`
28388      if test "x$has_space" != x; then
28389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28392      fi
28393
28394      # Use eval to expand a potential ~
28395      eval path="$path"
28396      if test ! -f "$path" && test ! -d "$path"; then
28397        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28398      fi
28399
28400      if test -d "$path"; then
28401        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28402      else
28403        dir="`$DIRNAME "$path"`"
28404        base="`$BASENAME "$path"`"
28405        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28406      fi
28407    fi
28408  fi
28409
28410            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28411$as_echo_n "checking for Boot JDK... " >&6; }
28412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28413$as_echo "$BOOT_JDK" >&6; }
28414            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28415$as_echo_n "checking Boot JDK version... " >&6; }
28416            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28418$as_echo "$BOOT_JDK_VERSION" >&6; }
28419          fi # end check jdk version
28420        fi # end check javac
28421      fi # end check java
28422    fi # end check boot jdk found
28423  fi
28424
28425    done
28426  fi
28427
28428
28429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28431      # Do we have a bin/java?
28432      if test ! -x "$BOOT_JDK/bin/java"; then
28433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28435        BOOT_JDK_FOUND=no
28436      else
28437        # Do we have a bin/javac?
28438        if test ! -x "$BOOT_JDK/bin/javac"; then
28439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28443          BOOT_JDK_FOUND=no
28444        else
28445          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28446          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28447
28448          # Extra M4 quote needed to protect [] in grep expression.
28449          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28450          if test "x$FOUND_CORRECT_VERSION" = x; then
28451            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28453            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28454$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28455            BOOT_JDK_FOUND=no
28456          else
28457            # We're done! :-)
28458            BOOT_JDK_FOUND=yes
28459
28460  # Only process if variable expands to non-empty
28461
28462  if test "x$BOOT_JDK" != x; then
28463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28464
28465  # Input might be given as Windows format, start by converting to
28466  # unix format.
28467  path="$BOOT_JDK"
28468  new_path=`$CYGPATH -u "$path"`
28469
28470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28473  # "foo.exe" is OK but "foo" is an error.
28474  #
28475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28476  # It is also a way to make sure we got the proper file name for the real test later on.
28477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28478  if test "x$test_shortpath" = x; then
28479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28482  fi
28483
28484  # Call helper function which possibly converts this using DOS-style short mode.
28485  # If so, the updated path is stored in $new_path.
28486
28487  input_path="$new_path"
28488  # Check if we need to convert this using DOS-style short mode. If the path
28489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28490  # take no chances and rewrite it.
28491  # Note: m4 eats our [], so we need to use [ and ] instead.
28492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28493  if test "x$has_forbidden_chars" != x; then
28494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28498      # Going to short mode and back again did indeed matter. Since short mode is
28499      # case insensitive, let's make it lowercase to improve readability.
28500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28501      # Now convert it back to Unix-style (cygpath)
28502      input_path=`$CYGPATH -u "$shortmode_path"`
28503      new_path="$input_path"
28504    fi
28505  fi
28506
28507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28508  if test "x$test_cygdrive_prefix" = x; then
28509    # As a simple fix, exclude /usr/bin since it's not a real path.
28510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28512      # a path prefixed by /cygdrive for fixpath to work.
28513      new_path="$CYGWIN_ROOT_PATH$input_path"
28514    fi
28515  fi
28516
28517
28518  if test "x$path" != "x$new_path"; then
28519    BOOT_JDK="$new_path"
28520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28522  fi
28523
28524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525
28526  path="$BOOT_JDK"
28527  has_colon=`$ECHO $path | $GREP ^.:`
28528  new_path="$path"
28529  if test "x$has_colon" = x; then
28530    # Not in mixed or Windows style, start by that.
28531    new_path=`cmd //c echo $path`
28532  fi
28533
28534
28535  input_path="$new_path"
28536  # Check if we need to convert this using DOS-style short mode. If the path
28537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28538  # take no chances and rewrite it.
28539  # Note: m4 eats our [], so we need to use [ and ] instead.
28540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28541  if test "x$has_forbidden_chars" != x; then
28542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28544  fi
28545
28546
28547  windows_path="$new_path"
28548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28549    unix_path=`$CYGPATH -u "$windows_path"`
28550    new_path="$unix_path"
28551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28553    new_path="$unix_path"
28554  fi
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28564
28565    else
28566      # We're on a unix platform. Hooray! :)
28567      path="$BOOT_JDK"
28568      has_space=`$ECHO "$path" | $GREP " "`
28569      if test "x$has_space" != x; then
28570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28572        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28573      fi
28574
28575      # Use eval to expand a potential ~
28576      eval path="$path"
28577      if test ! -f "$path" && test ! -d "$path"; then
28578        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28579      fi
28580
28581      if test -d "$path"; then
28582        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28583      else
28584        dir="`$DIRNAME "$path"`"
28585        base="`$BASENAME "$path"`"
28586        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28587      fi
28588    fi
28589  fi
28590
28591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28592$as_echo_n "checking for Boot JDK... " >&6; }
28593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28594$as_echo "$BOOT_JDK" >&6; }
28595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28596$as_echo_n "checking Boot JDK version... " >&6; }
28597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28599$as_echo "$BOOT_JDK_VERSION" >&6; }
28600          fi # end check jdk version
28601        fi # end check javac
28602      fi # end check java
28603    fi # end check boot jdk found
28604  fi
28605
28606  fi
28607
28608
28609    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28610    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28611      # Do we have a bin/java?
28612      if test ! -x "$BOOT_JDK/bin/java"; then
28613        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28615        BOOT_JDK_FOUND=no
28616      else
28617        # Do we have a bin/javac?
28618        if test ! -x "$BOOT_JDK/bin/javac"; then
28619          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28621          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28622$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28623          BOOT_JDK_FOUND=no
28624        else
28625          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28626          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28627
28628          # Extra M4 quote needed to protect [] in grep expression.
28629          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28630          if test "x$FOUND_CORRECT_VERSION" = x; then
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28634$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28635            BOOT_JDK_FOUND=no
28636          else
28637            # We're done! :-)
28638            BOOT_JDK_FOUND=yes
28639
28640  # Only process if variable expands to non-empty
28641
28642  if test "x$BOOT_JDK" != x; then
28643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28644
28645  # Input might be given as Windows format, start by converting to
28646  # unix format.
28647  path="$BOOT_JDK"
28648  new_path=`$CYGPATH -u "$path"`
28649
28650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28653  # "foo.exe" is OK but "foo" is an error.
28654  #
28655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28656  # It is also a way to make sure we got the proper file name for the real test later on.
28657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28658  if test "x$test_shortpath" = x; then
28659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28661    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28662  fi
28663
28664  # Call helper function which possibly converts this using DOS-style short mode.
28665  # If so, the updated path is stored in $new_path.
28666
28667  input_path="$new_path"
28668  # Check if we need to convert this using DOS-style short mode. If the path
28669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28670  # take no chances and rewrite it.
28671  # Note: m4 eats our [], so we need to use [ and ] instead.
28672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28673  if test "x$has_forbidden_chars" != x; then
28674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28678      # Going to short mode and back again did indeed matter. Since short mode is
28679      # case insensitive, let's make it lowercase to improve readability.
28680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28681      # Now convert it back to Unix-style (cygpath)
28682      input_path=`$CYGPATH -u "$shortmode_path"`
28683      new_path="$input_path"
28684    fi
28685  fi
28686
28687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28688  if test "x$test_cygdrive_prefix" = x; then
28689    # As a simple fix, exclude /usr/bin since it's not a real path.
28690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28692      # a path prefixed by /cygdrive for fixpath to work.
28693      new_path="$CYGWIN_ROOT_PATH$input_path"
28694    fi
28695  fi
28696
28697
28698  if test "x$path" != "x$new_path"; then
28699    BOOT_JDK="$new_path"
28700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28702  fi
28703
28704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28705
28706  path="$BOOT_JDK"
28707  has_colon=`$ECHO $path | $GREP ^.:`
28708  new_path="$path"
28709  if test "x$has_colon" = x; then
28710    # Not in mixed or Windows style, start by that.
28711    new_path=`cmd //c echo $path`
28712  fi
28713
28714
28715  input_path="$new_path"
28716  # Check if we need to convert this using DOS-style short mode. If the path
28717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28718  # take no chances and rewrite it.
28719  # Note: m4 eats our [], so we need to use [ and ] instead.
28720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28721  if test "x$has_forbidden_chars" != x; then
28722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28724  fi
28725
28726
28727  windows_path="$new_path"
28728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28729    unix_path=`$CYGPATH -u "$windows_path"`
28730    new_path="$unix_path"
28731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28733    new_path="$unix_path"
28734  fi
28735
28736  if test "x$path" != "x$new_path"; then
28737    BOOT_JDK="$new_path"
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28740  fi
28741
28742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28744
28745    else
28746      # We're on a unix platform. Hooray! :)
28747      path="$BOOT_JDK"
28748      has_space=`$ECHO "$path" | $GREP " "`
28749      if test "x$has_space" != x; then
28750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28752        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28753      fi
28754
28755      # Use eval to expand a potential ~
28756      eval path="$path"
28757      if test ! -f "$path" && test ! -d "$path"; then
28758        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28759      fi
28760
28761      if test -d "$path"; then
28762        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28763      else
28764        dir="`$DIRNAME "$path"`"
28765        base="`$BASENAME "$path"`"
28766        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28767      fi
28768    fi
28769  fi
28770
28771            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28772$as_echo_n "checking for Boot JDK... " >&6; }
28773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28774$as_echo "$BOOT_JDK" >&6; }
28775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28776$as_echo_n "checking Boot JDK version... " >&6; }
28777            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28779$as_echo "$BOOT_JDK_VERSION" >&6; }
28780          fi # end check jdk version
28781        fi # end check javac
28782      fi # end check java
28783    fi # end check boot jdk found
28784  fi
28785
28786
28787  # If we haven't found anything yet, we've truly lost. Give up.
28788  if test "x$BOOT_JDK_FOUND" = xno; then
28789
28790  # Print a helpful message on how to acquire the necessary build dependency.
28791  # openjdk is the help tag: freetype, cups, alsa etc
28792  MISSING_DEPENDENCY=openjdk
28793
28794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28795    cygwin_help $MISSING_DEPENDENCY
28796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28797    msys_help $MISSING_DEPENDENCY
28798  else
28799    PKGHANDLER_COMMAND=
28800
28801    case $PKGHANDLER in
28802      apt-get)
28803        apt_help     $MISSING_DEPENDENCY ;;
28804      yum)
28805        yum_help     $MISSING_DEPENDENCY ;;
28806      port)
28807        port_help    $MISSING_DEPENDENCY ;;
28808      pkgutil)
28809        pkgutil_help $MISSING_DEPENDENCY ;;
28810      pkgadd)
28811        pkgadd_help  $MISSING_DEPENDENCY ;;
28812    esac
28813
28814    if test "x$PKGHANDLER_COMMAND" != x; then
28815      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28816    fi
28817  fi
28818
28819    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28820$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28821    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28822$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28823    as_fn_error $? "Cannot continue" "$LINENO" 5
28824  fi
28825
28826
28827
28828  # Setup tools from the Boot JDK.
28829
28830  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28831
28832  # Publish this variable in the help.
28833
28834
28835  if [ -z "${JAVA+x}" ]; then
28836    # The variable is not set by user, try to locate tool using the code snippet
28837
28838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28839$as_echo_n "checking for java in Boot JDK... " >&6; }
28840      JAVA=$BOOT_JDK/bin/java
28841      if test ! -x $JAVA; then
28842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28843$as_echo "not found" >&6; }
28844        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28846        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28847      fi
28848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28849$as_echo "ok" >&6; }
28850
28851
28852  else
28853    # The variable is set, but is it from the command line or the environment?
28854
28855    # Try to remove the string !JAVA! from our list.
28856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28858      # If it failed, the variable was not from the command line. Ignore it,
28859      # but warn the user (except for BASH, which is always set by the calling BASH).
28860      if test "xJAVA" != xBASH; then
28861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28862$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28863      fi
28864      # Try to locate tool using the code snippet
28865
28866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28867$as_echo_n "checking for java in Boot JDK... " >&6; }
28868      JAVA=$BOOT_JDK/bin/java
28869      if test ! -x $JAVA; then
28870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28871$as_echo "not found" >&6; }
28872        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28873$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28874        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28875      fi
28876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28877$as_echo "ok" >&6; }
28878
28879
28880    else
28881      # If it succeeded, then it was overridden by the user. We will use it
28882      # for the tool.
28883
28884      # First remove it from the list of overridden variables, so we can test
28885      # for unknown variables in the end.
28886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28887
28888      # Check if we try to supply an empty value
28889      if test "x$JAVA" = x; then
28890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28891$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28893$as_echo_n "checking for JAVA... " >&6; }
28894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28895$as_echo "disabled" >&6; }
28896      else
28897        # Check if the provided tool contains a complete path.
28898        tool_specified="$JAVA"
28899        tool_basename="${tool_specified##*/}"
28900        if test "x$tool_basename" = "x$tool_specified"; then
28901          # A command without a complete path is provided, search $PATH.
28902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28903$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28904          # Extract the first word of "$tool_basename", so it can be a program name with args.
28905set dummy $tool_basename; ac_word=$2
28906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28907$as_echo_n "checking for $ac_word... " >&6; }
28908if ${ac_cv_path_JAVA+:} false; then :
28909  $as_echo_n "(cached) " >&6
28910else
28911  case $JAVA in
28912  [\\/]* | ?:[\\/]*)
28913  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28914  ;;
28915  *)
28916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28917for as_dir in $PATH
28918do
28919  IFS=$as_save_IFS
28920  test -z "$as_dir" && as_dir=.
28921    for ac_exec_ext in '' $ac_executable_extensions; do
28922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28923    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28925    break 2
28926  fi
28927done
28928  done
28929IFS=$as_save_IFS
28930
28931  ;;
28932esac
28933fi
28934JAVA=$ac_cv_path_JAVA
28935if test -n "$JAVA"; then
28936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28937$as_echo "$JAVA" >&6; }
28938else
28939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28940$as_echo "no" >&6; }
28941fi
28942
28943
28944          if test "x$JAVA" = x; then
28945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28946          fi
28947        else
28948          # Otherwise we believe it is a complete path. Use it as it is.
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28950$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28952$as_echo_n "checking for JAVA... " >&6; }
28953          if test ! -x "$tool_specified"; then
28954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28955$as_echo "not found" >&6; }
28956            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28957          fi
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28959$as_echo "$tool_specified" >&6; }
28960        fi
28961      fi
28962    fi
28963
28964  fi
28965
28966
28967
28968  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28969
28970  # Publish this variable in the help.
28971
28972
28973  if [ -z "${JAVAC+x}" ]; then
28974    # The variable is not set by user, try to locate tool using the code snippet
28975
28976      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28977$as_echo_n "checking for javac in Boot JDK... " >&6; }
28978      JAVAC=$BOOT_JDK/bin/javac
28979      if test ! -x $JAVAC; then
28980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28981$as_echo "not found" >&6; }
28982        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28983$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28984        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28985      fi
28986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28987$as_echo "ok" >&6; }
28988
28989
28990  else
28991    # The variable is set, but is it from the command line or the environment?
28992
28993    # Try to remove the string !JAVAC! from our list.
28994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28996      # If it failed, the variable was not from the command line. Ignore it,
28997      # but warn the user (except for BASH, which is always set by the calling BASH).
28998      if test "xJAVAC" != xBASH; then
28999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29000$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29001      fi
29002      # Try to locate tool using the code snippet
29003
29004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29005$as_echo_n "checking for javac in Boot JDK... " >&6; }
29006      JAVAC=$BOOT_JDK/bin/javac
29007      if test ! -x $JAVAC; then
29008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29009$as_echo "not found" >&6; }
29010        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29011$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29012        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29013      fi
29014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29015$as_echo "ok" >&6; }
29016
29017
29018    else
29019      # If it succeeded, then it was overridden by the user. We will use it
29020      # for the tool.
29021
29022      # First remove it from the list of overridden variables, so we can test
29023      # for unknown variables in the end.
29024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29025
29026      # Check if we try to supply an empty value
29027      if test "x$JAVAC" = x; then
29028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29029$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29031$as_echo_n "checking for JAVAC... " >&6; }
29032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29033$as_echo "disabled" >&6; }
29034      else
29035        # Check if the provided tool contains a complete path.
29036        tool_specified="$JAVAC"
29037        tool_basename="${tool_specified##*/}"
29038        if test "x$tool_basename" = "x$tool_specified"; then
29039          # A command without a complete path is provided, search $PATH.
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29041$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29042          # Extract the first word of "$tool_basename", so it can be a program name with args.
29043set dummy $tool_basename; ac_word=$2
29044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29045$as_echo_n "checking for $ac_word... " >&6; }
29046if ${ac_cv_path_JAVAC+:} false; then :
29047  $as_echo_n "(cached) " >&6
29048else
29049  case $JAVAC in
29050  [\\/]* | ?:[\\/]*)
29051  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29052  ;;
29053  *)
29054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29055for as_dir in $PATH
29056do
29057  IFS=$as_save_IFS
29058  test -z "$as_dir" && as_dir=.
29059    for ac_exec_ext in '' $ac_executable_extensions; do
29060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29061    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29063    break 2
29064  fi
29065done
29066  done
29067IFS=$as_save_IFS
29068
29069  ;;
29070esac
29071fi
29072JAVAC=$ac_cv_path_JAVAC
29073if test -n "$JAVAC"; then
29074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29075$as_echo "$JAVAC" >&6; }
29076else
29077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29078$as_echo "no" >&6; }
29079fi
29080
29081
29082          if test "x$JAVAC" = x; then
29083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29084          fi
29085        else
29086          # Otherwise we believe it is a complete path. Use it as it is.
29087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29088$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29090$as_echo_n "checking for JAVAC... " >&6; }
29091          if test ! -x "$tool_specified"; then
29092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29093$as_echo "not found" >&6; }
29094            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29095          fi
29096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29097$as_echo "$tool_specified" >&6; }
29098        fi
29099      fi
29100    fi
29101
29102  fi
29103
29104
29105
29106  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29107
29108  # Publish this variable in the help.
29109
29110
29111  if [ -z "${JAVAH+x}" ]; then
29112    # The variable is not set by user, try to locate tool using the code snippet
29113
29114      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29115$as_echo_n "checking for javah in Boot JDK... " >&6; }
29116      JAVAH=$BOOT_JDK/bin/javah
29117      if test ! -x $JAVAH; then
29118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29119$as_echo "not found" >&6; }
29120        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29121$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29122        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29123      fi
29124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29125$as_echo "ok" >&6; }
29126
29127
29128  else
29129    # The variable is set, but is it from the command line or the environment?
29130
29131    # Try to remove the string !JAVAH! from our list.
29132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29134      # If it failed, the variable was not from the command line. Ignore it,
29135      # but warn the user (except for BASH, which is always set by the calling BASH).
29136      if test "xJAVAH" != xBASH; then
29137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29138$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29139      fi
29140      # Try to locate tool using the code snippet
29141
29142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29143$as_echo_n "checking for javah in Boot JDK... " >&6; }
29144      JAVAH=$BOOT_JDK/bin/javah
29145      if test ! -x $JAVAH; then
29146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29147$as_echo "not found" >&6; }
29148        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29149$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29150        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29151      fi
29152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29153$as_echo "ok" >&6; }
29154
29155
29156    else
29157      # If it succeeded, then it was overridden by the user. We will use it
29158      # for the tool.
29159
29160      # First remove it from the list of overridden variables, so we can test
29161      # for unknown variables in the end.
29162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29163
29164      # Check if we try to supply an empty value
29165      if test "x$JAVAH" = x; then
29166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29167$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29169$as_echo_n "checking for JAVAH... " >&6; }
29170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29171$as_echo "disabled" >&6; }
29172      else
29173        # Check if the provided tool contains a complete path.
29174        tool_specified="$JAVAH"
29175        tool_basename="${tool_specified##*/}"
29176        if test "x$tool_basename" = "x$tool_specified"; then
29177          # A command without a complete path is provided, search $PATH.
29178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29179$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29180          # Extract the first word of "$tool_basename", so it can be a program name with args.
29181set dummy $tool_basename; ac_word=$2
29182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29183$as_echo_n "checking for $ac_word... " >&6; }
29184if ${ac_cv_path_JAVAH+:} false; then :
29185  $as_echo_n "(cached) " >&6
29186else
29187  case $JAVAH in
29188  [\\/]* | ?:[\\/]*)
29189  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29190  ;;
29191  *)
29192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29193for as_dir in $PATH
29194do
29195  IFS=$as_save_IFS
29196  test -z "$as_dir" && as_dir=.
29197    for ac_exec_ext in '' $ac_executable_extensions; do
29198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29199    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29201    break 2
29202  fi
29203done
29204  done
29205IFS=$as_save_IFS
29206
29207  ;;
29208esac
29209fi
29210JAVAH=$ac_cv_path_JAVAH
29211if test -n "$JAVAH"; then
29212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29213$as_echo "$JAVAH" >&6; }
29214else
29215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29216$as_echo "no" >&6; }
29217fi
29218
29219
29220          if test "x$JAVAH" = x; then
29221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29222          fi
29223        else
29224          # Otherwise we believe it is a complete path. Use it as it is.
29225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29226$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29228$as_echo_n "checking for JAVAH... " >&6; }
29229          if test ! -x "$tool_specified"; then
29230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29231$as_echo "not found" >&6; }
29232            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29233          fi
29234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29235$as_echo "$tool_specified" >&6; }
29236        fi
29237      fi
29238    fi
29239
29240  fi
29241
29242
29243
29244  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29245
29246  # Publish this variable in the help.
29247
29248
29249  if [ -z "${JAR+x}" ]; then
29250    # The variable is not set by user, try to locate tool using the code snippet
29251
29252      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29253$as_echo_n "checking for jar in Boot JDK... " >&6; }
29254      JAR=$BOOT_JDK/bin/jar
29255      if test ! -x $JAR; then
29256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29257$as_echo "not found" >&6; }
29258        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29259$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29260        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29261      fi
29262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29263$as_echo "ok" >&6; }
29264
29265
29266  else
29267    # The variable is set, but is it from the command line or the environment?
29268
29269    # Try to remove the string !JAR! from our list.
29270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29272      # If it failed, the variable was not from the command line. Ignore it,
29273      # but warn the user (except for BASH, which is always set by the calling BASH).
29274      if test "xJAR" != xBASH; then
29275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29276$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29277      fi
29278      # Try to locate tool using the code snippet
29279
29280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29281$as_echo_n "checking for jar in Boot JDK... " >&6; }
29282      JAR=$BOOT_JDK/bin/jar
29283      if test ! -x $JAR; then
29284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29285$as_echo "not found" >&6; }
29286        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29287$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29288        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29289      fi
29290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29291$as_echo "ok" >&6; }
29292
29293
29294    else
29295      # If it succeeded, then it was overridden by the user. We will use it
29296      # for the tool.
29297
29298      # First remove it from the list of overridden variables, so we can test
29299      # for unknown variables in the end.
29300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29301
29302      # Check if we try to supply an empty value
29303      if test "x$JAR" = x; then
29304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29305$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29307$as_echo_n "checking for JAR... " >&6; }
29308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29309$as_echo "disabled" >&6; }
29310      else
29311        # Check if the provided tool contains a complete path.
29312        tool_specified="$JAR"
29313        tool_basename="${tool_specified##*/}"
29314        if test "x$tool_basename" = "x$tool_specified"; then
29315          # A command without a complete path is provided, search $PATH.
29316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29317$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29318          # Extract the first word of "$tool_basename", so it can be a program name with args.
29319set dummy $tool_basename; ac_word=$2
29320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29321$as_echo_n "checking for $ac_word... " >&6; }
29322if ${ac_cv_path_JAR+:} false; then :
29323  $as_echo_n "(cached) " >&6
29324else
29325  case $JAR in
29326  [\\/]* | ?:[\\/]*)
29327  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29328  ;;
29329  *)
29330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29331for as_dir in $PATH
29332do
29333  IFS=$as_save_IFS
29334  test -z "$as_dir" && as_dir=.
29335    for ac_exec_ext in '' $ac_executable_extensions; do
29336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29337    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29339    break 2
29340  fi
29341done
29342  done
29343IFS=$as_save_IFS
29344
29345  ;;
29346esac
29347fi
29348JAR=$ac_cv_path_JAR
29349if test -n "$JAR"; then
29350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29351$as_echo "$JAR" >&6; }
29352else
29353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29354$as_echo "no" >&6; }
29355fi
29356
29357
29358          if test "x$JAR" = x; then
29359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29360          fi
29361        else
29362          # Otherwise we believe it is a complete path. Use it as it is.
29363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29364$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29366$as_echo_n "checking for JAR... " >&6; }
29367          if test ! -x "$tool_specified"; then
29368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29369$as_echo "not found" >&6; }
29370            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29371          fi
29372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29373$as_echo "$tool_specified" >&6; }
29374        fi
29375      fi
29376    fi
29377
29378  fi
29379
29380
29381
29382  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29383
29384  # Publish this variable in the help.
29385
29386
29387  if [ -z "${JARSIGNER+x}" ]; then
29388    # The variable is not set by user, try to locate tool using the code snippet
29389
29390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29391$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29392      JARSIGNER=$BOOT_JDK/bin/jarsigner
29393      if test ! -x $JARSIGNER; then
29394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29395$as_echo "not found" >&6; }
29396        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29397$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29398        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29399      fi
29400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29401$as_echo "ok" >&6; }
29402
29403
29404  else
29405    # The variable is set, but is it from the command line or the environment?
29406
29407    # Try to remove the string !JARSIGNER! from our list.
29408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29410      # If it failed, the variable was not from the command line. Ignore it,
29411      # but warn the user (except for BASH, which is always set by the calling BASH).
29412      if test "xJARSIGNER" != xBASH; then
29413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29414$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29415      fi
29416      # Try to locate tool using the code snippet
29417
29418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29419$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29420      JARSIGNER=$BOOT_JDK/bin/jarsigner
29421      if test ! -x $JARSIGNER; then
29422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29423$as_echo "not found" >&6; }
29424        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29425$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29426        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29427      fi
29428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29429$as_echo "ok" >&6; }
29430
29431
29432    else
29433      # If it succeeded, then it was overridden by the user. We will use it
29434      # for the tool.
29435
29436      # First remove it from the list of overridden variables, so we can test
29437      # for unknown variables in the end.
29438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29439
29440      # Check if we try to supply an empty value
29441      if test "x$JARSIGNER" = x; then
29442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29443$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29445$as_echo_n "checking for JARSIGNER... " >&6; }
29446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29447$as_echo "disabled" >&6; }
29448      else
29449        # Check if the provided tool contains a complete path.
29450        tool_specified="$JARSIGNER"
29451        tool_basename="${tool_specified##*/}"
29452        if test "x$tool_basename" = "x$tool_specified"; then
29453          # A command without a complete path is provided, search $PATH.
29454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29455$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29456          # Extract the first word of "$tool_basename", so it can be a program name with args.
29457set dummy $tool_basename; ac_word=$2
29458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29459$as_echo_n "checking for $ac_word... " >&6; }
29460if ${ac_cv_path_JARSIGNER+:} false; then :
29461  $as_echo_n "(cached) " >&6
29462else
29463  case $JARSIGNER in
29464  [\\/]* | ?:[\\/]*)
29465  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29466  ;;
29467  *)
29468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29469for as_dir in $PATH
29470do
29471  IFS=$as_save_IFS
29472  test -z "$as_dir" && as_dir=.
29473    for ac_exec_ext in '' $ac_executable_extensions; do
29474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29475    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29477    break 2
29478  fi
29479done
29480  done
29481IFS=$as_save_IFS
29482
29483  ;;
29484esac
29485fi
29486JARSIGNER=$ac_cv_path_JARSIGNER
29487if test -n "$JARSIGNER"; then
29488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29489$as_echo "$JARSIGNER" >&6; }
29490else
29491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29492$as_echo "no" >&6; }
29493fi
29494
29495
29496          if test "x$JARSIGNER" = x; then
29497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29498          fi
29499        else
29500          # Otherwise we believe it is a complete path. Use it as it is.
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29502$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29504$as_echo_n "checking for JARSIGNER... " >&6; }
29505          if test ! -x "$tool_specified"; then
29506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29507$as_echo "not found" >&6; }
29508            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29509          fi
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29511$as_echo "$tool_specified" >&6; }
29512        fi
29513      fi
29514    fi
29515
29516  fi
29517
29518
29519
29520  # Finally, set some other options...
29521
29522  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29523  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29524
29525
29526
29527  # Check if the boot jdk is 32 or 64 bit
29528  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29529    BOOT_JDK_BITS="64"
29530  else
29531    BOOT_JDK_BITS="32"
29532  fi
29533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29534$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29536$as_echo "$BOOT_JDK_BITS" >&6; }
29537
29538
29539
29540###############################################################################
29541#
29542# Configure the sources to use. We can add or override individual directories.
29543#
29544###############################################################################
29545
29546
29547  # Where are the sources.
29548  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29549  CORBA_TOPDIR="$SRC_ROOT/corba"
29550  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29551  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29552  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29553  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29554  JDK_TOPDIR="$SRC_ROOT/jdk"
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564  # This feature is no longer supported.
29565
29566
29567
29568# Check whether --with-add-source-root was given.
29569if test "${with_add_source_root+set}" = set; then :
29570  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
29571$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29572fi
29573
29574
29575
29576
29577# Check whether --with-override-source-root was given.
29578if test "${with_override_source_root+set}" = set; then :
29579  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
29580$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29581fi
29582
29583
29584
29585
29586# Check whether --with-adds-and-overrides was given.
29587if test "${with_adds_and_overrides+set}" = set; then :
29588  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
29589$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29590fi
29591
29592
29593
29594
29595# Check whether --with-override-langtools was given.
29596if test "${with_override_langtools+set}" = set; then :
29597  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29598$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29599fi
29600
29601
29602
29603
29604# Check whether --with-override-corba was given.
29605if test "${with_override_corba+set}" = set; then :
29606  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29607$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29608fi
29609
29610
29611
29612
29613# Check whether --with-override-jaxp was given.
29614if test "${with_override_jaxp+set}" = set; then :
29615  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29616$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29617fi
29618
29619
29620
29621
29622# Check whether --with-override-jaxws was given.
29623if test "${with_override_jaxws+set}" = set; then :
29624  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29625$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29626fi
29627
29628
29629
29630
29631# Check whether --with-override-hotspot was given.
29632if test "${with_override_hotspot+set}" = set; then :
29633  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29634$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29635fi
29636
29637
29638
29639
29640# Check whether --with-override-nashorn was given.
29641if test "${with_override_nashorn+set}" = set; then :
29642  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29643$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29644fi
29645
29646
29647
29648
29649# Check whether --with-override-jdk was given.
29650if test "${with_override_jdk+set}" = set; then :
29651  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29652$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29653fi
29654
29655
29656
29657
29658  BUILD_OUTPUT="$OUTPUT_ROOT"
29659
29660
29661  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29662  BUILD_HOTSPOT=true
29663
29664
29665
29666# Check whether --with-import-hotspot was given.
29667if test "${with_import_hotspot+set}" = set; then :
29668  withval=$with_import_hotspot;
29669fi
29670
29671  if test "x$with_import_hotspot" != x; then
29672    CURDIR="$PWD"
29673    cd "$with_import_hotspot"
29674    HOTSPOT_DIST="`pwd`"
29675    cd "$CURDIR"
29676    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29677      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29678    fi
29679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29680$as_echo_n "checking if hotspot should be imported... " >&6; }
29681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29682$as_echo "yes from $HOTSPOT_DIST" >&6; }
29683    BUILD_HOTSPOT=false
29684  fi
29685
29686  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29687
29688
29689###############################################################################
29690#
29691# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29692# native code.
29693#
29694###############################################################################
29695
29696# See if we are doing a complete static build or not
29697
29698  # Check whether --enable-static-build was given.
29699if test "${enable_static_build+set}" = set; then :
29700  enableval=$enable_static_build;
29701fi
29702
29703  STATIC_BUILD=false
29704  if test "x$enable_static_build" = "xyes"; then
29705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29706$as_echo_n "checking if static build is enabled... " >&6; }
29707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29708$as_echo "yes" >&6; }
29709    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29710      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29711    fi
29712    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29713    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29714    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29715    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29716    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29717    STATIC_BUILD=true
29718  elif test "x$enable_static_build" = "xno"; then
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29720$as_echo_n "checking if static build is enabled... " >&6; }
29721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29722$as_echo "no" >&6; }
29723  elif test "x$enable_static_build" != "x"; then
29724    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29725  fi
29726
29727
29728
29729
29730# First determine the toolchain type (compiler family)
29731
29732
29733# Check whether --with-toolchain-type was given.
29734if test "${with_toolchain_type+set}" = set; then :
29735  withval=$with_toolchain_type;
29736fi
29737
29738
29739  # Use indirect variable referencing
29740  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29741  VALID_TOOLCHAINS=${!toolchain_var_name}
29742
29743  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29744    if test -n "$XCODEBUILD"; then
29745      # On Mac OS X, default toolchain to clang after Xcode 5
29746      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29747      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29748      if test $? -ne 0; then
29749        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29750      fi
29751      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29752          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29753          $CUT -f 1 -d .`
29754      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29755$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29756      if test $XCODE_MAJOR_VERSION -ge 5; then
29757          DEFAULT_TOOLCHAIN="clang"
29758      else
29759          DEFAULT_TOOLCHAIN="gcc"
29760      fi
29761    else
29762      # If Xcode is not installed, but the command line tools are
29763      # then we can't run xcodebuild. On these systems we should
29764      # default to clang
29765      DEFAULT_TOOLCHAIN="clang"
29766    fi
29767  else
29768    # First toolchain type in the list is the default
29769    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29770  fi
29771
29772  if test "x$with_toolchain_type" = xlist; then
29773    # List all toolchains
29774    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29775$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29776    for toolchain in $VALID_TOOLCHAINS; do
29777      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29778      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29779      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29780    done
29781
29782    exit 0
29783  elif test "x$with_toolchain_type" != x; then
29784    # User override; check that it is valid
29785    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29786      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29787$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29788      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29789$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29790      as_fn_error $? "Cannot continue." "$LINENO" 5
29791    fi
29792    TOOLCHAIN_TYPE=$with_toolchain_type
29793  else
29794    # No flag given, use default
29795    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29796  fi
29797
29798
29799  TOOLCHAIN_CC_BINARY_clang="clang"
29800  TOOLCHAIN_CC_BINARY_gcc="gcc"
29801  TOOLCHAIN_CC_BINARY_microsoft="cl"
29802  TOOLCHAIN_CC_BINARY_solstudio="cc"
29803  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29804
29805  TOOLCHAIN_CXX_BINARY_clang="clang++"
29806  TOOLCHAIN_CXX_BINARY_gcc="g++"
29807  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29808  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29809  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29810
29811  # Use indirect variable referencing
29812  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29813  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29814  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29815  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29816  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29817  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29818
29819
29820  # Define filename patterns
29821  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29822    LIBRARY_PREFIX=
29823    SHARED_LIBRARY_SUFFIX='.dll'
29824    STATIC_LIBRARY_SUFFIX='.lib'
29825    SHARED_LIBRARY='$1.dll'
29826    STATIC_LIBRARY='$1.lib'
29827    OBJ_SUFFIX='.obj'
29828    EXE_SUFFIX='.exe'
29829  else
29830    LIBRARY_PREFIX=lib
29831    SHARED_LIBRARY_SUFFIX='.so'
29832    STATIC_LIBRARY_SUFFIX='.a'
29833    SHARED_LIBRARY='lib$1.so'
29834    STATIC_LIBRARY='lib$1.a'
29835    OBJ_SUFFIX='.o'
29836    EXE_SUFFIX=''
29837    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29838      # For full static builds, we're overloading the SHARED_LIBRARY
29839      # variables in order to limit the amount of changes required.
29840      # It would be better to remove SHARED and just use LIBRARY and
29841      # LIBRARY_SUFFIX for libraries that can be built either
29842      # shared or static and use STATIC_* for libraries that are
29843      # always built statically.
29844      if test "x$STATIC_BUILD" = xtrue; then
29845        SHARED_LIBRARY='lib$1.a'
29846        SHARED_LIBRARY_SUFFIX='.a'
29847      else
29848        SHARED_LIBRARY='lib$1.dylib'
29849        SHARED_LIBRARY_SUFFIX='.dylib'
29850      fi
29851    fi
29852  fi
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29864    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29865$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29866  else
29867    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29868$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29869  fi
29870
29871
29872# User supplied flags should be used when configure detects compilers
29873
29874  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29875    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29876$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29877  fi
29878
29879  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29880    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29881$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29882  fi
29883
29884  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29885    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29886$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29887  fi
29888
29889
29890# Check whether --with-extra-cflags was given.
29891if test "${with_extra_cflags+set}" = set; then :
29892  withval=$with_extra_cflags;
29893fi
29894
29895
29896
29897# Check whether --with-extra-cxxflags was given.
29898if test "${with_extra_cxxflags+set}" = set; then :
29899  withval=$with_extra_cxxflags;
29900fi
29901
29902
29903
29904# Check whether --with-extra-ldflags was given.
29905if test "${with_extra_ldflags+set}" = set; then :
29906  withval=$with_extra_ldflags;
29907fi
29908
29909
29910  EXTRA_CFLAGS="$with_extra_cflags"
29911  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29912  EXTRA_LDFLAGS="$with_extra_ldflags"
29913
29914  # Hotspot needs these set in their legacy form
29915  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29916  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29917  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29918
29919
29920
29921
29922
29923  # The global CFLAGS and LDLAGS variables are used by configure tests and
29924  # should include the extra parameters
29925  CFLAGS="$EXTRA_CFLAGS"
29926  CXXFLAGS="$EXTRA_CXXFLAGS"
29927  LDFLAGS="$EXTRA_LDFLAGS"
29928  CPPFLAGS=""
29929
29930# The sysroot cflags are needed for configure to be able to run the compilers
29931
29932  if test "x$SYSROOT" != "x"; then
29933    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29934      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29935        # Solaris Studio does not have a concept of sysroot. Instead we must
29936        # make sure the default include and lib dirs are appended to each
29937        # compile and link command line.
29938        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29939        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29940            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29941            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29942      fi
29943    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29944      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29945      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29946    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29947      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29948      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29949    fi
29950    # Propagate the sysroot args to hotspot
29951    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29952    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29953    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29954    # The global CFLAGS and LDFLAGS variables need these for configure to function
29955    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29956    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29957    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29958    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29959  fi
29960
29961  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29962    # We also need -iframework<path>/System/Library/Frameworks
29963    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29964    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29965    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29966    # set this here so it doesn't have to be peppered throughout the forest
29967    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29968    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29969  fi
29970
29971
29972
29973
29974
29975# Then detect the actual binaries needed
29976
29977  # FIXME: Is this needed?
29978  ac_ext=cpp
29979ac_cpp='$CXXCPP $CPPFLAGS'
29980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29983
29984
29985  # Store the CFLAGS etc passed to the configure script.
29986  ORG_CFLAGS="$CFLAGS"
29987  ORG_CXXFLAGS="$CXXFLAGS"
29988
29989  # autoconf magic only relies on PATH, so update it if tools dir is specified
29990  OLD_PATH="$PATH"
29991
29992  # On Windows, we need to detect the visual studio installation first.
29993  # This will change the PATH, but we need to keep that new PATH even
29994  # after toolchain detection is done, since the compiler (on x86) uses
29995  # it for DLL resolution in runtime.
29996  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29997      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29998
29999  # Store path to cygwin link.exe to help excluding it when searching for
30000  # VS linker. This must be done before changing the PATH when looking for VS.
30001  # Extract the first word of "link", so it can be a program name with args.
30002set dummy link; ac_word=$2
30003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30004$as_echo_n "checking for $ac_word... " >&6; }
30005if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30006  $as_echo_n "(cached) " >&6
30007else
30008  case $CYGWIN_LINK in
30009  [\\/]* | ?:[\\/]*)
30010  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30011  ;;
30012  *)
30013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30014for as_dir in $PATH
30015do
30016  IFS=$as_save_IFS
30017  test -z "$as_dir" && as_dir=.
30018    for ac_exec_ext in '' $ac_executable_extensions; do
30019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30020    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30022    break 2
30023  fi
30024done
30025  done
30026IFS=$as_save_IFS
30027
30028  ;;
30029esac
30030fi
30031CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30032if test -n "$CYGWIN_LINK"; then
30033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30034$as_echo "$CYGWIN_LINK" >&6; }
30035else
30036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30037$as_echo "no" >&6; }
30038fi
30039
30040
30041  if test "x$CYGWIN_LINK" != x; then
30042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30043$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30044    "$CYGWIN_LINK" --version > /dev/null
30045    if test $? -eq 0 ; then
30046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30047$as_echo "yes" >&6; }
30048    else
30049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30050$as_echo "no" >&6; }
30051      # This might be the VS linker. Don't exclude it later on.
30052      CYGWIN_LINK=""
30053    fi
30054  fi
30055
30056  # First-hand choice is to locate and run the vsvars bat file.
30057
30058
30059# Check whether --with-toolchain-version was given.
30060if test "${with_toolchain_version+set}" = set; then :
30061  withval=$with_toolchain_version;
30062fi
30063
30064
30065  if test "x$with_toolchain_version" = xlist; then
30066    # List all toolchains
30067    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30068$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30069    for version in $VALID_VS_VERSIONS; do
30070      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30071      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30072    done
30073
30074    exit 0
30075  elif test "x$DEVKIT_VS_VERSION" != x; then
30076    VS_VERSION=$DEVKIT_VS_VERSION
30077    TOOLCHAIN_VERSION=$VS_VERSION
30078    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30079    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30080    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30081    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30082    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30083    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30084
30085    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30086    # can still be exported as INCLUDE for compiler invocations without
30087    # SYSROOT_CFLAGS
30088    OLDIFS="$IFS"
30089    IFS=";"
30090    for i in $DEVKIT_VS_INCLUDE; do
30091      ipath=$i
30092
30093  unix_path="$ipath"
30094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30095    windows_path=`$CYGPATH -m "$unix_path"`
30096    ipath="$windows_path"
30097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30098    windows_path=`cmd //c echo $unix_path`
30099    ipath="$windows_path"
30100  fi
30101
30102      VS_INCLUDE="$VS_INCLUDE;$ipath"
30103    done
30104    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30105    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30106    for i in $DEVKIT_VS_LIB; do
30107      libpath=$i
30108
30109  unix_path="$libpath"
30110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30111    windows_path=`$CYGPATH -m "$unix_path"`
30112    libpath="$windows_path"
30113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30114    windows_path=`cmd //c echo $unix_path`
30115    libpath="$windows_path"
30116  fi
30117
30118      VS_LIB="$VS_LIB;$libpath"
30119    done
30120    IFS="$OLDIFS"
30121
30122    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30123$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30124
30125  elif test "x$with_toolchain_version" != x; then
30126    # User override; check that it is valid
30127    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30128      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30129$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30130      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30131$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30132      as_fn_error $? "Cannot continue." "$LINENO" 5
30133    fi
30134    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30135  else
30136    # No flag given, use default
30137    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30138  fi
30139
30140  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30141
30142  VS_VERSION="$VS_VERSION"
30143  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30144  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30145  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30146  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30147
30148  # When using --with-tools-dir, assume it points to the correct and default
30149  # version of Visual Studio or that --with-toolchain-version was also set.
30150  if test "x$with_tools_dir" != x; then
30151
30152  if test "x$VS_ENV_CMD" = x; then
30153    VS_VERSION="${VS_VERSION}"
30154    VS_BASE="$with_tools_dir/../.."
30155    METHOD="--with-tools-dir"
30156
30157    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30158      VCVARSFILE="vc/bin/vcvars32.bat"
30159    else
30160      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30161    fi
30162
30163
30164  windows_path="$VS_BASE"
30165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30166    unix_path=`$CYGPATH -u "$windows_path"`
30167    VS_BASE="$unix_path"
30168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30170    VS_BASE="$unix_path"
30171  fi
30172
30173    if test -d "$VS_BASE"; then
30174      if test -f "$VS_BASE/$VCVARSFILE"; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30176$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30177        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30178        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30179        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30180        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30181      else
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30183$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30184        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30185$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30186      fi
30187    fi
30188  fi
30189
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    if test "x$VS_ENV_CMD" = x; then
30230      # Having specified an argument which is incorrect will produce an instant failure;
30231      # we should not go on looking
30232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30233$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30234      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30235$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30236      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30237$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30238      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30239    fi
30240  fi
30241
30242  VS_ENV_CMD=""
30243  VS_ENV_ARGS=""
30244
30245  if test "x$VS_COMNTOOLS" != x; then
30246
30247  if test "x$VS_ENV_CMD" = x; then
30248    VS_VERSION="${VS_VERSION}"
30249    VS_BASE="$VS_COMNTOOLS/../.."
30250    METHOD="$VS_COMNTOOLS_VAR variable"
30251
30252    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30253      VCVARSFILE="vc/bin/vcvars32.bat"
30254    else
30255      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30256    fi
30257
30258
30259  windows_path="$VS_BASE"
30260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30261    unix_path=`$CYGPATH -u "$windows_path"`
30262    VS_BASE="$unix_path"
30263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30265    VS_BASE="$unix_path"
30266  fi
30267
30268    if test -d "$VS_BASE"; then
30269      if test -f "$VS_BASE/$VCVARSFILE"; then
30270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30271$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30272        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30273        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30274        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30275        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30276      else
30277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30278$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30280$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30281      fi
30282    fi
30283  fi
30284
30285  fi
30286  if test "x$PROGRAMFILES" != x; then
30287
30288  if test "x$VS_ENV_CMD" = x; then
30289    VS_VERSION="${VS_VERSION}"
30290    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30291    METHOD="well-known name"
30292
30293    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30294      VCVARSFILE="vc/bin/vcvars32.bat"
30295    else
30296      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30297    fi
30298
30299
30300  windows_path="$VS_BASE"
30301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30302    unix_path=`$CYGPATH -u "$windows_path"`
30303    VS_BASE="$unix_path"
30304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30306    VS_BASE="$unix_path"
30307  fi
30308
30309    if test -d "$VS_BASE"; then
30310      if test -f "$VS_BASE/$VCVARSFILE"; then
30311        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30312$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30313        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30314        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30315        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30316        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30317      else
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30319$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30320        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30321$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30322      fi
30323    fi
30324  fi
30325
30326  fi
30327  # Work around the insanely named ProgramFiles(x86) env variable
30328  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30329  if test "x$PROGRAMFILES_X86" != x; then
30330
30331  if test "x$VS_ENV_CMD" = x; then
30332    VS_VERSION="${VS_VERSION}"
30333    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30334    METHOD="well-known name"
30335
30336    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30337      VCVARSFILE="vc/bin/vcvars32.bat"
30338    else
30339      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30340    fi
30341
30342
30343  windows_path="$VS_BASE"
30344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30345    unix_path=`$CYGPATH -u "$windows_path"`
30346    VS_BASE="$unix_path"
30347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30349    VS_BASE="$unix_path"
30350  fi
30351
30352    if test -d "$VS_BASE"; then
30353      if test -f "$VS_BASE/$VCVARSFILE"; then
30354        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30355$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30356        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30357        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30358        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30359        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30360      else
30361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30362$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30364$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30365      fi
30366    fi
30367  fi
30368
30369  fi
30370
30371  if test "x$VS_ENV_CMD" = x; then
30372    VS_VERSION="${VS_VERSION}"
30373    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30374    METHOD="well-known name"
30375
30376    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30377      VCVARSFILE="vc/bin/vcvars32.bat"
30378    else
30379      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30380    fi
30381
30382
30383  windows_path="$VS_BASE"
30384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30385    unix_path=`$CYGPATH -u "$windows_path"`
30386    VS_BASE="$unix_path"
30387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30389    VS_BASE="$unix_path"
30390  fi
30391
30392    if test -d "$VS_BASE"; then
30393      if test -f "$VS_BASE/$VCVARSFILE"; then
30394        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30395$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30396        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30397        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30398        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30399        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30400      else
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30402$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30403        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30404$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30405      fi
30406    fi
30407  fi
30408
30409
30410  if test "x$VS_ENV_CMD" = x; then
30411    VS_VERSION="${VS_VERSION}"
30412    VS_BASE="C:/Program Files (x86)/$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$SDK_INSTALL_DIR" != x; then
30450    if test "x$ProgramW6432" != x; then
30451
30452  if test "x$VS_ENV_CMD" = x; then
30453    VS_VERSION="${VS_VERSION}"
30454    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30455    METHOD="well-known name"
30456
30457  windows_path="$WIN_SDK_BASE"
30458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30459    unix_path=`$CYGPATH -u "$windows_path"`
30460    WIN_SDK_BASE="$unix_path"
30461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30463    WIN_SDK_BASE="$unix_path"
30464  fi
30465
30466    if test -d "$WIN_SDK_BASE"; then
30467      # There have been cases of partial or broken SDK installations. A missing
30468      # lib dir is not going to work.
30469      if test ! -d "$WIN_SDK_BASE/lib"; then
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30471$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30473$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30474      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30476$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30477        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30478        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30479          VS_ENV_ARGS="/x86"
30480        else
30481          VS_ENV_ARGS="/x64"
30482        fi
30483        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30484        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30485        # TODO: improve detection for other versions of SDK
30486        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30487      else
30488        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30489$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30490        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30491$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30492      fi
30493    fi
30494  fi
30495
30496    fi
30497    if test "x$PROGRAMW6432" != x; then
30498
30499  if test "x$VS_ENV_CMD" = x; then
30500    VS_VERSION="${VS_VERSION}"
30501    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30502    METHOD="well-known name"
30503
30504  windows_path="$WIN_SDK_BASE"
30505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30506    unix_path=`$CYGPATH -u "$windows_path"`
30507    WIN_SDK_BASE="$unix_path"
30508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30510    WIN_SDK_BASE="$unix_path"
30511  fi
30512
30513    if test -d "$WIN_SDK_BASE"; then
30514      # There have been cases of partial or broken SDK installations. A missing
30515      # lib dir is not going to work.
30516      if test ! -d "$WIN_SDK_BASE/lib"; then
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30518$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30520$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30521      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30523$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30524        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30525        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30526          VS_ENV_ARGS="/x86"
30527        else
30528          VS_ENV_ARGS="/x64"
30529        fi
30530        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30531        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30532        # TODO: improve detection for other versions of SDK
30533        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30534      else
30535        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30536$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30537        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30538$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30539      fi
30540    fi
30541  fi
30542
30543    fi
30544    if test "x$PROGRAMFILES" != x; then
30545
30546  if test "x$VS_ENV_CMD" = x; then
30547    VS_VERSION="${VS_VERSION}"
30548    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30549    METHOD="well-known name"
30550
30551  windows_path="$WIN_SDK_BASE"
30552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30553    unix_path=`$CYGPATH -u "$windows_path"`
30554    WIN_SDK_BASE="$unix_path"
30555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30557    WIN_SDK_BASE="$unix_path"
30558  fi
30559
30560    if test -d "$WIN_SDK_BASE"; then
30561      # There have been cases of partial or broken SDK installations. A missing
30562      # lib dir is not going to work.
30563      if test ! -d "$WIN_SDK_BASE/lib"; then
30564        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30565$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30566        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30567$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30568      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30571        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30572        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30573          VS_ENV_ARGS="/x86"
30574        else
30575          VS_ENV_ARGS="/x64"
30576        fi
30577        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30578        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30579        # TODO: improve detection for other versions of SDK
30580        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30581      else
30582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30583$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30584        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30585$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30586      fi
30587    fi
30588  fi
30589
30590    fi
30591
30592  if test "x$VS_ENV_CMD" = x; then
30593    VS_VERSION="${VS_VERSION}"
30594    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30595    METHOD="well-known name"
30596
30597  windows_path="$WIN_SDK_BASE"
30598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30599    unix_path=`$CYGPATH -u "$windows_path"`
30600    WIN_SDK_BASE="$unix_path"
30601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30603    WIN_SDK_BASE="$unix_path"
30604  fi
30605
30606    if test -d "$WIN_SDK_BASE"; then
30607      # There have been cases of partial or broken SDK installations. A missing
30608      # lib dir is not going to work.
30609      if test ! -d "$WIN_SDK_BASE/lib"; then
30610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30611$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30613$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30614      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30615        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30616$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30617        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30618        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30619          VS_ENV_ARGS="/x86"
30620        else
30621          VS_ENV_ARGS="/x64"
30622        fi
30623        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30624        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30625        # TODO: improve detection for other versions of SDK
30626        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30627      else
30628        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30629$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30631$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30632      fi
30633    fi
30634  fi
30635
30636
30637  if test "x$VS_ENV_CMD" = x; then
30638    VS_VERSION="${VS_VERSION}"
30639    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30640    METHOD="well-known name"
30641
30642  windows_path="$WIN_SDK_BASE"
30643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30644    unix_path=`$CYGPATH -u "$windows_path"`
30645    WIN_SDK_BASE="$unix_path"
30646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30648    WIN_SDK_BASE="$unix_path"
30649  fi
30650
30651    if test -d "$WIN_SDK_BASE"; then
30652      # There have been cases of partial or broken SDK installations. A missing
30653      # lib dir is not going to work.
30654      if test ! -d "$WIN_SDK_BASE/lib"; then
30655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30656$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30658$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30659      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30661$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30662        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30663        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30664          VS_ENV_ARGS="/x86"
30665        else
30666          VS_ENV_ARGS="/x64"
30667        fi
30668        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30669        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30670        # TODO: improve detection for other versions of SDK
30671        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30672      else
30673        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30674$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30676$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30677      fi
30678    fi
30679  fi
30680
30681  fi
30682
30683    if test "x$VS_ENV_CMD" != x; then
30684      TOOLCHAIN_VERSION=$VS_VERSION
30685      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30686      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30687      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30688      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30689      # The rest of the variables are already evaled while probing
30690      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30691$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30692      break
30693    fi
30694  done
30695
30696
30697  # If we have a devkit, skip all of the below.
30698  if test "x$DEVKIT_VS_VERSION" = x; then
30699    if test "x$VS_ENV_CMD" != x; then
30700      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30701
30702  # Only process if variable expands to non-empty
30703
30704  if test "x$VS_ENV_CMD" != x; then
30705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30706
30707  # First separate the path from the arguments. This will split at the first
30708  # space.
30709  complete="$VS_ENV_CMD"
30710  path="${complete%% *}"
30711  tmp="$complete EOL"
30712  arguments="${tmp#* }"
30713
30714  # Input might be given as Windows format, start by converting to
30715  # unix format.
30716  new_path=`$CYGPATH -u "$path"`
30717
30718  # Now try to locate executable using which
30719  new_path=`$WHICH "$new_path" 2> /dev/null`
30720  # bat and cmd files are not always considered executable in cygwin causing which
30721  # to not find them
30722  if test "x$new_path" = x \
30723      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30724      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30725    new_path=`$CYGPATH -u "$path"`
30726  fi
30727  if test "x$new_path" = x; then
30728    # Oops. Which didn't find the executable.
30729    # The splitting of arguments from the executable at a space might have been incorrect,
30730    # since paths with space are more likely in Windows. Give it another try with the whole
30731    # argument.
30732    path="$complete"
30733    arguments="EOL"
30734    new_path=`$CYGPATH -u "$path"`
30735    new_path=`$WHICH "$new_path" 2> /dev/null`
30736    # bat and cmd files are not always considered executable in cygwin causing which
30737    # to not find them
30738    if test "x$new_path" = x \
30739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30741      new_path=`$CYGPATH -u "$path"`
30742    fi
30743    if test "x$new_path" = x; then
30744      # It's still not found. Now this is an unrecoverable error.
30745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30746$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30747      has_space=`$ECHO "$complete" | $GREP " "`
30748      if test "x$has_space" != x; then
30749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30751      fi
30752      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30753    fi
30754  fi
30755
30756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30759  # "foo.exe" is OK but "foo" is an error.
30760  #
30761  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30762  # It is also a way to make sure we got the proper file name for the real test later on.
30763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30764  if test "x$test_shortpath" = x; then
30765    # Short path failed, file does not exist as specified.
30766    # Try adding .exe or .cmd
30767    if test -f "${new_path}.exe"; then
30768      input_to_shortpath="${new_path}.exe"
30769    elif test -f "${new_path}.cmd"; then
30770      input_to_shortpath="${new_path}.cmd"
30771    else
30772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30773$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30776      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30777    fi
30778  else
30779    input_to_shortpath="$new_path"
30780  fi
30781
30782  # Call helper function which possibly converts this using DOS-style short mode.
30783  # If so, the updated path is stored in $new_path.
30784  new_path="$input_to_shortpath"
30785
30786  input_path="$input_to_shortpath"
30787  # Check if we need to convert this using DOS-style short mode. If the path
30788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30789  # take no chances and rewrite it.
30790  # Note: m4 eats our [], so we need to use [ and ] instead.
30791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30792  if test "x$has_forbidden_chars" != x; then
30793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30797      # Going to short mode and back again did indeed matter. Since short mode is
30798      # case insensitive, let's make it lowercase to improve readability.
30799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30800      # Now convert it back to Unix-style (cygpath)
30801      input_path=`$CYGPATH -u "$shortmode_path"`
30802      new_path="$input_path"
30803    fi
30804  fi
30805
30806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30807  if test "x$test_cygdrive_prefix" = x; then
30808    # As a simple fix, exclude /usr/bin since it's not a real path.
30809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30811      # a path prefixed by /cygdrive for fixpath to work.
30812      new_path="$CYGWIN_ROOT_PATH$input_path"
30813    fi
30814  fi
30815
30816  # remove trailing .exe if any
30817  new_path="${new_path/%.exe/}"
30818
30819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30820
30821  # First separate the path from the arguments. This will split at the first
30822  # space.
30823  complete="$VS_ENV_CMD"
30824  path="${complete%% *}"
30825  tmp="$complete EOL"
30826  arguments="${tmp#* }"
30827
30828  # Input might be given as Windows format, start by converting to
30829  # unix format.
30830  new_path="$path"
30831
30832  windows_path="$new_path"
30833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30834    unix_path=`$CYGPATH -u "$windows_path"`
30835    new_path="$unix_path"
30836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30838    new_path="$unix_path"
30839  fi
30840
30841
30842  # Now try to locate executable using which
30843  new_path=`$WHICH "$new_path" 2> /dev/null`
30844
30845  if test "x$new_path" = x; then
30846    # Oops. Which didn't find the executable.
30847    # The splitting of arguments from the executable at a space might have been incorrect,
30848    # since paths with space are more likely in Windows. Give it another try with the whole
30849    # argument.
30850    path="$complete"
30851    arguments="EOL"
30852    new_path="$path"
30853
30854  windows_path="$new_path"
30855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30856    unix_path=`$CYGPATH -u "$windows_path"`
30857    new_path="$unix_path"
30858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30860    new_path="$unix_path"
30861  fi
30862
30863
30864    new_path=`$WHICH "$new_path" 2> /dev/null`
30865    # bat and cmd files are not always considered executable in MSYS causing which
30866    # to not find them
30867    if test "x$new_path" = x \
30868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30870      new_path="$path"
30871
30872  windows_path="$new_path"
30873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30874    unix_path=`$CYGPATH -u "$windows_path"`
30875    new_path="$unix_path"
30876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30878    new_path="$unix_path"
30879  fi
30880
30881    fi
30882
30883    if test "x$new_path" = x; then
30884      # It's still not found. Now this is an unrecoverable error.
30885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30886$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30887      has_space=`$ECHO "$complete" | $GREP " "`
30888      if test "x$has_space" != x; then
30889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30891      fi
30892      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30893    fi
30894  fi
30895
30896  # Now new_path has a complete unix path to the binary
30897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30898    # Keep paths in /bin as-is, but remove trailing .exe if any
30899    new_path="${new_path/%.exe/}"
30900    # Do not save /bin paths to all_fixpath_prefixes!
30901  else
30902    # Not in mixed or Windows style, start by that.
30903    new_path=`cmd //c echo $new_path`
30904
30905  input_path="$new_path"
30906  # Check if we need to convert this using DOS-style short mode. If the path
30907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30908  # take no chances and rewrite it.
30909  # Note: m4 eats our [], so we need to use [ and ] instead.
30910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30911  if test "x$has_forbidden_chars" != x; then
30912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30914  fi
30915
30916    # Output is in $new_path
30917
30918  windows_path="$new_path"
30919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30920    unix_path=`$CYGPATH -u "$windows_path"`
30921    new_path="$unix_path"
30922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30924    new_path="$unix_path"
30925  fi
30926
30927    # remove trailing .exe if any
30928    new_path="${new_path/%.exe/}"
30929
30930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30932  fi
30933
30934    else
30935      # We're on a unix platform. Hooray! :)
30936      # First separate the path from the arguments. This will split at the first
30937      # space.
30938      complete="$VS_ENV_CMD"
30939      path="${complete%% *}"
30940      tmp="$complete EOL"
30941      arguments="${tmp#* }"
30942
30943      # Cannot rely on the command "which" here since it doesn't always work.
30944      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30945      if test -z "$is_absolute_path"; then
30946        # Path to executable is not absolute. Find it.
30947        IFS_save="$IFS"
30948        IFS=:
30949        for p in $PATH; do
30950          if test -f "$p/$path" && test -x "$p/$path"; then
30951            new_path="$p/$path"
30952            break
30953          fi
30954        done
30955        IFS="$IFS_save"
30956      else
30957        # This is an absolute path, we can use it without further modifications.
30958        new_path="$path"
30959      fi
30960
30961      if test "x$new_path" = x; then
30962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30963$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30964        has_space=`$ECHO "$complete" | $GREP " "`
30965        if test "x$has_space" != x; then
30966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30968        fi
30969        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30970      fi
30971    fi
30972
30973    # Now join together the path and the arguments once again
30974    if test "x$arguments" != xEOL; then
30975      new_complete="$new_path ${arguments% *}"
30976    else
30977      new_complete="$new_path"
30978    fi
30979
30980    if test "x$complete" != "x$new_complete"; then
30981      VS_ENV_CMD="$new_complete"
30982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30983$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30984    fi
30985  fi
30986
30987
30988      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30989      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30990$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30991
30992      # We need to create a couple of temporary files.
30993      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30994      $MKDIR -p $VS_ENV_TMP_DIR
30995
30996      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30997      # Instead create a shell script which will set the relevant variables when run.
30998      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30999
31000  unix_path="$WINPATH_VS_ENV_CMD"
31001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31002    windows_path=`$CYGPATH -m "$unix_path"`
31003    WINPATH_VS_ENV_CMD="$windows_path"
31004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31005    windows_path=`cmd //c echo $unix_path`
31006    WINPATH_VS_ENV_CMD="$windows_path"
31007  fi
31008
31009      WINPATH_BASH="$BASH"
31010
31011  unix_path="$WINPATH_BASH"
31012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31013    windows_path=`$CYGPATH -m "$unix_path"`
31014    WINPATH_BASH="$windows_path"
31015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31016    windows_path=`cmd //c echo $unix_path`
31017    WINPATH_BASH="$windows_path"
31018  fi
31019
31020
31021      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31022      # script (executable by bash) that will setup the important variables.
31023      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31024      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31025      # This will end up something like:
31026      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31027      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31028      # These will end up something like:
31029      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31030      # The trailing space for everyone except PATH is no typo, but is needed due
31031      # to trailing \ in the Windows paths. These will be stripped later.
31032      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31033          >> $EXTRACT_VC_ENV_BAT_FILE
31034      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31035          >> $EXTRACT_VC_ENV_BAT_FILE
31036      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31037          >> $EXTRACT_VC_ENV_BAT_FILE
31038      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31039          >> $EXTRACT_VC_ENV_BAT_FILE
31040      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31041          >> $EXTRACT_VC_ENV_BAT_FILE
31042      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31043          >> $EXTRACT_VC_ENV_BAT_FILE
31044
31045      # Now execute the newly created bat file.
31046      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31047      # Change directory so we don't need to mess with Windows paths in redirects.
31048      cd $VS_ENV_TMP_DIR
31049      cmd /c extract-vs-env.bat | $CAT
31050      cd $CURDIR
31051
31052      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31053        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31054$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31055        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31056$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31057        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31058$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31059        as_fn_error $? "Cannot continue" "$LINENO" 5
31060      fi
31061
31062      # Now set all paths and other env variables. This will allow the rest of
31063      # the configure script to find and run the compiler in the proper way.
31064      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31065$as_echo "$as_me: Setting extracted environment variables" >&6;}
31066      . $VS_ENV_TMP_DIR/set-vs-env.sh
31067      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31068      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31069    else
31070      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31071      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31072$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31073    fi
31074  fi
31075
31076  # At this point, we should have correct variables in the environment, or we can't continue.
31077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31078$as_echo_n "checking for Visual Studio variables... " >&6; }
31079
31080  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31081      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31082    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31084$as_echo "present but broken" >&6; }
31085      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31086    else
31087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31088$as_echo "ok" >&6; }
31089      # Remove any trailing "\" ";" and " " from the variables.
31090      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31091      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31092      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31093      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31094      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31095      # Remove any paths containing # (typically F#) as that messes up make. This
31096      # is needed if visual studio was installed with F# support.
31097      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31098
31099
31100
31101
31102
31103      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31104      OLDIFS="$IFS"
31105      IFS=";"
31106      for i in $VS_INCLUDE; do
31107        ipath=$i
31108        # Only process non-empty elements
31109        if test "x$ipath" != x; then
31110          IFS="$OLDIFS"
31111          # Check that directory exists before calling fixup_path
31112          testpath=$ipath
31113
31114  windows_path="$testpath"
31115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31116    unix_path=`$CYGPATH -u "$windows_path"`
31117    testpath="$unix_path"
31118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31120    testpath="$unix_path"
31121  fi
31122
31123          if test -d "$testpath"; then
31124
31125  # Only process if variable expands to non-empty
31126
31127  if test "x$ipath" != x; then
31128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31129
31130  # Input might be given as Windows format, start by converting to
31131  # unix format.
31132  path="$ipath"
31133  new_path=`$CYGPATH -u "$path"`
31134
31135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31138  # "foo.exe" is OK but "foo" is an error.
31139  #
31140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31141  # It is also a way to make sure we got the proper file name for the real test later on.
31142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31143  if test "x$test_shortpath" = x; then
31144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31145$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31146    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31147  fi
31148
31149  # Call helper function which possibly converts this using DOS-style short mode.
31150  # If so, the updated path is stored in $new_path.
31151
31152  input_path="$new_path"
31153  # Check if we need to convert this using DOS-style short mode. If the path
31154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31155  # take no chances and rewrite it.
31156  # Note: m4 eats our [], so we need to use [ and ] instead.
31157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31158  if test "x$has_forbidden_chars" != x; then
31159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31163      # Going to short mode and back again did indeed matter. Since short mode is
31164      # case insensitive, let's make it lowercase to improve readability.
31165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31166      # Now convert it back to Unix-style (cygpath)
31167      input_path=`$CYGPATH -u "$shortmode_path"`
31168      new_path="$input_path"
31169    fi
31170  fi
31171
31172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31173  if test "x$test_cygdrive_prefix" = x; then
31174    # As a simple fix, exclude /usr/bin since it's not a real path.
31175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31177      # a path prefixed by /cygdrive for fixpath to work.
31178      new_path="$CYGWIN_ROOT_PATH$input_path"
31179    fi
31180  fi
31181
31182
31183  if test "x$path" != "x$new_path"; then
31184    ipath="$new_path"
31185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31186$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31187  fi
31188
31189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31190
31191  path="$ipath"
31192  has_colon=`$ECHO $path | $GREP ^.:`
31193  new_path="$path"
31194  if test "x$has_colon" = x; then
31195    # Not in mixed or Windows style, start by that.
31196    new_path=`cmd //c echo $path`
31197  fi
31198
31199
31200  input_path="$new_path"
31201  # Check if we need to convert this using DOS-style short mode. If the path
31202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31203  # take no chances and rewrite it.
31204  # Note: m4 eats our [], so we need to use [ and ] instead.
31205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31206  if test "x$has_forbidden_chars" != x; then
31207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31209  fi
31210
31211
31212  windows_path="$new_path"
31213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31214    unix_path=`$CYGPATH -u "$windows_path"`
31215    new_path="$unix_path"
31216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31218    new_path="$unix_path"
31219  fi
31220
31221  if test "x$path" != "x$new_path"; then
31222    ipath="$new_path"
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31224$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31225  fi
31226
31227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31229
31230    else
31231      # We're on a unix platform. Hooray! :)
31232      path="$ipath"
31233      has_space=`$ECHO "$path" | $GREP " "`
31234      if test "x$has_space" != x; then
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31236$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31238      fi
31239
31240      # Use eval to expand a potential ~
31241      eval path="$path"
31242      if test ! -f "$path" && test ! -d "$path"; then
31243        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31244      fi
31245
31246      if test -d "$path"; then
31247        ipath="`cd "$path"; $THEPWDCMD -L`"
31248      else
31249        dir="`$DIRNAME "$path"`"
31250        base="`$BASENAME "$path"`"
31251        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31252      fi
31253    fi
31254  fi
31255
31256            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31257          fi
31258          IFS=";"
31259        fi
31260      done
31261      # Convert VS_LIB into SYSROOT_LDFLAGS
31262      for i in $VS_LIB; do
31263        libpath=$i
31264        # Only process non-empty elements
31265        if test "x$libpath" != x; then
31266          IFS="$OLDIFS"
31267          # Check that directory exists before calling fixup_path
31268          testpath=$libpath
31269
31270  windows_path="$testpath"
31271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31272    unix_path=`$CYGPATH -u "$windows_path"`
31273    testpath="$unix_path"
31274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31276    testpath="$unix_path"
31277  fi
31278
31279          if test -d "$testpath"; then
31280
31281  # Only process if variable expands to non-empty
31282
31283  if test "x$libpath" != x; then
31284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31285
31286  # Input might be given as Windows format, start by converting to
31287  # unix format.
31288  path="$libpath"
31289  new_path=`$CYGPATH -u "$path"`
31290
31291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31294  # "foo.exe" is OK but "foo" is an error.
31295  #
31296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31297  # It is also a way to make sure we got the proper file name for the real test later on.
31298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31299  if test "x$test_shortpath" = x; then
31300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31301$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31302    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31303  fi
31304
31305  # Call helper function which possibly converts this using DOS-style short mode.
31306  # If so, the updated path is stored in $new_path.
31307
31308  input_path="$new_path"
31309  # Check if we need to convert this using DOS-style short mode. If the path
31310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31311  # take no chances and rewrite it.
31312  # Note: m4 eats our [], so we need to use [ and ] instead.
31313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31314  if test "x$has_forbidden_chars" != x; then
31315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31319      # Going to short mode and back again did indeed matter. Since short mode is
31320      # case insensitive, let's make it lowercase to improve readability.
31321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31322      # Now convert it back to Unix-style (cygpath)
31323      input_path=`$CYGPATH -u "$shortmode_path"`
31324      new_path="$input_path"
31325    fi
31326  fi
31327
31328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31329  if test "x$test_cygdrive_prefix" = x; then
31330    # As a simple fix, exclude /usr/bin since it's not a real path.
31331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31333      # a path prefixed by /cygdrive for fixpath to work.
31334      new_path="$CYGWIN_ROOT_PATH$input_path"
31335    fi
31336  fi
31337
31338
31339  if test "x$path" != "x$new_path"; then
31340    libpath="$new_path"
31341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31342$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31343  fi
31344
31345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31346
31347  path="$libpath"
31348  has_colon=`$ECHO $path | $GREP ^.:`
31349  new_path="$path"
31350  if test "x$has_colon" = x; then
31351    # Not in mixed or Windows style, start by that.
31352    new_path=`cmd //c echo $path`
31353  fi
31354
31355
31356  input_path="$new_path"
31357  # Check if we need to convert this using DOS-style short mode. If the path
31358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31359  # take no chances and rewrite it.
31360  # Note: m4 eats our [], so we need to use [ and ] instead.
31361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31362  if test "x$has_forbidden_chars" != x; then
31363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31365  fi
31366
31367
31368  windows_path="$new_path"
31369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31370    unix_path=`$CYGPATH -u "$windows_path"`
31371    new_path="$unix_path"
31372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31374    new_path="$unix_path"
31375  fi
31376
31377  if test "x$path" != "x$new_path"; then
31378    libpath="$new_path"
31379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31380$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31381  fi
31382
31383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31385
31386    else
31387      # We're on a unix platform. Hooray! :)
31388      path="$libpath"
31389      has_space=`$ECHO "$path" | $GREP " "`
31390      if test "x$has_space" != x; then
31391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31392$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31394      fi
31395
31396      # Use eval to expand a potential ~
31397      eval path="$path"
31398      if test ! -f "$path" && test ! -d "$path"; then
31399        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31400      fi
31401
31402      if test -d "$path"; then
31403        libpath="`cd "$path"; $THEPWDCMD -L`"
31404      else
31405        dir="`$DIRNAME "$path"`"
31406        base="`$BASENAME "$path"`"
31407        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31408      fi
31409    fi
31410  fi
31411
31412            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31413          fi
31414          IFS=";"
31415        fi
31416      done
31417      IFS="$OLDIFS"
31418    fi
31419  else
31420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31421$as_echo "not found" >&6; }
31422
31423    if test "x$VS_ENV_CMD" = x; then
31424      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31425$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31426      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31427$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31428    else
31429      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31430$as_echo "$as_me: Running the extraction script failed." >&6;}
31431    fi
31432    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31433$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31434    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31435$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31436    as_fn_error $? "Cannot continue" "$LINENO" 5
31437  fi
31438
31439    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31440    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31441    PATH="$VS_PATH"
31442    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31443    export INCLUDE="$VS_INCLUDE"
31444    export LIB="$VS_LIB"
31445  else
31446    # Currently we do not define this for other toolchains. This might change as the need arise.
31447    TOOLCHAIN_VERSION=
31448  fi
31449
31450
31451  # For solaris we really need solaris tools, and not the GNU equivalent.
31452  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31453  # so add that to path before starting to probe.
31454  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31455  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31456    PATH="/usr/ccs/bin:$PATH"
31457  fi
31458
31459  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31460  # override all other locations.
31461  if test "x$TOOLCHAIN_PATH" != x; then
31462    PATH=$TOOLCHAIN_PATH:$PATH
31463  fi
31464
31465
31466  #
31467  # Setup the compilers (CC and CXX)
31468  #
31469
31470  COMPILER_NAME=C
31471  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31472
31473  if test "x$CC" != x; then
31474    # User has supplied compiler name already, always let that override.
31475    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31476$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31477    if test "x`basename $CC`" = "x$CC"; then
31478      # A command without a complete path is provided, search $PATH.
31479
31480      for ac_prog in $CC
31481do
31482  # Extract the first word of "$ac_prog", so it can be a program name with args.
31483set dummy $ac_prog; ac_word=$2
31484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31485$as_echo_n "checking for $ac_word... " >&6; }
31486if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31487  $as_echo_n "(cached) " >&6
31488else
31489  case $POTENTIAL_CC in
31490  [\\/]* | ?:[\\/]*)
31491  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31492  ;;
31493  *)
31494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31495for as_dir in $PATH
31496do
31497  IFS=$as_save_IFS
31498  test -z "$as_dir" && as_dir=.
31499    for ac_exec_ext in '' $ac_executable_extensions; do
31500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31501    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31503    break 2
31504  fi
31505done
31506  done
31507IFS=$as_save_IFS
31508
31509  ;;
31510esac
31511fi
31512POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31513if test -n "$POTENTIAL_CC"; then
31514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31515$as_echo "$POTENTIAL_CC" >&6; }
31516else
31517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31518$as_echo "no" >&6; }
31519fi
31520
31521
31522  test -n "$POTENTIAL_CC" && break
31523done
31524
31525      if test "x$POTENTIAL_CC" != x; then
31526        CC=$POTENTIAL_CC
31527      else
31528        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31529      fi
31530    else
31531      # Otherwise it might already be a complete path
31532      if test ! -x "$CC"; then
31533        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31534      fi
31535    fi
31536  else
31537    # No user supplied value. Locate compiler ourselves.
31538
31539    # If we are cross compiling, assume cross compilation tools follows the
31540    # cross compilation standard where they are prefixed with the autoconf
31541    # standard name for the target. For example the binary
31542    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31543    # If we are not cross compiling, then the default compiler name will be
31544    # used.
31545
31546    CC=
31547    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31548    # before checking the rest of the PATH.
31549    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31550    # step, this should not be necessary.
31551    if test -n "$TOOLCHAIN_PATH"; then
31552      PATH_save="$PATH"
31553      PATH="$TOOLCHAIN_PATH"
31554      for ac_prog in $SEARCH_LIST
31555do
31556  # Extract the first word of "$ac_prog", so it can be a program name with args.
31557set dummy $ac_prog; ac_word=$2
31558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31559$as_echo_n "checking for $ac_word... " >&6; }
31560if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31561  $as_echo_n "(cached) " >&6
31562else
31563  case $TOOLCHAIN_PATH_CC in
31564  [\\/]* | ?:[\\/]*)
31565  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31566  ;;
31567  *)
31568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31569for as_dir in $PATH
31570do
31571  IFS=$as_save_IFS
31572  test -z "$as_dir" && as_dir=.
31573    for ac_exec_ext in '' $ac_executable_extensions; do
31574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31575    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31577    break 2
31578  fi
31579done
31580  done
31581IFS=$as_save_IFS
31582
31583  ;;
31584esac
31585fi
31586TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31587if test -n "$TOOLCHAIN_PATH_CC"; then
31588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31589$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31590else
31591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31592$as_echo "no" >&6; }
31593fi
31594
31595
31596  test -n "$TOOLCHAIN_PATH_CC" && break
31597done
31598
31599      CC=$TOOLCHAIN_PATH_CC
31600      PATH="$PATH_save"
31601    fi
31602
31603    # AC_PATH_PROGS can't be run multiple times with the same variable,
31604    # so create a new name for this run.
31605    if test "x$CC" = x; then
31606      for ac_prog in $SEARCH_LIST
31607do
31608  # Extract the first word of "$ac_prog", so it can be a program name with args.
31609set dummy $ac_prog; ac_word=$2
31610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31611$as_echo_n "checking for $ac_word... " >&6; }
31612if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31613  $as_echo_n "(cached) " >&6
31614else
31615  case $POTENTIAL_CC in
31616  [\\/]* | ?:[\\/]*)
31617  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31618  ;;
31619  *)
31620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31621for as_dir in $PATH
31622do
31623  IFS=$as_save_IFS
31624  test -z "$as_dir" && as_dir=.
31625    for ac_exec_ext in '' $ac_executable_extensions; do
31626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31627    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31629    break 2
31630  fi
31631done
31632  done
31633IFS=$as_save_IFS
31634
31635  ;;
31636esac
31637fi
31638POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31639if test -n "$POTENTIAL_CC"; then
31640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31641$as_echo "$POTENTIAL_CC" >&6; }
31642else
31643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31644$as_echo "no" >&6; }
31645fi
31646
31647
31648  test -n "$POTENTIAL_CC" && break
31649done
31650
31651      CC=$POTENTIAL_CC
31652    fi
31653
31654    if test "x$CC" = x; then
31655
31656  # Print a helpful message on how to acquire the necessary build dependency.
31657  # devkit is the help tag: freetype, cups, alsa etc
31658  MISSING_DEPENDENCY=devkit
31659
31660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31661    cygwin_help $MISSING_DEPENDENCY
31662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31663    msys_help $MISSING_DEPENDENCY
31664  else
31665    PKGHANDLER_COMMAND=
31666
31667    case $PKGHANDLER in
31668      apt-get)
31669        apt_help     $MISSING_DEPENDENCY ;;
31670      yum)
31671        yum_help     $MISSING_DEPENDENCY ;;
31672      port)
31673        port_help    $MISSING_DEPENDENCY ;;
31674      pkgutil)
31675        pkgutil_help $MISSING_DEPENDENCY ;;
31676      pkgadd)
31677        pkgadd_help  $MISSING_DEPENDENCY ;;
31678    esac
31679
31680    if test "x$PKGHANDLER_COMMAND" != x; then
31681      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31682    fi
31683  fi
31684
31685      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31686    fi
31687  fi
31688
31689  # Now we have a compiler binary in CC. Make sure it's okay.
31690
31691  # Only process if variable expands to non-empty
31692
31693  if test "x$CC" != x; then
31694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31695
31696  # First separate the path from the arguments. This will split at the first
31697  # space.
31698  complete="$CC"
31699  path="${complete%% *}"
31700  tmp="$complete EOL"
31701  arguments="${tmp#* }"
31702
31703  # Input might be given as Windows format, start by converting to
31704  # unix format.
31705  new_path=`$CYGPATH -u "$path"`
31706
31707  # Now try to locate executable using which
31708  new_path=`$WHICH "$new_path" 2> /dev/null`
31709  # bat and cmd files are not always considered executable in cygwin causing which
31710  # to not find them
31711  if test "x$new_path" = x \
31712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31714    new_path=`$CYGPATH -u "$path"`
31715  fi
31716  if test "x$new_path" = x; then
31717    # Oops. Which didn't find the executable.
31718    # The splitting of arguments from the executable at a space might have been incorrect,
31719    # since paths with space are more likely in Windows. Give it another try with the whole
31720    # argument.
31721    path="$complete"
31722    arguments="EOL"
31723    new_path=`$CYGPATH -u "$path"`
31724    new_path=`$WHICH "$new_path" 2> /dev/null`
31725    # bat and cmd files are not always considered executable in cygwin causing which
31726    # to not find them
31727    if test "x$new_path" = x \
31728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31730      new_path=`$CYGPATH -u "$path"`
31731    fi
31732    if test "x$new_path" = x; then
31733      # It's still not found. Now this is an unrecoverable error.
31734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31735$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31736      has_space=`$ECHO "$complete" | $GREP " "`
31737      if test "x$has_space" != x; then
31738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31740      fi
31741      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31742    fi
31743  fi
31744
31745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31748  # "foo.exe" is OK but "foo" is an error.
31749  #
31750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31751  # It is also a way to make sure we got the proper file name for the real test later on.
31752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31753  if test "x$test_shortpath" = x; then
31754    # Short path failed, file does not exist as specified.
31755    # Try adding .exe or .cmd
31756    if test -f "${new_path}.exe"; then
31757      input_to_shortpath="${new_path}.exe"
31758    elif test -f "${new_path}.cmd"; then
31759      input_to_shortpath="${new_path}.cmd"
31760    else
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31762$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31765      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31766    fi
31767  else
31768    input_to_shortpath="$new_path"
31769  fi
31770
31771  # Call helper function which possibly converts this using DOS-style short mode.
31772  # If so, the updated path is stored in $new_path.
31773  new_path="$input_to_shortpath"
31774
31775  input_path="$input_to_shortpath"
31776  # Check if we need to convert this using DOS-style short mode. If the path
31777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31778  # take no chances and rewrite it.
31779  # Note: m4 eats our [], so we need to use [ and ] instead.
31780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31781  if test "x$has_forbidden_chars" != x; then
31782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31786      # Going to short mode and back again did indeed matter. Since short mode is
31787      # case insensitive, let's make it lowercase to improve readability.
31788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31789      # Now convert it back to Unix-style (cygpath)
31790      input_path=`$CYGPATH -u "$shortmode_path"`
31791      new_path="$input_path"
31792    fi
31793  fi
31794
31795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31796  if test "x$test_cygdrive_prefix" = x; then
31797    # As a simple fix, exclude /usr/bin since it's not a real path.
31798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31800      # a path prefixed by /cygdrive for fixpath to work.
31801      new_path="$CYGWIN_ROOT_PATH$input_path"
31802    fi
31803  fi
31804
31805  # remove trailing .exe if any
31806  new_path="${new_path/%.exe/}"
31807
31808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31809
31810  # First separate the path from the arguments. This will split at the first
31811  # space.
31812  complete="$CC"
31813  path="${complete%% *}"
31814  tmp="$complete EOL"
31815  arguments="${tmp#* }"
31816
31817  # Input might be given as Windows format, start by converting to
31818  # unix format.
31819  new_path="$path"
31820
31821  windows_path="$new_path"
31822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31823    unix_path=`$CYGPATH -u "$windows_path"`
31824    new_path="$unix_path"
31825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31827    new_path="$unix_path"
31828  fi
31829
31830
31831  # Now try to locate executable using which
31832  new_path=`$WHICH "$new_path" 2> /dev/null`
31833
31834  if test "x$new_path" = x; then
31835    # Oops. Which didn't find the executable.
31836    # The splitting of arguments from the executable at a space might have been incorrect,
31837    # since paths with space are more likely in Windows. Give it another try with the whole
31838    # argument.
31839    path="$complete"
31840    arguments="EOL"
31841    new_path="$path"
31842
31843  windows_path="$new_path"
31844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31845    unix_path=`$CYGPATH -u "$windows_path"`
31846    new_path="$unix_path"
31847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31849    new_path="$unix_path"
31850  fi
31851
31852
31853    new_path=`$WHICH "$new_path" 2> /dev/null`
31854    # bat and cmd files are not always considered executable in MSYS causing which
31855    # to not find them
31856    if test "x$new_path" = x \
31857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31859      new_path="$path"
31860
31861  windows_path="$new_path"
31862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31863    unix_path=`$CYGPATH -u "$windows_path"`
31864    new_path="$unix_path"
31865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31867    new_path="$unix_path"
31868  fi
31869
31870    fi
31871
31872    if test "x$new_path" = x; then
31873      # It's still not found. Now this is an unrecoverable error.
31874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31875$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31876      has_space=`$ECHO "$complete" | $GREP " "`
31877      if test "x$has_space" != x; then
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31880      fi
31881      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31882    fi
31883  fi
31884
31885  # Now new_path has a complete unix path to the binary
31886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31887    # Keep paths in /bin as-is, but remove trailing .exe if any
31888    new_path="${new_path/%.exe/}"
31889    # Do not save /bin paths to all_fixpath_prefixes!
31890  else
31891    # Not in mixed or Windows style, start by that.
31892    new_path=`cmd //c echo $new_path`
31893
31894  input_path="$new_path"
31895  # Check if we need to convert this using DOS-style short mode. If the path
31896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31897  # take no chances and rewrite it.
31898  # Note: m4 eats our [], so we need to use [ and ] instead.
31899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31900  if test "x$has_forbidden_chars" != x; then
31901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31903  fi
31904
31905    # Output is in $new_path
31906
31907  windows_path="$new_path"
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909    unix_path=`$CYGPATH -u "$windows_path"`
31910    new_path="$unix_path"
31911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31913    new_path="$unix_path"
31914  fi
31915
31916    # remove trailing .exe if any
31917    new_path="${new_path/%.exe/}"
31918
31919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31921  fi
31922
31923    else
31924      # We're on a unix platform. Hooray! :)
31925      # First separate the path from the arguments. This will split at the first
31926      # space.
31927      complete="$CC"
31928      path="${complete%% *}"
31929      tmp="$complete EOL"
31930      arguments="${tmp#* }"
31931
31932      # Cannot rely on the command "which" here since it doesn't always work.
31933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31934      if test -z "$is_absolute_path"; then
31935        # Path to executable is not absolute. Find it.
31936        IFS_save="$IFS"
31937        IFS=:
31938        for p in $PATH; do
31939          if test -f "$p/$path" && test -x "$p/$path"; then
31940            new_path="$p/$path"
31941            break
31942          fi
31943        done
31944        IFS="$IFS_save"
31945      else
31946        # This is an absolute path, we can use it without further modifications.
31947        new_path="$path"
31948      fi
31949
31950      if test "x$new_path" = x; then
31951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31952$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31953        has_space=`$ECHO "$complete" | $GREP " "`
31954        if test "x$has_space" != x; then
31955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31957        fi
31958        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31959      fi
31960    fi
31961
31962    # Now join together the path and the arguments once again
31963    if test "x$arguments" != xEOL; then
31964      new_complete="$new_path ${arguments% *}"
31965    else
31966      new_complete="$new_path"
31967    fi
31968
31969    if test "x$complete" != "x$new_complete"; then
31970      CC="$new_complete"
31971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31972$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31973    fi
31974  fi
31975
31976  TEST_COMPILER="$CC"
31977  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31978  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31979  if test "x$OPENJDK_BUILD_OS" != xaix; then
31980    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31982$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31983
31984  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31985    # Follow a chain of symbolic links. Use readlink
31986    # where it exists, else fall back to horribly
31987    # complicated shell code.
31988    if test "x$READLINK_TESTED" != yes; then
31989      # On MacOSX there is a readlink tool with a different
31990      # purpose than the GNU readlink tool. Check the found readlink.
31991      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31992      if test "x$ISGNU" = x; then
31993        # A readlink that we do not know how to use.
31994        # Are there other non-GNU readlinks out there?
31995        READLINK_TESTED=yes
31996        READLINK=
31997      fi
31998    fi
31999
32000    if test "x$READLINK" != x; then
32001      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
32002    else
32003      # Save the current directory for restoring afterwards
32004      STARTDIR=$PWD
32005      COUNTER=0
32006      sym_link_dir=`$DIRNAME $TEST_COMPILER`
32007      sym_link_file=`$BASENAME $TEST_COMPILER`
32008      cd $sym_link_dir
32009      # Use -P flag to resolve symlinks in directories.
32010      cd `$THEPWDCMD -P`
32011      sym_link_dir=`$THEPWDCMD -P`
32012      # Resolve file symlinks
32013      while test $COUNTER -lt 20; do
32014        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32015        if test "x$ISLINK" == x; then
32016          # This is not a symbolic link! We are done!
32017          break
32018        fi
32019        # Again resolve directory symlinks since the target of the just found
32020        # link could be in a different directory
32021        cd `$DIRNAME $ISLINK`
32022        sym_link_dir=`$THEPWDCMD -P`
32023        sym_link_file=`$BASENAME $ISLINK`
32024        let COUNTER=COUNTER+1
32025      done
32026      cd $STARTDIR
32027      TEST_COMPILER=$sym_link_dir/$sym_link_file
32028    fi
32029  fi
32030
32031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32032$as_echo "$TEST_COMPILER" >&6; }
32033  fi
32034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32035$as_echo_n "checking if CC is disguised ccache... " >&6; }
32036
32037  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32038  if test "x$COMPILER_BASENAME" = "xccache"; then
32039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32040$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32041    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32042    # We want to control ccache invocation ourselves, so ignore this cc and try
32043    # searching again.
32044
32045    # Remove the path to the fake ccache cc from the PATH
32046    RETRY_COMPILER_SAVED_PATH="$PATH"
32047    COMPILER_DIRNAME=`$DIRNAME $CC`
32048    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32049
32050    # Try again looking for our compiler
32051    if test -n "$ac_tool_prefix"; then
32052  for ac_prog in $TOOLCHAIN_CC_BINARY
32053  do
32054    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32055set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32057$as_echo_n "checking for $ac_word... " >&6; }
32058if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32059  $as_echo_n "(cached) " >&6
32060else
32061  if test -n "$PROPER_COMPILER_CC"; then
32062  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32063else
32064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32065for as_dir in $PATH
32066do
32067  IFS=$as_save_IFS
32068  test -z "$as_dir" && as_dir=.
32069    for ac_exec_ext in '' $ac_executable_extensions; do
32070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32071    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32073    break 2
32074  fi
32075done
32076  done
32077IFS=$as_save_IFS
32078
32079fi
32080fi
32081PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32082if test -n "$PROPER_COMPILER_CC"; then
32083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32084$as_echo "$PROPER_COMPILER_CC" >&6; }
32085else
32086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32087$as_echo "no" >&6; }
32088fi
32089
32090
32091    test -n "$PROPER_COMPILER_CC" && break
32092  done
32093fi
32094if test -z "$PROPER_COMPILER_CC"; then
32095  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32096  for ac_prog in $TOOLCHAIN_CC_BINARY
32097do
32098  # Extract the first word of "$ac_prog", so it can be a program name with args.
32099set dummy $ac_prog; ac_word=$2
32100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32101$as_echo_n "checking for $ac_word... " >&6; }
32102if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32103  $as_echo_n "(cached) " >&6
32104else
32105  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32106  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32107else
32108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32109for as_dir in $PATH
32110do
32111  IFS=$as_save_IFS
32112  test -z "$as_dir" && as_dir=.
32113    for ac_exec_ext in '' $ac_executable_extensions; do
32114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32115    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32117    break 2
32118  fi
32119done
32120  done
32121IFS=$as_save_IFS
32122
32123fi
32124fi
32125ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32126if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32128$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32129else
32130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32131$as_echo "no" >&6; }
32132fi
32133
32134
32135  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32136done
32137
32138  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32139    PROPER_COMPILER_CC=""
32140  else
32141    case $cross_compiling:$ac_tool_warned in
32142yes:)
32143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32145ac_tool_warned=yes ;;
32146esac
32147    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32148  fi
32149fi
32150
32151
32152  # Only process if variable expands to non-empty
32153
32154  if test "x$PROPER_COMPILER_CC" != x; then
32155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32156
32157  # First separate the path from the arguments. This will split at the first
32158  # space.
32159  complete="$PROPER_COMPILER_CC"
32160  path="${complete%% *}"
32161  tmp="$complete EOL"
32162  arguments="${tmp#* }"
32163
32164  # Input might be given as Windows format, start by converting to
32165  # unix format.
32166  new_path=`$CYGPATH -u "$path"`
32167
32168  # Now try to locate executable using which
32169  new_path=`$WHICH "$new_path" 2> /dev/null`
32170  # bat and cmd files are not always considered executable in cygwin causing which
32171  # to not find them
32172  if test "x$new_path" = x \
32173      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32174      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32175    new_path=`$CYGPATH -u "$path"`
32176  fi
32177  if test "x$new_path" = x; then
32178    # Oops. Which didn't find the executable.
32179    # The splitting of arguments from the executable at a space might have been incorrect,
32180    # since paths with space are more likely in Windows. Give it another try with the whole
32181    # argument.
32182    path="$complete"
32183    arguments="EOL"
32184    new_path=`$CYGPATH -u "$path"`
32185    new_path=`$WHICH "$new_path" 2> /dev/null`
32186    # bat and cmd files are not always considered executable in cygwin causing which
32187    # to not find them
32188    if test "x$new_path" = x \
32189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32191      new_path=`$CYGPATH -u "$path"`
32192    fi
32193    if test "x$new_path" = x; then
32194      # It's still not found. Now this is an unrecoverable error.
32195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32196$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32197      has_space=`$ECHO "$complete" | $GREP " "`
32198      if test "x$has_space" != x; then
32199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32201      fi
32202      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32203    fi
32204  fi
32205
32206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32209  # "foo.exe" is OK but "foo" is an error.
32210  #
32211  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32212  # It is also a way to make sure we got the proper file name for the real test later on.
32213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32214  if test "x$test_shortpath" = x; then
32215    # Short path failed, file does not exist as specified.
32216    # Try adding .exe or .cmd
32217    if test -f "${new_path}.exe"; then
32218      input_to_shortpath="${new_path}.exe"
32219    elif test -f "${new_path}.cmd"; then
32220      input_to_shortpath="${new_path}.cmd"
32221    else
32222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32223$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32226      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32227    fi
32228  else
32229    input_to_shortpath="$new_path"
32230  fi
32231
32232  # Call helper function which possibly converts this using DOS-style short mode.
32233  # If so, the updated path is stored in $new_path.
32234  new_path="$input_to_shortpath"
32235
32236  input_path="$input_to_shortpath"
32237  # Check if we need to convert this using DOS-style short mode. If the path
32238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32239  # take no chances and rewrite it.
32240  # Note: m4 eats our [], so we need to use [ and ] instead.
32241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32242  if test "x$has_forbidden_chars" != x; then
32243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32247      # Going to short mode and back again did indeed matter. Since short mode is
32248      # case insensitive, let's make it lowercase to improve readability.
32249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32250      # Now convert it back to Unix-style (cygpath)
32251      input_path=`$CYGPATH -u "$shortmode_path"`
32252      new_path="$input_path"
32253    fi
32254  fi
32255
32256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32257  if test "x$test_cygdrive_prefix" = x; then
32258    # As a simple fix, exclude /usr/bin since it's not a real path.
32259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32261      # a path prefixed by /cygdrive for fixpath to work.
32262      new_path="$CYGWIN_ROOT_PATH$input_path"
32263    fi
32264  fi
32265
32266  # remove trailing .exe if any
32267  new_path="${new_path/%.exe/}"
32268
32269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32270
32271  # First separate the path from the arguments. This will split at the first
32272  # space.
32273  complete="$PROPER_COMPILER_CC"
32274  path="${complete%% *}"
32275  tmp="$complete EOL"
32276  arguments="${tmp#* }"
32277
32278  # Input might be given as Windows format, start by converting to
32279  # unix format.
32280  new_path="$path"
32281
32282  windows_path="$new_path"
32283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32284    unix_path=`$CYGPATH -u "$windows_path"`
32285    new_path="$unix_path"
32286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32288    new_path="$unix_path"
32289  fi
32290
32291
32292  # Now try to locate executable using which
32293  new_path=`$WHICH "$new_path" 2> /dev/null`
32294
32295  if test "x$new_path" = x; then
32296    # Oops. Which didn't find the executable.
32297    # The splitting of arguments from the executable at a space might have been incorrect,
32298    # since paths with space are more likely in Windows. Give it another try with the whole
32299    # argument.
32300    path="$complete"
32301    arguments="EOL"
32302    new_path="$path"
32303
32304  windows_path="$new_path"
32305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32306    unix_path=`$CYGPATH -u "$windows_path"`
32307    new_path="$unix_path"
32308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32310    new_path="$unix_path"
32311  fi
32312
32313
32314    new_path=`$WHICH "$new_path" 2> /dev/null`
32315    # bat and cmd files are not always considered executable in MSYS causing which
32316    # to not find them
32317    if test "x$new_path" = x \
32318        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32319        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32320      new_path="$path"
32321
32322  windows_path="$new_path"
32323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324    unix_path=`$CYGPATH -u "$windows_path"`
32325    new_path="$unix_path"
32326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328    new_path="$unix_path"
32329  fi
32330
32331    fi
32332
32333    if test "x$new_path" = x; then
32334      # It's still not found. Now this is an unrecoverable error.
32335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32336$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32337      has_space=`$ECHO "$complete" | $GREP " "`
32338      if test "x$has_space" != x; then
32339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32341      fi
32342      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32343    fi
32344  fi
32345
32346  # Now new_path has a complete unix path to the binary
32347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32348    # Keep paths in /bin as-is, but remove trailing .exe if any
32349    new_path="${new_path/%.exe/}"
32350    # Do not save /bin paths to all_fixpath_prefixes!
32351  else
32352    # Not in mixed or Windows style, start by that.
32353    new_path=`cmd //c echo $new_path`
32354
32355  input_path="$new_path"
32356  # Check if we need to convert this using DOS-style short mode. If the path
32357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32358  # take no chances and rewrite it.
32359  # Note: m4 eats our [], so we need to use [ and ] instead.
32360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32361  if test "x$has_forbidden_chars" != x; then
32362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32364  fi
32365
32366    # Output is in $new_path
32367
32368  windows_path="$new_path"
32369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32370    unix_path=`$CYGPATH -u "$windows_path"`
32371    new_path="$unix_path"
32372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32374    new_path="$unix_path"
32375  fi
32376
32377    # remove trailing .exe if any
32378    new_path="${new_path/%.exe/}"
32379
32380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32382  fi
32383
32384    else
32385      # We're on a unix platform. Hooray! :)
32386      # First separate the path from the arguments. This will split at the first
32387      # space.
32388      complete="$PROPER_COMPILER_CC"
32389      path="${complete%% *}"
32390      tmp="$complete EOL"
32391      arguments="${tmp#* }"
32392
32393      # Cannot rely on the command "which" here since it doesn't always work.
32394      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32395      if test -z "$is_absolute_path"; then
32396        # Path to executable is not absolute. Find it.
32397        IFS_save="$IFS"
32398        IFS=:
32399        for p in $PATH; do
32400          if test -f "$p/$path" && test -x "$p/$path"; then
32401            new_path="$p/$path"
32402            break
32403          fi
32404        done
32405        IFS="$IFS_save"
32406      else
32407        # This is an absolute path, we can use it without further modifications.
32408        new_path="$path"
32409      fi
32410
32411      if test "x$new_path" = x; then
32412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32413$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32414        has_space=`$ECHO "$complete" | $GREP " "`
32415        if test "x$has_space" != x; then
32416          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32418        fi
32419        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32420      fi
32421    fi
32422
32423    # Now join together the path and the arguments once again
32424    if test "x$arguments" != xEOL; then
32425      new_complete="$new_path ${arguments% *}"
32426    else
32427      new_complete="$new_path"
32428    fi
32429
32430    if test "x$complete" != "x$new_complete"; then
32431      PROPER_COMPILER_CC="$new_complete"
32432      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32433$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32434    fi
32435  fi
32436
32437    PATH="$RETRY_COMPILER_SAVED_PATH"
32438
32439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32440$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32441
32442  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32443    # Follow a chain of symbolic links. Use readlink
32444    # where it exists, else fall back to horribly
32445    # complicated shell code.
32446    if test "x$READLINK_TESTED" != yes; then
32447      # On MacOSX there is a readlink tool with a different
32448      # purpose than the GNU readlink tool. Check the found readlink.
32449      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32450      if test "x$ISGNU" = x; then
32451        # A readlink that we do not know how to use.
32452        # Are there other non-GNU readlinks out there?
32453        READLINK_TESTED=yes
32454        READLINK=
32455      fi
32456    fi
32457
32458    if test "x$READLINK" != x; then
32459      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32460    else
32461      # Save the current directory for restoring afterwards
32462      STARTDIR=$PWD
32463      COUNTER=0
32464      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32465      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32466      cd $sym_link_dir
32467      # Use -P flag to resolve symlinks in directories.
32468      cd `$THEPWDCMD -P`
32469      sym_link_dir=`$THEPWDCMD -P`
32470      # Resolve file symlinks
32471      while test $COUNTER -lt 20; do
32472        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32473        if test "x$ISLINK" == x; then
32474          # This is not a symbolic link! We are done!
32475          break
32476        fi
32477        # Again resolve directory symlinks since the target of the just found
32478        # link could be in a different directory
32479        cd `$DIRNAME $ISLINK`
32480        sym_link_dir=`$THEPWDCMD -P`
32481        sym_link_file=`$BASENAME $ISLINK`
32482        let COUNTER=COUNTER+1
32483      done
32484      cd $STARTDIR
32485      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32486    fi
32487  fi
32488
32489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32490$as_echo "$PROPER_COMPILER_CC" >&6; }
32491    CC="$PROPER_COMPILER_CC"
32492  else
32493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32494$as_echo "no, keeping CC" >&6; }
32495  fi
32496
32497
32498  COMPILER=$CC
32499  COMPILER_NAME=$COMPILER_NAME
32500
32501  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32502    # cc -V output typically looks like
32503    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32504    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32505    # Check that this is likely to be the Solaris Studio cc.
32506    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32507    if test $? -ne 0; then
32508      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32509      { $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
32510$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32511      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32512$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32513      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32514$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32515      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32516    fi
32517    # Remove usage instructions (if present), and
32518    # collapse compiler output into a single line
32519    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32520        $SED -e 's/ *[Uu]sage:.*//'`
32521    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32522        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32523  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32524    # xlc -qversion output typically looks like
32525    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32526    #     Version: 11.01.0000.0015
32527    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32528    # Check that this is likely to be the IBM XL C compiler.
32529    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32530    if test $? -ne 0; then
32531      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32532      { $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
32533$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32534      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32535$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32536      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32537$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32538      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32539    fi
32540    # Collapse compiler output into a single line
32541    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32542    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32543        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32544  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32545    # There is no specific version flag, but all output starts with a version string.
32546    # First line typically looks something like:
32547    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32548    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32549    # Check that this is likely to be Microsoft CL.EXE.
32550    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32551    if test $? -ne 0; then
32552      { $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
32553$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32554      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32555$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32556      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32557    fi
32558    # Collapse compiler output into a single line
32559    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32560    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32561        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32562  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32563    # gcc --version output typically looks like
32564    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32565    #     Copyright (C) 2013 Free Software Foundation, Inc.
32566    #     This is free software; see the source for copying conditions.  There is NO
32567    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32568    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32569    # Check that this is likely to be GCC.
32570    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32571    if test $? -ne 0; then
32572      { $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
32573$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32575$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32576      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32577    fi
32578    # Remove Copyright and legalese from version string, and
32579    # collapse into a single line
32580    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32581        $SED -e 's/ *Copyright .*//'`
32582    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32583        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32584  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32585    # clang --version output typically looks like
32586    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32587    #    clang version 3.3 (tags/RELEASE_33/final)
32588    # or
32589    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32590    #    Target: x86_64-pc-linux-gnu
32591    #    Thread model: posix
32592    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32593    # Check that this is likely to be clang
32594    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32595    if test $? -ne 0; then
32596      { $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
32597$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32599$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32600      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32601    fi
32602    # Collapse compiler output into a single line
32603    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32604    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32605        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32606  else
32607      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32608  fi
32609  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32610  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32611  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32612  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32613
32614  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32615$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32616
32617
32618  # Now that we have resolved CC ourself, let autoconf have its go at it
32619  ac_ext=c
32620ac_cpp='$CPP $CPPFLAGS'
32621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32623ac_compiler_gnu=$ac_cv_c_compiler_gnu
32624if test -n "$ac_tool_prefix"; then
32625  for ac_prog in $CC
32626  do
32627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32630$as_echo_n "checking for $ac_word... " >&6; }
32631if ${ac_cv_prog_CC+:} false; then :
32632  $as_echo_n "(cached) " >&6
32633else
32634  if test -n "$CC"; then
32635  ac_cv_prog_CC="$CC" # Let the user override the test.
32636else
32637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32638for as_dir in $PATH
32639do
32640  IFS=$as_save_IFS
32641  test -z "$as_dir" && as_dir=.
32642    for ac_exec_ext in '' $ac_executable_extensions; do
32643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32644    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32646    break 2
32647  fi
32648done
32649  done
32650IFS=$as_save_IFS
32651
32652fi
32653fi
32654CC=$ac_cv_prog_CC
32655if test -n "$CC"; then
32656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32657$as_echo "$CC" >&6; }
32658else
32659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32660$as_echo "no" >&6; }
32661fi
32662
32663
32664    test -n "$CC" && break
32665  done
32666fi
32667if test -z "$CC"; then
32668  ac_ct_CC=$CC
32669  for ac_prog in $CC
32670do
32671  # Extract the first word of "$ac_prog", so it can be a program name with args.
32672set dummy $ac_prog; ac_word=$2
32673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32674$as_echo_n "checking for $ac_word... " >&6; }
32675if ${ac_cv_prog_ac_ct_CC+:} false; then :
32676  $as_echo_n "(cached) " >&6
32677else
32678  if test -n "$ac_ct_CC"; then
32679  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32680else
32681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32682for as_dir in $PATH
32683do
32684  IFS=$as_save_IFS
32685  test -z "$as_dir" && as_dir=.
32686    for ac_exec_ext in '' $ac_executable_extensions; do
32687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32688    ac_cv_prog_ac_ct_CC="$ac_prog"
32689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32690    break 2
32691  fi
32692done
32693  done
32694IFS=$as_save_IFS
32695
32696fi
32697fi
32698ac_ct_CC=$ac_cv_prog_ac_ct_CC
32699if test -n "$ac_ct_CC"; then
32700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32701$as_echo "$ac_ct_CC" >&6; }
32702else
32703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32704$as_echo "no" >&6; }
32705fi
32706
32707
32708  test -n "$ac_ct_CC" && break
32709done
32710
32711  if test "x$ac_ct_CC" = x; then
32712    CC=""
32713  else
32714    case $cross_compiling:$ac_tool_warned in
32715yes:)
32716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32718ac_tool_warned=yes ;;
32719esac
32720    CC=$ac_ct_CC
32721  fi
32722fi
32723
32724
32725test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32727as_fn_error $? "no acceptable C compiler found in \$PATH
32728See \`config.log' for more details" "$LINENO" 5; }
32729
32730# Provide some information about the compiler.
32731$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32732set X $ac_compile
32733ac_compiler=$2
32734for ac_option in --version -v -V -qversion; do
32735  { { ac_try="$ac_compiler $ac_option >&5"
32736case "(($ac_try" in
32737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32738  *) ac_try_echo=$ac_try;;
32739esac
32740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32741$as_echo "$ac_try_echo"; } >&5
32742  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32743  ac_status=$?
32744  if test -s conftest.err; then
32745    sed '10a\
32746... rest of stderr output deleted ...
32747         10q' conftest.err >conftest.er1
32748    cat conftest.er1 >&5
32749  fi
32750  rm -f conftest.er1 conftest.err
32751  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32752  test $ac_status = 0; }
32753done
32754
32755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32756/* end confdefs.h.  */
32757
32758int
32759main ()
32760{
32761
32762  ;
32763  return 0;
32764}
32765_ACEOF
32766ac_clean_files_save=$ac_clean_files
32767ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32768# Try to create an executable without -o first, disregard a.out.
32769# It will help us diagnose broken compilers, and finding out an intuition
32770# of exeext.
32771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32772$as_echo_n "checking whether the C compiler works... " >&6; }
32773ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32774
32775# The possible output files:
32776ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32777
32778ac_rmfiles=
32779for ac_file in $ac_files
32780do
32781  case $ac_file in
32782    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32783    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32784  esac
32785done
32786rm -f $ac_rmfiles
32787
32788if { { ac_try="$ac_link_default"
32789case "(($ac_try" in
32790  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32791  *) ac_try_echo=$ac_try;;
32792esac
32793eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32794$as_echo "$ac_try_echo"; } >&5
32795  (eval "$ac_link_default") 2>&5
32796  ac_status=$?
32797  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32798  test $ac_status = 0; }; then :
32799  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32800# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32801# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32802# so that the user can short-circuit this test for compilers unknown to
32803# Autoconf.
32804for ac_file in $ac_files ''
32805do
32806  test -f "$ac_file" || continue
32807  case $ac_file in
32808    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32809	;;
32810    [ab].out )
32811	# We found the default executable, but exeext='' is most
32812	# certainly right.
32813	break;;
32814    *.* )
32815	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32816	then :; else
32817	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32818	fi
32819	# We set ac_cv_exeext here because the later test for it is not
32820	# safe: cross compilers may not add the suffix if given an `-o'
32821	# argument, so we may need to know it at that point already.
32822	# Even if this section looks crufty: it has the advantage of
32823	# actually working.
32824	break;;
32825    * )
32826	break;;
32827  esac
32828done
32829test "$ac_cv_exeext" = no && ac_cv_exeext=
32830
32831else
32832  ac_file=''
32833fi
32834if test -z "$ac_file"; then :
32835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32836$as_echo "no" >&6; }
32837$as_echo "$as_me: failed program was:" >&5
32838sed 's/^/| /' conftest.$ac_ext >&5
32839
32840{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32842as_fn_error 77 "C compiler cannot create executables
32843See \`config.log' for more details" "$LINENO" 5; }
32844else
32845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32846$as_echo "yes" >&6; }
32847fi
32848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32849$as_echo_n "checking for C compiler default output file name... " >&6; }
32850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32851$as_echo "$ac_file" >&6; }
32852ac_exeext=$ac_cv_exeext
32853
32854rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32855ac_clean_files=$ac_clean_files_save
32856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32857$as_echo_n "checking for suffix of executables... " >&6; }
32858if { { ac_try="$ac_link"
32859case "(($ac_try" in
32860  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32861  *) ac_try_echo=$ac_try;;
32862esac
32863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32864$as_echo "$ac_try_echo"; } >&5
32865  (eval "$ac_link") 2>&5
32866  ac_status=$?
32867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32868  test $ac_status = 0; }; then :
32869  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32870# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32871# work properly (i.e., refer to `conftest.exe'), while it won't with
32872# `rm'.
32873for ac_file in conftest.exe conftest conftest.*; do
32874  test -f "$ac_file" || continue
32875  case $ac_file in
32876    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32877    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32878	  break;;
32879    * ) break;;
32880  esac
32881done
32882else
32883  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32885as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32886See \`config.log' for more details" "$LINENO" 5; }
32887fi
32888rm -f conftest conftest$ac_cv_exeext
32889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32890$as_echo "$ac_cv_exeext" >&6; }
32891
32892rm -f conftest.$ac_ext
32893EXEEXT=$ac_cv_exeext
32894ac_exeext=$EXEEXT
32895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32896/* end confdefs.h.  */
32897#include <stdio.h>
32898int
32899main ()
32900{
32901FILE *f = fopen ("conftest.out", "w");
32902 return ferror (f) || fclose (f) != 0;
32903
32904  ;
32905  return 0;
32906}
32907_ACEOF
32908ac_clean_files="$ac_clean_files conftest.out"
32909# Check that the compiler produces executables we can run.  If not, either
32910# the compiler is broken, or we cross compile.
32911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32912$as_echo_n "checking whether we are cross compiling... " >&6; }
32913if test "$cross_compiling" != yes; then
32914  { { ac_try="$ac_link"
32915case "(($ac_try" in
32916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32917  *) ac_try_echo=$ac_try;;
32918esac
32919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32920$as_echo "$ac_try_echo"; } >&5
32921  (eval "$ac_link") 2>&5
32922  ac_status=$?
32923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32924  test $ac_status = 0; }
32925  if { ac_try='./conftest$ac_cv_exeext'
32926  { { case "(($ac_try" in
32927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32928  *) ac_try_echo=$ac_try;;
32929esac
32930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32931$as_echo "$ac_try_echo"; } >&5
32932  (eval "$ac_try") 2>&5
32933  ac_status=$?
32934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32935  test $ac_status = 0; }; }; then
32936    cross_compiling=no
32937  else
32938    if test "$cross_compiling" = maybe; then
32939	cross_compiling=yes
32940    else
32941	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32943as_fn_error $? "cannot run C compiled programs.
32944If you meant to cross compile, use \`--host'.
32945See \`config.log' for more details" "$LINENO" 5; }
32946    fi
32947  fi
32948fi
32949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32950$as_echo "$cross_compiling" >&6; }
32951
32952rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32953ac_clean_files=$ac_clean_files_save
32954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32955$as_echo_n "checking for suffix of object files... " >&6; }
32956if ${ac_cv_objext+:} false; then :
32957  $as_echo_n "(cached) " >&6
32958else
32959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32960/* end confdefs.h.  */
32961
32962int
32963main ()
32964{
32965
32966  ;
32967  return 0;
32968}
32969_ACEOF
32970rm -f conftest.o conftest.obj
32971if { { ac_try="$ac_compile"
32972case "(($ac_try" in
32973  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32974  *) ac_try_echo=$ac_try;;
32975esac
32976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32977$as_echo "$ac_try_echo"; } >&5
32978  (eval "$ac_compile") 2>&5
32979  ac_status=$?
32980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32981  test $ac_status = 0; }; then :
32982  for ac_file in conftest.o conftest.obj conftest.*; do
32983  test -f "$ac_file" || continue;
32984  case $ac_file in
32985    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32986    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32987       break;;
32988  esac
32989done
32990else
32991  $as_echo "$as_me: failed program was:" >&5
32992sed 's/^/| /' conftest.$ac_ext >&5
32993
32994{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32996as_fn_error $? "cannot compute suffix of object files: cannot compile
32997See \`config.log' for more details" "$LINENO" 5; }
32998fi
32999rm -f conftest.$ac_cv_objext conftest.$ac_ext
33000fi
33001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33002$as_echo "$ac_cv_objext" >&6; }
33003OBJEXT=$ac_cv_objext
33004ac_objext=$OBJEXT
33005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33006$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33007if ${ac_cv_c_compiler_gnu+:} false; then :
33008  $as_echo_n "(cached) " >&6
33009else
33010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33011/* end confdefs.h.  */
33012
33013int
33014main ()
33015{
33016#ifndef __GNUC__
33017       choke me
33018#endif
33019
33020  ;
33021  return 0;
33022}
33023_ACEOF
33024if ac_fn_c_try_compile "$LINENO"; then :
33025  ac_compiler_gnu=yes
33026else
33027  ac_compiler_gnu=no
33028fi
33029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33030ac_cv_c_compiler_gnu=$ac_compiler_gnu
33031
33032fi
33033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33034$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33035if test $ac_compiler_gnu = yes; then
33036  GCC=yes
33037else
33038  GCC=
33039fi
33040ac_test_CFLAGS=${CFLAGS+set}
33041ac_save_CFLAGS=$CFLAGS
33042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33043$as_echo_n "checking whether $CC accepts -g... " >&6; }
33044if ${ac_cv_prog_cc_g+:} false; then :
33045  $as_echo_n "(cached) " >&6
33046else
33047  ac_save_c_werror_flag=$ac_c_werror_flag
33048   ac_c_werror_flag=yes
33049   ac_cv_prog_cc_g=no
33050   CFLAGS="-g"
33051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33052/* end confdefs.h.  */
33053
33054int
33055main ()
33056{
33057
33058  ;
33059  return 0;
33060}
33061_ACEOF
33062if ac_fn_c_try_compile "$LINENO"; then :
33063  ac_cv_prog_cc_g=yes
33064else
33065  CFLAGS=""
33066      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33067/* end confdefs.h.  */
33068
33069int
33070main ()
33071{
33072
33073  ;
33074  return 0;
33075}
33076_ACEOF
33077if ac_fn_c_try_compile "$LINENO"; then :
33078
33079else
33080  ac_c_werror_flag=$ac_save_c_werror_flag
33081	 CFLAGS="-g"
33082	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33083/* end confdefs.h.  */
33084
33085int
33086main ()
33087{
33088
33089  ;
33090  return 0;
33091}
33092_ACEOF
33093if ac_fn_c_try_compile "$LINENO"; then :
33094  ac_cv_prog_cc_g=yes
33095fi
33096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33097fi
33098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33099fi
33100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33101   ac_c_werror_flag=$ac_save_c_werror_flag
33102fi
33103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33104$as_echo "$ac_cv_prog_cc_g" >&6; }
33105if test "$ac_test_CFLAGS" = set; then
33106  CFLAGS=$ac_save_CFLAGS
33107elif test $ac_cv_prog_cc_g = yes; then
33108  if test "$GCC" = yes; then
33109    CFLAGS="-g -O2"
33110  else
33111    CFLAGS="-g"
33112  fi
33113else
33114  if test "$GCC" = yes; then
33115    CFLAGS="-O2"
33116  else
33117    CFLAGS=
33118  fi
33119fi
33120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33121$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33122if ${ac_cv_prog_cc_c89+:} false; then :
33123  $as_echo_n "(cached) " >&6
33124else
33125  ac_cv_prog_cc_c89=no
33126ac_save_CC=$CC
33127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33128/* end confdefs.h.  */
33129#include <stdarg.h>
33130#include <stdio.h>
33131struct stat;
33132/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33133struct buf { int x; };
33134FILE * (*rcsopen) (struct buf *, struct stat *, int);
33135static char *e (p, i)
33136     char **p;
33137     int i;
33138{
33139  return p[i];
33140}
33141static char *f (char * (*g) (char **, int), char **p, ...)
33142{
33143  char *s;
33144  va_list v;
33145  va_start (v,p);
33146  s = g (p, va_arg (v,int));
33147  va_end (v);
33148  return s;
33149}
33150
33151/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33152   function prototypes and stuff, but not '\xHH' hex character constants.
33153   These don't provoke an error unfortunately, instead are silently treated
33154   as 'x'.  The following induces an error, until -std is added to get
33155   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33156   array size at least.  It's necessary to write '\x00'==0 to get something
33157   that's true only with -std.  */
33158int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33159
33160/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33161   inside strings and character constants.  */
33162#define FOO(x) 'x'
33163int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33164
33165int test (int i, double x);
33166struct s1 {int (*f) (int a);};
33167struct s2 {int (*f) (double a);};
33168int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33169int argc;
33170char **argv;
33171int
33172main ()
33173{
33174return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33175  ;
33176  return 0;
33177}
33178_ACEOF
33179for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33180	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33181do
33182  CC="$ac_save_CC $ac_arg"
33183  if ac_fn_c_try_compile "$LINENO"; then :
33184  ac_cv_prog_cc_c89=$ac_arg
33185fi
33186rm -f core conftest.err conftest.$ac_objext
33187  test "x$ac_cv_prog_cc_c89" != "xno" && break
33188done
33189rm -f conftest.$ac_ext
33190CC=$ac_save_CC
33191
33192fi
33193# AC_CACHE_VAL
33194case "x$ac_cv_prog_cc_c89" in
33195  x)
33196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33197$as_echo "none needed" >&6; } ;;
33198  xno)
33199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33200$as_echo "unsupported" >&6; } ;;
33201  *)
33202    CC="$CC $ac_cv_prog_cc_c89"
33203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33204$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33205esac
33206if test "x$ac_cv_prog_cc_c89" != xno; then :
33207
33208fi
33209
33210ac_ext=cpp
33211ac_cpp='$CXXCPP $CPPFLAGS'
33212ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33213ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33214ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33215
33216
33217
33218  COMPILER_NAME=C++
33219  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33220
33221  if test "x$CXX" != x; then
33222    # User has supplied compiler name already, always let that override.
33223    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33224$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33225    if test "x`basename $CXX`" = "x$CXX"; then
33226      # A command without a complete path is provided, search $PATH.
33227
33228      for ac_prog in $CXX
33229do
33230  # Extract the first word of "$ac_prog", so it can be a program name with args.
33231set dummy $ac_prog; ac_word=$2
33232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33233$as_echo_n "checking for $ac_word... " >&6; }
33234if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33235  $as_echo_n "(cached) " >&6
33236else
33237  case $POTENTIAL_CXX in
33238  [\\/]* | ?:[\\/]*)
33239  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33240  ;;
33241  *)
33242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33243for as_dir in $PATH
33244do
33245  IFS=$as_save_IFS
33246  test -z "$as_dir" && as_dir=.
33247    for ac_exec_ext in '' $ac_executable_extensions; do
33248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33249    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33251    break 2
33252  fi
33253done
33254  done
33255IFS=$as_save_IFS
33256
33257  ;;
33258esac
33259fi
33260POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33261if test -n "$POTENTIAL_CXX"; then
33262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33263$as_echo "$POTENTIAL_CXX" >&6; }
33264else
33265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33266$as_echo "no" >&6; }
33267fi
33268
33269
33270  test -n "$POTENTIAL_CXX" && break
33271done
33272
33273      if test "x$POTENTIAL_CXX" != x; then
33274        CXX=$POTENTIAL_CXX
33275      else
33276        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33277      fi
33278    else
33279      # Otherwise it might already be a complete path
33280      if test ! -x "$CXX"; then
33281        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33282      fi
33283    fi
33284  else
33285    # No user supplied value. Locate compiler ourselves.
33286
33287    # If we are cross compiling, assume cross compilation tools follows the
33288    # cross compilation standard where they are prefixed with the autoconf
33289    # standard name for the target. For example the binary
33290    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33291    # If we are not cross compiling, then the default compiler name will be
33292    # used.
33293
33294    CXX=
33295    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33296    # before checking the rest of the PATH.
33297    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33298    # step, this should not be necessary.
33299    if test -n "$TOOLCHAIN_PATH"; then
33300      PATH_save="$PATH"
33301      PATH="$TOOLCHAIN_PATH"
33302      for ac_prog in $SEARCH_LIST
33303do
33304  # Extract the first word of "$ac_prog", so it can be a program name with args.
33305set dummy $ac_prog; ac_word=$2
33306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33307$as_echo_n "checking for $ac_word... " >&6; }
33308if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33309  $as_echo_n "(cached) " >&6
33310else
33311  case $TOOLCHAIN_PATH_CXX in
33312  [\\/]* | ?:[\\/]*)
33313  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33314  ;;
33315  *)
33316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33317for as_dir in $PATH
33318do
33319  IFS=$as_save_IFS
33320  test -z "$as_dir" && as_dir=.
33321    for ac_exec_ext in '' $ac_executable_extensions; do
33322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33323    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33325    break 2
33326  fi
33327done
33328  done
33329IFS=$as_save_IFS
33330
33331  ;;
33332esac
33333fi
33334TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33335if test -n "$TOOLCHAIN_PATH_CXX"; then
33336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33337$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33338else
33339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33340$as_echo "no" >&6; }
33341fi
33342
33343
33344  test -n "$TOOLCHAIN_PATH_CXX" && break
33345done
33346
33347      CXX=$TOOLCHAIN_PATH_CXX
33348      PATH="$PATH_save"
33349    fi
33350
33351    # AC_PATH_PROGS can't be run multiple times with the same variable,
33352    # so create a new name for this run.
33353    if test "x$CXX" = x; then
33354      for ac_prog in $SEARCH_LIST
33355do
33356  # Extract the first word of "$ac_prog", so it can be a program name with args.
33357set dummy $ac_prog; ac_word=$2
33358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33359$as_echo_n "checking for $ac_word... " >&6; }
33360if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33361  $as_echo_n "(cached) " >&6
33362else
33363  case $POTENTIAL_CXX in
33364  [\\/]* | ?:[\\/]*)
33365  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33366  ;;
33367  *)
33368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33369for as_dir in $PATH
33370do
33371  IFS=$as_save_IFS
33372  test -z "$as_dir" && as_dir=.
33373    for ac_exec_ext in '' $ac_executable_extensions; do
33374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33375    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33377    break 2
33378  fi
33379done
33380  done
33381IFS=$as_save_IFS
33382
33383  ;;
33384esac
33385fi
33386POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33387if test -n "$POTENTIAL_CXX"; then
33388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33389$as_echo "$POTENTIAL_CXX" >&6; }
33390else
33391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33392$as_echo "no" >&6; }
33393fi
33394
33395
33396  test -n "$POTENTIAL_CXX" && break
33397done
33398
33399      CXX=$POTENTIAL_CXX
33400    fi
33401
33402    if test "x$CXX" = x; then
33403
33404  # Print a helpful message on how to acquire the necessary build dependency.
33405  # devkit is the help tag: freetype, cups, alsa etc
33406  MISSING_DEPENDENCY=devkit
33407
33408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33409    cygwin_help $MISSING_DEPENDENCY
33410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33411    msys_help $MISSING_DEPENDENCY
33412  else
33413    PKGHANDLER_COMMAND=
33414
33415    case $PKGHANDLER in
33416      apt-get)
33417        apt_help     $MISSING_DEPENDENCY ;;
33418      yum)
33419        yum_help     $MISSING_DEPENDENCY ;;
33420      port)
33421        port_help    $MISSING_DEPENDENCY ;;
33422      pkgutil)
33423        pkgutil_help $MISSING_DEPENDENCY ;;
33424      pkgadd)
33425        pkgadd_help  $MISSING_DEPENDENCY ;;
33426    esac
33427
33428    if test "x$PKGHANDLER_COMMAND" != x; then
33429      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33430    fi
33431  fi
33432
33433      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33434    fi
33435  fi
33436
33437  # Now we have a compiler binary in CXX. Make sure it's okay.
33438
33439  # Only process if variable expands to non-empty
33440
33441  if test "x$CXX" != x; then
33442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33443
33444  # First separate the path from the arguments. This will split at the first
33445  # space.
33446  complete="$CXX"
33447  path="${complete%% *}"
33448  tmp="$complete EOL"
33449  arguments="${tmp#* }"
33450
33451  # Input might be given as Windows format, start by converting to
33452  # unix format.
33453  new_path=`$CYGPATH -u "$path"`
33454
33455  # Now try to locate executable using which
33456  new_path=`$WHICH "$new_path" 2> /dev/null`
33457  # bat and cmd files are not always considered executable in cygwin causing which
33458  # to not find them
33459  if test "x$new_path" = x \
33460      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33461      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33462    new_path=`$CYGPATH -u "$path"`
33463  fi
33464  if test "x$new_path" = x; then
33465    # Oops. Which didn't find the executable.
33466    # The splitting of arguments from the executable at a space might have been incorrect,
33467    # since paths with space are more likely in Windows. Give it another try with the whole
33468    # argument.
33469    path="$complete"
33470    arguments="EOL"
33471    new_path=`$CYGPATH -u "$path"`
33472    new_path=`$WHICH "$new_path" 2> /dev/null`
33473    # bat and cmd files are not always considered executable in cygwin causing which
33474    # to not find them
33475    if test "x$new_path" = x \
33476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33478      new_path=`$CYGPATH -u "$path"`
33479    fi
33480    if test "x$new_path" = x; then
33481      # It's still not found. Now this is an unrecoverable error.
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33483$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33484      has_space=`$ECHO "$complete" | $GREP " "`
33485      if test "x$has_space" != x; then
33486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33488      fi
33489      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33490    fi
33491  fi
33492
33493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33496  # "foo.exe" is OK but "foo" is an error.
33497  #
33498  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33499  # It is also a way to make sure we got the proper file name for the real test later on.
33500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33501  if test "x$test_shortpath" = x; then
33502    # Short path failed, file does not exist as specified.
33503    # Try adding .exe or .cmd
33504    if test -f "${new_path}.exe"; then
33505      input_to_shortpath="${new_path}.exe"
33506    elif test -f "${new_path}.cmd"; then
33507      input_to_shortpath="${new_path}.cmd"
33508    else
33509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33510$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33511      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33512$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33513      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33514    fi
33515  else
33516    input_to_shortpath="$new_path"
33517  fi
33518
33519  # Call helper function which possibly converts this using DOS-style short mode.
33520  # If so, the updated path is stored in $new_path.
33521  new_path="$input_to_shortpath"
33522
33523  input_path="$input_to_shortpath"
33524  # Check if we need to convert this using DOS-style short mode. If the path
33525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33526  # take no chances and rewrite it.
33527  # Note: m4 eats our [], so we need to use [ and ] instead.
33528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33529  if test "x$has_forbidden_chars" != x; then
33530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33534      # Going to short mode and back again did indeed matter. Since short mode is
33535      # case insensitive, let's make it lowercase to improve readability.
33536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33537      # Now convert it back to Unix-style (cygpath)
33538      input_path=`$CYGPATH -u "$shortmode_path"`
33539      new_path="$input_path"
33540    fi
33541  fi
33542
33543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33544  if test "x$test_cygdrive_prefix" = x; then
33545    # As a simple fix, exclude /usr/bin since it's not a real path.
33546    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33548      # a path prefixed by /cygdrive for fixpath to work.
33549      new_path="$CYGWIN_ROOT_PATH$input_path"
33550    fi
33551  fi
33552
33553  # remove trailing .exe if any
33554  new_path="${new_path/%.exe/}"
33555
33556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33557
33558  # First separate the path from the arguments. This will split at the first
33559  # space.
33560  complete="$CXX"
33561  path="${complete%% *}"
33562  tmp="$complete EOL"
33563  arguments="${tmp#* }"
33564
33565  # Input might be given as Windows format, start by converting to
33566  # unix format.
33567  new_path="$path"
33568
33569  windows_path="$new_path"
33570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33571    unix_path=`$CYGPATH -u "$windows_path"`
33572    new_path="$unix_path"
33573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33575    new_path="$unix_path"
33576  fi
33577
33578
33579  # Now try to locate executable using which
33580  new_path=`$WHICH "$new_path" 2> /dev/null`
33581
33582  if test "x$new_path" = x; then
33583    # Oops. Which didn't find the executable.
33584    # The splitting of arguments from the executable at a space might have been incorrect,
33585    # since paths with space are more likely in Windows. Give it another try with the whole
33586    # argument.
33587    path="$complete"
33588    arguments="EOL"
33589    new_path="$path"
33590
33591  windows_path="$new_path"
33592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33593    unix_path=`$CYGPATH -u "$windows_path"`
33594    new_path="$unix_path"
33595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33597    new_path="$unix_path"
33598  fi
33599
33600
33601    new_path=`$WHICH "$new_path" 2> /dev/null`
33602    # bat and cmd files are not always considered executable in MSYS causing which
33603    # to not find them
33604    if test "x$new_path" = x \
33605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33607      new_path="$path"
33608
33609  windows_path="$new_path"
33610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33611    unix_path=`$CYGPATH -u "$windows_path"`
33612    new_path="$unix_path"
33613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33615    new_path="$unix_path"
33616  fi
33617
33618    fi
33619
33620    if test "x$new_path" = x; then
33621      # It's still not found. Now this is an unrecoverable error.
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33623$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33624      has_space=`$ECHO "$complete" | $GREP " "`
33625      if test "x$has_space" != x; then
33626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33628      fi
33629      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33630    fi
33631  fi
33632
33633  # Now new_path has a complete unix path to the binary
33634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33635    # Keep paths in /bin as-is, but remove trailing .exe if any
33636    new_path="${new_path/%.exe/}"
33637    # Do not save /bin paths to all_fixpath_prefixes!
33638  else
33639    # Not in mixed or Windows style, start by that.
33640    new_path=`cmd //c echo $new_path`
33641
33642  input_path="$new_path"
33643  # Check if we need to convert this using DOS-style short mode. If the path
33644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33645  # take no chances and rewrite it.
33646  # Note: m4 eats our [], so we need to use [ and ] instead.
33647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33648  if test "x$has_forbidden_chars" != x; then
33649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33651  fi
33652
33653    # Output is in $new_path
33654
33655  windows_path="$new_path"
33656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33657    unix_path=`$CYGPATH -u "$windows_path"`
33658    new_path="$unix_path"
33659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33661    new_path="$unix_path"
33662  fi
33663
33664    # remove trailing .exe if any
33665    new_path="${new_path/%.exe/}"
33666
33667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33669  fi
33670
33671    else
33672      # We're on a unix platform. Hooray! :)
33673      # First separate the path from the arguments. This will split at the first
33674      # space.
33675      complete="$CXX"
33676      path="${complete%% *}"
33677      tmp="$complete EOL"
33678      arguments="${tmp#* }"
33679
33680      # Cannot rely on the command "which" here since it doesn't always work.
33681      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33682      if test -z "$is_absolute_path"; then
33683        # Path to executable is not absolute. Find it.
33684        IFS_save="$IFS"
33685        IFS=:
33686        for p in $PATH; do
33687          if test -f "$p/$path" && test -x "$p/$path"; then
33688            new_path="$p/$path"
33689            break
33690          fi
33691        done
33692        IFS="$IFS_save"
33693      else
33694        # This is an absolute path, we can use it without further modifications.
33695        new_path="$path"
33696      fi
33697
33698      if test "x$new_path" = x; then
33699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33700$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33701        has_space=`$ECHO "$complete" | $GREP " "`
33702        if test "x$has_space" != x; then
33703          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33705        fi
33706        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33707      fi
33708    fi
33709
33710    # Now join together the path and the arguments once again
33711    if test "x$arguments" != xEOL; then
33712      new_complete="$new_path ${arguments% *}"
33713    else
33714      new_complete="$new_path"
33715    fi
33716
33717    if test "x$complete" != "x$new_complete"; then
33718      CXX="$new_complete"
33719      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33720$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33721    fi
33722  fi
33723
33724  TEST_COMPILER="$CXX"
33725  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33726  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33727  if test "x$OPENJDK_BUILD_OS" != xaix; then
33728    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33730$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33731
33732  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33733    # Follow a chain of symbolic links. Use readlink
33734    # where it exists, else fall back to horribly
33735    # complicated shell code.
33736    if test "x$READLINK_TESTED" != yes; then
33737      # On MacOSX there is a readlink tool with a different
33738      # purpose than the GNU readlink tool. Check the found readlink.
33739      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33740      if test "x$ISGNU" = x; then
33741        # A readlink that we do not know how to use.
33742        # Are there other non-GNU readlinks out there?
33743        READLINK_TESTED=yes
33744        READLINK=
33745      fi
33746    fi
33747
33748    if test "x$READLINK" != x; then
33749      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33750    else
33751      # Save the current directory for restoring afterwards
33752      STARTDIR=$PWD
33753      COUNTER=0
33754      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33755      sym_link_file=`$BASENAME $TEST_COMPILER`
33756      cd $sym_link_dir
33757      # Use -P flag to resolve symlinks in directories.
33758      cd `$THEPWDCMD -P`
33759      sym_link_dir=`$THEPWDCMD -P`
33760      # Resolve file symlinks
33761      while test $COUNTER -lt 20; do
33762        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33763        if test "x$ISLINK" == x; then
33764          # This is not a symbolic link! We are done!
33765          break
33766        fi
33767        # Again resolve directory symlinks since the target of the just found
33768        # link could be in a different directory
33769        cd `$DIRNAME $ISLINK`
33770        sym_link_dir=`$THEPWDCMD -P`
33771        sym_link_file=`$BASENAME $ISLINK`
33772        let COUNTER=COUNTER+1
33773      done
33774      cd $STARTDIR
33775      TEST_COMPILER=$sym_link_dir/$sym_link_file
33776    fi
33777  fi
33778
33779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33780$as_echo "$TEST_COMPILER" >&6; }
33781  fi
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33783$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33784
33785  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33786  if test "x$COMPILER_BASENAME" = "xccache"; then
33787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33788$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33789    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33790    # We want to control ccache invocation ourselves, so ignore this cc and try
33791    # searching again.
33792
33793    # Remove the path to the fake ccache cc from the PATH
33794    RETRY_COMPILER_SAVED_PATH="$PATH"
33795    COMPILER_DIRNAME=`$DIRNAME $CXX`
33796    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33797
33798    # Try again looking for our compiler
33799    if test -n "$ac_tool_prefix"; then
33800  for ac_prog in $TOOLCHAIN_CXX_BINARY
33801  do
33802    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33805$as_echo_n "checking for $ac_word... " >&6; }
33806if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33807  $as_echo_n "(cached) " >&6
33808else
33809  if test -n "$PROPER_COMPILER_CXX"; then
33810  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33811else
33812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33813for as_dir in $PATH
33814do
33815  IFS=$as_save_IFS
33816  test -z "$as_dir" && as_dir=.
33817    for ac_exec_ext in '' $ac_executable_extensions; do
33818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33819    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827fi
33828fi
33829PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33830if test -n "$PROPER_COMPILER_CXX"; then
33831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33832$as_echo "$PROPER_COMPILER_CXX" >&6; }
33833else
33834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33835$as_echo "no" >&6; }
33836fi
33837
33838
33839    test -n "$PROPER_COMPILER_CXX" && break
33840  done
33841fi
33842if test -z "$PROPER_COMPILER_CXX"; then
33843  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33844  for ac_prog in $TOOLCHAIN_CXX_BINARY
33845do
33846  # Extract the first word of "$ac_prog", so it can be a program name with args.
33847set dummy $ac_prog; ac_word=$2
33848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33849$as_echo_n "checking for $ac_word... " >&6; }
33850if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33851  $as_echo_n "(cached) " >&6
33852else
33853  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33854  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33855else
33856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33857for as_dir in $PATH
33858do
33859  IFS=$as_save_IFS
33860  test -z "$as_dir" && as_dir=.
33861    for ac_exec_ext in '' $ac_executable_extensions; do
33862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33863    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33865    break 2
33866  fi
33867done
33868  done
33869IFS=$as_save_IFS
33870
33871fi
33872fi
33873ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33874if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33876$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33877else
33878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33879$as_echo "no" >&6; }
33880fi
33881
33882
33883  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33884done
33885
33886  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33887    PROPER_COMPILER_CXX=""
33888  else
33889    case $cross_compiling:$ac_tool_warned in
33890yes:)
33891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33893ac_tool_warned=yes ;;
33894esac
33895    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33896  fi
33897fi
33898
33899
33900  # Only process if variable expands to non-empty
33901
33902  if test "x$PROPER_COMPILER_CXX" != x; then
33903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904
33905  # First separate the path from the arguments. This will split at the first
33906  # space.
33907  complete="$PROPER_COMPILER_CXX"
33908  path="${complete%% *}"
33909  tmp="$complete EOL"
33910  arguments="${tmp#* }"
33911
33912  # Input might be given as Windows format, start by converting to
33913  # unix format.
33914  new_path=`$CYGPATH -u "$path"`
33915
33916  # Now try to locate executable using which
33917  new_path=`$WHICH "$new_path" 2> /dev/null`
33918  # bat and cmd files are not always considered executable in cygwin causing which
33919  # to not find them
33920  if test "x$new_path" = x \
33921      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33922      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33923    new_path=`$CYGPATH -u "$path"`
33924  fi
33925  if test "x$new_path" = x; then
33926    # Oops. Which didn't find the executable.
33927    # The splitting of arguments from the executable at a space might have been incorrect,
33928    # since paths with space are more likely in Windows. Give it another try with the whole
33929    # argument.
33930    path="$complete"
33931    arguments="EOL"
33932    new_path=`$CYGPATH -u "$path"`
33933    new_path=`$WHICH "$new_path" 2> /dev/null`
33934    # bat and cmd files are not always considered executable in cygwin causing which
33935    # to not find them
33936    if test "x$new_path" = x \
33937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33939      new_path=`$CYGPATH -u "$path"`
33940    fi
33941    if test "x$new_path" = x; then
33942      # It's still not found. Now this is an unrecoverable error.
33943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33944$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33945      has_space=`$ECHO "$complete" | $GREP " "`
33946      if test "x$has_space" != x; then
33947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33949      fi
33950      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33951    fi
33952  fi
33953
33954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33957  # "foo.exe" is OK but "foo" is an error.
33958  #
33959  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33960  # It is also a way to make sure we got the proper file name for the real test later on.
33961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33962  if test "x$test_shortpath" = x; then
33963    # Short path failed, file does not exist as specified.
33964    # Try adding .exe or .cmd
33965    if test -f "${new_path}.exe"; then
33966      input_to_shortpath="${new_path}.exe"
33967    elif test -f "${new_path}.cmd"; then
33968      input_to_shortpath="${new_path}.cmd"
33969    else
33970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33971$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33972      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33973$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33974      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33975    fi
33976  else
33977    input_to_shortpath="$new_path"
33978  fi
33979
33980  # Call helper function which possibly converts this using DOS-style short mode.
33981  # If so, the updated path is stored in $new_path.
33982  new_path="$input_to_shortpath"
33983
33984  input_path="$input_to_shortpath"
33985  # Check if we need to convert this using DOS-style short mode. If the path
33986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33987  # take no chances and rewrite it.
33988  # Note: m4 eats our [], so we need to use [ and ] instead.
33989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33990  if test "x$has_forbidden_chars" != x; then
33991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33995      # Going to short mode and back again did indeed matter. Since short mode is
33996      # case insensitive, let's make it lowercase to improve readability.
33997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33998      # Now convert it back to Unix-style (cygpath)
33999      input_path=`$CYGPATH -u "$shortmode_path"`
34000      new_path="$input_path"
34001    fi
34002  fi
34003
34004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34005  if test "x$test_cygdrive_prefix" = x; then
34006    # As a simple fix, exclude /usr/bin since it's not a real path.
34007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34009      # a path prefixed by /cygdrive for fixpath to work.
34010      new_path="$CYGWIN_ROOT_PATH$input_path"
34011    fi
34012  fi
34013
34014  # remove trailing .exe if any
34015  new_path="${new_path/%.exe/}"
34016
34017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34018
34019  # First separate the path from the arguments. This will split at the first
34020  # space.
34021  complete="$PROPER_COMPILER_CXX"
34022  path="${complete%% *}"
34023  tmp="$complete EOL"
34024  arguments="${tmp#* }"
34025
34026  # Input might be given as Windows format, start by converting to
34027  # unix format.
34028  new_path="$path"
34029
34030  windows_path="$new_path"
34031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34032    unix_path=`$CYGPATH -u "$windows_path"`
34033    new_path="$unix_path"
34034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34036    new_path="$unix_path"
34037  fi
34038
34039
34040  # Now try to locate executable using which
34041  new_path=`$WHICH "$new_path" 2> /dev/null`
34042
34043  if test "x$new_path" = x; then
34044    # Oops. Which didn't find the executable.
34045    # The splitting of arguments from the executable at a space might have been incorrect,
34046    # since paths with space are more likely in Windows. Give it another try with the whole
34047    # argument.
34048    path="$complete"
34049    arguments="EOL"
34050    new_path="$path"
34051
34052  windows_path="$new_path"
34053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34054    unix_path=`$CYGPATH -u "$windows_path"`
34055    new_path="$unix_path"
34056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34058    new_path="$unix_path"
34059  fi
34060
34061
34062    new_path=`$WHICH "$new_path" 2> /dev/null`
34063    # bat and cmd files are not always considered executable in MSYS causing which
34064    # to not find them
34065    if test "x$new_path" = x \
34066        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34067        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34068      new_path="$path"
34069
34070  windows_path="$new_path"
34071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34072    unix_path=`$CYGPATH -u "$windows_path"`
34073    new_path="$unix_path"
34074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34076    new_path="$unix_path"
34077  fi
34078
34079    fi
34080
34081    if test "x$new_path" = x; then
34082      # It's still not found. Now this is an unrecoverable error.
34083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34084$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34085      has_space=`$ECHO "$complete" | $GREP " "`
34086      if test "x$has_space" != x; then
34087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34089      fi
34090      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34091    fi
34092  fi
34093
34094  # Now new_path has a complete unix path to the binary
34095  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34096    # Keep paths in /bin as-is, but remove trailing .exe if any
34097    new_path="${new_path/%.exe/}"
34098    # Do not save /bin paths to all_fixpath_prefixes!
34099  else
34100    # Not in mixed or Windows style, start by that.
34101    new_path=`cmd //c echo $new_path`
34102
34103  input_path="$new_path"
34104  # Check if we need to convert this using DOS-style short mode. If the path
34105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34106  # take no chances and rewrite it.
34107  # Note: m4 eats our [], so we need to use [ and ] instead.
34108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34109  if test "x$has_forbidden_chars" != x; then
34110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34112  fi
34113
34114    # Output is in $new_path
34115
34116  windows_path="$new_path"
34117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34118    unix_path=`$CYGPATH -u "$windows_path"`
34119    new_path="$unix_path"
34120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34122    new_path="$unix_path"
34123  fi
34124
34125    # remove trailing .exe if any
34126    new_path="${new_path/%.exe/}"
34127
34128    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34129    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34130  fi
34131
34132    else
34133      # We're on a unix platform. Hooray! :)
34134      # First separate the path from the arguments. This will split at the first
34135      # space.
34136      complete="$PROPER_COMPILER_CXX"
34137      path="${complete%% *}"
34138      tmp="$complete EOL"
34139      arguments="${tmp#* }"
34140
34141      # Cannot rely on the command "which" here since it doesn't always work.
34142      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34143      if test -z "$is_absolute_path"; then
34144        # Path to executable is not absolute. Find it.
34145        IFS_save="$IFS"
34146        IFS=:
34147        for p in $PATH; do
34148          if test -f "$p/$path" && test -x "$p/$path"; then
34149            new_path="$p/$path"
34150            break
34151          fi
34152        done
34153        IFS="$IFS_save"
34154      else
34155        # This is an absolute path, we can use it without further modifications.
34156        new_path="$path"
34157      fi
34158
34159      if test "x$new_path" = x; then
34160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34161$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34162        has_space=`$ECHO "$complete" | $GREP " "`
34163        if test "x$has_space" != x; then
34164          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34165$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34166        fi
34167        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34168      fi
34169    fi
34170
34171    # Now join together the path and the arguments once again
34172    if test "x$arguments" != xEOL; then
34173      new_complete="$new_path ${arguments% *}"
34174    else
34175      new_complete="$new_path"
34176    fi
34177
34178    if test "x$complete" != "x$new_complete"; then
34179      PROPER_COMPILER_CXX="$new_complete"
34180      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34181$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34182    fi
34183  fi
34184
34185    PATH="$RETRY_COMPILER_SAVED_PATH"
34186
34187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34188$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34189
34190  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34191    # Follow a chain of symbolic links. Use readlink
34192    # where it exists, else fall back to horribly
34193    # complicated shell code.
34194    if test "x$READLINK_TESTED" != yes; then
34195      # On MacOSX there is a readlink tool with a different
34196      # purpose than the GNU readlink tool. Check the found readlink.
34197      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34198      if test "x$ISGNU" = x; then
34199        # A readlink that we do not know how to use.
34200        # Are there other non-GNU readlinks out there?
34201        READLINK_TESTED=yes
34202        READLINK=
34203      fi
34204    fi
34205
34206    if test "x$READLINK" != x; then
34207      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34208    else
34209      # Save the current directory for restoring afterwards
34210      STARTDIR=$PWD
34211      COUNTER=0
34212      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34213      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34214      cd $sym_link_dir
34215      # Use -P flag to resolve symlinks in directories.
34216      cd `$THEPWDCMD -P`
34217      sym_link_dir=`$THEPWDCMD -P`
34218      # Resolve file symlinks
34219      while test $COUNTER -lt 20; do
34220        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34221        if test "x$ISLINK" == x; then
34222          # This is not a symbolic link! We are done!
34223          break
34224        fi
34225        # Again resolve directory symlinks since the target of the just found
34226        # link could be in a different directory
34227        cd `$DIRNAME $ISLINK`
34228        sym_link_dir=`$THEPWDCMD -P`
34229        sym_link_file=`$BASENAME $ISLINK`
34230        let COUNTER=COUNTER+1
34231      done
34232      cd $STARTDIR
34233      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34234    fi
34235  fi
34236
34237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34238$as_echo "$PROPER_COMPILER_CXX" >&6; }
34239    CXX="$PROPER_COMPILER_CXX"
34240  else
34241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34242$as_echo "no, keeping CXX" >&6; }
34243  fi
34244
34245
34246  COMPILER=$CXX
34247  COMPILER_NAME=$COMPILER_NAME
34248
34249  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34250    # cc -V output typically looks like
34251    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34252    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34253    # Check that this is likely to be the Solaris Studio cc.
34254    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34255    if test $? -ne 0; then
34256      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34257      { $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
34258$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34259      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34260$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34261      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34262$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34263      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34264    fi
34265    # Remove usage instructions (if present), and
34266    # collapse compiler output into a single line
34267    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34268        $SED -e 's/ *[Uu]sage:.*//'`
34269    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34270        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34271  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34272    # xlc -qversion output typically looks like
34273    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34274    #     Version: 11.01.0000.0015
34275    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34276    # Check that this is likely to be the IBM XL C compiler.
34277    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34278    if test $? -ne 0; then
34279      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34280      { $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
34281$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34282      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34283$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34284      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34285$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34286      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34287    fi
34288    # Collapse compiler output into a single line
34289    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34290    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34291        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34292  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34293    # There is no specific version flag, but all output starts with a version string.
34294    # First line typically looks something like:
34295    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34296    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34297    # Check that this is likely to be Microsoft CL.EXE.
34298    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34299    if test $? -ne 0; then
34300      { $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
34301$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34302      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34303$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34304      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34305    fi
34306    # Collapse compiler output into a single line
34307    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34308    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34309        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34310  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34311    # gcc --version output typically looks like
34312    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34313    #     Copyright (C) 2013 Free Software Foundation, Inc.
34314    #     This is free software; see the source for copying conditions.  There is NO
34315    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34316    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34317    # Check that this is likely to be GCC.
34318    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34319    if test $? -ne 0; then
34320      { $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
34321$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34322      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34323$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34324      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34325    fi
34326    # Remove Copyright and legalese from version string, and
34327    # collapse into a single line
34328    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34329        $SED -e 's/ *Copyright .*//'`
34330    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34331        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34332  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34333    # clang --version output typically looks like
34334    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34335    #    clang version 3.3 (tags/RELEASE_33/final)
34336    # or
34337    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34338    #    Target: x86_64-pc-linux-gnu
34339    #    Thread model: posix
34340    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34341    # Check that this is likely to be clang
34342    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34343    if test $? -ne 0; then
34344      { $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
34345$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34346      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34347$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34348      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34349    fi
34350    # Collapse compiler output into a single line
34351    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34352    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34353        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34354  else
34355      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34356  fi
34357  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34358  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34359  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34360  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34361
34362  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34363$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34364
34365
34366  # Now that we have resolved CXX ourself, let autoconf have its go at it
34367  ac_ext=cpp
34368ac_cpp='$CXXCPP $CPPFLAGS'
34369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34372if test -z "$CXX"; then
34373  if test -n "$CCC"; then
34374    CXX=$CCC
34375  else
34376    if test -n "$ac_tool_prefix"; then
34377  for ac_prog in $CXX
34378  do
34379    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34380set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34382$as_echo_n "checking for $ac_word... " >&6; }
34383if ${ac_cv_prog_CXX+:} false; then :
34384  $as_echo_n "(cached) " >&6
34385else
34386  if test -n "$CXX"; then
34387  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34388else
34389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34390for as_dir in $PATH
34391do
34392  IFS=$as_save_IFS
34393  test -z "$as_dir" && as_dir=.
34394    for ac_exec_ext in '' $ac_executable_extensions; do
34395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34396    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34398    break 2
34399  fi
34400done
34401  done
34402IFS=$as_save_IFS
34403
34404fi
34405fi
34406CXX=$ac_cv_prog_CXX
34407if test -n "$CXX"; then
34408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34409$as_echo "$CXX" >&6; }
34410else
34411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34412$as_echo "no" >&6; }
34413fi
34414
34415
34416    test -n "$CXX" && break
34417  done
34418fi
34419if test -z "$CXX"; then
34420  ac_ct_CXX=$CXX
34421  for ac_prog in $CXX
34422do
34423  # Extract the first word of "$ac_prog", so it can be a program name with args.
34424set dummy $ac_prog; ac_word=$2
34425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34426$as_echo_n "checking for $ac_word... " >&6; }
34427if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34428  $as_echo_n "(cached) " >&6
34429else
34430  if test -n "$ac_ct_CXX"; then
34431  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34432else
34433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34434for as_dir in $PATH
34435do
34436  IFS=$as_save_IFS
34437  test -z "$as_dir" && as_dir=.
34438    for ac_exec_ext in '' $ac_executable_extensions; do
34439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34440    ac_cv_prog_ac_ct_CXX="$ac_prog"
34441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34442    break 2
34443  fi
34444done
34445  done
34446IFS=$as_save_IFS
34447
34448fi
34449fi
34450ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34451if test -n "$ac_ct_CXX"; then
34452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34453$as_echo "$ac_ct_CXX" >&6; }
34454else
34455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34456$as_echo "no" >&6; }
34457fi
34458
34459
34460  test -n "$ac_ct_CXX" && break
34461done
34462
34463  if test "x$ac_ct_CXX" = x; then
34464    CXX="g++"
34465  else
34466    case $cross_compiling:$ac_tool_warned in
34467yes:)
34468{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34469$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34470ac_tool_warned=yes ;;
34471esac
34472    CXX=$ac_ct_CXX
34473  fi
34474fi
34475
34476  fi
34477fi
34478# Provide some information about the compiler.
34479$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34480set X $ac_compile
34481ac_compiler=$2
34482for ac_option in --version -v -V -qversion; do
34483  { { ac_try="$ac_compiler $ac_option >&5"
34484case "(($ac_try" in
34485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34486  *) ac_try_echo=$ac_try;;
34487esac
34488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34489$as_echo "$ac_try_echo"; } >&5
34490  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34491  ac_status=$?
34492  if test -s conftest.err; then
34493    sed '10a\
34494... rest of stderr output deleted ...
34495         10q' conftest.err >conftest.er1
34496    cat conftest.er1 >&5
34497  fi
34498  rm -f conftest.er1 conftest.err
34499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34500  test $ac_status = 0; }
34501done
34502
34503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34504$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34505if ${ac_cv_cxx_compiler_gnu+:} false; then :
34506  $as_echo_n "(cached) " >&6
34507else
34508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34509/* end confdefs.h.  */
34510
34511int
34512main ()
34513{
34514#ifndef __GNUC__
34515       choke me
34516#endif
34517
34518  ;
34519  return 0;
34520}
34521_ACEOF
34522if ac_fn_cxx_try_compile "$LINENO"; then :
34523  ac_compiler_gnu=yes
34524else
34525  ac_compiler_gnu=no
34526fi
34527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34528ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34529
34530fi
34531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34532$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34533if test $ac_compiler_gnu = yes; then
34534  GXX=yes
34535else
34536  GXX=
34537fi
34538ac_test_CXXFLAGS=${CXXFLAGS+set}
34539ac_save_CXXFLAGS=$CXXFLAGS
34540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34541$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34542if ${ac_cv_prog_cxx_g+:} false; then :
34543  $as_echo_n "(cached) " >&6
34544else
34545  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34546   ac_cxx_werror_flag=yes
34547   ac_cv_prog_cxx_g=no
34548   CXXFLAGS="-g"
34549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34550/* end confdefs.h.  */
34551
34552int
34553main ()
34554{
34555
34556  ;
34557  return 0;
34558}
34559_ACEOF
34560if ac_fn_cxx_try_compile "$LINENO"; then :
34561  ac_cv_prog_cxx_g=yes
34562else
34563  CXXFLAGS=""
34564      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34565/* end confdefs.h.  */
34566
34567int
34568main ()
34569{
34570
34571  ;
34572  return 0;
34573}
34574_ACEOF
34575if ac_fn_cxx_try_compile "$LINENO"; then :
34576
34577else
34578  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34579	 CXXFLAGS="-g"
34580	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34581/* end confdefs.h.  */
34582
34583int
34584main ()
34585{
34586
34587  ;
34588  return 0;
34589}
34590_ACEOF
34591if ac_fn_cxx_try_compile "$LINENO"; then :
34592  ac_cv_prog_cxx_g=yes
34593fi
34594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34595fi
34596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34597fi
34598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34599   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34600fi
34601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34602$as_echo "$ac_cv_prog_cxx_g" >&6; }
34603if test "$ac_test_CXXFLAGS" = set; then
34604  CXXFLAGS=$ac_save_CXXFLAGS
34605elif test $ac_cv_prog_cxx_g = yes; then
34606  if test "$GXX" = yes; then
34607    CXXFLAGS="-g -O2"
34608  else
34609    CXXFLAGS="-g"
34610  fi
34611else
34612  if test "$GXX" = yes; then
34613    CXXFLAGS="-O2"
34614  else
34615    CXXFLAGS=
34616  fi
34617fi
34618ac_ext=cpp
34619ac_cpp='$CXXCPP $CPPFLAGS'
34620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34623
34624
34625  #
34626  # Setup the preprocessor (CPP and CXXCPP)
34627  #
34628  ac_ext=c
34629ac_cpp='$CPP $CPPFLAGS'
34630ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34631ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34632ac_compiler_gnu=$ac_cv_c_compiler_gnu
34633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34634$as_echo_n "checking how to run the C preprocessor... " >&6; }
34635# On Suns, sometimes $CPP names a directory.
34636if test -n "$CPP" && test -d "$CPP"; then
34637  CPP=
34638fi
34639if test -z "$CPP"; then
34640  if ${ac_cv_prog_CPP+:} false; then :
34641  $as_echo_n "(cached) " >&6
34642else
34643      # Double quotes because CPP needs to be expanded
34644    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34645    do
34646      ac_preproc_ok=false
34647for ac_c_preproc_warn_flag in '' yes
34648do
34649  # Use a header file that comes with gcc, so configuring glibc
34650  # with a fresh cross-compiler works.
34651  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34652  # <limits.h> exists even on freestanding compilers.
34653  # On the NeXT, cc -E runs the code through the compiler's parser,
34654  # not just through cpp. "Syntax error" is here to catch this case.
34655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34656/* end confdefs.h.  */
34657#ifdef __STDC__
34658# include <limits.h>
34659#else
34660# include <assert.h>
34661#endif
34662		     Syntax error
34663_ACEOF
34664if ac_fn_c_try_cpp "$LINENO"; then :
34665
34666else
34667  # Broken: fails on valid input.
34668continue
34669fi
34670rm -f conftest.err conftest.i conftest.$ac_ext
34671
34672  # OK, works on sane cases.  Now check whether nonexistent headers
34673  # can be detected and how.
34674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34675/* end confdefs.h.  */
34676#include <ac_nonexistent.h>
34677_ACEOF
34678if ac_fn_c_try_cpp "$LINENO"; then :
34679  # Broken: success on invalid input.
34680continue
34681else
34682  # Passes both tests.
34683ac_preproc_ok=:
34684break
34685fi
34686rm -f conftest.err conftest.i conftest.$ac_ext
34687
34688done
34689# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34690rm -f conftest.i conftest.err conftest.$ac_ext
34691if $ac_preproc_ok; then :
34692  break
34693fi
34694
34695    done
34696    ac_cv_prog_CPP=$CPP
34697
34698fi
34699  CPP=$ac_cv_prog_CPP
34700else
34701  ac_cv_prog_CPP=$CPP
34702fi
34703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34704$as_echo "$CPP" >&6; }
34705ac_preproc_ok=false
34706for ac_c_preproc_warn_flag in '' yes
34707do
34708  # Use a header file that comes with gcc, so configuring glibc
34709  # with a fresh cross-compiler works.
34710  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34711  # <limits.h> exists even on freestanding compilers.
34712  # On the NeXT, cc -E runs the code through the compiler's parser,
34713  # not just through cpp. "Syntax error" is here to catch this case.
34714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34715/* end confdefs.h.  */
34716#ifdef __STDC__
34717# include <limits.h>
34718#else
34719# include <assert.h>
34720#endif
34721		     Syntax error
34722_ACEOF
34723if ac_fn_c_try_cpp "$LINENO"; then :
34724
34725else
34726  # Broken: fails on valid input.
34727continue
34728fi
34729rm -f conftest.err conftest.i conftest.$ac_ext
34730
34731  # OK, works on sane cases.  Now check whether nonexistent headers
34732  # can be detected and how.
34733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34734/* end confdefs.h.  */
34735#include <ac_nonexistent.h>
34736_ACEOF
34737if ac_fn_c_try_cpp "$LINENO"; then :
34738  # Broken: success on invalid input.
34739continue
34740else
34741  # Passes both tests.
34742ac_preproc_ok=:
34743break
34744fi
34745rm -f conftest.err conftest.i conftest.$ac_ext
34746
34747done
34748# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34749rm -f conftest.i conftest.err conftest.$ac_ext
34750if $ac_preproc_ok; then :
34751
34752else
34753  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34755as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34756See \`config.log' for more details" "$LINENO" 5; }
34757fi
34758
34759ac_ext=cpp
34760ac_cpp='$CXXCPP $CPPFLAGS'
34761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34764
34765
34766  # Only process if variable expands to non-empty
34767
34768  if test "x$CPP" != x; then
34769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34770
34771  # First separate the path from the arguments. This will split at the first
34772  # space.
34773  complete="$CPP"
34774  path="${complete%% *}"
34775  tmp="$complete EOL"
34776  arguments="${tmp#* }"
34777
34778  # Input might be given as Windows format, start by converting to
34779  # unix format.
34780  new_path=`$CYGPATH -u "$path"`
34781
34782  # Now try to locate executable using which
34783  new_path=`$WHICH "$new_path" 2> /dev/null`
34784  # bat and cmd files are not always considered executable in cygwin causing which
34785  # to not find them
34786  if test "x$new_path" = x \
34787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34789    new_path=`$CYGPATH -u "$path"`
34790  fi
34791  if test "x$new_path" = x; then
34792    # Oops. Which didn't find the executable.
34793    # The splitting of arguments from the executable at a space might have been incorrect,
34794    # since paths with space are more likely in Windows. Give it another try with the whole
34795    # argument.
34796    path="$complete"
34797    arguments="EOL"
34798    new_path=`$CYGPATH -u "$path"`
34799    new_path=`$WHICH "$new_path" 2> /dev/null`
34800    # bat and cmd files are not always considered executable in cygwin causing which
34801    # to not find them
34802    if test "x$new_path" = x \
34803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34805      new_path=`$CYGPATH -u "$path"`
34806    fi
34807    if test "x$new_path" = x; then
34808      # It's still not found. Now this is an unrecoverable error.
34809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34810$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34811      has_space=`$ECHO "$complete" | $GREP " "`
34812      if test "x$has_space" != x; then
34813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34815      fi
34816      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34817    fi
34818  fi
34819
34820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34823  # "foo.exe" is OK but "foo" is an error.
34824  #
34825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34826  # It is also a way to make sure we got the proper file name for the real test later on.
34827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34828  if test "x$test_shortpath" = x; then
34829    # Short path failed, file does not exist as specified.
34830    # Try adding .exe or .cmd
34831    if test -f "${new_path}.exe"; then
34832      input_to_shortpath="${new_path}.exe"
34833    elif test -f "${new_path}.cmd"; then
34834      input_to_shortpath="${new_path}.cmd"
34835    else
34836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34837$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34840      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34841    fi
34842  else
34843    input_to_shortpath="$new_path"
34844  fi
34845
34846  # Call helper function which possibly converts this using DOS-style short mode.
34847  # If so, the updated path is stored in $new_path.
34848  new_path="$input_to_shortpath"
34849
34850  input_path="$input_to_shortpath"
34851  # Check if we need to convert this using DOS-style short mode. If the path
34852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34853  # take no chances and rewrite it.
34854  # Note: m4 eats our [], so we need to use [ and ] instead.
34855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34856  if test "x$has_forbidden_chars" != x; then
34857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34861      # Going to short mode and back again did indeed matter. Since short mode is
34862      # case insensitive, let's make it lowercase to improve readability.
34863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34864      # Now convert it back to Unix-style (cygpath)
34865      input_path=`$CYGPATH -u "$shortmode_path"`
34866      new_path="$input_path"
34867    fi
34868  fi
34869
34870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34871  if test "x$test_cygdrive_prefix" = x; then
34872    # As a simple fix, exclude /usr/bin since it's not a real path.
34873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34875      # a path prefixed by /cygdrive for fixpath to work.
34876      new_path="$CYGWIN_ROOT_PATH$input_path"
34877    fi
34878  fi
34879
34880  # remove trailing .exe if any
34881  new_path="${new_path/%.exe/}"
34882
34883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34884
34885  # First separate the path from the arguments. This will split at the first
34886  # space.
34887  complete="$CPP"
34888  path="${complete%% *}"
34889  tmp="$complete EOL"
34890  arguments="${tmp#* }"
34891
34892  # Input might be given as Windows format, start by converting to
34893  # unix format.
34894  new_path="$path"
34895
34896  windows_path="$new_path"
34897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34898    unix_path=`$CYGPATH -u "$windows_path"`
34899    new_path="$unix_path"
34900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34902    new_path="$unix_path"
34903  fi
34904
34905
34906  # Now try to locate executable using which
34907  new_path=`$WHICH "$new_path" 2> /dev/null`
34908
34909  if test "x$new_path" = x; then
34910    # Oops. Which didn't find the executable.
34911    # The splitting of arguments from the executable at a space might have been incorrect,
34912    # since paths with space are more likely in Windows. Give it another try with the whole
34913    # argument.
34914    path="$complete"
34915    arguments="EOL"
34916    new_path="$path"
34917
34918  windows_path="$new_path"
34919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34920    unix_path=`$CYGPATH -u "$windows_path"`
34921    new_path="$unix_path"
34922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34924    new_path="$unix_path"
34925  fi
34926
34927
34928    new_path=`$WHICH "$new_path" 2> /dev/null`
34929    # bat and cmd files are not always considered executable in MSYS causing which
34930    # to not find them
34931    if test "x$new_path" = x \
34932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34934      new_path="$path"
34935
34936  windows_path="$new_path"
34937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34938    unix_path=`$CYGPATH -u "$windows_path"`
34939    new_path="$unix_path"
34940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34942    new_path="$unix_path"
34943  fi
34944
34945    fi
34946
34947    if test "x$new_path" = x; then
34948      # It's still not found. Now this is an unrecoverable error.
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34950$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34951      has_space=`$ECHO "$complete" | $GREP " "`
34952      if test "x$has_space" != x; then
34953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34955      fi
34956      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34957    fi
34958  fi
34959
34960  # Now new_path has a complete unix path to the binary
34961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34962    # Keep paths in /bin as-is, but remove trailing .exe if any
34963    new_path="${new_path/%.exe/}"
34964    # Do not save /bin paths to all_fixpath_prefixes!
34965  else
34966    # Not in mixed or Windows style, start by that.
34967    new_path=`cmd //c echo $new_path`
34968
34969  input_path="$new_path"
34970  # Check if we need to convert this using DOS-style short mode. If the path
34971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34972  # take no chances and rewrite it.
34973  # Note: m4 eats our [], so we need to use [ and ] instead.
34974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34975  if test "x$has_forbidden_chars" != x; then
34976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34978  fi
34979
34980    # Output is in $new_path
34981
34982  windows_path="$new_path"
34983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34984    unix_path=`$CYGPATH -u "$windows_path"`
34985    new_path="$unix_path"
34986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34988    new_path="$unix_path"
34989  fi
34990
34991    # remove trailing .exe if any
34992    new_path="${new_path/%.exe/}"
34993
34994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34996  fi
34997
34998    else
34999      # We're on a unix platform. Hooray! :)
35000      # First separate the path from the arguments. This will split at the first
35001      # space.
35002      complete="$CPP"
35003      path="${complete%% *}"
35004      tmp="$complete EOL"
35005      arguments="${tmp#* }"
35006
35007      # Cannot rely on the command "which" here since it doesn't always work.
35008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35009      if test -z "$is_absolute_path"; then
35010        # Path to executable is not absolute. Find it.
35011        IFS_save="$IFS"
35012        IFS=:
35013        for p in $PATH; do
35014          if test -f "$p/$path" && test -x "$p/$path"; then
35015            new_path="$p/$path"
35016            break
35017          fi
35018        done
35019        IFS="$IFS_save"
35020      else
35021        # This is an absolute path, we can use it without further modifications.
35022        new_path="$path"
35023      fi
35024
35025      if test "x$new_path" = x; then
35026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35027$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35028        has_space=`$ECHO "$complete" | $GREP " "`
35029        if test "x$has_space" != x; then
35030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35032        fi
35033        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35034      fi
35035    fi
35036
35037    # Now join together the path and the arguments once again
35038    if test "x$arguments" != xEOL; then
35039      new_complete="$new_path ${arguments% *}"
35040    else
35041      new_complete="$new_path"
35042    fi
35043
35044    if test "x$complete" != "x$new_complete"; then
35045      CPP="$new_complete"
35046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35047$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35048    fi
35049  fi
35050
35051  ac_ext=cpp
35052ac_cpp='$CXXCPP $CPPFLAGS'
35053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35057$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35058if test -z "$CXXCPP"; then
35059  if ${ac_cv_prog_CXXCPP+:} false; then :
35060  $as_echo_n "(cached) " >&6
35061else
35062      # Double quotes because CXXCPP needs to be expanded
35063    for CXXCPP in "$CXX -E" "/lib/cpp"
35064    do
35065      ac_preproc_ok=false
35066for ac_cxx_preproc_warn_flag in '' yes
35067do
35068  # Use a header file that comes with gcc, so configuring glibc
35069  # with a fresh cross-compiler works.
35070  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35071  # <limits.h> exists even on freestanding compilers.
35072  # On the NeXT, cc -E runs the code through the compiler's parser,
35073  # not just through cpp. "Syntax error" is here to catch this case.
35074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35075/* end confdefs.h.  */
35076#ifdef __STDC__
35077# include <limits.h>
35078#else
35079# include <assert.h>
35080#endif
35081		     Syntax error
35082_ACEOF
35083if ac_fn_cxx_try_cpp "$LINENO"; then :
35084
35085else
35086  # Broken: fails on valid input.
35087continue
35088fi
35089rm -f conftest.err conftest.i conftest.$ac_ext
35090
35091  # OK, works on sane cases.  Now check whether nonexistent headers
35092  # can be detected and how.
35093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35094/* end confdefs.h.  */
35095#include <ac_nonexistent.h>
35096_ACEOF
35097if ac_fn_cxx_try_cpp "$LINENO"; then :
35098  # Broken: success on invalid input.
35099continue
35100else
35101  # Passes both tests.
35102ac_preproc_ok=:
35103break
35104fi
35105rm -f conftest.err conftest.i conftest.$ac_ext
35106
35107done
35108# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35109rm -f conftest.i conftest.err conftest.$ac_ext
35110if $ac_preproc_ok; then :
35111  break
35112fi
35113
35114    done
35115    ac_cv_prog_CXXCPP=$CXXCPP
35116
35117fi
35118  CXXCPP=$ac_cv_prog_CXXCPP
35119else
35120  ac_cv_prog_CXXCPP=$CXXCPP
35121fi
35122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35123$as_echo "$CXXCPP" >&6; }
35124ac_preproc_ok=false
35125for ac_cxx_preproc_warn_flag in '' yes
35126do
35127  # Use a header file that comes with gcc, so configuring glibc
35128  # with a fresh cross-compiler works.
35129  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35130  # <limits.h> exists even on freestanding compilers.
35131  # On the NeXT, cc -E runs the code through the compiler's parser,
35132  # not just through cpp. "Syntax error" is here to catch this case.
35133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35134/* end confdefs.h.  */
35135#ifdef __STDC__
35136# include <limits.h>
35137#else
35138# include <assert.h>
35139#endif
35140		     Syntax error
35141_ACEOF
35142if ac_fn_cxx_try_cpp "$LINENO"; then :
35143
35144else
35145  # Broken: fails on valid input.
35146continue
35147fi
35148rm -f conftest.err conftest.i conftest.$ac_ext
35149
35150  # OK, works on sane cases.  Now check whether nonexistent headers
35151  # can be detected and how.
35152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35153/* end confdefs.h.  */
35154#include <ac_nonexistent.h>
35155_ACEOF
35156if ac_fn_cxx_try_cpp "$LINENO"; then :
35157  # Broken: success on invalid input.
35158continue
35159else
35160  # Passes both tests.
35161ac_preproc_ok=:
35162break
35163fi
35164rm -f conftest.err conftest.i conftest.$ac_ext
35165
35166done
35167# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35168rm -f conftest.i conftest.err conftest.$ac_ext
35169if $ac_preproc_ok; then :
35170
35171else
35172  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35174as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35175See \`config.log' for more details" "$LINENO" 5; }
35176fi
35177
35178ac_ext=cpp
35179ac_cpp='$CXXCPP $CPPFLAGS'
35180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35183
35184
35185  # Only process if variable expands to non-empty
35186
35187  if test "x$CXXCPP" != x; then
35188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35189
35190  # First separate the path from the arguments. This will split at the first
35191  # space.
35192  complete="$CXXCPP"
35193  path="${complete%% *}"
35194  tmp="$complete EOL"
35195  arguments="${tmp#* }"
35196
35197  # Input might be given as Windows format, start by converting to
35198  # unix format.
35199  new_path=`$CYGPATH -u "$path"`
35200
35201  # Now try to locate executable using which
35202  new_path=`$WHICH "$new_path" 2> /dev/null`
35203  # bat and cmd files are not always considered executable in cygwin causing which
35204  # to not find them
35205  if test "x$new_path" = x \
35206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35208    new_path=`$CYGPATH -u "$path"`
35209  fi
35210  if test "x$new_path" = x; then
35211    # Oops. Which didn't find the executable.
35212    # The splitting of arguments from the executable at a space might have been incorrect,
35213    # since paths with space are more likely in Windows. Give it another try with the whole
35214    # argument.
35215    path="$complete"
35216    arguments="EOL"
35217    new_path=`$CYGPATH -u "$path"`
35218    new_path=`$WHICH "$new_path" 2> /dev/null`
35219    # bat and cmd files are not always considered executable in cygwin causing which
35220    # to not find them
35221    if test "x$new_path" = x \
35222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35224      new_path=`$CYGPATH -u "$path"`
35225    fi
35226    if test "x$new_path" = x; then
35227      # It's still not found. Now this is an unrecoverable error.
35228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35229$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35230      has_space=`$ECHO "$complete" | $GREP " "`
35231      if test "x$has_space" != x; then
35232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35234      fi
35235      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35236    fi
35237  fi
35238
35239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35242  # "foo.exe" is OK but "foo" is an error.
35243  #
35244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35245  # It is also a way to make sure we got the proper file name for the real test later on.
35246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35247  if test "x$test_shortpath" = x; then
35248    # Short path failed, file does not exist as specified.
35249    # Try adding .exe or .cmd
35250    if test -f "${new_path}.exe"; then
35251      input_to_shortpath="${new_path}.exe"
35252    elif test -f "${new_path}.cmd"; then
35253      input_to_shortpath="${new_path}.cmd"
35254    else
35255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35256$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35259      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35260    fi
35261  else
35262    input_to_shortpath="$new_path"
35263  fi
35264
35265  # Call helper function which possibly converts this using DOS-style short mode.
35266  # If so, the updated path is stored in $new_path.
35267  new_path="$input_to_shortpath"
35268
35269  input_path="$input_to_shortpath"
35270  # Check if we need to convert this using DOS-style short mode. If the path
35271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35272  # take no chances and rewrite it.
35273  # Note: m4 eats our [], so we need to use [ and ] instead.
35274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35275  if test "x$has_forbidden_chars" != x; then
35276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35280      # Going to short mode and back again did indeed matter. Since short mode is
35281      # case insensitive, let's make it lowercase to improve readability.
35282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35283      # Now convert it back to Unix-style (cygpath)
35284      input_path=`$CYGPATH -u "$shortmode_path"`
35285      new_path="$input_path"
35286    fi
35287  fi
35288
35289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35290  if test "x$test_cygdrive_prefix" = x; then
35291    # As a simple fix, exclude /usr/bin since it's not a real path.
35292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35294      # a path prefixed by /cygdrive for fixpath to work.
35295      new_path="$CYGWIN_ROOT_PATH$input_path"
35296    fi
35297  fi
35298
35299  # remove trailing .exe if any
35300  new_path="${new_path/%.exe/}"
35301
35302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35303
35304  # First separate the path from the arguments. This will split at the first
35305  # space.
35306  complete="$CXXCPP"
35307  path="${complete%% *}"
35308  tmp="$complete EOL"
35309  arguments="${tmp#* }"
35310
35311  # Input might be given as Windows format, start by converting to
35312  # unix format.
35313  new_path="$path"
35314
35315  windows_path="$new_path"
35316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35317    unix_path=`$CYGPATH -u "$windows_path"`
35318    new_path="$unix_path"
35319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35321    new_path="$unix_path"
35322  fi
35323
35324
35325  # Now try to locate executable using which
35326  new_path=`$WHICH "$new_path" 2> /dev/null`
35327
35328  if test "x$new_path" = x; then
35329    # Oops. Which didn't find the executable.
35330    # The splitting of arguments from the executable at a space might have been incorrect,
35331    # since paths with space are more likely in Windows. Give it another try with the whole
35332    # argument.
35333    path="$complete"
35334    arguments="EOL"
35335    new_path="$path"
35336
35337  windows_path="$new_path"
35338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35339    unix_path=`$CYGPATH -u "$windows_path"`
35340    new_path="$unix_path"
35341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35343    new_path="$unix_path"
35344  fi
35345
35346
35347    new_path=`$WHICH "$new_path" 2> /dev/null`
35348    # bat and cmd files are not always considered executable in MSYS causing which
35349    # to not find them
35350    if test "x$new_path" = x \
35351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35353      new_path="$path"
35354
35355  windows_path="$new_path"
35356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35357    unix_path=`$CYGPATH -u "$windows_path"`
35358    new_path="$unix_path"
35359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35361    new_path="$unix_path"
35362  fi
35363
35364    fi
35365
35366    if test "x$new_path" = x; then
35367      # It's still not found. Now this is an unrecoverable error.
35368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35369$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35370      has_space=`$ECHO "$complete" | $GREP " "`
35371      if test "x$has_space" != x; then
35372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35374      fi
35375      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35376    fi
35377  fi
35378
35379  # Now new_path has a complete unix path to the binary
35380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35381    # Keep paths in /bin as-is, but remove trailing .exe if any
35382    new_path="${new_path/%.exe/}"
35383    # Do not save /bin paths to all_fixpath_prefixes!
35384  else
35385    # Not in mixed or Windows style, start by that.
35386    new_path=`cmd //c echo $new_path`
35387
35388  input_path="$new_path"
35389  # Check if we need to convert this using DOS-style short mode. If the path
35390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35391  # take no chances and rewrite it.
35392  # Note: m4 eats our [], so we need to use [ and ] instead.
35393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35394  if test "x$has_forbidden_chars" != x; then
35395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35397  fi
35398
35399    # Output is in $new_path
35400
35401  windows_path="$new_path"
35402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35403    unix_path=`$CYGPATH -u "$windows_path"`
35404    new_path="$unix_path"
35405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35407    new_path="$unix_path"
35408  fi
35409
35410    # remove trailing .exe if any
35411    new_path="${new_path/%.exe/}"
35412
35413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35415  fi
35416
35417    else
35418      # We're on a unix platform. Hooray! :)
35419      # First separate the path from the arguments. This will split at the first
35420      # space.
35421      complete="$CXXCPP"
35422      path="${complete%% *}"
35423      tmp="$complete EOL"
35424      arguments="${tmp#* }"
35425
35426      # Cannot rely on the command "which" here since it doesn't always work.
35427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35428      if test -z "$is_absolute_path"; then
35429        # Path to executable is not absolute. Find it.
35430        IFS_save="$IFS"
35431        IFS=:
35432        for p in $PATH; do
35433          if test -f "$p/$path" && test -x "$p/$path"; then
35434            new_path="$p/$path"
35435            break
35436          fi
35437        done
35438        IFS="$IFS_save"
35439      else
35440        # This is an absolute path, we can use it without further modifications.
35441        new_path="$path"
35442      fi
35443
35444      if test "x$new_path" = x; then
35445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35446$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35447        has_space=`$ECHO "$complete" | $GREP " "`
35448        if test "x$has_space" != x; then
35449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35451        fi
35452        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35453      fi
35454    fi
35455
35456    # Now join together the path and the arguments once again
35457    if test "x$arguments" != xEOL; then
35458      new_complete="$new_path ${arguments% *}"
35459    else
35460      new_complete="$new_path"
35461    fi
35462
35463    if test "x$complete" != "x$new_complete"; then
35464      CXXCPP="$new_complete"
35465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35466$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35467    fi
35468  fi
35469
35470
35471  #
35472  # Setup the linker (LD)
35473  #
35474  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35475    # In the Microsoft toolchain we have a separate LD command "link".
35476    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35477    # a cygwin program for something completely different.
35478    # Extract the first word of "link", so it can be a program name with args.
35479set dummy link; ac_word=$2
35480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35481$as_echo_n "checking for $ac_word... " >&6; }
35482if ${ac_cv_prog_LD+:} false; then :
35483  $as_echo_n "(cached) " >&6
35484else
35485  if test -n "$LD"; then
35486  ac_cv_prog_LD="$LD" # Let the user override the test.
35487else
35488  ac_prog_rejected=no
35489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35490for as_dir in $PATH
35491do
35492  IFS=$as_save_IFS
35493  test -z "$as_dir" && as_dir=.
35494    for ac_exec_ext in '' $ac_executable_extensions; do
35495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35496    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35497       ac_prog_rejected=yes
35498       continue
35499     fi
35500    ac_cv_prog_LD="link"
35501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35502    break 2
35503  fi
35504done
35505  done
35506IFS=$as_save_IFS
35507
35508if test $ac_prog_rejected = yes; then
35509  # We found a bogon in the path, so make sure we never use it.
35510  set dummy $ac_cv_prog_LD
35511  shift
35512  if test $# != 0; then
35513    # We chose a different compiler from the bogus one.
35514    # However, it has the same basename, so the bogon will be chosen
35515    # first if we set LD to just the basename; use the full file name.
35516    shift
35517    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35518  fi
35519fi
35520fi
35521fi
35522LD=$ac_cv_prog_LD
35523if test -n "$LD"; then
35524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35525$as_echo "$LD" >&6; }
35526else
35527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35528$as_echo "no" >&6; }
35529fi
35530
35531
35532
35533  # Only process if variable expands to non-empty
35534
35535  if test "x$LD" != x; then
35536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35537
35538  # First separate the path from the arguments. This will split at the first
35539  # space.
35540  complete="$LD"
35541  path="${complete%% *}"
35542  tmp="$complete EOL"
35543  arguments="${tmp#* }"
35544
35545  # Input might be given as Windows format, start by converting to
35546  # unix format.
35547  new_path=`$CYGPATH -u "$path"`
35548
35549  # Now try to locate executable using which
35550  new_path=`$WHICH "$new_path" 2> /dev/null`
35551  # bat and cmd files are not always considered executable in cygwin causing which
35552  # to not find them
35553  if test "x$new_path" = x \
35554      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35555      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35556    new_path=`$CYGPATH -u "$path"`
35557  fi
35558  if test "x$new_path" = x; then
35559    # Oops. Which didn't find the executable.
35560    # The splitting of arguments from the executable at a space might have been incorrect,
35561    # since paths with space are more likely in Windows. Give it another try with the whole
35562    # argument.
35563    path="$complete"
35564    arguments="EOL"
35565    new_path=`$CYGPATH -u "$path"`
35566    new_path=`$WHICH "$new_path" 2> /dev/null`
35567    # bat and cmd files are not always considered executable in cygwin causing which
35568    # to not find them
35569    if test "x$new_path" = x \
35570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35572      new_path=`$CYGPATH -u "$path"`
35573    fi
35574    if test "x$new_path" = x; then
35575      # It's still not found. Now this is an unrecoverable error.
35576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35577$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35578      has_space=`$ECHO "$complete" | $GREP " "`
35579      if test "x$has_space" != x; then
35580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35582      fi
35583      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35584    fi
35585  fi
35586
35587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35590  # "foo.exe" is OK but "foo" is an error.
35591  #
35592  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35593  # It is also a way to make sure we got the proper file name for the real test later on.
35594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35595  if test "x$test_shortpath" = x; then
35596    # Short path failed, file does not exist as specified.
35597    # Try adding .exe or .cmd
35598    if test -f "${new_path}.exe"; then
35599      input_to_shortpath="${new_path}.exe"
35600    elif test -f "${new_path}.cmd"; then
35601      input_to_shortpath="${new_path}.cmd"
35602    else
35603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35604$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35605      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35606$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35607      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35608    fi
35609  else
35610    input_to_shortpath="$new_path"
35611  fi
35612
35613  # Call helper function which possibly converts this using DOS-style short mode.
35614  # If so, the updated path is stored in $new_path.
35615  new_path="$input_to_shortpath"
35616
35617  input_path="$input_to_shortpath"
35618  # Check if we need to convert this using DOS-style short mode. If the path
35619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35620  # take no chances and rewrite it.
35621  # Note: m4 eats our [], so we need to use [ and ] instead.
35622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35623  if test "x$has_forbidden_chars" != x; then
35624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35628      # Going to short mode and back again did indeed matter. Since short mode is
35629      # case insensitive, let's make it lowercase to improve readability.
35630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35631      # Now convert it back to Unix-style (cygpath)
35632      input_path=`$CYGPATH -u "$shortmode_path"`
35633      new_path="$input_path"
35634    fi
35635  fi
35636
35637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35638  if test "x$test_cygdrive_prefix" = x; then
35639    # As a simple fix, exclude /usr/bin since it's not a real path.
35640    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35642      # a path prefixed by /cygdrive for fixpath to work.
35643      new_path="$CYGWIN_ROOT_PATH$input_path"
35644    fi
35645  fi
35646
35647  # remove trailing .exe if any
35648  new_path="${new_path/%.exe/}"
35649
35650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35651
35652  # First separate the path from the arguments. This will split at the first
35653  # space.
35654  complete="$LD"
35655  path="${complete%% *}"
35656  tmp="$complete EOL"
35657  arguments="${tmp#* }"
35658
35659  # Input might be given as Windows format, start by converting to
35660  # unix format.
35661  new_path="$path"
35662
35663  windows_path="$new_path"
35664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665    unix_path=`$CYGPATH -u "$windows_path"`
35666    new_path="$unix_path"
35667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669    new_path="$unix_path"
35670  fi
35671
35672
35673  # Now try to locate executable using which
35674  new_path=`$WHICH "$new_path" 2> /dev/null`
35675
35676  if test "x$new_path" = x; then
35677    # Oops. Which didn't find the executable.
35678    # The splitting of arguments from the executable at a space might have been incorrect,
35679    # since paths with space are more likely in Windows. Give it another try with the whole
35680    # argument.
35681    path="$complete"
35682    arguments="EOL"
35683    new_path="$path"
35684
35685  windows_path="$new_path"
35686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35687    unix_path=`$CYGPATH -u "$windows_path"`
35688    new_path="$unix_path"
35689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35691    new_path="$unix_path"
35692  fi
35693
35694
35695    new_path=`$WHICH "$new_path" 2> /dev/null`
35696    # bat and cmd files are not always considered executable in MSYS causing which
35697    # to not find them
35698    if test "x$new_path" = x \
35699        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35700        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35701      new_path="$path"
35702
35703  windows_path="$new_path"
35704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35705    unix_path=`$CYGPATH -u "$windows_path"`
35706    new_path="$unix_path"
35707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35709    new_path="$unix_path"
35710  fi
35711
35712    fi
35713
35714    if test "x$new_path" = x; then
35715      # It's still not found. Now this is an unrecoverable error.
35716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35717$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35718      has_space=`$ECHO "$complete" | $GREP " "`
35719      if test "x$has_space" != x; then
35720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35722      fi
35723      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35724    fi
35725  fi
35726
35727  # Now new_path has a complete unix path to the binary
35728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35729    # Keep paths in /bin as-is, but remove trailing .exe if any
35730    new_path="${new_path/%.exe/}"
35731    # Do not save /bin paths to all_fixpath_prefixes!
35732  else
35733    # Not in mixed or Windows style, start by that.
35734    new_path=`cmd //c echo $new_path`
35735
35736  input_path="$new_path"
35737  # Check if we need to convert this using DOS-style short mode. If the path
35738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35739  # take no chances and rewrite it.
35740  # Note: m4 eats our [], so we need to use [ and ] instead.
35741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35742  if test "x$has_forbidden_chars" != x; then
35743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35745  fi
35746
35747    # Output is in $new_path
35748
35749  windows_path="$new_path"
35750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35751    unix_path=`$CYGPATH -u "$windows_path"`
35752    new_path="$unix_path"
35753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35755    new_path="$unix_path"
35756  fi
35757
35758    # remove trailing .exe if any
35759    new_path="${new_path/%.exe/}"
35760
35761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35763  fi
35764
35765    else
35766      # We're on a unix platform. Hooray! :)
35767      # First separate the path from the arguments. This will split at the first
35768      # space.
35769      complete="$LD"
35770      path="${complete%% *}"
35771      tmp="$complete EOL"
35772      arguments="${tmp#* }"
35773
35774      # Cannot rely on the command "which" here since it doesn't always work.
35775      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35776      if test -z "$is_absolute_path"; then
35777        # Path to executable is not absolute. Find it.
35778        IFS_save="$IFS"
35779        IFS=:
35780        for p in $PATH; do
35781          if test -f "$p/$path" && test -x "$p/$path"; then
35782            new_path="$p/$path"
35783            break
35784          fi
35785        done
35786        IFS="$IFS_save"
35787      else
35788        # This is an absolute path, we can use it without further modifications.
35789        new_path="$path"
35790      fi
35791
35792      if test "x$new_path" = x; then
35793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35794$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35795        has_space=`$ECHO "$complete" | $GREP " "`
35796        if test "x$has_space" != x; then
35797          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35798$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35799        fi
35800        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35801      fi
35802    fi
35803
35804    # Now join together the path and the arguments once again
35805    if test "x$arguments" != xEOL; then
35806      new_complete="$new_path ${arguments% *}"
35807    else
35808      new_complete="$new_path"
35809    fi
35810
35811    if test "x$complete" != "x$new_complete"; then
35812      LD="$new_complete"
35813      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35814$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35815    fi
35816  fi
35817
35818    # Verify that we indeed succeeded with this trick.
35819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35820$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35821    "$LD" --version > /dev/null
35822    if test $? -eq 0 ; then
35823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35824$as_echo "no" >&6; }
35825      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35826    else
35827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35828$as_echo "yes" >&6; }
35829    fi
35830    LDCXX="$LD"
35831  else
35832    # All other toolchains use the compiler to link.
35833    LD="$CC"
35834    LDCXX="$CXX"
35835  fi
35836
35837  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35838
35839
35840  #
35841  # Setup the assembler (AS)
35842  #
35843  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35844    # FIXME: should this really be solaris, or solstudio?
35845
35846
35847  # Publish this variable in the help.
35848
35849
35850  if [ -z "${AS+x}" ]; then
35851    # The variable is not set by user, try to locate tool using the code snippet
35852    for ac_prog in as
35853do
35854  # Extract the first word of "$ac_prog", so it can be a program name with args.
35855set dummy $ac_prog; ac_word=$2
35856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35857$as_echo_n "checking for $ac_word... " >&6; }
35858if ${ac_cv_path_AS+:} false; then :
35859  $as_echo_n "(cached) " >&6
35860else
35861  case $AS in
35862  [\\/]* | ?:[\\/]*)
35863  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35864  ;;
35865  *)
35866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35867for as_dir in $PATH
35868do
35869  IFS=$as_save_IFS
35870  test -z "$as_dir" && as_dir=.
35871    for ac_exec_ext in '' $ac_executable_extensions; do
35872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35873    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35875    break 2
35876  fi
35877done
35878  done
35879IFS=$as_save_IFS
35880
35881  ;;
35882esac
35883fi
35884AS=$ac_cv_path_AS
35885if test -n "$AS"; then
35886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35887$as_echo "$AS" >&6; }
35888else
35889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35890$as_echo "no" >&6; }
35891fi
35892
35893
35894  test -n "$AS" && break
35895done
35896
35897  else
35898    # The variable is set, but is it from the command line or the environment?
35899
35900    # Try to remove the string !AS! from our list.
35901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35903      # If it failed, the variable was not from the command line. Ignore it,
35904      # but warn the user (except for BASH, which is always set by the calling BASH).
35905      if test "xAS" != xBASH; then
35906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35907$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35908      fi
35909      # Try to locate tool using the code snippet
35910      for ac_prog in as
35911do
35912  # Extract the first word of "$ac_prog", so it can be a program name with args.
35913set dummy $ac_prog; ac_word=$2
35914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35915$as_echo_n "checking for $ac_word... " >&6; }
35916if ${ac_cv_path_AS+:} false; then :
35917  $as_echo_n "(cached) " >&6
35918else
35919  case $AS in
35920  [\\/]* | ?:[\\/]*)
35921  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35922  ;;
35923  *)
35924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35925for as_dir in $PATH
35926do
35927  IFS=$as_save_IFS
35928  test -z "$as_dir" && as_dir=.
35929    for ac_exec_ext in '' $ac_executable_extensions; do
35930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35931    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35933    break 2
35934  fi
35935done
35936  done
35937IFS=$as_save_IFS
35938
35939  ;;
35940esac
35941fi
35942AS=$ac_cv_path_AS
35943if test -n "$AS"; then
35944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35945$as_echo "$AS" >&6; }
35946else
35947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35948$as_echo "no" >&6; }
35949fi
35950
35951
35952  test -n "$AS" && break
35953done
35954
35955    else
35956      # If it succeeded, then it was overridden by the user. We will use it
35957      # for the tool.
35958
35959      # First remove it from the list of overridden variables, so we can test
35960      # for unknown variables in the end.
35961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35962
35963      # Check if we try to supply an empty value
35964      if test "x$AS" = x; then
35965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35966$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35968$as_echo_n "checking for AS... " >&6; }
35969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35970$as_echo "disabled" >&6; }
35971      else
35972        # Check if the provided tool contains a complete path.
35973        tool_specified="$AS"
35974        tool_basename="${tool_specified##*/}"
35975        if test "x$tool_basename" = "x$tool_specified"; then
35976          # A command without a complete path is provided, search $PATH.
35977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35978$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35979          # Extract the first word of "$tool_basename", so it can be a program name with args.
35980set dummy $tool_basename; ac_word=$2
35981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35982$as_echo_n "checking for $ac_word... " >&6; }
35983if ${ac_cv_path_AS+:} false; then :
35984  $as_echo_n "(cached) " >&6
35985else
35986  case $AS in
35987  [\\/]* | ?:[\\/]*)
35988  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35989  ;;
35990  *)
35991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35992for as_dir in $PATH
35993do
35994  IFS=$as_save_IFS
35995  test -z "$as_dir" && as_dir=.
35996    for ac_exec_ext in '' $ac_executable_extensions; do
35997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35998    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36000    break 2
36001  fi
36002done
36003  done
36004IFS=$as_save_IFS
36005
36006  ;;
36007esac
36008fi
36009AS=$ac_cv_path_AS
36010if test -n "$AS"; then
36011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36012$as_echo "$AS" >&6; }
36013else
36014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36015$as_echo "no" >&6; }
36016fi
36017
36018
36019          if test "x$AS" = x; then
36020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36021          fi
36022        else
36023          # Otherwise we believe it is a complete path. Use it as it is.
36024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36025$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36027$as_echo_n "checking for AS... " >&6; }
36028          if test ! -x "$tool_specified"; then
36029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36030$as_echo "not found" >&6; }
36031            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36032          fi
36033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36034$as_echo "$tool_specified" >&6; }
36035        fi
36036      fi
36037    fi
36038
36039  fi
36040
36041
36042
36043  # Only process if variable expands to non-empty
36044
36045  if test "x$AS" != x; then
36046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36047
36048  # First separate the path from the arguments. This will split at the first
36049  # space.
36050  complete="$AS"
36051  path="${complete%% *}"
36052  tmp="$complete EOL"
36053  arguments="${tmp#* }"
36054
36055  # Input might be given as Windows format, start by converting to
36056  # unix format.
36057  new_path=`$CYGPATH -u "$path"`
36058
36059  # Now try to locate executable using which
36060  new_path=`$WHICH "$new_path" 2> /dev/null`
36061  # bat and cmd files are not always considered executable in cygwin causing which
36062  # to not find them
36063  if test "x$new_path" = x \
36064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36066    new_path=`$CYGPATH -u "$path"`
36067  fi
36068  if test "x$new_path" = x; then
36069    # Oops. Which didn't find the executable.
36070    # The splitting of arguments from the executable at a space might have been incorrect,
36071    # since paths with space are more likely in Windows. Give it another try with the whole
36072    # argument.
36073    path="$complete"
36074    arguments="EOL"
36075    new_path=`$CYGPATH -u "$path"`
36076    new_path=`$WHICH "$new_path" 2> /dev/null`
36077    # bat and cmd files are not always considered executable in cygwin causing which
36078    # to not find them
36079    if test "x$new_path" = x \
36080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36082      new_path=`$CYGPATH -u "$path"`
36083    fi
36084    if test "x$new_path" = x; then
36085      # It's still not found. Now this is an unrecoverable error.
36086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36087$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36088      has_space=`$ECHO "$complete" | $GREP " "`
36089      if test "x$has_space" != x; then
36090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36092      fi
36093      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36094    fi
36095  fi
36096
36097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36100  # "foo.exe" is OK but "foo" is an error.
36101  #
36102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36103  # It is also a way to make sure we got the proper file name for the real test later on.
36104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36105  if test "x$test_shortpath" = x; then
36106    # Short path failed, file does not exist as specified.
36107    # Try adding .exe or .cmd
36108    if test -f "${new_path}.exe"; then
36109      input_to_shortpath="${new_path}.exe"
36110    elif test -f "${new_path}.cmd"; then
36111      input_to_shortpath="${new_path}.cmd"
36112    else
36113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36114$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36117      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36118    fi
36119  else
36120    input_to_shortpath="$new_path"
36121  fi
36122
36123  # Call helper function which possibly converts this using DOS-style short mode.
36124  # If so, the updated path is stored in $new_path.
36125  new_path="$input_to_shortpath"
36126
36127  input_path="$input_to_shortpath"
36128  # Check if we need to convert this using DOS-style short mode. If the path
36129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36130  # take no chances and rewrite it.
36131  # Note: m4 eats our [], so we need to use [ and ] instead.
36132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36133  if test "x$has_forbidden_chars" != x; then
36134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36138      # Going to short mode and back again did indeed matter. Since short mode is
36139      # case insensitive, let's make it lowercase to improve readability.
36140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36141      # Now convert it back to Unix-style (cygpath)
36142      input_path=`$CYGPATH -u "$shortmode_path"`
36143      new_path="$input_path"
36144    fi
36145  fi
36146
36147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36148  if test "x$test_cygdrive_prefix" = x; then
36149    # As a simple fix, exclude /usr/bin since it's not a real path.
36150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36152      # a path prefixed by /cygdrive for fixpath to work.
36153      new_path="$CYGWIN_ROOT_PATH$input_path"
36154    fi
36155  fi
36156
36157  # remove trailing .exe if any
36158  new_path="${new_path/%.exe/}"
36159
36160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36161
36162  # First separate the path from the arguments. This will split at the first
36163  # space.
36164  complete="$AS"
36165  path="${complete%% *}"
36166  tmp="$complete EOL"
36167  arguments="${tmp#* }"
36168
36169  # Input might be given as Windows format, start by converting to
36170  # unix format.
36171  new_path="$path"
36172
36173  windows_path="$new_path"
36174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36175    unix_path=`$CYGPATH -u "$windows_path"`
36176    new_path="$unix_path"
36177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36179    new_path="$unix_path"
36180  fi
36181
36182
36183  # Now try to locate executable using which
36184  new_path=`$WHICH "$new_path" 2> /dev/null`
36185
36186  if test "x$new_path" = x; then
36187    # Oops. Which didn't find the executable.
36188    # The splitting of arguments from the executable at a space might have been incorrect,
36189    # since paths with space are more likely in Windows. Give it another try with the whole
36190    # argument.
36191    path="$complete"
36192    arguments="EOL"
36193    new_path="$path"
36194
36195  windows_path="$new_path"
36196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36197    unix_path=`$CYGPATH -u "$windows_path"`
36198    new_path="$unix_path"
36199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36201    new_path="$unix_path"
36202  fi
36203
36204
36205    new_path=`$WHICH "$new_path" 2> /dev/null`
36206    # bat and cmd files are not always considered executable in MSYS causing which
36207    # to not find them
36208    if test "x$new_path" = x \
36209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36211      new_path="$path"
36212
36213  windows_path="$new_path"
36214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36215    unix_path=`$CYGPATH -u "$windows_path"`
36216    new_path="$unix_path"
36217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36219    new_path="$unix_path"
36220  fi
36221
36222    fi
36223
36224    if test "x$new_path" = x; then
36225      # It's still not found. Now this is an unrecoverable error.
36226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36227$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36228      has_space=`$ECHO "$complete" | $GREP " "`
36229      if test "x$has_space" != x; then
36230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36232      fi
36233      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36234    fi
36235  fi
36236
36237  # Now new_path has a complete unix path to the binary
36238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36239    # Keep paths in /bin as-is, but remove trailing .exe if any
36240    new_path="${new_path/%.exe/}"
36241    # Do not save /bin paths to all_fixpath_prefixes!
36242  else
36243    # Not in mixed or Windows style, start by that.
36244    new_path=`cmd //c echo $new_path`
36245
36246  input_path="$new_path"
36247  # Check if we need to convert this using DOS-style short mode. If the path
36248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36249  # take no chances and rewrite it.
36250  # Note: m4 eats our [], so we need to use [ and ] instead.
36251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36252  if test "x$has_forbidden_chars" != x; then
36253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36255  fi
36256
36257    # Output is in $new_path
36258
36259  windows_path="$new_path"
36260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36261    unix_path=`$CYGPATH -u "$windows_path"`
36262    new_path="$unix_path"
36263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36265    new_path="$unix_path"
36266  fi
36267
36268    # remove trailing .exe if any
36269    new_path="${new_path/%.exe/}"
36270
36271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36273  fi
36274
36275    else
36276      # We're on a unix platform. Hooray! :)
36277      # First separate the path from the arguments. This will split at the first
36278      # space.
36279      complete="$AS"
36280      path="${complete%% *}"
36281      tmp="$complete EOL"
36282      arguments="${tmp#* }"
36283
36284      # Cannot rely on the command "which" here since it doesn't always work.
36285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36286      if test -z "$is_absolute_path"; then
36287        # Path to executable is not absolute. Find it.
36288        IFS_save="$IFS"
36289        IFS=:
36290        for p in $PATH; do
36291          if test -f "$p/$path" && test -x "$p/$path"; then
36292            new_path="$p/$path"
36293            break
36294          fi
36295        done
36296        IFS="$IFS_save"
36297      else
36298        # This is an absolute path, we can use it without further modifications.
36299        new_path="$path"
36300      fi
36301
36302      if test "x$new_path" = x; then
36303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36304$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36305        has_space=`$ECHO "$complete" | $GREP " "`
36306        if test "x$has_space" != x; then
36307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36309        fi
36310        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36311      fi
36312    fi
36313
36314    # Now join together the path and the arguments once again
36315    if test "x$arguments" != xEOL; then
36316      new_complete="$new_path ${arguments% *}"
36317    else
36318      new_complete="$new_path"
36319    fi
36320
36321    if test "x$complete" != "x$new_complete"; then
36322      AS="$new_complete"
36323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36324$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36325    fi
36326  fi
36327
36328  else
36329    # FIXME: is this correct for microsoft?
36330    AS="$CC -c"
36331  fi
36332
36333
36334  #
36335  # Setup the archiver (AR)
36336  #
36337  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36338    # The corresponding ar tool is lib.exe (used to create static libraries)
36339    # Extract the first word of "lib", so it can be a program name with args.
36340set dummy lib; ac_word=$2
36341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36342$as_echo_n "checking for $ac_word... " >&6; }
36343if ${ac_cv_prog_AR+:} false; then :
36344  $as_echo_n "(cached) " >&6
36345else
36346  if test -n "$AR"; then
36347  ac_cv_prog_AR="$AR" # Let the user override the test.
36348else
36349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36350for as_dir in $PATH
36351do
36352  IFS=$as_save_IFS
36353  test -z "$as_dir" && as_dir=.
36354    for ac_exec_ext in '' $ac_executable_extensions; do
36355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36356    ac_cv_prog_AR="lib"
36357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36358    break 2
36359  fi
36360done
36361  done
36362IFS=$as_save_IFS
36363
36364fi
36365fi
36366AR=$ac_cv_prog_AR
36367if test -n "$AR"; then
36368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36369$as_echo "$AR" >&6; }
36370else
36371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36372$as_echo "no" >&6; }
36373fi
36374
36375
36376  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36377
36378
36379  # Publish this variable in the help.
36380
36381
36382  if [ -z "${AR+x}" ]; then
36383    # The variable is not set by user, try to locate tool using the code snippet
36384    if test -n "$ac_tool_prefix"; then
36385  for ac_prog in ar gcc-ar
36386  do
36387    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36388set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36390$as_echo_n "checking for $ac_word... " >&6; }
36391if ${ac_cv_prog_AR+:} false; then :
36392  $as_echo_n "(cached) " >&6
36393else
36394  if test -n "$AR"; then
36395  ac_cv_prog_AR="$AR" # Let the user override the test.
36396else
36397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36398for as_dir in $PATH
36399do
36400  IFS=$as_save_IFS
36401  test -z "$as_dir" && as_dir=.
36402    for ac_exec_ext in '' $ac_executable_extensions; do
36403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36404    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36406    break 2
36407  fi
36408done
36409  done
36410IFS=$as_save_IFS
36411
36412fi
36413fi
36414AR=$ac_cv_prog_AR
36415if test -n "$AR"; then
36416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36417$as_echo "$AR" >&6; }
36418else
36419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36420$as_echo "no" >&6; }
36421fi
36422
36423
36424    test -n "$AR" && break
36425  done
36426fi
36427if test -z "$AR"; then
36428  ac_ct_AR=$AR
36429  for ac_prog in ar gcc-ar
36430do
36431  # Extract the first word of "$ac_prog", so it can be a program name with args.
36432set dummy $ac_prog; ac_word=$2
36433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36434$as_echo_n "checking for $ac_word... " >&6; }
36435if ${ac_cv_prog_ac_ct_AR+:} false; then :
36436  $as_echo_n "(cached) " >&6
36437else
36438  if test -n "$ac_ct_AR"; then
36439  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36440else
36441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36442for as_dir in $PATH
36443do
36444  IFS=$as_save_IFS
36445  test -z "$as_dir" && as_dir=.
36446    for ac_exec_ext in '' $ac_executable_extensions; do
36447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36448    ac_cv_prog_ac_ct_AR="$ac_prog"
36449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36450    break 2
36451  fi
36452done
36453  done
36454IFS=$as_save_IFS
36455
36456fi
36457fi
36458ac_ct_AR=$ac_cv_prog_ac_ct_AR
36459if test -n "$ac_ct_AR"; then
36460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36461$as_echo "$ac_ct_AR" >&6; }
36462else
36463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36464$as_echo "no" >&6; }
36465fi
36466
36467
36468  test -n "$ac_ct_AR" && break
36469done
36470
36471  if test "x$ac_ct_AR" = x; then
36472    AR=""
36473  else
36474    case $cross_compiling:$ac_tool_warned in
36475yes:)
36476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36478ac_tool_warned=yes ;;
36479esac
36480    AR=$ac_ct_AR
36481  fi
36482fi
36483
36484  else
36485    # The variable is set, but is it from the command line or the environment?
36486
36487    # Try to remove the string !AR! from our list.
36488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36490      # If it failed, the variable was not from the command line. Ignore it,
36491      # but warn the user (except for BASH, which is always set by the calling BASH).
36492      if test "xAR" != xBASH; then
36493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36494$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36495      fi
36496      # Try to locate tool using the code snippet
36497      if test -n "$ac_tool_prefix"; then
36498  for ac_prog in ar gcc-ar
36499  do
36500    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36501set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36503$as_echo_n "checking for $ac_word... " >&6; }
36504if ${ac_cv_prog_AR+:} false; then :
36505  $as_echo_n "(cached) " >&6
36506else
36507  if test -n "$AR"; then
36508  ac_cv_prog_AR="$AR" # Let the user override the test.
36509else
36510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36511for as_dir in $PATH
36512do
36513  IFS=$as_save_IFS
36514  test -z "$as_dir" && as_dir=.
36515    for ac_exec_ext in '' $ac_executable_extensions; do
36516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36517    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36519    break 2
36520  fi
36521done
36522  done
36523IFS=$as_save_IFS
36524
36525fi
36526fi
36527AR=$ac_cv_prog_AR
36528if test -n "$AR"; then
36529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36530$as_echo "$AR" >&6; }
36531else
36532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36533$as_echo "no" >&6; }
36534fi
36535
36536
36537    test -n "$AR" && break
36538  done
36539fi
36540if test -z "$AR"; then
36541  ac_ct_AR=$AR
36542  for ac_prog in ar gcc-ar
36543do
36544  # Extract the first word of "$ac_prog", so it can be a program name with args.
36545set dummy $ac_prog; ac_word=$2
36546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36547$as_echo_n "checking for $ac_word... " >&6; }
36548if ${ac_cv_prog_ac_ct_AR+:} false; then :
36549  $as_echo_n "(cached) " >&6
36550else
36551  if test -n "$ac_ct_AR"; then
36552  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36553else
36554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36555for as_dir in $PATH
36556do
36557  IFS=$as_save_IFS
36558  test -z "$as_dir" && as_dir=.
36559    for ac_exec_ext in '' $ac_executable_extensions; do
36560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36561    ac_cv_prog_ac_ct_AR="$ac_prog"
36562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36563    break 2
36564  fi
36565done
36566  done
36567IFS=$as_save_IFS
36568
36569fi
36570fi
36571ac_ct_AR=$ac_cv_prog_ac_ct_AR
36572if test -n "$ac_ct_AR"; then
36573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36574$as_echo "$ac_ct_AR" >&6; }
36575else
36576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36577$as_echo "no" >&6; }
36578fi
36579
36580
36581  test -n "$ac_ct_AR" && break
36582done
36583
36584  if test "x$ac_ct_AR" = x; then
36585    AR=""
36586  else
36587    case $cross_compiling:$ac_tool_warned in
36588yes:)
36589{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36590$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36591ac_tool_warned=yes ;;
36592esac
36593    AR=$ac_ct_AR
36594  fi
36595fi
36596
36597    else
36598      # If it succeeded, then it was overridden by the user. We will use it
36599      # for the tool.
36600
36601      # First remove it from the list of overridden variables, so we can test
36602      # for unknown variables in the end.
36603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36604
36605      # Check if we try to supply an empty value
36606      if test "x$AR" = x; then
36607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36608$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36610$as_echo_n "checking for AR... " >&6; }
36611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36612$as_echo "disabled" >&6; }
36613      else
36614        # Check if the provided tool contains a complete path.
36615        tool_specified="$AR"
36616        tool_basename="${tool_specified##*/}"
36617        if test "x$tool_basename" = "x$tool_specified"; then
36618          # A command without a complete path is provided, search $PATH.
36619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36620$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36621          # Extract the first word of "$tool_basename", so it can be a program name with args.
36622set dummy $tool_basename; ac_word=$2
36623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36624$as_echo_n "checking for $ac_word... " >&6; }
36625if ${ac_cv_path_AR+:} false; then :
36626  $as_echo_n "(cached) " >&6
36627else
36628  case $AR in
36629  [\\/]* | ?:[\\/]*)
36630  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36631  ;;
36632  *)
36633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36634for as_dir in $PATH
36635do
36636  IFS=$as_save_IFS
36637  test -z "$as_dir" && as_dir=.
36638    for ac_exec_ext in '' $ac_executable_extensions; do
36639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36640    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36642    break 2
36643  fi
36644done
36645  done
36646IFS=$as_save_IFS
36647
36648  ;;
36649esac
36650fi
36651AR=$ac_cv_path_AR
36652if test -n "$AR"; then
36653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36654$as_echo "$AR" >&6; }
36655else
36656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36657$as_echo "no" >&6; }
36658fi
36659
36660
36661          if test "x$AR" = x; then
36662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36663          fi
36664        else
36665          # Otherwise we believe it is a complete path. Use it as it is.
36666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36667$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36669$as_echo_n "checking for AR... " >&6; }
36670          if test ! -x "$tool_specified"; then
36671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36672$as_echo "not found" >&6; }
36673            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36674          fi
36675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36676$as_echo "$tool_specified" >&6; }
36677        fi
36678      fi
36679    fi
36680
36681  fi
36682
36683
36684  else
36685
36686
36687  # Publish this variable in the help.
36688
36689
36690  if [ -z "${AR+x}" ]; then
36691    # The variable is not set by user, try to locate tool using the code snippet
36692    if test -n "$ac_tool_prefix"; then
36693  for ac_prog in ar
36694  do
36695    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36696set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36698$as_echo_n "checking for $ac_word... " >&6; }
36699if ${ac_cv_prog_AR+:} false; then :
36700  $as_echo_n "(cached) " >&6
36701else
36702  if test -n "$AR"; then
36703  ac_cv_prog_AR="$AR" # Let the user override the test.
36704else
36705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36706for as_dir in $PATH
36707do
36708  IFS=$as_save_IFS
36709  test -z "$as_dir" && as_dir=.
36710    for ac_exec_ext in '' $ac_executable_extensions; do
36711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36712    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36714    break 2
36715  fi
36716done
36717  done
36718IFS=$as_save_IFS
36719
36720fi
36721fi
36722AR=$ac_cv_prog_AR
36723if test -n "$AR"; then
36724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36725$as_echo "$AR" >&6; }
36726else
36727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36728$as_echo "no" >&6; }
36729fi
36730
36731
36732    test -n "$AR" && break
36733  done
36734fi
36735if test -z "$AR"; then
36736  ac_ct_AR=$AR
36737  for ac_prog in ar
36738do
36739  # Extract the first word of "$ac_prog", so it can be a program name with args.
36740set dummy $ac_prog; ac_word=$2
36741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36742$as_echo_n "checking for $ac_word... " >&6; }
36743if ${ac_cv_prog_ac_ct_AR+:} false; then :
36744  $as_echo_n "(cached) " >&6
36745else
36746  if test -n "$ac_ct_AR"; then
36747  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36748else
36749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36750for as_dir in $PATH
36751do
36752  IFS=$as_save_IFS
36753  test -z "$as_dir" && as_dir=.
36754    for ac_exec_ext in '' $ac_executable_extensions; do
36755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36756    ac_cv_prog_ac_ct_AR="$ac_prog"
36757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36758    break 2
36759  fi
36760done
36761  done
36762IFS=$as_save_IFS
36763
36764fi
36765fi
36766ac_ct_AR=$ac_cv_prog_ac_ct_AR
36767if test -n "$ac_ct_AR"; then
36768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36769$as_echo "$ac_ct_AR" >&6; }
36770else
36771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36772$as_echo "no" >&6; }
36773fi
36774
36775
36776  test -n "$ac_ct_AR" && break
36777done
36778
36779  if test "x$ac_ct_AR" = x; then
36780    AR=""
36781  else
36782    case $cross_compiling:$ac_tool_warned in
36783yes:)
36784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36786ac_tool_warned=yes ;;
36787esac
36788    AR=$ac_ct_AR
36789  fi
36790fi
36791
36792  else
36793    # The variable is set, but is it from the command line or the environment?
36794
36795    # Try to remove the string !AR! from our list.
36796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36798      # If it failed, the variable was not from the command line. Ignore it,
36799      # but warn the user (except for BASH, which is always set by the calling BASH).
36800      if test "xAR" != xBASH; then
36801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36802$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36803      fi
36804      # Try to locate tool using the code snippet
36805      if test -n "$ac_tool_prefix"; then
36806  for ac_prog in ar
36807  do
36808    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36811$as_echo_n "checking for $ac_word... " >&6; }
36812if ${ac_cv_prog_AR+:} false; then :
36813  $as_echo_n "(cached) " >&6
36814else
36815  if test -n "$AR"; then
36816  ac_cv_prog_AR="$AR" # Let the user override the test.
36817else
36818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36819for as_dir in $PATH
36820do
36821  IFS=$as_save_IFS
36822  test -z "$as_dir" && as_dir=.
36823    for ac_exec_ext in '' $ac_executable_extensions; do
36824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36825    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36827    break 2
36828  fi
36829done
36830  done
36831IFS=$as_save_IFS
36832
36833fi
36834fi
36835AR=$ac_cv_prog_AR
36836if test -n "$AR"; then
36837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36838$as_echo "$AR" >&6; }
36839else
36840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36841$as_echo "no" >&6; }
36842fi
36843
36844
36845    test -n "$AR" && break
36846  done
36847fi
36848if test -z "$AR"; then
36849  ac_ct_AR=$AR
36850  for ac_prog in ar
36851do
36852  # Extract the first word of "$ac_prog", so it can be a program name with args.
36853set dummy $ac_prog; ac_word=$2
36854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36855$as_echo_n "checking for $ac_word... " >&6; }
36856if ${ac_cv_prog_ac_ct_AR+:} false; then :
36857  $as_echo_n "(cached) " >&6
36858else
36859  if test -n "$ac_ct_AR"; then
36860  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36861else
36862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36863for as_dir in $PATH
36864do
36865  IFS=$as_save_IFS
36866  test -z "$as_dir" && as_dir=.
36867    for ac_exec_ext in '' $ac_executable_extensions; do
36868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36869    ac_cv_prog_ac_ct_AR="$ac_prog"
36870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36871    break 2
36872  fi
36873done
36874  done
36875IFS=$as_save_IFS
36876
36877fi
36878fi
36879ac_ct_AR=$ac_cv_prog_ac_ct_AR
36880if test -n "$ac_ct_AR"; then
36881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36882$as_echo "$ac_ct_AR" >&6; }
36883else
36884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36885$as_echo "no" >&6; }
36886fi
36887
36888
36889  test -n "$ac_ct_AR" && break
36890done
36891
36892  if test "x$ac_ct_AR" = x; then
36893    AR=""
36894  else
36895    case $cross_compiling:$ac_tool_warned in
36896yes:)
36897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36899ac_tool_warned=yes ;;
36900esac
36901    AR=$ac_ct_AR
36902  fi
36903fi
36904
36905    else
36906      # If it succeeded, then it was overridden by the user. We will use it
36907      # for the tool.
36908
36909      # First remove it from the list of overridden variables, so we can test
36910      # for unknown variables in the end.
36911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36912
36913      # Check if we try to supply an empty value
36914      if test "x$AR" = x; then
36915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36916$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36918$as_echo_n "checking for AR... " >&6; }
36919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36920$as_echo "disabled" >&6; }
36921      else
36922        # Check if the provided tool contains a complete path.
36923        tool_specified="$AR"
36924        tool_basename="${tool_specified##*/}"
36925        if test "x$tool_basename" = "x$tool_specified"; then
36926          # A command without a complete path is provided, search $PATH.
36927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36928$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36929          # Extract the first word of "$tool_basename", so it can be a program name with args.
36930set dummy $tool_basename; ac_word=$2
36931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36932$as_echo_n "checking for $ac_word... " >&6; }
36933if ${ac_cv_path_AR+:} false; then :
36934  $as_echo_n "(cached) " >&6
36935else
36936  case $AR in
36937  [\\/]* | ?:[\\/]*)
36938  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36939  ;;
36940  *)
36941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36942for as_dir in $PATH
36943do
36944  IFS=$as_save_IFS
36945  test -z "$as_dir" && as_dir=.
36946    for ac_exec_ext in '' $ac_executable_extensions; do
36947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36948    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36950    break 2
36951  fi
36952done
36953  done
36954IFS=$as_save_IFS
36955
36956  ;;
36957esac
36958fi
36959AR=$ac_cv_path_AR
36960if test -n "$AR"; then
36961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36962$as_echo "$AR" >&6; }
36963else
36964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36965$as_echo "no" >&6; }
36966fi
36967
36968
36969          if test "x$AR" = x; then
36970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36971          fi
36972        else
36973          # Otherwise we believe it is a complete path. Use it as it is.
36974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36975$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36977$as_echo_n "checking for AR... " >&6; }
36978          if test ! -x "$tool_specified"; then
36979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36980$as_echo "not found" >&6; }
36981            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36982          fi
36983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36984$as_echo "$tool_specified" >&6; }
36985        fi
36986      fi
36987    fi
36988
36989  fi
36990
36991
36992  fi
36993
36994  # Only process if variable expands to non-empty
36995
36996  if test "x$AR" != x; then
36997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36998
36999  # First separate the path from the arguments. This will split at the first
37000  # space.
37001  complete="$AR"
37002  path="${complete%% *}"
37003  tmp="$complete EOL"
37004  arguments="${tmp#* }"
37005
37006  # Input might be given as Windows format, start by converting to
37007  # unix format.
37008  new_path=`$CYGPATH -u "$path"`
37009
37010  # Now try to locate executable using which
37011  new_path=`$WHICH "$new_path" 2> /dev/null`
37012  # bat and cmd files are not always considered executable in cygwin causing which
37013  # to not find them
37014  if test "x$new_path" = x \
37015      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37016      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37017    new_path=`$CYGPATH -u "$path"`
37018  fi
37019  if test "x$new_path" = x; then
37020    # Oops. Which didn't find the executable.
37021    # The splitting of arguments from the executable at a space might have been incorrect,
37022    # since paths with space are more likely in Windows. Give it another try with the whole
37023    # argument.
37024    path="$complete"
37025    arguments="EOL"
37026    new_path=`$CYGPATH -u "$path"`
37027    new_path=`$WHICH "$new_path" 2> /dev/null`
37028    # bat and cmd files are not always considered executable in cygwin causing which
37029    # to not find them
37030    if test "x$new_path" = x \
37031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37033      new_path=`$CYGPATH -u "$path"`
37034    fi
37035    if test "x$new_path" = x; then
37036      # It's still not found. Now this is an unrecoverable error.
37037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37038$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37039      has_space=`$ECHO "$complete" | $GREP " "`
37040      if test "x$has_space" != x; then
37041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37043      fi
37044      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37045    fi
37046  fi
37047
37048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37051  # "foo.exe" is OK but "foo" is an error.
37052  #
37053  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37054  # It is also a way to make sure we got the proper file name for the real test later on.
37055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37056  if test "x$test_shortpath" = x; then
37057    # Short path failed, file does not exist as specified.
37058    # Try adding .exe or .cmd
37059    if test -f "${new_path}.exe"; then
37060      input_to_shortpath="${new_path}.exe"
37061    elif test -f "${new_path}.cmd"; then
37062      input_to_shortpath="${new_path}.cmd"
37063    else
37064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37065$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37068      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37069    fi
37070  else
37071    input_to_shortpath="$new_path"
37072  fi
37073
37074  # Call helper function which possibly converts this using DOS-style short mode.
37075  # If so, the updated path is stored in $new_path.
37076  new_path="$input_to_shortpath"
37077
37078  input_path="$input_to_shortpath"
37079  # Check if we need to convert this using DOS-style short mode. If the path
37080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37081  # take no chances and rewrite it.
37082  # Note: m4 eats our [], so we need to use [ and ] instead.
37083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37084  if test "x$has_forbidden_chars" != x; then
37085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37089      # Going to short mode and back again did indeed matter. Since short mode is
37090      # case insensitive, let's make it lowercase to improve readability.
37091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37092      # Now convert it back to Unix-style (cygpath)
37093      input_path=`$CYGPATH -u "$shortmode_path"`
37094      new_path="$input_path"
37095    fi
37096  fi
37097
37098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37099  if test "x$test_cygdrive_prefix" = x; then
37100    # As a simple fix, exclude /usr/bin since it's not a real path.
37101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37103      # a path prefixed by /cygdrive for fixpath to work.
37104      new_path="$CYGWIN_ROOT_PATH$input_path"
37105    fi
37106  fi
37107
37108  # remove trailing .exe if any
37109  new_path="${new_path/%.exe/}"
37110
37111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37112
37113  # First separate the path from the arguments. This will split at the first
37114  # space.
37115  complete="$AR"
37116  path="${complete%% *}"
37117  tmp="$complete EOL"
37118  arguments="${tmp#* }"
37119
37120  # Input might be given as Windows format, start by converting to
37121  # unix format.
37122  new_path="$path"
37123
37124  windows_path="$new_path"
37125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37126    unix_path=`$CYGPATH -u "$windows_path"`
37127    new_path="$unix_path"
37128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37130    new_path="$unix_path"
37131  fi
37132
37133
37134  # Now try to locate executable using which
37135  new_path=`$WHICH "$new_path" 2> /dev/null`
37136
37137  if test "x$new_path" = x; then
37138    # Oops. Which didn't find the executable.
37139    # The splitting of arguments from the executable at a space might have been incorrect,
37140    # since paths with space are more likely in Windows. Give it another try with the whole
37141    # argument.
37142    path="$complete"
37143    arguments="EOL"
37144    new_path="$path"
37145
37146  windows_path="$new_path"
37147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37148    unix_path=`$CYGPATH -u "$windows_path"`
37149    new_path="$unix_path"
37150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37152    new_path="$unix_path"
37153  fi
37154
37155
37156    new_path=`$WHICH "$new_path" 2> /dev/null`
37157    # bat and cmd files are not always considered executable in MSYS causing which
37158    # to not find them
37159    if test "x$new_path" = x \
37160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37162      new_path="$path"
37163
37164  windows_path="$new_path"
37165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37166    unix_path=`$CYGPATH -u "$windows_path"`
37167    new_path="$unix_path"
37168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37170    new_path="$unix_path"
37171  fi
37172
37173    fi
37174
37175    if test "x$new_path" = x; then
37176      # It's still not found. Now this is an unrecoverable error.
37177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37178$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37179      has_space=`$ECHO "$complete" | $GREP " "`
37180      if test "x$has_space" != x; then
37181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37183      fi
37184      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37185    fi
37186  fi
37187
37188  # Now new_path has a complete unix path to the binary
37189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37190    # Keep paths in /bin as-is, but remove trailing .exe if any
37191    new_path="${new_path/%.exe/}"
37192    # Do not save /bin paths to all_fixpath_prefixes!
37193  else
37194    # Not in mixed or Windows style, start by that.
37195    new_path=`cmd //c echo $new_path`
37196
37197  input_path="$new_path"
37198  # Check if we need to convert this using DOS-style short mode. If the path
37199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37200  # take no chances and rewrite it.
37201  # Note: m4 eats our [], so we need to use [ and ] instead.
37202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37203  if test "x$has_forbidden_chars" != x; then
37204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37206  fi
37207
37208    # Output is in $new_path
37209
37210  windows_path="$new_path"
37211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37212    unix_path=`$CYGPATH -u "$windows_path"`
37213    new_path="$unix_path"
37214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37216    new_path="$unix_path"
37217  fi
37218
37219    # remove trailing .exe if any
37220    new_path="${new_path/%.exe/}"
37221
37222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37224  fi
37225
37226    else
37227      # We're on a unix platform. Hooray! :)
37228      # First separate the path from the arguments. This will split at the first
37229      # space.
37230      complete="$AR"
37231      path="${complete%% *}"
37232      tmp="$complete EOL"
37233      arguments="${tmp#* }"
37234
37235      # Cannot rely on the command "which" here since it doesn't always work.
37236      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37237      if test -z "$is_absolute_path"; then
37238        # Path to executable is not absolute. Find it.
37239        IFS_save="$IFS"
37240        IFS=:
37241        for p in $PATH; do
37242          if test -f "$p/$path" && test -x "$p/$path"; then
37243            new_path="$p/$path"
37244            break
37245          fi
37246        done
37247        IFS="$IFS_save"
37248      else
37249        # This is an absolute path, we can use it without further modifications.
37250        new_path="$path"
37251      fi
37252
37253      if test "x$new_path" = x; then
37254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37255$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37256        has_space=`$ECHO "$complete" | $GREP " "`
37257        if test "x$has_space" != x; then
37258          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37260        fi
37261        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37262      fi
37263    fi
37264
37265    # Now join together the path and the arguments once again
37266    if test "x$arguments" != xEOL; then
37267      new_complete="$new_path ${arguments% *}"
37268    else
37269      new_complete="$new_path"
37270    fi
37271
37272    if test "x$complete" != "x$new_complete"; then
37273      AR="$new_complete"
37274      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37275$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37276    fi
37277  fi
37278
37279
37280
37281  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37282
37283
37284  # Publish this variable in the help.
37285
37286
37287  if [ -z "${LIPO+x}" ]; then
37288    # The variable is not set by user, try to locate tool using the code snippet
37289    for ac_prog in lipo
37290do
37291  # Extract the first word of "$ac_prog", so it can be a program name with args.
37292set dummy $ac_prog; ac_word=$2
37293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37294$as_echo_n "checking for $ac_word... " >&6; }
37295if ${ac_cv_path_LIPO+:} false; then :
37296  $as_echo_n "(cached) " >&6
37297else
37298  case $LIPO in
37299  [\\/]* | ?:[\\/]*)
37300  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37301  ;;
37302  *)
37303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37304for as_dir in $PATH
37305do
37306  IFS=$as_save_IFS
37307  test -z "$as_dir" && as_dir=.
37308    for ac_exec_ext in '' $ac_executable_extensions; do
37309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37310    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37312    break 2
37313  fi
37314done
37315  done
37316IFS=$as_save_IFS
37317
37318  ;;
37319esac
37320fi
37321LIPO=$ac_cv_path_LIPO
37322if test -n "$LIPO"; then
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37324$as_echo "$LIPO" >&6; }
37325else
37326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37327$as_echo "no" >&6; }
37328fi
37329
37330
37331  test -n "$LIPO" && break
37332done
37333
37334  else
37335    # The variable is set, but is it from the command line or the environment?
37336
37337    # Try to remove the string !LIPO! from our list.
37338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37340      # If it failed, the variable was not from the command line. Ignore it,
37341      # but warn the user (except for BASH, which is always set by the calling BASH).
37342      if test "xLIPO" != xBASH; then
37343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37344$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37345      fi
37346      # Try to locate tool using the code snippet
37347      for ac_prog in lipo
37348do
37349  # Extract the first word of "$ac_prog", so it can be a program name with args.
37350set dummy $ac_prog; ac_word=$2
37351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37352$as_echo_n "checking for $ac_word... " >&6; }
37353if ${ac_cv_path_LIPO+:} false; then :
37354  $as_echo_n "(cached) " >&6
37355else
37356  case $LIPO in
37357  [\\/]* | ?:[\\/]*)
37358  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37359  ;;
37360  *)
37361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37362for as_dir in $PATH
37363do
37364  IFS=$as_save_IFS
37365  test -z "$as_dir" && as_dir=.
37366    for ac_exec_ext in '' $ac_executable_extensions; do
37367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37368    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37370    break 2
37371  fi
37372done
37373  done
37374IFS=$as_save_IFS
37375
37376  ;;
37377esac
37378fi
37379LIPO=$ac_cv_path_LIPO
37380if test -n "$LIPO"; then
37381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37382$as_echo "$LIPO" >&6; }
37383else
37384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37385$as_echo "no" >&6; }
37386fi
37387
37388
37389  test -n "$LIPO" && break
37390done
37391
37392    else
37393      # If it succeeded, then it was overridden by the user. We will use it
37394      # for the tool.
37395
37396      # First remove it from the list of overridden variables, so we can test
37397      # for unknown variables in the end.
37398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37399
37400      # Check if we try to supply an empty value
37401      if test "x$LIPO" = x; then
37402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37403$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37405$as_echo_n "checking for LIPO... " >&6; }
37406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37407$as_echo "disabled" >&6; }
37408      else
37409        # Check if the provided tool contains a complete path.
37410        tool_specified="$LIPO"
37411        tool_basename="${tool_specified##*/}"
37412        if test "x$tool_basename" = "x$tool_specified"; then
37413          # A command without a complete path is provided, search $PATH.
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37415$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37416          # Extract the first word of "$tool_basename", so it can be a program name with args.
37417set dummy $tool_basename; ac_word=$2
37418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37419$as_echo_n "checking for $ac_word... " >&6; }
37420if ${ac_cv_path_LIPO+:} false; then :
37421  $as_echo_n "(cached) " >&6
37422else
37423  case $LIPO in
37424  [\\/]* | ?:[\\/]*)
37425  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37426  ;;
37427  *)
37428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37429for as_dir in $PATH
37430do
37431  IFS=$as_save_IFS
37432  test -z "$as_dir" && as_dir=.
37433    for ac_exec_ext in '' $ac_executable_extensions; do
37434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37435    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37437    break 2
37438  fi
37439done
37440  done
37441IFS=$as_save_IFS
37442
37443  ;;
37444esac
37445fi
37446LIPO=$ac_cv_path_LIPO
37447if test -n "$LIPO"; then
37448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37449$as_echo "$LIPO" >&6; }
37450else
37451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37452$as_echo "no" >&6; }
37453fi
37454
37455
37456          if test "x$LIPO" = x; then
37457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37458          fi
37459        else
37460          # Otherwise we believe it is a complete path. Use it as it is.
37461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37462$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37464$as_echo_n "checking for LIPO... " >&6; }
37465          if test ! -x "$tool_specified"; then
37466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37467$as_echo "not found" >&6; }
37468            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37469          fi
37470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37471$as_echo "$tool_specified" >&6; }
37472        fi
37473      fi
37474    fi
37475
37476  fi
37477
37478
37479
37480  # Only process if variable expands to non-empty
37481
37482  if test "x$LIPO" != x; then
37483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37484
37485  # First separate the path from the arguments. This will split at the first
37486  # space.
37487  complete="$LIPO"
37488  path="${complete%% *}"
37489  tmp="$complete EOL"
37490  arguments="${tmp#* }"
37491
37492  # Input might be given as Windows format, start by converting to
37493  # unix format.
37494  new_path=`$CYGPATH -u "$path"`
37495
37496  # Now try to locate executable using which
37497  new_path=`$WHICH "$new_path" 2> /dev/null`
37498  # bat and cmd files are not always considered executable in cygwin causing which
37499  # to not find them
37500  if test "x$new_path" = x \
37501      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37502      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37503    new_path=`$CYGPATH -u "$path"`
37504  fi
37505  if test "x$new_path" = x; then
37506    # Oops. Which didn't find the executable.
37507    # The splitting of arguments from the executable at a space might have been incorrect,
37508    # since paths with space are more likely in Windows. Give it another try with the whole
37509    # argument.
37510    path="$complete"
37511    arguments="EOL"
37512    new_path=`$CYGPATH -u "$path"`
37513    new_path=`$WHICH "$new_path" 2> /dev/null`
37514    # bat and cmd files are not always considered executable in cygwin causing which
37515    # to not find them
37516    if test "x$new_path" = x \
37517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37519      new_path=`$CYGPATH -u "$path"`
37520    fi
37521    if test "x$new_path" = x; then
37522      # It's still not found. Now this is an unrecoverable error.
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37524$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37525      has_space=`$ECHO "$complete" | $GREP " "`
37526      if test "x$has_space" != x; then
37527        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37528$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37529      fi
37530      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37531    fi
37532  fi
37533
37534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37537  # "foo.exe" is OK but "foo" is an error.
37538  #
37539  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37540  # It is also a way to make sure we got the proper file name for the real test later on.
37541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37542  if test "x$test_shortpath" = x; then
37543    # Short path failed, file does not exist as specified.
37544    # Try adding .exe or .cmd
37545    if test -f "${new_path}.exe"; then
37546      input_to_shortpath="${new_path}.exe"
37547    elif test -f "${new_path}.cmd"; then
37548      input_to_shortpath="${new_path}.cmd"
37549    else
37550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37551$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37552      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37553$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37554      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37555    fi
37556  else
37557    input_to_shortpath="$new_path"
37558  fi
37559
37560  # Call helper function which possibly converts this using DOS-style short mode.
37561  # If so, the updated path is stored in $new_path.
37562  new_path="$input_to_shortpath"
37563
37564  input_path="$input_to_shortpath"
37565  # Check if we need to convert this using DOS-style short mode. If the path
37566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37567  # take no chances and rewrite it.
37568  # Note: m4 eats our [], so we need to use [ and ] instead.
37569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37570  if test "x$has_forbidden_chars" != x; then
37571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37575      # Going to short mode and back again did indeed matter. Since short mode is
37576      # case insensitive, let's make it lowercase to improve readability.
37577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37578      # Now convert it back to Unix-style (cygpath)
37579      input_path=`$CYGPATH -u "$shortmode_path"`
37580      new_path="$input_path"
37581    fi
37582  fi
37583
37584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37585  if test "x$test_cygdrive_prefix" = x; then
37586    # As a simple fix, exclude /usr/bin since it's not a real path.
37587    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37589      # a path prefixed by /cygdrive for fixpath to work.
37590      new_path="$CYGWIN_ROOT_PATH$input_path"
37591    fi
37592  fi
37593
37594  # remove trailing .exe if any
37595  new_path="${new_path/%.exe/}"
37596
37597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37598
37599  # First separate the path from the arguments. This will split at the first
37600  # space.
37601  complete="$LIPO"
37602  path="${complete%% *}"
37603  tmp="$complete EOL"
37604  arguments="${tmp#* }"
37605
37606  # Input might be given as Windows format, start by converting to
37607  # unix format.
37608  new_path="$path"
37609
37610  windows_path="$new_path"
37611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37612    unix_path=`$CYGPATH -u "$windows_path"`
37613    new_path="$unix_path"
37614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37616    new_path="$unix_path"
37617  fi
37618
37619
37620  # Now try to locate executable using which
37621  new_path=`$WHICH "$new_path" 2> /dev/null`
37622
37623  if test "x$new_path" = x; then
37624    # Oops. Which didn't find the executable.
37625    # The splitting of arguments from the executable at a space might have been incorrect,
37626    # since paths with space are more likely in Windows. Give it another try with the whole
37627    # argument.
37628    path="$complete"
37629    arguments="EOL"
37630    new_path="$path"
37631
37632  windows_path="$new_path"
37633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37634    unix_path=`$CYGPATH -u "$windows_path"`
37635    new_path="$unix_path"
37636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37638    new_path="$unix_path"
37639  fi
37640
37641
37642    new_path=`$WHICH "$new_path" 2> /dev/null`
37643    # bat and cmd files are not always considered executable in MSYS causing which
37644    # to not find them
37645    if test "x$new_path" = x \
37646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37648      new_path="$path"
37649
37650  windows_path="$new_path"
37651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37652    unix_path=`$CYGPATH -u "$windows_path"`
37653    new_path="$unix_path"
37654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37656    new_path="$unix_path"
37657  fi
37658
37659    fi
37660
37661    if test "x$new_path" = x; then
37662      # It's still not found. Now this is an unrecoverable error.
37663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37664$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37665      has_space=`$ECHO "$complete" | $GREP " "`
37666      if test "x$has_space" != x; then
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37669      fi
37670      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37671    fi
37672  fi
37673
37674  # Now new_path has a complete unix path to the binary
37675  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37676    # Keep paths in /bin as-is, but remove trailing .exe if any
37677    new_path="${new_path/%.exe/}"
37678    # Do not save /bin paths to all_fixpath_prefixes!
37679  else
37680    # Not in mixed or Windows style, start by that.
37681    new_path=`cmd //c echo $new_path`
37682
37683  input_path="$new_path"
37684  # Check if we need to convert this using DOS-style short mode. If the path
37685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37686  # take no chances and rewrite it.
37687  # Note: m4 eats our [], so we need to use [ and ] instead.
37688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37689  if test "x$has_forbidden_chars" != x; then
37690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37692  fi
37693
37694    # Output is in $new_path
37695
37696  windows_path="$new_path"
37697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37698    unix_path=`$CYGPATH -u "$windows_path"`
37699    new_path="$unix_path"
37700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37702    new_path="$unix_path"
37703  fi
37704
37705    # remove trailing .exe if any
37706    new_path="${new_path/%.exe/}"
37707
37708    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37709    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37710  fi
37711
37712    else
37713      # We're on a unix platform. Hooray! :)
37714      # First separate the path from the arguments. This will split at the first
37715      # space.
37716      complete="$LIPO"
37717      path="${complete%% *}"
37718      tmp="$complete EOL"
37719      arguments="${tmp#* }"
37720
37721      # Cannot rely on the command "which" here since it doesn't always work.
37722      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37723      if test -z "$is_absolute_path"; then
37724        # Path to executable is not absolute. Find it.
37725        IFS_save="$IFS"
37726        IFS=:
37727        for p in $PATH; do
37728          if test -f "$p/$path" && test -x "$p/$path"; then
37729            new_path="$p/$path"
37730            break
37731          fi
37732        done
37733        IFS="$IFS_save"
37734      else
37735        # This is an absolute path, we can use it without further modifications.
37736        new_path="$path"
37737      fi
37738
37739      if test "x$new_path" = x; then
37740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37741$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37742        has_space=`$ECHO "$complete" | $GREP " "`
37743        if test "x$has_space" != x; then
37744          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37745$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37746        fi
37747        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37748      fi
37749    fi
37750
37751    # Now join together the path and the arguments once again
37752    if test "x$arguments" != xEOL; then
37753      new_complete="$new_path ${arguments% *}"
37754    else
37755      new_complete="$new_path"
37756    fi
37757
37758    if test "x$complete" != "x$new_complete"; then
37759      LIPO="$new_complete"
37760      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37761$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37762    fi
37763  fi
37764
37765  fi
37766
37767  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37768    # Extract the first word of "mt", so it can be a program name with args.
37769set dummy mt; ac_word=$2
37770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37771$as_echo_n "checking for $ac_word... " >&6; }
37772if ${ac_cv_prog_MT+:} false; then :
37773  $as_echo_n "(cached) " >&6
37774else
37775  if test -n "$MT"; then
37776  ac_cv_prog_MT="$MT" # Let the user override the test.
37777else
37778  ac_prog_rejected=no
37779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37780for as_dir in $PATH
37781do
37782  IFS=$as_save_IFS
37783  test -z "$as_dir" && as_dir=.
37784    for ac_exec_ext in '' $ac_executable_extensions; do
37785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37786    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37787       ac_prog_rejected=yes
37788       continue
37789     fi
37790    ac_cv_prog_MT="mt"
37791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37792    break 2
37793  fi
37794done
37795  done
37796IFS=$as_save_IFS
37797
37798if test $ac_prog_rejected = yes; then
37799  # We found a bogon in the path, so make sure we never use it.
37800  set dummy $ac_cv_prog_MT
37801  shift
37802  if test $# != 0; then
37803    # We chose a different compiler from the bogus one.
37804    # However, it has the same basename, so the bogon will be chosen
37805    # first if we set MT to just the basename; use the full file name.
37806    shift
37807    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37808  fi
37809fi
37810fi
37811fi
37812MT=$ac_cv_prog_MT
37813if test -n "$MT"; then
37814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37815$as_echo "$MT" >&6; }
37816else
37817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37818$as_echo "no" >&6; }
37819fi
37820
37821
37822
37823  # Only process if variable expands to non-empty
37824
37825  if test "x$MT" != x; then
37826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37827
37828  # First separate the path from the arguments. This will split at the first
37829  # space.
37830  complete="$MT"
37831  path="${complete%% *}"
37832  tmp="$complete EOL"
37833  arguments="${tmp#* }"
37834
37835  # Input might be given as Windows format, start by converting to
37836  # unix format.
37837  new_path=`$CYGPATH -u "$path"`
37838
37839  # Now try to locate executable using which
37840  new_path=`$WHICH "$new_path" 2> /dev/null`
37841  # bat and cmd files are not always considered executable in cygwin causing which
37842  # to not find them
37843  if test "x$new_path" = x \
37844      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37845      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37846    new_path=`$CYGPATH -u "$path"`
37847  fi
37848  if test "x$new_path" = x; then
37849    # Oops. Which didn't find the executable.
37850    # The splitting of arguments from the executable at a space might have been incorrect,
37851    # since paths with space are more likely in Windows. Give it another try with the whole
37852    # argument.
37853    path="$complete"
37854    arguments="EOL"
37855    new_path=`$CYGPATH -u "$path"`
37856    new_path=`$WHICH "$new_path" 2> /dev/null`
37857    # bat and cmd files are not always considered executable in cygwin causing which
37858    # to not find them
37859    if test "x$new_path" = x \
37860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37862      new_path=`$CYGPATH -u "$path"`
37863    fi
37864    if test "x$new_path" = x; then
37865      # It's still not found. Now this is an unrecoverable error.
37866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37867$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37868      has_space=`$ECHO "$complete" | $GREP " "`
37869      if test "x$has_space" != x; then
37870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37872      fi
37873      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37874    fi
37875  fi
37876
37877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37880  # "foo.exe" is OK but "foo" is an error.
37881  #
37882  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37883  # It is also a way to make sure we got the proper file name for the real test later on.
37884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37885  if test "x$test_shortpath" = x; then
37886    # Short path failed, file does not exist as specified.
37887    # Try adding .exe or .cmd
37888    if test -f "${new_path}.exe"; then
37889      input_to_shortpath="${new_path}.exe"
37890    elif test -f "${new_path}.cmd"; then
37891      input_to_shortpath="${new_path}.cmd"
37892    else
37893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37894$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37895      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37896$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37897      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37898    fi
37899  else
37900    input_to_shortpath="$new_path"
37901  fi
37902
37903  # Call helper function which possibly converts this using DOS-style short mode.
37904  # If so, the updated path is stored in $new_path.
37905  new_path="$input_to_shortpath"
37906
37907  input_path="$input_to_shortpath"
37908  # Check if we need to convert this using DOS-style short mode. If the path
37909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37910  # take no chances and rewrite it.
37911  # Note: m4 eats our [], so we need to use [ and ] instead.
37912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37913  if test "x$has_forbidden_chars" != x; then
37914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37918      # Going to short mode and back again did indeed matter. Since short mode is
37919      # case insensitive, let's make it lowercase to improve readability.
37920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37921      # Now convert it back to Unix-style (cygpath)
37922      input_path=`$CYGPATH -u "$shortmode_path"`
37923      new_path="$input_path"
37924    fi
37925  fi
37926
37927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37928  if test "x$test_cygdrive_prefix" = x; then
37929    # As a simple fix, exclude /usr/bin since it's not a real path.
37930    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37932      # a path prefixed by /cygdrive for fixpath to work.
37933      new_path="$CYGWIN_ROOT_PATH$input_path"
37934    fi
37935  fi
37936
37937  # remove trailing .exe if any
37938  new_path="${new_path/%.exe/}"
37939
37940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37941
37942  # First separate the path from the arguments. This will split at the first
37943  # space.
37944  complete="$MT"
37945  path="${complete%% *}"
37946  tmp="$complete EOL"
37947  arguments="${tmp#* }"
37948
37949  # Input might be given as Windows format, start by converting to
37950  # unix format.
37951  new_path="$path"
37952
37953  windows_path="$new_path"
37954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37955    unix_path=`$CYGPATH -u "$windows_path"`
37956    new_path="$unix_path"
37957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37959    new_path="$unix_path"
37960  fi
37961
37962
37963  # Now try to locate executable using which
37964  new_path=`$WHICH "$new_path" 2> /dev/null`
37965
37966  if test "x$new_path" = x; then
37967    # Oops. Which didn't find the executable.
37968    # The splitting of arguments from the executable at a space might have been incorrect,
37969    # since paths with space are more likely in Windows. Give it another try with the whole
37970    # argument.
37971    path="$complete"
37972    arguments="EOL"
37973    new_path="$path"
37974
37975  windows_path="$new_path"
37976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977    unix_path=`$CYGPATH -u "$windows_path"`
37978    new_path="$unix_path"
37979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37981    new_path="$unix_path"
37982  fi
37983
37984
37985    new_path=`$WHICH "$new_path" 2> /dev/null`
37986    # bat and cmd files are not always considered executable in MSYS causing which
37987    # to not find them
37988    if test "x$new_path" = x \
37989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37991      new_path="$path"
37992
37993  windows_path="$new_path"
37994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37995    unix_path=`$CYGPATH -u "$windows_path"`
37996    new_path="$unix_path"
37997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37999    new_path="$unix_path"
38000  fi
38001
38002    fi
38003
38004    if test "x$new_path" = x; then
38005      # It's still not found. Now this is an unrecoverable error.
38006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38007$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38008      has_space=`$ECHO "$complete" | $GREP " "`
38009      if test "x$has_space" != x; then
38010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38012      fi
38013      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38014    fi
38015  fi
38016
38017  # Now new_path has a complete unix path to the binary
38018  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38019    # Keep paths in /bin as-is, but remove trailing .exe if any
38020    new_path="${new_path/%.exe/}"
38021    # Do not save /bin paths to all_fixpath_prefixes!
38022  else
38023    # Not in mixed or Windows style, start by that.
38024    new_path=`cmd //c echo $new_path`
38025
38026  input_path="$new_path"
38027  # Check if we need to convert this using DOS-style short mode. If the path
38028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38029  # take no chances and rewrite it.
38030  # Note: m4 eats our [], so we need to use [ and ] instead.
38031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38032  if test "x$has_forbidden_chars" != x; then
38033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38035  fi
38036
38037    # Output is in $new_path
38038
38039  windows_path="$new_path"
38040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38041    unix_path=`$CYGPATH -u "$windows_path"`
38042    new_path="$unix_path"
38043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38045    new_path="$unix_path"
38046  fi
38047
38048    # remove trailing .exe if any
38049    new_path="${new_path/%.exe/}"
38050
38051    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38052    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38053  fi
38054
38055    else
38056      # We're on a unix platform. Hooray! :)
38057      # First separate the path from the arguments. This will split at the first
38058      # space.
38059      complete="$MT"
38060      path="${complete%% *}"
38061      tmp="$complete EOL"
38062      arguments="${tmp#* }"
38063
38064      # Cannot rely on the command "which" here since it doesn't always work.
38065      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38066      if test -z "$is_absolute_path"; then
38067        # Path to executable is not absolute. Find it.
38068        IFS_save="$IFS"
38069        IFS=:
38070        for p in $PATH; do
38071          if test -f "$p/$path" && test -x "$p/$path"; then
38072            new_path="$p/$path"
38073            break
38074          fi
38075        done
38076        IFS="$IFS_save"
38077      else
38078        # This is an absolute path, we can use it without further modifications.
38079        new_path="$path"
38080      fi
38081
38082      if test "x$new_path" = x; then
38083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38084$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38085        has_space=`$ECHO "$complete" | $GREP " "`
38086        if test "x$has_space" != x; then
38087          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38088$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38089        fi
38090        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38091      fi
38092    fi
38093
38094    # Now join together the path and the arguments once again
38095    if test "x$arguments" != xEOL; then
38096      new_complete="$new_path ${arguments% *}"
38097    else
38098      new_complete="$new_path"
38099    fi
38100
38101    if test "x$complete" != "x$new_complete"; then
38102      MT="$new_complete"
38103      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38104$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38105    fi
38106  fi
38107
38108    # Setup the resource compiler (RC)
38109    # Extract the first word of "rc", so it can be a program name with args.
38110set dummy rc; ac_word=$2
38111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38112$as_echo_n "checking for $ac_word... " >&6; }
38113if ${ac_cv_prog_RC+:} false; then :
38114  $as_echo_n "(cached) " >&6
38115else
38116  if test -n "$RC"; then
38117  ac_cv_prog_RC="$RC" # Let the user override the test.
38118else
38119  ac_prog_rejected=no
38120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38121for as_dir in $PATH
38122do
38123  IFS=$as_save_IFS
38124  test -z "$as_dir" && as_dir=.
38125    for ac_exec_ext in '' $ac_executable_extensions; do
38126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38127    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38128       ac_prog_rejected=yes
38129       continue
38130     fi
38131    ac_cv_prog_RC="rc"
38132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38133    break 2
38134  fi
38135done
38136  done
38137IFS=$as_save_IFS
38138
38139if test $ac_prog_rejected = yes; then
38140  # We found a bogon in the path, so make sure we never use it.
38141  set dummy $ac_cv_prog_RC
38142  shift
38143  if test $# != 0; then
38144    # We chose a different compiler from the bogus one.
38145    # However, it has the same basename, so the bogon will be chosen
38146    # first if we set RC to just the basename; use the full file name.
38147    shift
38148    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38149  fi
38150fi
38151fi
38152fi
38153RC=$ac_cv_prog_RC
38154if test -n "$RC"; then
38155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38156$as_echo "$RC" >&6; }
38157else
38158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38159$as_echo "no" >&6; }
38160fi
38161
38162
38163
38164  # Only process if variable expands to non-empty
38165
38166  if test "x$RC" != x; then
38167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38168
38169  # First separate the path from the arguments. This will split at the first
38170  # space.
38171  complete="$RC"
38172  path="${complete%% *}"
38173  tmp="$complete EOL"
38174  arguments="${tmp#* }"
38175
38176  # Input might be given as Windows format, start by converting to
38177  # unix format.
38178  new_path=`$CYGPATH -u "$path"`
38179
38180  # Now try to locate executable using which
38181  new_path=`$WHICH "$new_path" 2> /dev/null`
38182  # bat and cmd files are not always considered executable in cygwin causing which
38183  # to not find them
38184  if test "x$new_path" = x \
38185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38187    new_path=`$CYGPATH -u "$path"`
38188  fi
38189  if test "x$new_path" = x; then
38190    # Oops. Which didn't find the executable.
38191    # The splitting of arguments from the executable at a space might have been incorrect,
38192    # since paths with space are more likely in Windows. Give it another try with the whole
38193    # argument.
38194    path="$complete"
38195    arguments="EOL"
38196    new_path=`$CYGPATH -u "$path"`
38197    new_path=`$WHICH "$new_path" 2> /dev/null`
38198    # bat and cmd files are not always considered executable in cygwin causing which
38199    # to not find them
38200    if test "x$new_path" = x \
38201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38203      new_path=`$CYGPATH -u "$path"`
38204    fi
38205    if test "x$new_path" = x; then
38206      # It's still not found. Now this is an unrecoverable error.
38207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38208$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38209      has_space=`$ECHO "$complete" | $GREP " "`
38210      if test "x$has_space" != x; then
38211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38213      fi
38214      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38215    fi
38216  fi
38217
38218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38221  # "foo.exe" is OK but "foo" is an error.
38222  #
38223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38224  # It is also a way to make sure we got the proper file name for the real test later on.
38225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38226  if test "x$test_shortpath" = x; then
38227    # Short path failed, file does not exist as specified.
38228    # Try adding .exe or .cmd
38229    if test -f "${new_path}.exe"; then
38230      input_to_shortpath="${new_path}.exe"
38231    elif test -f "${new_path}.cmd"; then
38232      input_to_shortpath="${new_path}.cmd"
38233    else
38234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38235$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38238      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38239    fi
38240  else
38241    input_to_shortpath="$new_path"
38242  fi
38243
38244  # Call helper function which possibly converts this using DOS-style short mode.
38245  # If so, the updated path is stored in $new_path.
38246  new_path="$input_to_shortpath"
38247
38248  input_path="$input_to_shortpath"
38249  # Check if we need to convert this using DOS-style short mode. If the path
38250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38251  # take no chances and rewrite it.
38252  # Note: m4 eats our [], so we need to use [ and ] instead.
38253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38254  if test "x$has_forbidden_chars" != x; then
38255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38259      # Going to short mode and back again did indeed matter. Since short mode is
38260      # case insensitive, let's make it lowercase to improve readability.
38261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38262      # Now convert it back to Unix-style (cygpath)
38263      input_path=`$CYGPATH -u "$shortmode_path"`
38264      new_path="$input_path"
38265    fi
38266  fi
38267
38268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38269  if test "x$test_cygdrive_prefix" = x; then
38270    # As a simple fix, exclude /usr/bin since it's not a real path.
38271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38273      # a path prefixed by /cygdrive for fixpath to work.
38274      new_path="$CYGWIN_ROOT_PATH$input_path"
38275    fi
38276  fi
38277
38278  # remove trailing .exe if any
38279  new_path="${new_path/%.exe/}"
38280
38281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38282
38283  # First separate the path from the arguments. This will split at the first
38284  # space.
38285  complete="$RC"
38286  path="${complete%% *}"
38287  tmp="$complete EOL"
38288  arguments="${tmp#* }"
38289
38290  # Input might be given as Windows format, start by converting to
38291  # unix format.
38292  new_path="$path"
38293
38294  windows_path="$new_path"
38295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38296    unix_path=`$CYGPATH -u "$windows_path"`
38297    new_path="$unix_path"
38298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38300    new_path="$unix_path"
38301  fi
38302
38303
38304  # Now try to locate executable using which
38305  new_path=`$WHICH "$new_path" 2> /dev/null`
38306
38307  if test "x$new_path" = x; then
38308    # Oops. Which didn't find the executable.
38309    # The splitting of arguments from the executable at a space might have been incorrect,
38310    # since paths with space are more likely in Windows. Give it another try with the whole
38311    # argument.
38312    path="$complete"
38313    arguments="EOL"
38314    new_path="$path"
38315
38316  windows_path="$new_path"
38317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38318    unix_path=`$CYGPATH -u "$windows_path"`
38319    new_path="$unix_path"
38320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38322    new_path="$unix_path"
38323  fi
38324
38325
38326    new_path=`$WHICH "$new_path" 2> /dev/null`
38327    # bat and cmd files are not always considered executable in MSYS causing which
38328    # to not find them
38329    if test "x$new_path" = x \
38330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38332      new_path="$path"
38333
38334  windows_path="$new_path"
38335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38336    unix_path=`$CYGPATH -u "$windows_path"`
38337    new_path="$unix_path"
38338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38340    new_path="$unix_path"
38341  fi
38342
38343    fi
38344
38345    if test "x$new_path" = x; then
38346      # It's still not found. Now this is an unrecoverable error.
38347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38348$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38349      has_space=`$ECHO "$complete" | $GREP " "`
38350      if test "x$has_space" != x; then
38351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38353      fi
38354      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38355    fi
38356  fi
38357
38358  # Now new_path has a complete unix path to the binary
38359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38360    # Keep paths in /bin as-is, but remove trailing .exe if any
38361    new_path="${new_path/%.exe/}"
38362    # Do not save /bin paths to all_fixpath_prefixes!
38363  else
38364    # Not in mixed or Windows style, start by that.
38365    new_path=`cmd //c echo $new_path`
38366
38367  input_path="$new_path"
38368  # Check if we need to convert this using DOS-style short mode. If the path
38369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38370  # take no chances and rewrite it.
38371  # Note: m4 eats our [], so we need to use [ and ] instead.
38372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38373  if test "x$has_forbidden_chars" != x; then
38374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38376  fi
38377
38378    # Output is in $new_path
38379
38380  windows_path="$new_path"
38381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38382    unix_path=`$CYGPATH -u "$windows_path"`
38383    new_path="$unix_path"
38384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38386    new_path="$unix_path"
38387  fi
38388
38389    # remove trailing .exe if any
38390    new_path="${new_path/%.exe/}"
38391
38392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38394  fi
38395
38396    else
38397      # We're on a unix platform. Hooray! :)
38398      # First separate the path from the arguments. This will split at the first
38399      # space.
38400      complete="$RC"
38401      path="${complete%% *}"
38402      tmp="$complete EOL"
38403      arguments="${tmp#* }"
38404
38405      # Cannot rely on the command "which" here since it doesn't always work.
38406      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38407      if test -z "$is_absolute_path"; then
38408        # Path to executable is not absolute. Find it.
38409        IFS_save="$IFS"
38410        IFS=:
38411        for p in $PATH; do
38412          if test -f "$p/$path" && test -x "$p/$path"; then
38413            new_path="$p/$path"
38414            break
38415          fi
38416        done
38417        IFS="$IFS_save"
38418      else
38419        # This is an absolute path, we can use it without further modifications.
38420        new_path="$path"
38421      fi
38422
38423      if test "x$new_path" = x; then
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38425$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38426        has_space=`$ECHO "$complete" | $GREP " "`
38427        if test "x$has_space" != x; then
38428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38430        fi
38431        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38432      fi
38433    fi
38434
38435    # Now join together the path and the arguments once again
38436    if test "x$arguments" != xEOL; then
38437      new_complete="$new_path ${arguments% *}"
38438    else
38439      new_complete="$new_path"
38440    fi
38441
38442    if test "x$complete" != "x$new_complete"; then
38443      RC="$new_complete"
38444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38445$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38446    fi
38447  fi
38448
38449    # Extract the first word of "dumpbin", so it can be a program name with args.
38450set dummy dumpbin; ac_word=$2
38451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38452$as_echo_n "checking for $ac_word... " >&6; }
38453if ${ac_cv_prog_DUMPBIN+:} false; then :
38454  $as_echo_n "(cached) " >&6
38455else
38456  if test -n "$DUMPBIN"; then
38457  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38458else
38459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38460for as_dir in $PATH
38461do
38462  IFS=$as_save_IFS
38463  test -z "$as_dir" && as_dir=.
38464    for ac_exec_ext in '' $ac_executable_extensions; do
38465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38466    ac_cv_prog_DUMPBIN="dumpbin"
38467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38468    break 2
38469  fi
38470done
38471  done
38472IFS=$as_save_IFS
38473
38474fi
38475fi
38476DUMPBIN=$ac_cv_prog_DUMPBIN
38477if test -n "$DUMPBIN"; then
38478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38479$as_echo "$DUMPBIN" >&6; }
38480else
38481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38482$as_echo "no" >&6; }
38483fi
38484
38485
38486
38487  # Only process if variable expands to non-empty
38488
38489  if test "x$DUMPBIN" != x; then
38490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38491
38492  # First separate the path from the arguments. This will split at the first
38493  # space.
38494  complete="$DUMPBIN"
38495  path="${complete%% *}"
38496  tmp="$complete EOL"
38497  arguments="${tmp#* }"
38498
38499  # Input might be given as Windows format, start by converting to
38500  # unix format.
38501  new_path=`$CYGPATH -u "$path"`
38502
38503  # Now try to locate executable using which
38504  new_path=`$WHICH "$new_path" 2> /dev/null`
38505  # bat and cmd files are not always considered executable in cygwin causing which
38506  # to not find them
38507  if test "x$new_path" = x \
38508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38510    new_path=`$CYGPATH -u "$path"`
38511  fi
38512  if test "x$new_path" = x; then
38513    # Oops. Which didn't find the executable.
38514    # The splitting of arguments from the executable at a space might have been incorrect,
38515    # since paths with space are more likely in Windows. Give it another try with the whole
38516    # argument.
38517    path="$complete"
38518    arguments="EOL"
38519    new_path=`$CYGPATH -u "$path"`
38520    new_path=`$WHICH "$new_path" 2> /dev/null`
38521    # bat and cmd files are not always considered executable in cygwin causing which
38522    # to not find them
38523    if test "x$new_path" = x \
38524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38526      new_path=`$CYGPATH -u "$path"`
38527    fi
38528    if test "x$new_path" = x; then
38529      # It's still not found. Now this is an unrecoverable error.
38530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38531$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38532      has_space=`$ECHO "$complete" | $GREP " "`
38533      if test "x$has_space" != x; then
38534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38536      fi
38537      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38538    fi
38539  fi
38540
38541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38544  # "foo.exe" is OK but "foo" is an error.
38545  #
38546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38547  # It is also a way to make sure we got the proper file name for the real test later on.
38548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38549  if test "x$test_shortpath" = x; then
38550    # Short path failed, file does not exist as specified.
38551    # Try adding .exe or .cmd
38552    if test -f "${new_path}.exe"; then
38553      input_to_shortpath="${new_path}.exe"
38554    elif test -f "${new_path}.cmd"; then
38555      input_to_shortpath="${new_path}.cmd"
38556    else
38557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38558$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38561      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38562    fi
38563  else
38564    input_to_shortpath="$new_path"
38565  fi
38566
38567  # Call helper function which possibly converts this using DOS-style short mode.
38568  # If so, the updated path is stored in $new_path.
38569  new_path="$input_to_shortpath"
38570
38571  input_path="$input_to_shortpath"
38572  # Check if we need to convert this using DOS-style short mode. If the path
38573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38574  # take no chances and rewrite it.
38575  # Note: m4 eats our [], so we need to use [ and ] instead.
38576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38577  if test "x$has_forbidden_chars" != x; then
38578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38582      # Going to short mode and back again did indeed matter. Since short mode is
38583      # case insensitive, let's make it lowercase to improve readability.
38584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38585      # Now convert it back to Unix-style (cygpath)
38586      input_path=`$CYGPATH -u "$shortmode_path"`
38587      new_path="$input_path"
38588    fi
38589  fi
38590
38591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38592  if test "x$test_cygdrive_prefix" = x; then
38593    # As a simple fix, exclude /usr/bin since it's not a real path.
38594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38596      # a path prefixed by /cygdrive for fixpath to work.
38597      new_path="$CYGWIN_ROOT_PATH$input_path"
38598    fi
38599  fi
38600
38601  # remove trailing .exe if any
38602  new_path="${new_path/%.exe/}"
38603
38604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38605
38606  # First separate the path from the arguments. This will split at the first
38607  # space.
38608  complete="$DUMPBIN"
38609  path="${complete%% *}"
38610  tmp="$complete EOL"
38611  arguments="${tmp#* }"
38612
38613  # Input might be given as Windows format, start by converting to
38614  # unix format.
38615  new_path="$path"
38616
38617  windows_path="$new_path"
38618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38619    unix_path=`$CYGPATH -u "$windows_path"`
38620    new_path="$unix_path"
38621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38623    new_path="$unix_path"
38624  fi
38625
38626
38627  # Now try to locate executable using which
38628  new_path=`$WHICH "$new_path" 2> /dev/null`
38629
38630  if test "x$new_path" = x; then
38631    # Oops. Which didn't find the executable.
38632    # The splitting of arguments from the executable at a space might have been incorrect,
38633    # since paths with space are more likely in Windows. Give it another try with the whole
38634    # argument.
38635    path="$complete"
38636    arguments="EOL"
38637    new_path="$path"
38638
38639  windows_path="$new_path"
38640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38641    unix_path=`$CYGPATH -u "$windows_path"`
38642    new_path="$unix_path"
38643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38645    new_path="$unix_path"
38646  fi
38647
38648
38649    new_path=`$WHICH "$new_path" 2> /dev/null`
38650    # bat and cmd files are not always considered executable in MSYS causing which
38651    # to not find them
38652    if test "x$new_path" = x \
38653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38655      new_path="$path"
38656
38657  windows_path="$new_path"
38658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38659    unix_path=`$CYGPATH -u "$windows_path"`
38660    new_path="$unix_path"
38661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38663    new_path="$unix_path"
38664  fi
38665
38666    fi
38667
38668    if test "x$new_path" = x; then
38669      # It's still not found. Now this is an unrecoverable error.
38670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38671$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38672      has_space=`$ECHO "$complete" | $GREP " "`
38673      if test "x$has_space" != x; then
38674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38676      fi
38677      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38678    fi
38679  fi
38680
38681  # Now new_path has a complete unix path to the binary
38682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38683    # Keep paths in /bin as-is, but remove trailing .exe if any
38684    new_path="${new_path/%.exe/}"
38685    # Do not save /bin paths to all_fixpath_prefixes!
38686  else
38687    # Not in mixed or Windows style, start by that.
38688    new_path=`cmd //c echo $new_path`
38689
38690  input_path="$new_path"
38691  # Check if we need to convert this using DOS-style short mode. If the path
38692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38693  # take no chances and rewrite it.
38694  # Note: m4 eats our [], so we need to use [ and ] instead.
38695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38696  if test "x$has_forbidden_chars" != x; then
38697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38699  fi
38700
38701    # Output is in $new_path
38702
38703  windows_path="$new_path"
38704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38705    unix_path=`$CYGPATH -u "$windows_path"`
38706    new_path="$unix_path"
38707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38709    new_path="$unix_path"
38710  fi
38711
38712    # remove trailing .exe if any
38713    new_path="${new_path/%.exe/}"
38714
38715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38717  fi
38718
38719    else
38720      # We're on a unix platform. Hooray! :)
38721      # First separate the path from the arguments. This will split at the first
38722      # space.
38723      complete="$DUMPBIN"
38724      path="${complete%% *}"
38725      tmp="$complete EOL"
38726      arguments="${tmp#* }"
38727
38728      # Cannot rely on the command "which" here since it doesn't always work.
38729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38730      if test -z "$is_absolute_path"; then
38731        # Path to executable is not absolute. Find it.
38732        IFS_save="$IFS"
38733        IFS=:
38734        for p in $PATH; do
38735          if test -f "$p/$path" && test -x "$p/$path"; then
38736            new_path="$p/$path"
38737            break
38738          fi
38739        done
38740        IFS="$IFS_save"
38741      else
38742        # This is an absolute path, we can use it without further modifications.
38743        new_path="$path"
38744      fi
38745
38746      if test "x$new_path" = x; then
38747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38748$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38749        has_space=`$ECHO "$complete" | $GREP " "`
38750        if test "x$has_space" != x; then
38751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38753        fi
38754        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38755      fi
38756    fi
38757
38758    # Now join together the path and the arguments once again
38759    if test "x$arguments" != xEOL; then
38760      new_complete="$new_path ${arguments% *}"
38761    else
38762      new_complete="$new_path"
38763    fi
38764
38765    if test "x$complete" != "x$new_complete"; then
38766      DUMPBIN="$new_complete"
38767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38768$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38769    fi
38770  fi
38771
38772    # We need to check for 'msbuild.exe' because at the place where we expect to
38773    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38774    # won't find the 'msbuild.exe' executable in that case (and the
38775    # 'ac_executable_extensions' is unusable due to performance reasons).
38776    # Notice that we intentionally don't fix up the path to MSBUILD because we
38777    # will call it in a DOS shell during freetype detection on Windows (see
38778    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38779    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38780set dummy msbuild.exe; ac_word=$2
38781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38782$as_echo_n "checking for $ac_word... " >&6; }
38783if ${ac_cv_prog_MSBUILD+:} false; then :
38784  $as_echo_n "(cached) " >&6
38785else
38786  if test -n "$MSBUILD"; then
38787  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38788else
38789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38790for as_dir in $PATH
38791do
38792  IFS=$as_save_IFS
38793  test -z "$as_dir" && as_dir=.
38794    for ac_exec_ext in '' $ac_executable_extensions; do
38795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38796    ac_cv_prog_MSBUILD="msbuild.exe"
38797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38798    break 2
38799  fi
38800done
38801  done
38802IFS=$as_save_IFS
38803
38804fi
38805fi
38806MSBUILD=$ac_cv_prog_MSBUILD
38807if test -n "$MSBUILD"; then
38808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38809$as_echo "$MSBUILD" >&6; }
38810else
38811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38812$as_echo "no" >&6; }
38813fi
38814
38815
38816  fi
38817
38818  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38819
38820
38821  # Publish this variable in the help.
38822
38823
38824  if [ -z "${STRIP+x}" ]; then
38825    # The variable is not set by user, try to locate tool using the code snippet
38826    for ac_prog in strip
38827do
38828  # Extract the first word of "$ac_prog", so it can be a program name with args.
38829set dummy $ac_prog; ac_word=$2
38830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38831$as_echo_n "checking for $ac_word... " >&6; }
38832if ${ac_cv_path_STRIP+:} false; then :
38833  $as_echo_n "(cached) " >&6
38834else
38835  case $STRIP in
38836  [\\/]* | ?:[\\/]*)
38837  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38838  ;;
38839  *)
38840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38841for as_dir in $PATH
38842do
38843  IFS=$as_save_IFS
38844  test -z "$as_dir" && as_dir=.
38845    for ac_exec_ext in '' $ac_executable_extensions; do
38846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38847    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38849    break 2
38850  fi
38851done
38852  done
38853IFS=$as_save_IFS
38854
38855  ;;
38856esac
38857fi
38858STRIP=$ac_cv_path_STRIP
38859if test -n "$STRIP"; then
38860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38861$as_echo "$STRIP" >&6; }
38862else
38863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38864$as_echo "no" >&6; }
38865fi
38866
38867
38868  test -n "$STRIP" && break
38869done
38870
38871  else
38872    # The variable is set, but is it from the command line or the environment?
38873
38874    # Try to remove the string !STRIP! from our list.
38875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38877      # If it failed, the variable was not from the command line. Ignore it,
38878      # but warn the user (except for BASH, which is always set by the calling BASH).
38879      if test "xSTRIP" != xBASH; then
38880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38881$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38882      fi
38883      # Try to locate tool using the code snippet
38884      for ac_prog in strip
38885do
38886  # Extract the first word of "$ac_prog", so it can be a program name with args.
38887set dummy $ac_prog; ac_word=$2
38888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38889$as_echo_n "checking for $ac_word... " >&6; }
38890if ${ac_cv_path_STRIP+:} false; then :
38891  $as_echo_n "(cached) " >&6
38892else
38893  case $STRIP in
38894  [\\/]* | ?:[\\/]*)
38895  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38896  ;;
38897  *)
38898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38899for as_dir in $PATH
38900do
38901  IFS=$as_save_IFS
38902  test -z "$as_dir" && as_dir=.
38903    for ac_exec_ext in '' $ac_executable_extensions; do
38904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38905    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38907    break 2
38908  fi
38909done
38910  done
38911IFS=$as_save_IFS
38912
38913  ;;
38914esac
38915fi
38916STRIP=$ac_cv_path_STRIP
38917if test -n "$STRIP"; then
38918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38919$as_echo "$STRIP" >&6; }
38920else
38921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38922$as_echo "no" >&6; }
38923fi
38924
38925
38926  test -n "$STRIP" && break
38927done
38928
38929    else
38930      # If it succeeded, then it was overridden by the user. We will use it
38931      # for the tool.
38932
38933      # First remove it from the list of overridden variables, so we can test
38934      # for unknown variables in the end.
38935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38936
38937      # Check if we try to supply an empty value
38938      if test "x$STRIP" = x; then
38939        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38940$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38942$as_echo_n "checking for STRIP... " >&6; }
38943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38944$as_echo "disabled" >&6; }
38945      else
38946        # Check if the provided tool contains a complete path.
38947        tool_specified="$STRIP"
38948        tool_basename="${tool_specified##*/}"
38949        if test "x$tool_basename" = "x$tool_specified"; then
38950          # A command without a complete path is provided, search $PATH.
38951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38952$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38953          # Extract the first word of "$tool_basename", so it can be a program name with args.
38954set dummy $tool_basename; ac_word=$2
38955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38956$as_echo_n "checking for $ac_word... " >&6; }
38957if ${ac_cv_path_STRIP+:} false; then :
38958  $as_echo_n "(cached) " >&6
38959else
38960  case $STRIP in
38961  [\\/]* | ?:[\\/]*)
38962  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38963  ;;
38964  *)
38965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38966for as_dir in $PATH
38967do
38968  IFS=$as_save_IFS
38969  test -z "$as_dir" && as_dir=.
38970    for ac_exec_ext in '' $ac_executable_extensions; do
38971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38972    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38974    break 2
38975  fi
38976done
38977  done
38978IFS=$as_save_IFS
38979
38980  ;;
38981esac
38982fi
38983STRIP=$ac_cv_path_STRIP
38984if test -n "$STRIP"; then
38985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38986$as_echo "$STRIP" >&6; }
38987else
38988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38989$as_echo "no" >&6; }
38990fi
38991
38992
38993          if test "x$STRIP" = x; then
38994            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38995          fi
38996        else
38997          # Otherwise we believe it is a complete path. Use it as it is.
38998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38999$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39000          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39001$as_echo_n "checking for STRIP... " >&6; }
39002          if test ! -x "$tool_specified"; then
39003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39004$as_echo "not found" >&6; }
39005            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39006          fi
39007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39008$as_echo "$tool_specified" >&6; }
39009        fi
39010      fi
39011    fi
39012
39013  fi
39014
39015
39016
39017  # Only process if variable expands to non-empty
39018
39019  if test "x$STRIP" != x; then
39020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39021
39022  # First separate the path from the arguments. This will split at the first
39023  # space.
39024  complete="$STRIP"
39025  path="${complete%% *}"
39026  tmp="$complete EOL"
39027  arguments="${tmp#* }"
39028
39029  # Input might be given as Windows format, start by converting to
39030  # unix format.
39031  new_path=`$CYGPATH -u "$path"`
39032
39033  # Now try to locate executable using which
39034  new_path=`$WHICH "$new_path" 2> /dev/null`
39035  # bat and cmd files are not always considered executable in cygwin causing which
39036  # to not find them
39037  if test "x$new_path" = x \
39038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39040    new_path=`$CYGPATH -u "$path"`
39041  fi
39042  if test "x$new_path" = x; then
39043    # Oops. Which didn't find the executable.
39044    # The splitting of arguments from the executable at a space might have been incorrect,
39045    # since paths with space are more likely in Windows. Give it another try with the whole
39046    # argument.
39047    path="$complete"
39048    arguments="EOL"
39049    new_path=`$CYGPATH -u "$path"`
39050    new_path=`$WHICH "$new_path" 2> /dev/null`
39051    # bat and cmd files are not always considered executable in cygwin causing which
39052    # to not find them
39053    if test "x$new_path" = x \
39054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39056      new_path=`$CYGPATH -u "$path"`
39057    fi
39058    if test "x$new_path" = x; then
39059      # It's still not found. Now this is an unrecoverable error.
39060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39061$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39062      has_space=`$ECHO "$complete" | $GREP " "`
39063      if test "x$has_space" != x; then
39064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39066      fi
39067      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39068    fi
39069  fi
39070
39071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39074  # "foo.exe" is OK but "foo" is an error.
39075  #
39076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39077  # It is also a way to make sure we got the proper file name for the real test later on.
39078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39079  if test "x$test_shortpath" = x; then
39080    # Short path failed, file does not exist as specified.
39081    # Try adding .exe or .cmd
39082    if test -f "${new_path}.exe"; then
39083      input_to_shortpath="${new_path}.exe"
39084    elif test -f "${new_path}.cmd"; then
39085      input_to_shortpath="${new_path}.cmd"
39086    else
39087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39088$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39091      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39092    fi
39093  else
39094    input_to_shortpath="$new_path"
39095  fi
39096
39097  # Call helper function which possibly converts this using DOS-style short mode.
39098  # If so, the updated path is stored in $new_path.
39099  new_path="$input_to_shortpath"
39100
39101  input_path="$input_to_shortpath"
39102  # Check if we need to convert this using DOS-style short mode. If the path
39103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39104  # take no chances and rewrite it.
39105  # Note: m4 eats our [], so we need to use [ and ] instead.
39106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39107  if test "x$has_forbidden_chars" != x; then
39108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39112      # Going to short mode and back again did indeed matter. Since short mode is
39113      # case insensitive, let's make it lowercase to improve readability.
39114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39115      # Now convert it back to Unix-style (cygpath)
39116      input_path=`$CYGPATH -u "$shortmode_path"`
39117      new_path="$input_path"
39118    fi
39119  fi
39120
39121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39122  if test "x$test_cygdrive_prefix" = x; then
39123    # As a simple fix, exclude /usr/bin since it's not a real path.
39124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39126      # a path prefixed by /cygdrive for fixpath to work.
39127      new_path="$CYGWIN_ROOT_PATH$input_path"
39128    fi
39129  fi
39130
39131  # remove trailing .exe if any
39132  new_path="${new_path/%.exe/}"
39133
39134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39135
39136  # First separate the path from the arguments. This will split at the first
39137  # space.
39138  complete="$STRIP"
39139  path="${complete%% *}"
39140  tmp="$complete EOL"
39141  arguments="${tmp#* }"
39142
39143  # Input might be given as Windows format, start by converting to
39144  # unix format.
39145  new_path="$path"
39146
39147  windows_path="$new_path"
39148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39149    unix_path=`$CYGPATH -u "$windows_path"`
39150    new_path="$unix_path"
39151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39153    new_path="$unix_path"
39154  fi
39155
39156
39157  # Now try to locate executable using which
39158  new_path=`$WHICH "$new_path" 2> /dev/null`
39159
39160  if test "x$new_path" = x; then
39161    # Oops. Which didn't find the executable.
39162    # The splitting of arguments from the executable at a space might have been incorrect,
39163    # since paths with space are more likely in Windows. Give it another try with the whole
39164    # argument.
39165    path="$complete"
39166    arguments="EOL"
39167    new_path="$path"
39168
39169  windows_path="$new_path"
39170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39171    unix_path=`$CYGPATH -u "$windows_path"`
39172    new_path="$unix_path"
39173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39175    new_path="$unix_path"
39176  fi
39177
39178
39179    new_path=`$WHICH "$new_path" 2> /dev/null`
39180    # bat and cmd files are not always considered executable in MSYS causing which
39181    # to not find them
39182    if test "x$new_path" = x \
39183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39185      new_path="$path"
39186
39187  windows_path="$new_path"
39188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39189    unix_path=`$CYGPATH -u "$windows_path"`
39190    new_path="$unix_path"
39191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39193    new_path="$unix_path"
39194  fi
39195
39196    fi
39197
39198    if test "x$new_path" = x; then
39199      # It's still not found. Now this is an unrecoverable error.
39200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39201$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39202      has_space=`$ECHO "$complete" | $GREP " "`
39203      if test "x$has_space" != x; then
39204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39206      fi
39207      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39208    fi
39209  fi
39210
39211  # Now new_path has a complete unix path to the binary
39212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39213    # Keep paths in /bin as-is, but remove trailing .exe if any
39214    new_path="${new_path/%.exe/}"
39215    # Do not save /bin paths to all_fixpath_prefixes!
39216  else
39217    # Not in mixed or Windows style, start by that.
39218    new_path=`cmd //c echo $new_path`
39219
39220  input_path="$new_path"
39221  # Check if we need to convert this using DOS-style short mode. If the path
39222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39223  # take no chances and rewrite it.
39224  # Note: m4 eats our [], so we need to use [ and ] instead.
39225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39226  if test "x$has_forbidden_chars" != x; then
39227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39229  fi
39230
39231    # Output is in $new_path
39232
39233  windows_path="$new_path"
39234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39235    unix_path=`$CYGPATH -u "$windows_path"`
39236    new_path="$unix_path"
39237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39239    new_path="$unix_path"
39240  fi
39241
39242    # remove trailing .exe if any
39243    new_path="${new_path/%.exe/}"
39244
39245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39247  fi
39248
39249    else
39250      # We're on a unix platform. Hooray! :)
39251      # First separate the path from the arguments. This will split at the first
39252      # space.
39253      complete="$STRIP"
39254      path="${complete%% *}"
39255      tmp="$complete EOL"
39256      arguments="${tmp#* }"
39257
39258      # Cannot rely on the command "which" here since it doesn't always work.
39259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39260      if test -z "$is_absolute_path"; then
39261        # Path to executable is not absolute. Find it.
39262        IFS_save="$IFS"
39263        IFS=:
39264        for p in $PATH; do
39265          if test -f "$p/$path" && test -x "$p/$path"; then
39266            new_path="$p/$path"
39267            break
39268          fi
39269        done
39270        IFS="$IFS_save"
39271      else
39272        # This is an absolute path, we can use it without further modifications.
39273        new_path="$path"
39274      fi
39275
39276      if test "x$new_path" = x; then
39277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39278$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39279        has_space=`$ECHO "$complete" | $GREP " "`
39280        if test "x$has_space" != x; then
39281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39283        fi
39284        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39285      fi
39286    fi
39287
39288    # Now join together the path and the arguments once again
39289    if test "x$arguments" != xEOL; then
39290      new_complete="$new_path ${arguments% *}"
39291    else
39292      new_complete="$new_path"
39293    fi
39294
39295    if test "x$complete" != "x$new_complete"; then
39296      STRIP="$new_complete"
39297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39298$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39299    fi
39300  fi
39301
39302
39303
39304  # Publish this variable in the help.
39305
39306
39307  if [ -z "${NM+x}" ]; then
39308    # The variable is not set by user, try to locate tool using the code snippet
39309    for ac_prog in nm
39310do
39311  # Extract the first word of "$ac_prog", so it can be a program name with args.
39312set dummy $ac_prog; ac_word=$2
39313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39314$as_echo_n "checking for $ac_word... " >&6; }
39315if ${ac_cv_path_NM+:} false; then :
39316  $as_echo_n "(cached) " >&6
39317else
39318  case $NM in
39319  [\\/]* | ?:[\\/]*)
39320  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39321  ;;
39322  *)
39323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39324for as_dir in $PATH
39325do
39326  IFS=$as_save_IFS
39327  test -z "$as_dir" && as_dir=.
39328    for ac_exec_ext in '' $ac_executable_extensions; do
39329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39330    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39332    break 2
39333  fi
39334done
39335  done
39336IFS=$as_save_IFS
39337
39338  ;;
39339esac
39340fi
39341NM=$ac_cv_path_NM
39342if test -n "$NM"; then
39343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39344$as_echo "$NM" >&6; }
39345else
39346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39347$as_echo "no" >&6; }
39348fi
39349
39350
39351  test -n "$NM" && break
39352done
39353
39354  else
39355    # The variable is set, but is it from the command line or the environment?
39356
39357    # Try to remove the string !NM! from our list.
39358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39360      # If it failed, the variable was not from the command line. Ignore it,
39361      # but warn the user (except for BASH, which is always set by the calling BASH).
39362      if test "xNM" != xBASH; then
39363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39364$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39365      fi
39366      # Try to locate tool using the code snippet
39367      for ac_prog in nm
39368do
39369  # Extract the first word of "$ac_prog", so it can be a program name with args.
39370set dummy $ac_prog; ac_word=$2
39371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39372$as_echo_n "checking for $ac_word... " >&6; }
39373if ${ac_cv_path_NM+:} false; then :
39374  $as_echo_n "(cached) " >&6
39375else
39376  case $NM in
39377  [\\/]* | ?:[\\/]*)
39378  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39379  ;;
39380  *)
39381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39382for as_dir in $PATH
39383do
39384  IFS=$as_save_IFS
39385  test -z "$as_dir" && as_dir=.
39386    for ac_exec_ext in '' $ac_executable_extensions; do
39387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39388    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39390    break 2
39391  fi
39392done
39393  done
39394IFS=$as_save_IFS
39395
39396  ;;
39397esac
39398fi
39399NM=$ac_cv_path_NM
39400if test -n "$NM"; then
39401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39402$as_echo "$NM" >&6; }
39403else
39404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39405$as_echo "no" >&6; }
39406fi
39407
39408
39409  test -n "$NM" && break
39410done
39411
39412    else
39413      # If it succeeded, then it was overridden by the user. We will use it
39414      # for the tool.
39415
39416      # First remove it from the list of overridden variables, so we can test
39417      # for unknown variables in the end.
39418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39419
39420      # Check if we try to supply an empty value
39421      if test "x$NM" = x; then
39422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39423$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39425$as_echo_n "checking for NM... " >&6; }
39426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39427$as_echo "disabled" >&6; }
39428      else
39429        # Check if the provided tool contains a complete path.
39430        tool_specified="$NM"
39431        tool_basename="${tool_specified##*/}"
39432        if test "x$tool_basename" = "x$tool_specified"; then
39433          # A command without a complete path is provided, search $PATH.
39434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39435$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39436          # Extract the first word of "$tool_basename", so it can be a program name with args.
39437set dummy $tool_basename; ac_word=$2
39438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39439$as_echo_n "checking for $ac_word... " >&6; }
39440if ${ac_cv_path_NM+:} false; then :
39441  $as_echo_n "(cached) " >&6
39442else
39443  case $NM in
39444  [\\/]* | ?:[\\/]*)
39445  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39446  ;;
39447  *)
39448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39449for as_dir in $PATH
39450do
39451  IFS=$as_save_IFS
39452  test -z "$as_dir" && as_dir=.
39453    for ac_exec_ext in '' $ac_executable_extensions; do
39454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39455    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39457    break 2
39458  fi
39459done
39460  done
39461IFS=$as_save_IFS
39462
39463  ;;
39464esac
39465fi
39466NM=$ac_cv_path_NM
39467if test -n "$NM"; then
39468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39469$as_echo "$NM" >&6; }
39470else
39471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39472$as_echo "no" >&6; }
39473fi
39474
39475
39476          if test "x$NM" = x; then
39477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39478          fi
39479        else
39480          # Otherwise we believe it is a complete path. Use it as it is.
39481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39482$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39484$as_echo_n "checking for NM... " >&6; }
39485          if test ! -x "$tool_specified"; then
39486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39487$as_echo "not found" >&6; }
39488            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39489          fi
39490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39491$as_echo "$tool_specified" >&6; }
39492        fi
39493      fi
39494    fi
39495
39496  fi
39497
39498
39499
39500  # Only process if variable expands to non-empty
39501
39502  if test "x$NM" != x; then
39503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39504
39505  # First separate the path from the arguments. This will split at the first
39506  # space.
39507  complete="$NM"
39508  path="${complete%% *}"
39509  tmp="$complete EOL"
39510  arguments="${tmp#* }"
39511
39512  # Input might be given as Windows format, start by converting to
39513  # unix format.
39514  new_path=`$CYGPATH -u "$path"`
39515
39516  # Now try to locate executable using which
39517  new_path=`$WHICH "$new_path" 2> /dev/null`
39518  # bat and cmd files are not always considered executable in cygwin causing which
39519  # to not find them
39520  if test "x$new_path" = x \
39521      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39522      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39523    new_path=`$CYGPATH -u "$path"`
39524  fi
39525  if test "x$new_path" = x; then
39526    # Oops. Which didn't find the executable.
39527    # The splitting of arguments from the executable at a space might have been incorrect,
39528    # since paths with space are more likely in Windows. Give it another try with the whole
39529    # argument.
39530    path="$complete"
39531    arguments="EOL"
39532    new_path=`$CYGPATH -u "$path"`
39533    new_path=`$WHICH "$new_path" 2> /dev/null`
39534    # bat and cmd files are not always considered executable in cygwin causing which
39535    # to not find them
39536    if test "x$new_path" = x \
39537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39539      new_path=`$CYGPATH -u "$path"`
39540    fi
39541    if test "x$new_path" = x; then
39542      # It's still not found. Now this is an unrecoverable error.
39543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39544$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39545      has_space=`$ECHO "$complete" | $GREP " "`
39546      if test "x$has_space" != x; then
39547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39549      fi
39550      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39551    fi
39552  fi
39553
39554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39557  # "foo.exe" is OK but "foo" is an error.
39558  #
39559  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39560  # It is also a way to make sure we got the proper file name for the real test later on.
39561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39562  if test "x$test_shortpath" = x; then
39563    # Short path failed, file does not exist as specified.
39564    # Try adding .exe or .cmd
39565    if test -f "${new_path}.exe"; then
39566      input_to_shortpath="${new_path}.exe"
39567    elif test -f "${new_path}.cmd"; then
39568      input_to_shortpath="${new_path}.cmd"
39569    else
39570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39571$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39572      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39573$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39574      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39575    fi
39576  else
39577    input_to_shortpath="$new_path"
39578  fi
39579
39580  # Call helper function which possibly converts this using DOS-style short mode.
39581  # If so, the updated path is stored in $new_path.
39582  new_path="$input_to_shortpath"
39583
39584  input_path="$input_to_shortpath"
39585  # Check if we need to convert this using DOS-style short mode. If the path
39586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39587  # take no chances and rewrite it.
39588  # Note: m4 eats our [], so we need to use [ and ] instead.
39589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39590  if test "x$has_forbidden_chars" != x; then
39591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39595      # Going to short mode and back again did indeed matter. Since short mode is
39596      # case insensitive, let's make it lowercase to improve readability.
39597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39598      # Now convert it back to Unix-style (cygpath)
39599      input_path=`$CYGPATH -u "$shortmode_path"`
39600      new_path="$input_path"
39601    fi
39602  fi
39603
39604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39605  if test "x$test_cygdrive_prefix" = x; then
39606    # As a simple fix, exclude /usr/bin since it's not a real path.
39607    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39609      # a path prefixed by /cygdrive for fixpath to work.
39610      new_path="$CYGWIN_ROOT_PATH$input_path"
39611    fi
39612  fi
39613
39614  # remove trailing .exe if any
39615  new_path="${new_path/%.exe/}"
39616
39617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39618
39619  # First separate the path from the arguments. This will split at the first
39620  # space.
39621  complete="$NM"
39622  path="${complete%% *}"
39623  tmp="$complete EOL"
39624  arguments="${tmp#* }"
39625
39626  # Input might be given as Windows format, start by converting to
39627  # unix format.
39628  new_path="$path"
39629
39630  windows_path="$new_path"
39631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39632    unix_path=`$CYGPATH -u "$windows_path"`
39633    new_path="$unix_path"
39634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39636    new_path="$unix_path"
39637  fi
39638
39639
39640  # Now try to locate executable using which
39641  new_path=`$WHICH "$new_path" 2> /dev/null`
39642
39643  if test "x$new_path" = x; then
39644    # Oops. Which didn't find the executable.
39645    # The splitting of arguments from the executable at a space might have been incorrect,
39646    # since paths with space are more likely in Windows. Give it another try with the whole
39647    # argument.
39648    path="$complete"
39649    arguments="EOL"
39650    new_path="$path"
39651
39652  windows_path="$new_path"
39653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39654    unix_path=`$CYGPATH -u "$windows_path"`
39655    new_path="$unix_path"
39656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39658    new_path="$unix_path"
39659  fi
39660
39661
39662    new_path=`$WHICH "$new_path" 2> /dev/null`
39663    # bat and cmd files are not always considered executable in MSYS causing which
39664    # to not find them
39665    if test "x$new_path" = x \
39666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39668      new_path="$path"
39669
39670  windows_path="$new_path"
39671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39672    unix_path=`$CYGPATH -u "$windows_path"`
39673    new_path="$unix_path"
39674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39676    new_path="$unix_path"
39677  fi
39678
39679    fi
39680
39681    if test "x$new_path" = x; then
39682      # It's still not found. Now this is an unrecoverable error.
39683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39684$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39685      has_space=`$ECHO "$complete" | $GREP " "`
39686      if test "x$has_space" != x; then
39687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39689      fi
39690      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39691    fi
39692  fi
39693
39694  # Now new_path has a complete unix path to the binary
39695  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39696    # Keep paths in /bin as-is, but remove trailing .exe if any
39697    new_path="${new_path/%.exe/}"
39698    # Do not save /bin paths to all_fixpath_prefixes!
39699  else
39700    # Not in mixed or Windows style, start by that.
39701    new_path=`cmd //c echo $new_path`
39702
39703  input_path="$new_path"
39704  # Check if we need to convert this using DOS-style short mode. If the path
39705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39706  # take no chances and rewrite it.
39707  # Note: m4 eats our [], so we need to use [ and ] instead.
39708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39709  if test "x$has_forbidden_chars" != x; then
39710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39712  fi
39713
39714    # Output is in $new_path
39715
39716  windows_path="$new_path"
39717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39718    unix_path=`$CYGPATH -u "$windows_path"`
39719    new_path="$unix_path"
39720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39722    new_path="$unix_path"
39723  fi
39724
39725    # remove trailing .exe if any
39726    new_path="${new_path/%.exe/}"
39727
39728    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39729    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39730  fi
39731
39732    else
39733      # We're on a unix platform. Hooray! :)
39734      # First separate the path from the arguments. This will split at the first
39735      # space.
39736      complete="$NM"
39737      path="${complete%% *}"
39738      tmp="$complete EOL"
39739      arguments="${tmp#* }"
39740
39741      # Cannot rely on the command "which" here since it doesn't always work.
39742      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39743      if test -z "$is_absolute_path"; then
39744        # Path to executable is not absolute. Find it.
39745        IFS_save="$IFS"
39746        IFS=:
39747        for p in $PATH; do
39748          if test -f "$p/$path" && test -x "$p/$path"; then
39749            new_path="$p/$path"
39750            break
39751          fi
39752        done
39753        IFS="$IFS_save"
39754      else
39755        # This is an absolute path, we can use it without further modifications.
39756        new_path="$path"
39757      fi
39758
39759      if test "x$new_path" = x; then
39760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39761$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39762        has_space=`$ECHO "$complete" | $GREP " "`
39763        if test "x$has_space" != x; then
39764          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39766        fi
39767        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39768      fi
39769    fi
39770
39771    # Now join together the path and the arguments once again
39772    if test "x$arguments" != xEOL; then
39773      new_complete="$new_path ${arguments% *}"
39774    else
39775      new_complete="$new_path"
39776    fi
39777
39778    if test "x$complete" != "x$new_complete"; then
39779      NM="$new_complete"
39780      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39781$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39782    fi
39783  fi
39784
39785
39786
39787  # Publish this variable in the help.
39788
39789
39790  if [ -z "${GNM+x}" ]; then
39791    # The variable is not set by user, try to locate tool using the code snippet
39792    for ac_prog in gnm
39793do
39794  # Extract the first word of "$ac_prog", so it can be a program name with args.
39795set dummy $ac_prog; ac_word=$2
39796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39797$as_echo_n "checking for $ac_word... " >&6; }
39798if ${ac_cv_path_GNM+:} false; then :
39799  $as_echo_n "(cached) " >&6
39800else
39801  case $GNM in
39802  [\\/]* | ?:[\\/]*)
39803  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39804  ;;
39805  *)
39806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39807for as_dir in $PATH
39808do
39809  IFS=$as_save_IFS
39810  test -z "$as_dir" && as_dir=.
39811    for ac_exec_ext in '' $ac_executable_extensions; do
39812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39813    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39815    break 2
39816  fi
39817done
39818  done
39819IFS=$as_save_IFS
39820
39821  ;;
39822esac
39823fi
39824GNM=$ac_cv_path_GNM
39825if test -n "$GNM"; then
39826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39827$as_echo "$GNM" >&6; }
39828else
39829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39830$as_echo "no" >&6; }
39831fi
39832
39833
39834  test -n "$GNM" && break
39835done
39836
39837  else
39838    # The variable is set, but is it from the command line or the environment?
39839
39840    # Try to remove the string !GNM! from our list.
39841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39843      # If it failed, the variable was not from the command line. Ignore it,
39844      # but warn the user (except for BASH, which is always set by the calling BASH).
39845      if test "xGNM" != xBASH; then
39846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39847$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39848      fi
39849      # Try to locate tool using the code snippet
39850      for ac_prog in gnm
39851do
39852  # Extract the first word of "$ac_prog", so it can be a program name with args.
39853set dummy $ac_prog; ac_word=$2
39854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39855$as_echo_n "checking for $ac_word... " >&6; }
39856if ${ac_cv_path_GNM+:} false; then :
39857  $as_echo_n "(cached) " >&6
39858else
39859  case $GNM in
39860  [\\/]* | ?:[\\/]*)
39861  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39862  ;;
39863  *)
39864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39865for as_dir in $PATH
39866do
39867  IFS=$as_save_IFS
39868  test -z "$as_dir" && as_dir=.
39869    for ac_exec_ext in '' $ac_executable_extensions; do
39870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39871    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39873    break 2
39874  fi
39875done
39876  done
39877IFS=$as_save_IFS
39878
39879  ;;
39880esac
39881fi
39882GNM=$ac_cv_path_GNM
39883if test -n "$GNM"; then
39884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39885$as_echo "$GNM" >&6; }
39886else
39887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39888$as_echo "no" >&6; }
39889fi
39890
39891
39892  test -n "$GNM" && break
39893done
39894
39895    else
39896      # If it succeeded, then it was overridden by the user. We will use it
39897      # for the tool.
39898
39899      # First remove it from the list of overridden variables, so we can test
39900      # for unknown variables in the end.
39901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39902
39903      # Check if we try to supply an empty value
39904      if test "x$GNM" = x; then
39905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39906$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39908$as_echo_n "checking for GNM... " >&6; }
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39910$as_echo "disabled" >&6; }
39911      else
39912        # Check if the provided tool contains a complete path.
39913        tool_specified="$GNM"
39914        tool_basename="${tool_specified##*/}"
39915        if test "x$tool_basename" = "x$tool_specified"; then
39916          # A command without a complete path is provided, search $PATH.
39917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39918$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39919          # Extract the first word of "$tool_basename", so it can be a program name with args.
39920set dummy $tool_basename; ac_word=$2
39921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39922$as_echo_n "checking for $ac_word... " >&6; }
39923if ${ac_cv_path_GNM+:} false; then :
39924  $as_echo_n "(cached) " >&6
39925else
39926  case $GNM in
39927  [\\/]* | ?:[\\/]*)
39928  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39929  ;;
39930  *)
39931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39932for as_dir in $PATH
39933do
39934  IFS=$as_save_IFS
39935  test -z "$as_dir" && as_dir=.
39936    for ac_exec_ext in '' $ac_executable_extensions; do
39937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39938    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39940    break 2
39941  fi
39942done
39943  done
39944IFS=$as_save_IFS
39945
39946  ;;
39947esac
39948fi
39949GNM=$ac_cv_path_GNM
39950if test -n "$GNM"; then
39951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39952$as_echo "$GNM" >&6; }
39953else
39954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39955$as_echo "no" >&6; }
39956fi
39957
39958
39959          if test "x$GNM" = x; then
39960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39961          fi
39962        else
39963          # Otherwise we believe it is a complete path. Use it as it is.
39964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39965$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39967$as_echo_n "checking for GNM... " >&6; }
39968          if test ! -x "$tool_specified"; then
39969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39970$as_echo "not found" >&6; }
39971            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39972          fi
39973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39974$as_echo "$tool_specified" >&6; }
39975        fi
39976      fi
39977    fi
39978
39979  fi
39980
39981
39982
39983  # Only process if variable expands to non-empty
39984
39985  if test "x$GNM" != x; then
39986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39987
39988  # First separate the path from the arguments. This will split at the first
39989  # space.
39990  complete="$GNM"
39991  path="${complete%% *}"
39992  tmp="$complete EOL"
39993  arguments="${tmp#* }"
39994
39995  # Input might be given as Windows format, start by converting to
39996  # unix format.
39997  new_path=`$CYGPATH -u "$path"`
39998
39999  # Now try to locate executable using which
40000  new_path=`$WHICH "$new_path" 2> /dev/null`
40001  # bat and cmd files are not always considered executable in cygwin causing which
40002  # to not find them
40003  if test "x$new_path" = x \
40004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40006    new_path=`$CYGPATH -u "$path"`
40007  fi
40008  if test "x$new_path" = x; then
40009    # Oops. Which didn't find the executable.
40010    # The splitting of arguments from the executable at a space might have been incorrect,
40011    # since paths with space are more likely in Windows. Give it another try with the whole
40012    # argument.
40013    path="$complete"
40014    arguments="EOL"
40015    new_path=`$CYGPATH -u "$path"`
40016    new_path=`$WHICH "$new_path" 2> /dev/null`
40017    # bat and cmd files are not always considered executable in cygwin causing which
40018    # to not find them
40019    if test "x$new_path" = x \
40020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40022      new_path=`$CYGPATH -u "$path"`
40023    fi
40024    if test "x$new_path" = x; then
40025      # It's still not found. Now this is an unrecoverable error.
40026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40027$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40028      has_space=`$ECHO "$complete" | $GREP " "`
40029      if test "x$has_space" != x; then
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40032      fi
40033      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40034    fi
40035  fi
40036
40037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40040  # "foo.exe" is OK but "foo" is an error.
40041  #
40042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40043  # It is also a way to make sure we got the proper file name for the real test later on.
40044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40045  if test "x$test_shortpath" = x; then
40046    # Short path failed, file does not exist as specified.
40047    # Try adding .exe or .cmd
40048    if test -f "${new_path}.exe"; then
40049      input_to_shortpath="${new_path}.exe"
40050    elif test -f "${new_path}.cmd"; then
40051      input_to_shortpath="${new_path}.cmd"
40052    else
40053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40054$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40057      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40058    fi
40059  else
40060    input_to_shortpath="$new_path"
40061  fi
40062
40063  # Call helper function which possibly converts this using DOS-style short mode.
40064  # If so, the updated path is stored in $new_path.
40065  new_path="$input_to_shortpath"
40066
40067  input_path="$input_to_shortpath"
40068  # Check if we need to convert this using DOS-style short mode. If the path
40069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40070  # take no chances and rewrite it.
40071  # Note: m4 eats our [], so we need to use [ and ] instead.
40072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40073  if test "x$has_forbidden_chars" != x; then
40074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40078      # Going to short mode and back again did indeed matter. Since short mode is
40079      # case insensitive, let's make it lowercase to improve readability.
40080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40081      # Now convert it back to Unix-style (cygpath)
40082      input_path=`$CYGPATH -u "$shortmode_path"`
40083      new_path="$input_path"
40084    fi
40085  fi
40086
40087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40088  if test "x$test_cygdrive_prefix" = x; then
40089    # As a simple fix, exclude /usr/bin since it's not a real path.
40090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40092      # a path prefixed by /cygdrive for fixpath to work.
40093      new_path="$CYGWIN_ROOT_PATH$input_path"
40094    fi
40095  fi
40096
40097  # remove trailing .exe if any
40098  new_path="${new_path/%.exe/}"
40099
40100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40101
40102  # First separate the path from the arguments. This will split at the first
40103  # space.
40104  complete="$GNM"
40105  path="${complete%% *}"
40106  tmp="$complete EOL"
40107  arguments="${tmp#* }"
40108
40109  # Input might be given as Windows format, start by converting to
40110  # unix format.
40111  new_path="$path"
40112
40113  windows_path="$new_path"
40114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40115    unix_path=`$CYGPATH -u "$windows_path"`
40116    new_path="$unix_path"
40117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40119    new_path="$unix_path"
40120  fi
40121
40122
40123  # Now try to locate executable using which
40124  new_path=`$WHICH "$new_path" 2> /dev/null`
40125
40126  if test "x$new_path" = x; then
40127    # Oops. Which didn't find the executable.
40128    # The splitting of arguments from the executable at a space might have been incorrect,
40129    # since paths with space are more likely in Windows. Give it another try with the whole
40130    # argument.
40131    path="$complete"
40132    arguments="EOL"
40133    new_path="$path"
40134
40135  windows_path="$new_path"
40136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40137    unix_path=`$CYGPATH -u "$windows_path"`
40138    new_path="$unix_path"
40139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40141    new_path="$unix_path"
40142  fi
40143
40144
40145    new_path=`$WHICH "$new_path" 2> /dev/null`
40146    # bat and cmd files are not always considered executable in MSYS causing which
40147    # to not find them
40148    if test "x$new_path" = x \
40149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40151      new_path="$path"
40152
40153  windows_path="$new_path"
40154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40155    unix_path=`$CYGPATH -u "$windows_path"`
40156    new_path="$unix_path"
40157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40159    new_path="$unix_path"
40160  fi
40161
40162    fi
40163
40164    if test "x$new_path" = x; then
40165      # It's still not found. Now this is an unrecoverable error.
40166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40167$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40168      has_space=`$ECHO "$complete" | $GREP " "`
40169      if test "x$has_space" != x; then
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40172      fi
40173      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40174    fi
40175  fi
40176
40177  # Now new_path has a complete unix path to the binary
40178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40179    # Keep paths in /bin as-is, but remove trailing .exe if any
40180    new_path="${new_path/%.exe/}"
40181    # Do not save /bin paths to all_fixpath_prefixes!
40182  else
40183    # Not in mixed or Windows style, start by that.
40184    new_path=`cmd //c echo $new_path`
40185
40186  input_path="$new_path"
40187  # Check if we need to convert this using DOS-style short mode. If the path
40188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40189  # take no chances and rewrite it.
40190  # Note: m4 eats our [], so we need to use [ and ] instead.
40191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40192  if test "x$has_forbidden_chars" != x; then
40193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40195  fi
40196
40197    # Output is in $new_path
40198
40199  windows_path="$new_path"
40200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40201    unix_path=`$CYGPATH -u "$windows_path"`
40202    new_path="$unix_path"
40203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40205    new_path="$unix_path"
40206  fi
40207
40208    # remove trailing .exe if any
40209    new_path="${new_path/%.exe/}"
40210
40211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40213  fi
40214
40215    else
40216      # We're on a unix platform. Hooray! :)
40217      # First separate the path from the arguments. This will split at the first
40218      # space.
40219      complete="$GNM"
40220      path="${complete%% *}"
40221      tmp="$complete EOL"
40222      arguments="${tmp#* }"
40223
40224      # Cannot rely on the command "which" here since it doesn't always work.
40225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40226      if test -z "$is_absolute_path"; then
40227        # Path to executable is not absolute. Find it.
40228        IFS_save="$IFS"
40229        IFS=:
40230        for p in $PATH; do
40231          if test -f "$p/$path" && test -x "$p/$path"; then
40232            new_path="$p/$path"
40233            break
40234          fi
40235        done
40236        IFS="$IFS_save"
40237      else
40238        # This is an absolute path, we can use it without further modifications.
40239        new_path="$path"
40240      fi
40241
40242      if test "x$new_path" = x; then
40243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40244$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40245        has_space=`$ECHO "$complete" | $GREP " "`
40246        if test "x$has_space" != x; then
40247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40249        fi
40250        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40251      fi
40252    fi
40253
40254    # Now join together the path and the arguments once again
40255    if test "x$arguments" != xEOL; then
40256      new_complete="$new_path ${arguments% *}"
40257    else
40258      new_complete="$new_path"
40259    fi
40260
40261    if test "x$complete" != "x$new_complete"; then
40262      GNM="$new_complete"
40263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40264$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40265    fi
40266  fi
40267
40268  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40269    # FIXME: we should unify this with the solaris case above.
40270
40271
40272  # Publish this variable in the help.
40273
40274
40275  if [ -z "${STRIP+x}" ]; then
40276    # The variable is not set by user, try to locate tool using the code snippet
40277    if test -n "$ac_tool_prefix"; then
40278  for ac_prog in strip
40279  do
40280    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40281set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40283$as_echo_n "checking for $ac_word... " >&6; }
40284if ${ac_cv_prog_STRIP+:} false; then :
40285  $as_echo_n "(cached) " >&6
40286else
40287  if test -n "$STRIP"; then
40288  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40289else
40290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40291for as_dir in $PATH
40292do
40293  IFS=$as_save_IFS
40294  test -z "$as_dir" && as_dir=.
40295    for ac_exec_ext in '' $ac_executable_extensions; do
40296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40297    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40299    break 2
40300  fi
40301done
40302  done
40303IFS=$as_save_IFS
40304
40305fi
40306fi
40307STRIP=$ac_cv_prog_STRIP
40308if test -n "$STRIP"; then
40309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40310$as_echo "$STRIP" >&6; }
40311else
40312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40313$as_echo "no" >&6; }
40314fi
40315
40316
40317    test -n "$STRIP" && break
40318  done
40319fi
40320if test -z "$STRIP"; then
40321  ac_ct_STRIP=$STRIP
40322  for ac_prog in strip
40323do
40324  # Extract the first word of "$ac_prog", so it can be a program name with args.
40325set dummy $ac_prog; ac_word=$2
40326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40327$as_echo_n "checking for $ac_word... " >&6; }
40328if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40329  $as_echo_n "(cached) " >&6
40330else
40331  if test -n "$ac_ct_STRIP"; then
40332  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40333else
40334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40335for as_dir in $PATH
40336do
40337  IFS=$as_save_IFS
40338  test -z "$as_dir" && as_dir=.
40339    for ac_exec_ext in '' $ac_executable_extensions; do
40340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40341    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40343    break 2
40344  fi
40345done
40346  done
40347IFS=$as_save_IFS
40348
40349fi
40350fi
40351ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40352if test -n "$ac_ct_STRIP"; then
40353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40354$as_echo "$ac_ct_STRIP" >&6; }
40355else
40356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40357$as_echo "no" >&6; }
40358fi
40359
40360
40361  test -n "$ac_ct_STRIP" && break
40362done
40363
40364  if test "x$ac_ct_STRIP" = x; then
40365    STRIP=""
40366  else
40367    case $cross_compiling:$ac_tool_warned in
40368yes:)
40369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40371ac_tool_warned=yes ;;
40372esac
40373    STRIP=$ac_ct_STRIP
40374  fi
40375fi
40376
40377  else
40378    # The variable is set, but is it from the command line or the environment?
40379
40380    # Try to remove the string !STRIP! from our list.
40381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40383      # If it failed, the variable was not from the command line. Ignore it,
40384      # but warn the user (except for BASH, which is always set by the calling BASH).
40385      if test "xSTRIP" != xBASH; then
40386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40387$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40388      fi
40389      # Try to locate tool using the code snippet
40390      if test -n "$ac_tool_prefix"; then
40391  for ac_prog in strip
40392  do
40393    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40396$as_echo_n "checking for $ac_word... " >&6; }
40397if ${ac_cv_prog_STRIP+:} false; then :
40398  $as_echo_n "(cached) " >&6
40399else
40400  if test -n "$STRIP"; then
40401  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40402else
40403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40404for as_dir in $PATH
40405do
40406  IFS=$as_save_IFS
40407  test -z "$as_dir" && as_dir=.
40408    for ac_exec_ext in '' $ac_executable_extensions; do
40409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40410    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40412    break 2
40413  fi
40414done
40415  done
40416IFS=$as_save_IFS
40417
40418fi
40419fi
40420STRIP=$ac_cv_prog_STRIP
40421if test -n "$STRIP"; then
40422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40423$as_echo "$STRIP" >&6; }
40424else
40425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40426$as_echo "no" >&6; }
40427fi
40428
40429
40430    test -n "$STRIP" && break
40431  done
40432fi
40433if test -z "$STRIP"; then
40434  ac_ct_STRIP=$STRIP
40435  for ac_prog in strip
40436do
40437  # Extract the first word of "$ac_prog", so it can be a program name with args.
40438set dummy $ac_prog; ac_word=$2
40439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40440$as_echo_n "checking for $ac_word... " >&6; }
40441if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40442  $as_echo_n "(cached) " >&6
40443else
40444  if test -n "$ac_ct_STRIP"; then
40445  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40446else
40447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40448for as_dir in $PATH
40449do
40450  IFS=$as_save_IFS
40451  test -z "$as_dir" && as_dir=.
40452    for ac_exec_ext in '' $ac_executable_extensions; do
40453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40454    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40456    break 2
40457  fi
40458done
40459  done
40460IFS=$as_save_IFS
40461
40462fi
40463fi
40464ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40465if test -n "$ac_ct_STRIP"; then
40466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40467$as_echo "$ac_ct_STRIP" >&6; }
40468else
40469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40470$as_echo "no" >&6; }
40471fi
40472
40473
40474  test -n "$ac_ct_STRIP" && break
40475done
40476
40477  if test "x$ac_ct_STRIP" = x; then
40478    STRIP=""
40479  else
40480    case $cross_compiling:$ac_tool_warned in
40481yes:)
40482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40484ac_tool_warned=yes ;;
40485esac
40486    STRIP=$ac_ct_STRIP
40487  fi
40488fi
40489
40490    else
40491      # If it succeeded, then it was overridden by the user. We will use it
40492      # for the tool.
40493
40494      # First remove it from the list of overridden variables, so we can test
40495      # for unknown variables in the end.
40496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40497
40498      # Check if we try to supply an empty value
40499      if test "x$STRIP" = x; then
40500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40501$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40503$as_echo_n "checking for STRIP... " >&6; }
40504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40505$as_echo "disabled" >&6; }
40506      else
40507        # Check if the provided tool contains a complete path.
40508        tool_specified="$STRIP"
40509        tool_basename="${tool_specified##*/}"
40510        if test "x$tool_basename" = "x$tool_specified"; then
40511          # A command without a complete path is provided, search $PATH.
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40513$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40514          # Extract the first word of "$tool_basename", so it can be a program name with args.
40515set dummy $tool_basename; ac_word=$2
40516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40517$as_echo_n "checking for $ac_word... " >&6; }
40518if ${ac_cv_path_STRIP+:} false; then :
40519  $as_echo_n "(cached) " >&6
40520else
40521  case $STRIP in
40522  [\\/]* | ?:[\\/]*)
40523  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40524  ;;
40525  *)
40526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40527for as_dir in $PATH
40528do
40529  IFS=$as_save_IFS
40530  test -z "$as_dir" && as_dir=.
40531    for ac_exec_ext in '' $ac_executable_extensions; do
40532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40533    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40535    break 2
40536  fi
40537done
40538  done
40539IFS=$as_save_IFS
40540
40541  ;;
40542esac
40543fi
40544STRIP=$ac_cv_path_STRIP
40545if test -n "$STRIP"; then
40546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40547$as_echo "$STRIP" >&6; }
40548else
40549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40550$as_echo "no" >&6; }
40551fi
40552
40553
40554          if test "x$STRIP" = x; then
40555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40556          fi
40557        else
40558          # Otherwise we believe it is a complete path. Use it as it is.
40559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40560$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40562$as_echo_n "checking for STRIP... " >&6; }
40563          if test ! -x "$tool_specified"; then
40564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40565$as_echo "not found" >&6; }
40566            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40567          fi
40568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40569$as_echo "$tool_specified" >&6; }
40570        fi
40571      fi
40572    fi
40573
40574  fi
40575
40576
40577
40578  # Only process if variable expands to non-empty
40579
40580  if test "x$STRIP" != x; then
40581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40582
40583  # First separate the path from the arguments. This will split at the first
40584  # space.
40585  complete="$STRIP"
40586  path="${complete%% *}"
40587  tmp="$complete EOL"
40588  arguments="${tmp#* }"
40589
40590  # Input might be given as Windows format, start by converting to
40591  # unix format.
40592  new_path=`$CYGPATH -u "$path"`
40593
40594  # Now try to locate executable using which
40595  new_path=`$WHICH "$new_path" 2> /dev/null`
40596  # bat and cmd files are not always considered executable in cygwin causing which
40597  # to not find them
40598  if test "x$new_path" = x \
40599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40601    new_path=`$CYGPATH -u "$path"`
40602  fi
40603  if test "x$new_path" = x; then
40604    # Oops. Which didn't find the executable.
40605    # The splitting of arguments from the executable at a space might have been incorrect,
40606    # since paths with space are more likely in Windows. Give it another try with the whole
40607    # argument.
40608    path="$complete"
40609    arguments="EOL"
40610    new_path=`$CYGPATH -u "$path"`
40611    new_path=`$WHICH "$new_path" 2> /dev/null`
40612    # bat and cmd files are not always considered executable in cygwin causing which
40613    # to not find them
40614    if test "x$new_path" = x \
40615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40617      new_path=`$CYGPATH -u "$path"`
40618    fi
40619    if test "x$new_path" = x; then
40620      # It's still not found. Now this is an unrecoverable error.
40621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40622$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40623      has_space=`$ECHO "$complete" | $GREP " "`
40624      if test "x$has_space" != x; then
40625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40627      fi
40628      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40629    fi
40630  fi
40631
40632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40635  # "foo.exe" is OK but "foo" is an error.
40636  #
40637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40638  # It is also a way to make sure we got the proper file name for the real test later on.
40639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40640  if test "x$test_shortpath" = x; then
40641    # Short path failed, file does not exist as specified.
40642    # Try adding .exe or .cmd
40643    if test -f "${new_path}.exe"; then
40644      input_to_shortpath="${new_path}.exe"
40645    elif test -f "${new_path}.cmd"; then
40646      input_to_shortpath="${new_path}.cmd"
40647    else
40648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40649$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40652      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40653    fi
40654  else
40655    input_to_shortpath="$new_path"
40656  fi
40657
40658  # Call helper function which possibly converts this using DOS-style short mode.
40659  # If so, the updated path is stored in $new_path.
40660  new_path="$input_to_shortpath"
40661
40662  input_path="$input_to_shortpath"
40663  # Check if we need to convert this using DOS-style short mode. If the path
40664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40665  # take no chances and rewrite it.
40666  # Note: m4 eats our [], so we need to use [ and ] instead.
40667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40668  if test "x$has_forbidden_chars" != x; then
40669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40673      # Going to short mode and back again did indeed matter. Since short mode is
40674      # case insensitive, let's make it lowercase to improve readability.
40675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40676      # Now convert it back to Unix-style (cygpath)
40677      input_path=`$CYGPATH -u "$shortmode_path"`
40678      new_path="$input_path"
40679    fi
40680  fi
40681
40682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40683  if test "x$test_cygdrive_prefix" = x; then
40684    # As a simple fix, exclude /usr/bin since it's not a real path.
40685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40687      # a path prefixed by /cygdrive for fixpath to work.
40688      new_path="$CYGWIN_ROOT_PATH$input_path"
40689    fi
40690  fi
40691
40692  # remove trailing .exe if any
40693  new_path="${new_path/%.exe/}"
40694
40695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40696
40697  # First separate the path from the arguments. This will split at the first
40698  # space.
40699  complete="$STRIP"
40700  path="${complete%% *}"
40701  tmp="$complete EOL"
40702  arguments="${tmp#* }"
40703
40704  # Input might be given as Windows format, start by converting to
40705  # unix format.
40706  new_path="$path"
40707
40708  windows_path="$new_path"
40709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40710    unix_path=`$CYGPATH -u "$windows_path"`
40711    new_path="$unix_path"
40712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40714    new_path="$unix_path"
40715  fi
40716
40717
40718  # Now try to locate executable using which
40719  new_path=`$WHICH "$new_path" 2> /dev/null`
40720
40721  if test "x$new_path" = x; then
40722    # Oops. Which didn't find the executable.
40723    # The splitting of arguments from the executable at a space might have been incorrect,
40724    # since paths with space are more likely in Windows. Give it another try with the whole
40725    # argument.
40726    path="$complete"
40727    arguments="EOL"
40728    new_path="$path"
40729
40730  windows_path="$new_path"
40731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40732    unix_path=`$CYGPATH -u "$windows_path"`
40733    new_path="$unix_path"
40734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40736    new_path="$unix_path"
40737  fi
40738
40739
40740    new_path=`$WHICH "$new_path" 2> /dev/null`
40741    # bat and cmd files are not always considered executable in MSYS causing which
40742    # to not find them
40743    if test "x$new_path" = x \
40744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
40758
40759    if test "x$new_path" = x; then
40760      # It's still not found. Now this is an unrecoverable error.
40761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40762$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40763      has_space=`$ECHO "$complete" | $GREP " "`
40764      if test "x$has_space" != x; then
40765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40767      fi
40768      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40769    fi
40770  fi
40771
40772  # Now new_path has a complete unix path to the binary
40773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40774    # Keep paths in /bin as-is, but remove trailing .exe if any
40775    new_path="${new_path/%.exe/}"
40776    # Do not save /bin paths to all_fixpath_prefixes!
40777  else
40778    # Not in mixed or Windows style, start by that.
40779    new_path=`cmd //c echo $new_path`
40780
40781  input_path="$new_path"
40782  # Check if we need to convert this using DOS-style short mode. If the path
40783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40784  # take no chances and rewrite it.
40785  # Note: m4 eats our [], so we need to use [ and ] instead.
40786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40787  if test "x$has_forbidden_chars" != x; then
40788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40790  fi
40791
40792    # Output is in $new_path
40793
40794  windows_path="$new_path"
40795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40796    unix_path=`$CYGPATH -u "$windows_path"`
40797    new_path="$unix_path"
40798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40800    new_path="$unix_path"
40801  fi
40802
40803    # remove trailing .exe if any
40804    new_path="${new_path/%.exe/}"
40805
40806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40808  fi
40809
40810    else
40811      # We're on a unix platform. Hooray! :)
40812      # First separate the path from the arguments. This will split at the first
40813      # space.
40814      complete="$STRIP"
40815      path="${complete%% *}"
40816      tmp="$complete EOL"
40817      arguments="${tmp#* }"
40818
40819      # Cannot rely on the command "which" here since it doesn't always work.
40820      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40821      if test -z "$is_absolute_path"; then
40822        # Path to executable is not absolute. Find it.
40823        IFS_save="$IFS"
40824        IFS=:
40825        for p in $PATH; do
40826          if test -f "$p/$path" && test -x "$p/$path"; then
40827            new_path="$p/$path"
40828            break
40829          fi
40830        done
40831        IFS="$IFS_save"
40832      else
40833        # This is an absolute path, we can use it without further modifications.
40834        new_path="$path"
40835      fi
40836
40837      if test "x$new_path" = x; then
40838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40839$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40840        has_space=`$ECHO "$complete" | $GREP " "`
40841        if test "x$has_space" != x; then
40842          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40844        fi
40845        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40846      fi
40847    fi
40848
40849    # Now join together the path and the arguments once again
40850    if test "x$arguments" != xEOL; then
40851      new_complete="$new_path ${arguments% *}"
40852    else
40853      new_complete="$new_path"
40854    fi
40855
40856    if test "x$complete" != "x$new_complete"; then
40857      STRIP="$new_complete"
40858      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40859$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40860    fi
40861  fi
40862
40863    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40864
40865
40866  # Publish this variable in the help.
40867
40868
40869  if [ -z "${NM+x}" ]; then
40870    # The variable is not set by user, try to locate tool using the code snippet
40871    if test -n "$ac_tool_prefix"; then
40872  for ac_prog in nm gcc-nm
40873  do
40874    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40877$as_echo_n "checking for $ac_word... " >&6; }
40878if ${ac_cv_prog_NM+:} false; then :
40879  $as_echo_n "(cached) " >&6
40880else
40881  if test -n "$NM"; then
40882  ac_cv_prog_NM="$NM" # Let the user override the test.
40883else
40884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40885for as_dir in $PATH
40886do
40887  IFS=$as_save_IFS
40888  test -z "$as_dir" && as_dir=.
40889    for ac_exec_ext in '' $ac_executable_extensions; do
40890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40891    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40893    break 2
40894  fi
40895done
40896  done
40897IFS=$as_save_IFS
40898
40899fi
40900fi
40901NM=$ac_cv_prog_NM
40902if test -n "$NM"; then
40903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40904$as_echo "$NM" >&6; }
40905else
40906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40907$as_echo "no" >&6; }
40908fi
40909
40910
40911    test -n "$NM" && break
40912  done
40913fi
40914if test -z "$NM"; then
40915  ac_ct_NM=$NM
40916  for ac_prog in nm gcc-nm
40917do
40918  # Extract the first word of "$ac_prog", so it can be a program name with args.
40919set dummy $ac_prog; ac_word=$2
40920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40921$as_echo_n "checking for $ac_word... " >&6; }
40922if ${ac_cv_prog_ac_ct_NM+:} false; then :
40923  $as_echo_n "(cached) " >&6
40924else
40925  if test -n "$ac_ct_NM"; then
40926  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40927else
40928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40929for as_dir in $PATH
40930do
40931  IFS=$as_save_IFS
40932  test -z "$as_dir" && as_dir=.
40933    for ac_exec_ext in '' $ac_executable_extensions; do
40934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40935    ac_cv_prog_ac_ct_NM="$ac_prog"
40936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40937    break 2
40938  fi
40939done
40940  done
40941IFS=$as_save_IFS
40942
40943fi
40944fi
40945ac_ct_NM=$ac_cv_prog_ac_ct_NM
40946if test -n "$ac_ct_NM"; then
40947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40948$as_echo "$ac_ct_NM" >&6; }
40949else
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40951$as_echo "no" >&6; }
40952fi
40953
40954
40955  test -n "$ac_ct_NM" && break
40956done
40957
40958  if test "x$ac_ct_NM" = x; then
40959    NM=""
40960  else
40961    case $cross_compiling:$ac_tool_warned in
40962yes:)
40963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40965ac_tool_warned=yes ;;
40966esac
40967    NM=$ac_ct_NM
40968  fi
40969fi
40970
40971  else
40972    # The variable is set, but is it from the command line or the environment?
40973
40974    # Try to remove the string !NM! from our list.
40975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40977      # If it failed, the variable was not from the command line. Ignore it,
40978      # but warn the user (except for BASH, which is always set by the calling BASH).
40979      if test "xNM" != xBASH; then
40980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40981$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40982      fi
40983      # Try to locate tool using the code snippet
40984      if test -n "$ac_tool_prefix"; then
40985  for ac_prog in nm gcc-nm
40986  do
40987    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40988set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40990$as_echo_n "checking for $ac_word... " >&6; }
40991if ${ac_cv_prog_NM+:} false; then :
40992  $as_echo_n "(cached) " >&6
40993else
40994  if test -n "$NM"; then
40995  ac_cv_prog_NM="$NM" # Let the user override the test.
40996else
40997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40998for as_dir in $PATH
40999do
41000  IFS=$as_save_IFS
41001  test -z "$as_dir" && as_dir=.
41002    for ac_exec_ext in '' $ac_executable_extensions; do
41003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41004    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41006    break 2
41007  fi
41008done
41009  done
41010IFS=$as_save_IFS
41011
41012fi
41013fi
41014NM=$ac_cv_prog_NM
41015if test -n "$NM"; then
41016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41017$as_echo "$NM" >&6; }
41018else
41019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41020$as_echo "no" >&6; }
41021fi
41022
41023
41024    test -n "$NM" && break
41025  done
41026fi
41027if test -z "$NM"; then
41028  ac_ct_NM=$NM
41029  for ac_prog in nm gcc-nm
41030do
41031  # Extract the first word of "$ac_prog", so it can be a program name with args.
41032set dummy $ac_prog; ac_word=$2
41033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41034$as_echo_n "checking for $ac_word... " >&6; }
41035if ${ac_cv_prog_ac_ct_NM+:} false; then :
41036  $as_echo_n "(cached) " >&6
41037else
41038  if test -n "$ac_ct_NM"; then
41039  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41040else
41041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41042for as_dir in $PATH
41043do
41044  IFS=$as_save_IFS
41045  test -z "$as_dir" && as_dir=.
41046    for ac_exec_ext in '' $ac_executable_extensions; do
41047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41048    ac_cv_prog_ac_ct_NM="$ac_prog"
41049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41050    break 2
41051  fi
41052done
41053  done
41054IFS=$as_save_IFS
41055
41056fi
41057fi
41058ac_ct_NM=$ac_cv_prog_ac_ct_NM
41059if test -n "$ac_ct_NM"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41061$as_echo "$ac_ct_NM" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068  test -n "$ac_ct_NM" && break
41069done
41070
41071  if test "x$ac_ct_NM" = x; then
41072    NM=""
41073  else
41074    case $cross_compiling:$ac_tool_warned in
41075yes:)
41076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41078ac_tool_warned=yes ;;
41079esac
41080    NM=$ac_ct_NM
41081  fi
41082fi
41083
41084    else
41085      # If it succeeded, then it was overridden by the user. We will use it
41086      # for the tool.
41087
41088      # First remove it from the list of overridden variables, so we can test
41089      # for unknown variables in the end.
41090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41091
41092      # Check if we try to supply an empty value
41093      if test "x$NM" = x; then
41094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41095$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41097$as_echo_n "checking for NM... " >&6; }
41098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41099$as_echo "disabled" >&6; }
41100      else
41101        # Check if the provided tool contains a complete path.
41102        tool_specified="$NM"
41103        tool_basename="${tool_specified##*/}"
41104        if test "x$tool_basename" = "x$tool_specified"; then
41105          # A command without a complete path is provided, search $PATH.
41106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41107$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41108          # Extract the first word of "$tool_basename", so it can be a program name with args.
41109set dummy $tool_basename; ac_word=$2
41110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41111$as_echo_n "checking for $ac_word... " >&6; }
41112if ${ac_cv_path_NM+:} false; then :
41113  $as_echo_n "(cached) " >&6
41114else
41115  case $NM in
41116  [\\/]* | ?:[\\/]*)
41117  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41118  ;;
41119  *)
41120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41121for as_dir in $PATH
41122do
41123  IFS=$as_save_IFS
41124  test -z "$as_dir" && as_dir=.
41125    for ac_exec_ext in '' $ac_executable_extensions; do
41126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41127    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41129    break 2
41130  fi
41131done
41132  done
41133IFS=$as_save_IFS
41134
41135  ;;
41136esac
41137fi
41138NM=$ac_cv_path_NM
41139if test -n "$NM"; then
41140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41141$as_echo "$NM" >&6; }
41142else
41143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41144$as_echo "no" >&6; }
41145fi
41146
41147
41148          if test "x$NM" = x; then
41149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41150          fi
41151        else
41152          # Otherwise we believe it is a complete path. Use it as it is.
41153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41154$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41156$as_echo_n "checking for NM... " >&6; }
41157          if test ! -x "$tool_specified"; then
41158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41159$as_echo "not found" >&6; }
41160            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41161          fi
41162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41163$as_echo "$tool_specified" >&6; }
41164        fi
41165      fi
41166    fi
41167
41168  fi
41169
41170
41171    else
41172
41173
41174  # Publish this variable in the help.
41175
41176
41177  if [ -z "${NM+x}" ]; then
41178    # The variable is not set by user, try to locate tool using the code snippet
41179    if test -n "$ac_tool_prefix"; then
41180  for ac_prog in nm
41181  do
41182    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41185$as_echo_n "checking for $ac_word... " >&6; }
41186if ${ac_cv_prog_NM+:} false; then :
41187  $as_echo_n "(cached) " >&6
41188else
41189  if test -n "$NM"; then
41190  ac_cv_prog_NM="$NM" # Let the user override the test.
41191else
41192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193for as_dir in $PATH
41194do
41195  IFS=$as_save_IFS
41196  test -z "$as_dir" && as_dir=.
41197    for ac_exec_ext in '' $ac_executable_extensions; do
41198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201    break 2
41202  fi
41203done
41204  done
41205IFS=$as_save_IFS
41206
41207fi
41208fi
41209NM=$ac_cv_prog_NM
41210if test -n "$NM"; then
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41212$as_echo "$NM" >&6; }
41213else
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41215$as_echo "no" >&6; }
41216fi
41217
41218
41219    test -n "$NM" && break
41220  done
41221fi
41222if test -z "$NM"; then
41223  ac_ct_NM=$NM
41224  for ac_prog in nm
41225do
41226  # Extract the first word of "$ac_prog", so it can be a program name with args.
41227set dummy $ac_prog; ac_word=$2
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229$as_echo_n "checking for $ac_word... " >&6; }
41230if ${ac_cv_prog_ac_ct_NM+:} false; then :
41231  $as_echo_n "(cached) " >&6
41232else
41233  if test -n "$ac_ct_NM"; then
41234  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41235else
41236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237for as_dir in $PATH
41238do
41239  IFS=$as_save_IFS
41240  test -z "$as_dir" && as_dir=.
41241    for ac_exec_ext in '' $ac_executable_extensions; do
41242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243    ac_cv_prog_ac_ct_NM="$ac_prog"
41244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245    break 2
41246  fi
41247done
41248  done
41249IFS=$as_save_IFS
41250
41251fi
41252fi
41253ac_ct_NM=$ac_cv_prog_ac_ct_NM
41254if test -n "$ac_ct_NM"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41256$as_echo "$ac_ct_NM" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263  test -n "$ac_ct_NM" && break
41264done
41265
41266  if test "x$ac_ct_NM" = x; then
41267    NM=""
41268  else
41269    case $cross_compiling:$ac_tool_warned in
41270yes:)
41271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41273ac_tool_warned=yes ;;
41274esac
41275    NM=$ac_ct_NM
41276  fi
41277fi
41278
41279  else
41280    # The variable is set, but is it from the command line or the environment?
41281
41282    # Try to remove the string !NM! from our list.
41283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41285      # If it failed, the variable was not from the command line. Ignore it,
41286      # but warn the user (except for BASH, which is always set by the calling BASH).
41287      if test "xNM" != xBASH; then
41288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41289$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41290      fi
41291      # Try to locate tool using the code snippet
41292      if test -n "$ac_tool_prefix"; then
41293  for ac_prog in nm
41294  do
41295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41298$as_echo_n "checking for $ac_word... " >&6; }
41299if ${ac_cv_prog_NM+:} false; then :
41300  $as_echo_n "(cached) " >&6
41301else
41302  if test -n "$NM"; then
41303  ac_cv_prog_NM="$NM" # Let the user override the test.
41304else
41305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41306for as_dir in $PATH
41307do
41308  IFS=$as_save_IFS
41309  test -z "$as_dir" && as_dir=.
41310    for ac_exec_ext in '' $ac_executable_extensions; do
41311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41312    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41314    break 2
41315  fi
41316done
41317  done
41318IFS=$as_save_IFS
41319
41320fi
41321fi
41322NM=$ac_cv_prog_NM
41323if test -n "$NM"; then
41324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41325$as_echo "$NM" >&6; }
41326else
41327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41328$as_echo "no" >&6; }
41329fi
41330
41331
41332    test -n "$NM" && break
41333  done
41334fi
41335if test -z "$NM"; then
41336  ac_ct_NM=$NM
41337  for ac_prog in nm
41338do
41339  # Extract the first word of "$ac_prog", so it can be a program name with args.
41340set dummy $ac_prog; ac_word=$2
41341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41342$as_echo_n "checking for $ac_word... " >&6; }
41343if ${ac_cv_prog_ac_ct_NM+:} false; then :
41344  $as_echo_n "(cached) " >&6
41345else
41346  if test -n "$ac_ct_NM"; then
41347  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41348else
41349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41350for as_dir in $PATH
41351do
41352  IFS=$as_save_IFS
41353  test -z "$as_dir" && as_dir=.
41354    for ac_exec_ext in '' $ac_executable_extensions; do
41355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41356    ac_cv_prog_ac_ct_NM="$ac_prog"
41357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41358    break 2
41359  fi
41360done
41361  done
41362IFS=$as_save_IFS
41363
41364fi
41365fi
41366ac_ct_NM=$ac_cv_prog_ac_ct_NM
41367if test -n "$ac_ct_NM"; then
41368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41369$as_echo "$ac_ct_NM" >&6; }
41370else
41371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41372$as_echo "no" >&6; }
41373fi
41374
41375
41376  test -n "$ac_ct_NM" && break
41377done
41378
41379  if test "x$ac_ct_NM" = x; then
41380    NM=""
41381  else
41382    case $cross_compiling:$ac_tool_warned in
41383yes:)
41384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41386ac_tool_warned=yes ;;
41387esac
41388    NM=$ac_ct_NM
41389  fi
41390fi
41391
41392    else
41393      # If it succeeded, then it was overridden by the user. We will use it
41394      # for the tool.
41395
41396      # First remove it from the list of overridden variables, so we can test
41397      # for unknown variables in the end.
41398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41399
41400      # Check if we try to supply an empty value
41401      if test "x$NM" = x; then
41402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41403$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41405$as_echo_n "checking for NM... " >&6; }
41406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41407$as_echo "disabled" >&6; }
41408      else
41409        # Check if the provided tool contains a complete path.
41410        tool_specified="$NM"
41411        tool_basename="${tool_specified##*/}"
41412        if test "x$tool_basename" = "x$tool_specified"; then
41413          # A command without a complete path is provided, search $PATH.
41414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41415$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41416          # Extract the first word of "$tool_basename", so it can be a program name with args.
41417set dummy $tool_basename; ac_word=$2
41418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41419$as_echo_n "checking for $ac_word... " >&6; }
41420if ${ac_cv_path_NM+:} false; then :
41421  $as_echo_n "(cached) " >&6
41422else
41423  case $NM in
41424  [\\/]* | ?:[\\/]*)
41425  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41426  ;;
41427  *)
41428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41429for as_dir in $PATH
41430do
41431  IFS=$as_save_IFS
41432  test -z "$as_dir" && as_dir=.
41433    for ac_exec_ext in '' $ac_executable_extensions; do
41434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41435    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41437    break 2
41438  fi
41439done
41440  done
41441IFS=$as_save_IFS
41442
41443  ;;
41444esac
41445fi
41446NM=$ac_cv_path_NM
41447if test -n "$NM"; then
41448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41449$as_echo "$NM" >&6; }
41450else
41451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41452$as_echo "no" >&6; }
41453fi
41454
41455
41456          if test "x$NM" = x; then
41457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41458          fi
41459        else
41460          # Otherwise we believe it is a complete path. Use it as it is.
41461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41462$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41464$as_echo_n "checking for NM... " >&6; }
41465          if test ! -x "$tool_specified"; then
41466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41467$as_echo "not found" >&6; }
41468            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41469          fi
41470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41471$as_echo "$tool_specified" >&6; }
41472        fi
41473      fi
41474    fi
41475
41476  fi
41477
41478
41479    fi
41480
41481  # Only process if variable expands to non-empty
41482
41483  if test "x$NM" != x; then
41484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41485
41486  # First separate the path from the arguments. This will split at the first
41487  # space.
41488  complete="$NM"
41489  path="${complete%% *}"
41490  tmp="$complete EOL"
41491  arguments="${tmp#* }"
41492
41493  # Input might be given as Windows format, start by converting to
41494  # unix format.
41495  new_path=`$CYGPATH -u "$path"`
41496
41497  # Now try to locate executable using which
41498  new_path=`$WHICH "$new_path" 2> /dev/null`
41499  # bat and cmd files are not always considered executable in cygwin causing which
41500  # to not find them
41501  if test "x$new_path" = x \
41502      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41503      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41504    new_path=`$CYGPATH -u "$path"`
41505  fi
41506  if test "x$new_path" = x; then
41507    # Oops. Which didn't find the executable.
41508    # The splitting of arguments from the executable at a space might have been incorrect,
41509    # since paths with space are more likely in Windows. Give it another try with the whole
41510    # argument.
41511    path="$complete"
41512    arguments="EOL"
41513    new_path=`$CYGPATH -u "$path"`
41514    new_path=`$WHICH "$new_path" 2> /dev/null`
41515    # bat and cmd files are not always considered executable in cygwin causing which
41516    # to not find them
41517    if test "x$new_path" = x \
41518        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41519        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41520      new_path=`$CYGPATH -u "$path"`
41521    fi
41522    if test "x$new_path" = x; then
41523      # It's still not found. Now this is an unrecoverable error.
41524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41525$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41526      has_space=`$ECHO "$complete" | $GREP " "`
41527      if test "x$has_space" != x; then
41528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41530      fi
41531      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41532    fi
41533  fi
41534
41535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41538  # "foo.exe" is OK but "foo" is an error.
41539  #
41540  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41541  # It is also a way to make sure we got the proper file name for the real test later on.
41542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41543  if test "x$test_shortpath" = x; then
41544    # Short path failed, file does not exist as specified.
41545    # Try adding .exe or .cmd
41546    if test -f "${new_path}.exe"; then
41547      input_to_shortpath="${new_path}.exe"
41548    elif test -f "${new_path}.cmd"; then
41549      input_to_shortpath="${new_path}.cmd"
41550    else
41551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41552$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41553      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41554$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41555      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41556    fi
41557  else
41558    input_to_shortpath="$new_path"
41559  fi
41560
41561  # Call helper function which possibly converts this using DOS-style short mode.
41562  # If so, the updated path is stored in $new_path.
41563  new_path="$input_to_shortpath"
41564
41565  input_path="$input_to_shortpath"
41566  # Check if we need to convert this using DOS-style short mode. If the path
41567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41568  # take no chances and rewrite it.
41569  # Note: m4 eats our [], so we need to use [ and ] instead.
41570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41571  if test "x$has_forbidden_chars" != x; then
41572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41576      # Going to short mode and back again did indeed matter. Since short mode is
41577      # case insensitive, let's make it lowercase to improve readability.
41578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41579      # Now convert it back to Unix-style (cygpath)
41580      input_path=`$CYGPATH -u "$shortmode_path"`
41581      new_path="$input_path"
41582    fi
41583  fi
41584
41585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41586  if test "x$test_cygdrive_prefix" = x; then
41587    # As a simple fix, exclude /usr/bin since it's not a real path.
41588    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41590      # a path prefixed by /cygdrive for fixpath to work.
41591      new_path="$CYGWIN_ROOT_PATH$input_path"
41592    fi
41593  fi
41594
41595  # remove trailing .exe if any
41596  new_path="${new_path/%.exe/}"
41597
41598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41599
41600  # First separate the path from the arguments. This will split at the first
41601  # space.
41602  complete="$NM"
41603  path="${complete%% *}"
41604  tmp="$complete EOL"
41605  arguments="${tmp#* }"
41606
41607  # Input might be given as Windows format, start by converting to
41608  # unix format.
41609  new_path="$path"
41610
41611  windows_path="$new_path"
41612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41613    unix_path=`$CYGPATH -u "$windows_path"`
41614    new_path="$unix_path"
41615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41617    new_path="$unix_path"
41618  fi
41619
41620
41621  # Now try to locate executable using which
41622  new_path=`$WHICH "$new_path" 2> /dev/null`
41623
41624  if test "x$new_path" = x; then
41625    # Oops. Which didn't find the executable.
41626    # The splitting of arguments from the executable at a space might have been incorrect,
41627    # since paths with space are more likely in Windows. Give it another try with the whole
41628    # argument.
41629    path="$complete"
41630    arguments="EOL"
41631    new_path="$path"
41632
41633  windows_path="$new_path"
41634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41635    unix_path=`$CYGPATH -u "$windows_path"`
41636    new_path="$unix_path"
41637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41639    new_path="$unix_path"
41640  fi
41641
41642
41643    new_path=`$WHICH "$new_path" 2> /dev/null`
41644    # bat and cmd files are not always considered executable in MSYS causing which
41645    # to not find them
41646    if test "x$new_path" = x \
41647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41649      new_path="$path"
41650
41651  windows_path="$new_path"
41652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41653    unix_path=`$CYGPATH -u "$windows_path"`
41654    new_path="$unix_path"
41655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41657    new_path="$unix_path"
41658  fi
41659
41660    fi
41661
41662    if test "x$new_path" = x; then
41663      # It's still not found. Now this is an unrecoverable error.
41664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41665$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41666      has_space=`$ECHO "$complete" | $GREP " "`
41667      if test "x$has_space" != x; then
41668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41670      fi
41671      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41672    fi
41673  fi
41674
41675  # Now new_path has a complete unix path to the binary
41676  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41677    # Keep paths in /bin as-is, but remove trailing .exe if any
41678    new_path="${new_path/%.exe/}"
41679    # Do not save /bin paths to all_fixpath_prefixes!
41680  else
41681    # Not in mixed or Windows style, start by that.
41682    new_path=`cmd //c echo $new_path`
41683
41684  input_path="$new_path"
41685  # Check if we need to convert this using DOS-style short mode. If the path
41686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41687  # take no chances and rewrite it.
41688  # Note: m4 eats our [], so we need to use [ and ] instead.
41689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41690  if test "x$has_forbidden_chars" != x; then
41691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41693  fi
41694
41695    # Output is in $new_path
41696
41697  windows_path="$new_path"
41698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41699    unix_path=`$CYGPATH -u "$windows_path"`
41700    new_path="$unix_path"
41701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41703    new_path="$unix_path"
41704  fi
41705
41706    # remove trailing .exe if any
41707    new_path="${new_path/%.exe/}"
41708
41709    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41710    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41711  fi
41712
41713    else
41714      # We're on a unix platform. Hooray! :)
41715      # First separate the path from the arguments. This will split at the first
41716      # space.
41717      complete="$NM"
41718      path="${complete%% *}"
41719      tmp="$complete EOL"
41720      arguments="${tmp#* }"
41721
41722      # Cannot rely on the command "which" here since it doesn't always work.
41723      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41724      if test -z "$is_absolute_path"; then
41725        # Path to executable is not absolute. Find it.
41726        IFS_save="$IFS"
41727        IFS=:
41728        for p in $PATH; do
41729          if test -f "$p/$path" && test -x "$p/$path"; then
41730            new_path="$p/$path"
41731            break
41732          fi
41733        done
41734        IFS="$IFS_save"
41735      else
41736        # This is an absolute path, we can use it without further modifications.
41737        new_path="$path"
41738      fi
41739
41740      if test "x$new_path" = x; then
41741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41742$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41743        has_space=`$ECHO "$complete" | $GREP " "`
41744        if test "x$has_space" != x; then
41745          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41746$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41747        fi
41748        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41749      fi
41750    fi
41751
41752    # Now join together the path and the arguments once again
41753    if test "x$arguments" != xEOL; then
41754      new_complete="$new_path ${arguments% *}"
41755    else
41756      new_complete="$new_path"
41757    fi
41758
41759    if test "x$complete" != "x$new_complete"; then
41760      NM="$new_complete"
41761      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41762$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41763    fi
41764  fi
41765
41766    GNM="$NM"
41767
41768  fi
41769
41770  # objcopy is used for moving debug symbols to separate files when
41771  # full debug symbols are enabled.
41772  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41773
41774
41775  # Publish this variable in the help.
41776
41777
41778  if [ -z "${OBJCOPY+x}" ]; then
41779    # The variable is not set by user, try to locate tool using the code snippet
41780    if test -n "$ac_tool_prefix"; then
41781  for ac_prog in gobjcopy objcopy
41782  do
41783    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41784set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41786$as_echo_n "checking for $ac_word... " >&6; }
41787if ${ac_cv_prog_OBJCOPY+:} false; then :
41788  $as_echo_n "(cached) " >&6
41789else
41790  if test -n "$OBJCOPY"; then
41791  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41792else
41793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41794for as_dir in $PATH
41795do
41796  IFS=$as_save_IFS
41797  test -z "$as_dir" && as_dir=.
41798    for ac_exec_ext in '' $ac_executable_extensions; do
41799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41800    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41802    break 2
41803  fi
41804done
41805  done
41806IFS=$as_save_IFS
41807
41808fi
41809fi
41810OBJCOPY=$ac_cv_prog_OBJCOPY
41811if test -n "$OBJCOPY"; then
41812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41813$as_echo "$OBJCOPY" >&6; }
41814else
41815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41816$as_echo "no" >&6; }
41817fi
41818
41819
41820    test -n "$OBJCOPY" && break
41821  done
41822fi
41823if test -z "$OBJCOPY"; then
41824  ac_ct_OBJCOPY=$OBJCOPY
41825  for ac_prog in gobjcopy objcopy
41826do
41827  # Extract the first word of "$ac_prog", so it can be a program name with args.
41828set dummy $ac_prog; ac_word=$2
41829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41830$as_echo_n "checking for $ac_word... " >&6; }
41831if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41832  $as_echo_n "(cached) " >&6
41833else
41834  if test -n "$ac_ct_OBJCOPY"; then
41835  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41836else
41837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41838for as_dir in $PATH
41839do
41840  IFS=$as_save_IFS
41841  test -z "$as_dir" && as_dir=.
41842    for ac_exec_ext in '' $ac_executable_extensions; do
41843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41844    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41846    break 2
41847  fi
41848done
41849  done
41850IFS=$as_save_IFS
41851
41852fi
41853fi
41854ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41855if test -n "$ac_ct_OBJCOPY"; then
41856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41857$as_echo "$ac_ct_OBJCOPY" >&6; }
41858else
41859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41860$as_echo "no" >&6; }
41861fi
41862
41863
41864  test -n "$ac_ct_OBJCOPY" && break
41865done
41866
41867  if test "x$ac_ct_OBJCOPY" = x; then
41868    OBJCOPY=""
41869  else
41870    case $cross_compiling:$ac_tool_warned in
41871yes:)
41872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41874ac_tool_warned=yes ;;
41875esac
41876    OBJCOPY=$ac_ct_OBJCOPY
41877  fi
41878fi
41879
41880  else
41881    # The variable is set, but is it from the command line or the environment?
41882
41883    # Try to remove the string !OBJCOPY! from our list.
41884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41886      # If it failed, the variable was not from the command line. Ignore it,
41887      # but warn the user (except for BASH, which is always set by the calling BASH).
41888      if test "xOBJCOPY" != xBASH; then
41889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41890$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41891      fi
41892      # Try to locate tool using the code snippet
41893      if test -n "$ac_tool_prefix"; then
41894  for ac_prog in gobjcopy objcopy
41895  do
41896    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41897set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41899$as_echo_n "checking for $ac_word... " >&6; }
41900if ${ac_cv_prog_OBJCOPY+:} false; then :
41901  $as_echo_n "(cached) " >&6
41902else
41903  if test -n "$OBJCOPY"; then
41904  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41905else
41906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41907for as_dir in $PATH
41908do
41909  IFS=$as_save_IFS
41910  test -z "$as_dir" && as_dir=.
41911    for ac_exec_ext in '' $ac_executable_extensions; do
41912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41913    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41915    break 2
41916  fi
41917done
41918  done
41919IFS=$as_save_IFS
41920
41921fi
41922fi
41923OBJCOPY=$ac_cv_prog_OBJCOPY
41924if test -n "$OBJCOPY"; then
41925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41926$as_echo "$OBJCOPY" >&6; }
41927else
41928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41929$as_echo "no" >&6; }
41930fi
41931
41932
41933    test -n "$OBJCOPY" && break
41934  done
41935fi
41936if test -z "$OBJCOPY"; then
41937  ac_ct_OBJCOPY=$OBJCOPY
41938  for ac_prog in gobjcopy objcopy
41939do
41940  # Extract the first word of "$ac_prog", so it can be a program name with args.
41941set dummy $ac_prog; ac_word=$2
41942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943$as_echo_n "checking for $ac_word... " >&6; }
41944if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41945  $as_echo_n "(cached) " >&6
41946else
41947  if test -n "$ac_ct_OBJCOPY"; then
41948  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41949else
41950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951for as_dir in $PATH
41952do
41953  IFS=$as_save_IFS
41954  test -z "$as_dir" && as_dir=.
41955    for ac_exec_ext in '' $ac_executable_extensions; do
41956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959    break 2
41960  fi
41961done
41962  done
41963IFS=$as_save_IFS
41964
41965fi
41966fi
41967ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41968if test -n "$ac_ct_OBJCOPY"; then
41969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41970$as_echo "$ac_ct_OBJCOPY" >&6; }
41971else
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973$as_echo "no" >&6; }
41974fi
41975
41976
41977  test -n "$ac_ct_OBJCOPY" && break
41978done
41979
41980  if test "x$ac_ct_OBJCOPY" = x; then
41981    OBJCOPY=""
41982  else
41983    case $cross_compiling:$ac_tool_warned in
41984yes:)
41985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41987ac_tool_warned=yes ;;
41988esac
41989    OBJCOPY=$ac_ct_OBJCOPY
41990  fi
41991fi
41992
41993    else
41994      # If it succeeded, then it was overridden by the user. We will use it
41995      # for the tool.
41996
41997      # First remove it from the list of overridden variables, so we can test
41998      # for unknown variables in the end.
41999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42000
42001      # Check if we try to supply an empty value
42002      if test "x$OBJCOPY" = x; then
42003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42004$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42006$as_echo_n "checking for OBJCOPY... " >&6; }
42007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42008$as_echo "disabled" >&6; }
42009      else
42010        # Check if the provided tool contains a complete path.
42011        tool_specified="$OBJCOPY"
42012        tool_basename="${tool_specified##*/}"
42013        if test "x$tool_basename" = "x$tool_specified"; then
42014          # A command without a complete path is provided, search $PATH.
42015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42016$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42017          # Extract the first word of "$tool_basename", so it can be a program name with args.
42018set dummy $tool_basename; ac_word=$2
42019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42020$as_echo_n "checking for $ac_word... " >&6; }
42021if ${ac_cv_path_OBJCOPY+:} false; then :
42022  $as_echo_n "(cached) " >&6
42023else
42024  case $OBJCOPY in
42025  [\\/]* | ?:[\\/]*)
42026  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42027  ;;
42028  *)
42029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42030for as_dir in $PATH
42031do
42032  IFS=$as_save_IFS
42033  test -z "$as_dir" && as_dir=.
42034    for ac_exec_ext in '' $ac_executable_extensions; do
42035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42036    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42038    break 2
42039  fi
42040done
42041  done
42042IFS=$as_save_IFS
42043
42044  ;;
42045esac
42046fi
42047OBJCOPY=$ac_cv_path_OBJCOPY
42048if test -n "$OBJCOPY"; then
42049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42050$as_echo "$OBJCOPY" >&6; }
42051else
42052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42053$as_echo "no" >&6; }
42054fi
42055
42056
42057          if test "x$OBJCOPY" = x; then
42058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42059          fi
42060        else
42061          # Otherwise we believe it is a complete path. Use it as it is.
42062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42063$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42065$as_echo_n "checking for OBJCOPY... " >&6; }
42066          if test ! -x "$tool_specified"; then
42067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42068$as_echo "not found" >&6; }
42069            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42070          fi
42071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42072$as_echo "$tool_specified" >&6; }
42073        fi
42074      fi
42075    fi
42076
42077  fi
42078
42079
42080    # Only call fixup if objcopy was found.
42081    if test -n "$OBJCOPY"; then
42082
42083  # Only process if variable expands to non-empty
42084
42085  if test "x$OBJCOPY" != x; then
42086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42087
42088  # First separate the path from the arguments. This will split at the first
42089  # space.
42090  complete="$OBJCOPY"
42091  path="${complete%% *}"
42092  tmp="$complete EOL"
42093  arguments="${tmp#* }"
42094
42095  # Input might be given as Windows format, start by converting to
42096  # unix format.
42097  new_path=`$CYGPATH -u "$path"`
42098
42099  # Now try to locate executable using which
42100  new_path=`$WHICH "$new_path" 2> /dev/null`
42101  # bat and cmd files are not always considered executable in cygwin causing which
42102  # to not find them
42103  if test "x$new_path" = x \
42104      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42105      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42106    new_path=`$CYGPATH -u "$path"`
42107  fi
42108  if test "x$new_path" = x; then
42109    # Oops. Which didn't find the executable.
42110    # The splitting of arguments from the executable at a space might have been incorrect,
42111    # since paths with space are more likely in Windows. Give it another try with the whole
42112    # argument.
42113    path="$complete"
42114    arguments="EOL"
42115    new_path=`$CYGPATH -u "$path"`
42116    new_path=`$WHICH "$new_path" 2> /dev/null`
42117    # bat and cmd files are not always considered executable in cygwin causing which
42118    # to not find them
42119    if test "x$new_path" = x \
42120        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42121        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42122      new_path=`$CYGPATH -u "$path"`
42123    fi
42124    if test "x$new_path" = x; then
42125      # It's still not found. Now this is an unrecoverable error.
42126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42127$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42128      has_space=`$ECHO "$complete" | $GREP " "`
42129      if test "x$has_space" != x; then
42130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42132      fi
42133      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42134    fi
42135  fi
42136
42137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42140  # "foo.exe" is OK but "foo" is an error.
42141  #
42142  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42143  # It is also a way to make sure we got the proper file name for the real test later on.
42144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42145  if test "x$test_shortpath" = x; then
42146    # Short path failed, file does not exist as specified.
42147    # Try adding .exe or .cmd
42148    if test -f "${new_path}.exe"; then
42149      input_to_shortpath="${new_path}.exe"
42150    elif test -f "${new_path}.cmd"; then
42151      input_to_shortpath="${new_path}.cmd"
42152    else
42153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42154$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42157      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42158    fi
42159  else
42160    input_to_shortpath="$new_path"
42161  fi
42162
42163  # Call helper function which possibly converts this using DOS-style short mode.
42164  # If so, the updated path is stored in $new_path.
42165  new_path="$input_to_shortpath"
42166
42167  input_path="$input_to_shortpath"
42168  # Check if we need to convert this using DOS-style short mode. If the path
42169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42170  # take no chances and rewrite it.
42171  # Note: m4 eats our [], so we need to use [ and ] instead.
42172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42173  if test "x$has_forbidden_chars" != x; then
42174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42178      # Going to short mode and back again did indeed matter. Since short mode is
42179      # case insensitive, let's make it lowercase to improve readability.
42180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42181      # Now convert it back to Unix-style (cygpath)
42182      input_path=`$CYGPATH -u "$shortmode_path"`
42183      new_path="$input_path"
42184    fi
42185  fi
42186
42187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42188  if test "x$test_cygdrive_prefix" = x; then
42189    # As a simple fix, exclude /usr/bin since it's not a real path.
42190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42192      # a path prefixed by /cygdrive for fixpath to work.
42193      new_path="$CYGWIN_ROOT_PATH$input_path"
42194    fi
42195  fi
42196
42197  # remove trailing .exe if any
42198  new_path="${new_path/%.exe/}"
42199
42200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42201
42202  # First separate the path from the arguments. This will split at the first
42203  # space.
42204  complete="$OBJCOPY"
42205  path="${complete%% *}"
42206  tmp="$complete EOL"
42207  arguments="${tmp#* }"
42208
42209  # Input might be given as Windows format, start by converting to
42210  # unix format.
42211  new_path="$path"
42212
42213  windows_path="$new_path"
42214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42215    unix_path=`$CYGPATH -u "$windows_path"`
42216    new_path="$unix_path"
42217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42219    new_path="$unix_path"
42220  fi
42221
42222
42223  # Now try to locate executable using which
42224  new_path=`$WHICH "$new_path" 2> /dev/null`
42225
42226  if test "x$new_path" = x; then
42227    # Oops. Which didn't find the executable.
42228    # The splitting of arguments from the executable at a space might have been incorrect,
42229    # since paths with space are more likely in Windows. Give it another try with the whole
42230    # argument.
42231    path="$complete"
42232    arguments="EOL"
42233    new_path="$path"
42234
42235  windows_path="$new_path"
42236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42237    unix_path=`$CYGPATH -u "$windows_path"`
42238    new_path="$unix_path"
42239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42241    new_path="$unix_path"
42242  fi
42243
42244
42245    new_path=`$WHICH "$new_path" 2> /dev/null`
42246    # bat and cmd files are not always considered executable in MSYS causing which
42247    # to not find them
42248    if test "x$new_path" = x \
42249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42251      new_path="$path"
42252
42253  windows_path="$new_path"
42254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42255    unix_path=`$CYGPATH -u "$windows_path"`
42256    new_path="$unix_path"
42257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42259    new_path="$unix_path"
42260  fi
42261
42262    fi
42263
42264    if test "x$new_path" = x; then
42265      # It's still not found. Now this is an unrecoverable error.
42266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42267$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42268      has_space=`$ECHO "$complete" | $GREP " "`
42269      if test "x$has_space" != x; then
42270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42272      fi
42273      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42274    fi
42275  fi
42276
42277  # Now new_path has a complete unix path to the binary
42278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42279    # Keep paths in /bin as-is, but remove trailing .exe if any
42280    new_path="${new_path/%.exe/}"
42281    # Do not save /bin paths to all_fixpath_prefixes!
42282  else
42283    # Not in mixed or Windows style, start by that.
42284    new_path=`cmd //c echo $new_path`
42285
42286  input_path="$new_path"
42287  # Check if we need to convert this using DOS-style short mode. If the path
42288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42289  # take no chances and rewrite it.
42290  # Note: m4 eats our [], so we need to use [ and ] instead.
42291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42292  if test "x$has_forbidden_chars" != x; then
42293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42295  fi
42296
42297    # Output is in $new_path
42298
42299  windows_path="$new_path"
42300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42301    unix_path=`$CYGPATH -u "$windows_path"`
42302    new_path="$unix_path"
42303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42305    new_path="$unix_path"
42306  fi
42307
42308    # remove trailing .exe if any
42309    new_path="${new_path/%.exe/}"
42310
42311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42313  fi
42314
42315    else
42316      # We're on a unix platform. Hooray! :)
42317      # First separate the path from the arguments. This will split at the first
42318      # space.
42319      complete="$OBJCOPY"
42320      path="${complete%% *}"
42321      tmp="$complete EOL"
42322      arguments="${tmp#* }"
42323
42324      # Cannot rely on the command "which" here since it doesn't always work.
42325      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42326      if test -z "$is_absolute_path"; then
42327        # Path to executable is not absolute. Find it.
42328        IFS_save="$IFS"
42329        IFS=:
42330        for p in $PATH; do
42331          if test -f "$p/$path" && test -x "$p/$path"; then
42332            new_path="$p/$path"
42333            break
42334          fi
42335        done
42336        IFS="$IFS_save"
42337      else
42338        # This is an absolute path, we can use it without further modifications.
42339        new_path="$path"
42340      fi
42341
42342      if test "x$new_path" = x; then
42343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42344$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42345        has_space=`$ECHO "$complete" | $GREP " "`
42346        if test "x$has_space" != x; then
42347          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42348$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42349        fi
42350        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42351      fi
42352    fi
42353
42354    # Now join together the path and the arguments once again
42355    if test "x$arguments" != xEOL; then
42356      new_complete="$new_path ${arguments% *}"
42357    else
42358      new_complete="$new_path"
42359    fi
42360
42361    if test "x$complete" != "x$new_complete"; then
42362      OBJCOPY="$new_complete"
42363      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42364$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42365    fi
42366  fi
42367
42368      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42369        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42370        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42371        # - version number is last blank separate word on first line
42372        # - version number formats that have been seen:
42373        #   - <major>.<minor>
42374        #   - <major>.<minor>.<micro>
42375        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42376        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42377         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42378              -e 's/.* //' \
42379              -e '/^[01]\./b bad' \
42380              -e '/^2\./{' \
42381              -e '  s/^2\.//' \
42382              -e '  /^[0-9]$/b bad' \
42383              -e '  /^[0-9]\./b bad' \
42384              -e '  /^1[0-9]$/b bad' \
42385              -e '  /^1[0-9]\./b bad' \
42386              -e '  /^20\./b bad' \
42387              -e '  /^21\.0$/b bad' \
42388              -e '  /^21\.0\./b bad' \
42389              -e '}' \
42390              -e ':good' \
42391              -e 's/.*/VALID_VERSION/p' \
42392              -e 'q' \
42393              -e ':bad' \
42394              -e 's/.*/BAD_VERSION/p' \
42395              -e 'q'`
42396        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42397          OBJCOPY=
42398          { $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
42399$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42400          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42401$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42402          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42403$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42404          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42405$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42406          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42407$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42408        fi
42409      fi
42410    fi
42411  fi
42412
42413
42414
42415  # Publish this variable in the help.
42416
42417
42418  if [ -z "${OBJDUMP+x}" ]; then
42419    # The variable is not set by user, try to locate tool using the code snippet
42420    if test -n "$ac_tool_prefix"; then
42421  for ac_prog in gobjdump objdump
42422  do
42423    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42424set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42426$as_echo_n "checking for $ac_word... " >&6; }
42427if ${ac_cv_prog_OBJDUMP+:} false; then :
42428  $as_echo_n "(cached) " >&6
42429else
42430  if test -n "$OBJDUMP"; then
42431  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42432else
42433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42434for as_dir in $PATH
42435do
42436  IFS=$as_save_IFS
42437  test -z "$as_dir" && as_dir=.
42438    for ac_exec_ext in '' $ac_executable_extensions; do
42439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42440    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42442    break 2
42443  fi
42444done
42445  done
42446IFS=$as_save_IFS
42447
42448fi
42449fi
42450OBJDUMP=$ac_cv_prog_OBJDUMP
42451if test -n "$OBJDUMP"; then
42452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42453$as_echo "$OBJDUMP" >&6; }
42454else
42455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42456$as_echo "no" >&6; }
42457fi
42458
42459
42460    test -n "$OBJDUMP" && break
42461  done
42462fi
42463if test -z "$OBJDUMP"; then
42464  ac_ct_OBJDUMP=$OBJDUMP
42465  for ac_prog in gobjdump objdump
42466do
42467  # Extract the first word of "$ac_prog", so it can be a program name with args.
42468set dummy $ac_prog; ac_word=$2
42469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42470$as_echo_n "checking for $ac_word... " >&6; }
42471if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42472  $as_echo_n "(cached) " >&6
42473else
42474  if test -n "$ac_ct_OBJDUMP"; then
42475  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42476else
42477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42478for as_dir in $PATH
42479do
42480  IFS=$as_save_IFS
42481  test -z "$as_dir" && as_dir=.
42482    for ac_exec_ext in '' $ac_executable_extensions; do
42483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42484    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42486    break 2
42487  fi
42488done
42489  done
42490IFS=$as_save_IFS
42491
42492fi
42493fi
42494ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42495if test -n "$ac_ct_OBJDUMP"; then
42496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42497$as_echo "$ac_ct_OBJDUMP" >&6; }
42498else
42499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42500$as_echo "no" >&6; }
42501fi
42502
42503
42504  test -n "$ac_ct_OBJDUMP" && break
42505done
42506
42507  if test "x$ac_ct_OBJDUMP" = x; then
42508    OBJDUMP=""
42509  else
42510    case $cross_compiling:$ac_tool_warned in
42511yes:)
42512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42514ac_tool_warned=yes ;;
42515esac
42516    OBJDUMP=$ac_ct_OBJDUMP
42517  fi
42518fi
42519
42520  else
42521    # The variable is set, but is it from the command line or the environment?
42522
42523    # Try to remove the string !OBJDUMP! from our list.
42524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42526      # If it failed, the variable was not from the command line. Ignore it,
42527      # but warn the user (except for BASH, which is always set by the calling BASH).
42528      if test "xOBJDUMP" != xBASH; then
42529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42530$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42531      fi
42532      # Try to locate tool using the code snippet
42533      if test -n "$ac_tool_prefix"; then
42534  for ac_prog in gobjdump objdump
42535  do
42536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42539$as_echo_n "checking for $ac_word... " >&6; }
42540if ${ac_cv_prog_OBJDUMP+:} false; then :
42541  $as_echo_n "(cached) " >&6
42542else
42543  if test -n "$OBJDUMP"; then
42544  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42545else
42546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42547for as_dir in $PATH
42548do
42549  IFS=$as_save_IFS
42550  test -z "$as_dir" && as_dir=.
42551    for ac_exec_ext in '' $ac_executable_extensions; do
42552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42553    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42555    break 2
42556  fi
42557done
42558  done
42559IFS=$as_save_IFS
42560
42561fi
42562fi
42563OBJDUMP=$ac_cv_prog_OBJDUMP
42564if test -n "$OBJDUMP"; then
42565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42566$as_echo "$OBJDUMP" >&6; }
42567else
42568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42569$as_echo "no" >&6; }
42570fi
42571
42572
42573    test -n "$OBJDUMP" && break
42574  done
42575fi
42576if test -z "$OBJDUMP"; then
42577  ac_ct_OBJDUMP=$OBJDUMP
42578  for ac_prog in gobjdump objdump
42579do
42580  # Extract the first word of "$ac_prog", so it can be a program name with args.
42581set dummy $ac_prog; ac_word=$2
42582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42583$as_echo_n "checking for $ac_word... " >&6; }
42584if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42585  $as_echo_n "(cached) " >&6
42586else
42587  if test -n "$ac_ct_OBJDUMP"; then
42588  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42589else
42590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42591for as_dir in $PATH
42592do
42593  IFS=$as_save_IFS
42594  test -z "$as_dir" && as_dir=.
42595    for ac_exec_ext in '' $ac_executable_extensions; do
42596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42597    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42599    break 2
42600  fi
42601done
42602  done
42603IFS=$as_save_IFS
42604
42605fi
42606fi
42607ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42608if test -n "$ac_ct_OBJDUMP"; then
42609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42610$as_echo "$ac_ct_OBJDUMP" >&6; }
42611else
42612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42613$as_echo "no" >&6; }
42614fi
42615
42616
42617  test -n "$ac_ct_OBJDUMP" && break
42618done
42619
42620  if test "x$ac_ct_OBJDUMP" = x; then
42621    OBJDUMP=""
42622  else
42623    case $cross_compiling:$ac_tool_warned in
42624yes:)
42625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42627ac_tool_warned=yes ;;
42628esac
42629    OBJDUMP=$ac_ct_OBJDUMP
42630  fi
42631fi
42632
42633    else
42634      # If it succeeded, then it was overridden by the user. We will use it
42635      # for the tool.
42636
42637      # First remove it from the list of overridden variables, so we can test
42638      # for unknown variables in the end.
42639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42640
42641      # Check if we try to supply an empty value
42642      if test "x$OBJDUMP" = x; then
42643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42644$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42646$as_echo_n "checking for OBJDUMP... " >&6; }
42647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42648$as_echo "disabled" >&6; }
42649      else
42650        # Check if the provided tool contains a complete path.
42651        tool_specified="$OBJDUMP"
42652        tool_basename="${tool_specified##*/}"
42653        if test "x$tool_basename" = "x$tool_specified"; then
42654          # A command without a complete path is provided, search $PATH.
42655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42656$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42657          # Extract the first word of "$tool_basename", so it can be a program name with args.
42658set dummy $tool_basename; ac_word=$2
42659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42660$as_echo_n "checking for $ac_word... " >&6; }
42661if ${ac_cv_path_OBJDUMP+:} false; then :
42662  $as_echo_n "(cached) " >&6
42663else
42664  case $OBJDUMP in
42665  [\\/]* | ?:[\\/]*)
42666  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42667  ;;
42668  *)
42669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42670for as_dir in $PATH
42671do
42672  IFS=$as_save_IFS
42673  test -z "$as_dir" && as_dir=.
42674    for ac_exec_ext in '' $ac_executable_extensions; do
42675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42676    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42678    break 2
42679  fi
42680done
42681  done
42682IFS=$as_save_IFS
42683
42684  ;;
42685esac
42686fi
42687OBJDUMP=$ac_cv_path_OBJDUMP
42688if test -n "$OBJDUMP"; then
42689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42690$as_echo "$OBJDUMP" >&6; }
42691else
42692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42693$as_echo "no" >&6; }
42694fi
42695
42696
42697          if test "x$OBJDUMP" = x; then
42698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42699          fi
42700        else
42701          # Otherwise we believe it is a complete path. Use it as it is.
42702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42703$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42705$as_echo_n "checking for OBJDUMP... " >&6; }
42706          if test ! -x "$tool_specified"; then
42707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42708$as_echo "not found" >&6; }
42709            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42710          fi
42711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42712$as_echo "$tool_specified" >&6; }
42713        fi
42714      fi
42715    fi
42716
42717  fi
42718
42719
42720  if test "x$OBJDUMP" != x; then
42721    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42722    # bails if argument is missing.
42723
42724  # Only process if variable expands to non-empty
42725
42726  if test "x$OBJDUMP" != x; then
42727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42728
42729  # First separate the path from the arguments. This will split at the first
42730  # space.
42731  complete="$OBJDUMP"
42732  path="${complete%% *}"
42733  tmp="$complete EOL"
42734  arguments="${tmp#* }"
42735
42736  # Input might be given as Windows format, start by converting to
42737  # unix format.
42738  new_path=`$CYGPATH -u "$path"`
42739
42740  # Now try to locate executable using which
42741  new_path=`$WHICH "$new_path" 2> /dev/null`
42742  # bat and cmd files are not always considered executable in cygwin causing which
42743  # to not find them
42744  if test "x$new_path" = x \
42745      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42746      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42747    new_path=`$CYGPATH -u "$path"`
42748  fi
42749  if test "x$new_path" = x; then
42750    # Oops. Which didn't find the executable.
42751    # The splitting of arguments from the executable at a space might have been incorrect,
42752    # since paths with space are more likely in Windows. Give it another try with the whole
42753    # argument.
42754    path="$complete"
42755    arguments="EOL"
42756    new_path=`$CYGPATH -u "$path"`
42757    new_path=`$WHICH "$new_path" 2> /dev/null`
42758    # bat and cmd files are not always considered executable in cygwin causing which
42759    # to not find them
42760    if test "x$new_path" = x \
42761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42763      new_path=`$CYGPATH -u "$path"`
42764    fi
42765    if test "x$new_path" = x; then
42766      # It's still not found. Now this is an unrecoverable error.
42767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42768$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42769      has_space=`$ECHO "$complete" | $GREP " "`
42770      if test "x$has_space" != x; then
42771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42773      fi
42774      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42775    fi
42776  fi
42777
42778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42781  # "foo.exe" is OK but "foo" is an error.
42782  #
42783  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42784  # It is also a way to make sure we got the proper file name for the real test later on.
42785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42786  if test "x$test_shortpath" = x; then
42787    # Short path failed, file does not exist as specified.
42788    # Try adding .exe or .cmd
42789    if test -f "${new_path}.exe"; then
42790      input_to_shortpath="${new_path}.exe"
42791    elif test -f "${new_path}.cmd"; then
42792      input_to_shortpath="${new_path}.cmd"
42793    else
42794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42795$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42796      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42797$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42798      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42799    fi
42800  else
42801    input_to_shortpath="$new_path"
42802  fi
42803
42804  # Call helper function which possibly converts this using DOS-style short mode.
42805  # If so, the updated path is stored in $new_path.
42806  new_path="$input_to_shortpath"
42807
42808  input_path="$input_to_shortpath"
42809  # Check if we need to convert this using DOS-style short mode. If the path
42810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42811  # take no chances and rewrite it.
42812  # Note: m4 eats our [], so we need to use [ and ] instead.
42813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42814  if test "x$has_forbidden_chars" != x; then
42815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42819      # Going to short mode and back again did indeed matter. Since short mode is
42820      # case insensitive, let's make it lowercase to improve readability.
42821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42822      # Now convert it back to Unix-style (cygpath)
42823      input_path=`$CYGPATH -u "$shortmode_path"`
42824      new_path="$input_path"
42825    fi
42826  fi
42827
42828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42829  if test "x$test_cygdrive_prefix" = x; then
42830    # As a simple fix, exclude /usr/bin since it's not a real path.
42831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42833      # a path prefixed by /cygdrive for fixpath to work.
42834      new_path="$CYGWIN_ROOT_PATH$input_path"
42835    fi
42836  fi
42837
42838  # remove trailing .exe if any
42839  new_path="${new_path/%.exe/}"
42840
42841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42842
42843  # First separate the path from the arguments. This will split at the first
42844  # space.
42845  complete="$OBJDUMP"
42846  path="${complete%% *}"
42847  tmp="$complete EOL"
42848  arguments="${tmp#* }"
42849
42850  # Input might be given as Windows format, start by converting to
42851  # unix format.
42852  new_path="$path"
42853
42854  windows_path="$new_path"
42855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42856    unix_path=`$CYGPATH -u "$windows_path"`
42857    new_path="$unix_path"
42858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42860    new_path="$unix_path"
42861  fi
42862
42863
42864  # Now try to locate executable using which
42865  new_path=`$WHICH "$new_path" 2> /dev/null`
42866
42867  if test "x$new_path" = x; then
42868    # Oops. Which didn't find the executable.
42869    # The splitting of arguments from the executable at a space might have been incorrect,
42870    # since paths with space are more likely in Windows. Give it another try with the whole
42871    # argument.
42872    path="$complete"
42873    arguments="EOL"
42874    new_path="$path"
42875
42876  windows_path="$new_path"
42877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42878    unix_path=`$CYGPATH -u "$windows_path"`
42879    new_path="$unix_path"
42880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42882    new_path="$unix_path"
42883  fi
42884
42885
42886    new_path=`$WHICH "$new_path" 2> /dev/null`
42887    # bat and cmd files are not always considered executable in MSYS causing which
42888    # to not find them
42889    if test "x$new_path" = x \
42890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42892      new_path="$path"
42893
42894  windows_path="$new_path"
42895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42896    unix_path=`$CYGPATH -u "$windows_path"`
42897    new_path="$unix_path"
42898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42900    new_path="$unix_path"
42901  fi
42902
42903    fi
42904
42905    if test "x$new_path" = x; then
42906      # It's still not found. Now this is an unrecoverable error.
42907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42908$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42909      has_space=`$ECHO "$complete" | $GREP " "`
42910      if test "x$has_space" != x; then
42911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42913      fi
42914      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42915    fi
42916  fi
42917
42918  # Now new_path has a complete unix path to the binary
42919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42920    # Keep paths in /bin as-is, but remove trailing .exe if any
42921    new_path="${new_path/%.exe/}"
42922    # Do not save /bin paths to all_fixpath_prefixes!
42923  else
42924    # Not in mixed or Windows style, start by that.
42925    new_path=`cmd //c echo $new_path`
42926
42927  input_path="$new_path"
42928  # Check if we need to convert this using DOS-style short mode. If the path
42929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42930  # take no chances and rewrite it.
42931  # Note: m4 eats our [], so we need to use [ and ] instead.
42932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42933  if test "x$has_forbidden_chars" != x; then
42934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42936  fi
42937
42938    # Output is in $new_path
42939
42940  windows_path="$new_path"
42941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42942    unix_path=`$CYGPATH -u "$windows_path"`
42943    new_path="$unix_path"
42944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42946    new_path="$unix_path"
42947  fi
42948
42949    # remove trailing .exe if any
42950    new_path="${new_path/%.exe/}"
42951
42952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42954  fi
42955
42956    else
42957      # We're on a unix platform. Hooray! :)
42958      # First separate the path from the arguments. This will split at the first
42959      # space.
42960      complete="$OBJDUMP"
42961      path="${complete%% *}"
42962      tmp="$complete EOL"
42963      arguments="${tmp#* }"
42964
42965      # Cannot rely on the command "which" here since it doesn't always work.
42966      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42967      if test -z "$is_absolute_path"; then
42968        # Path to executable is not absolute. Find it.
42969        IFS_save="$IFS"
42970        IFS=:
42971        for p in $PATH; do
42972          if test -f "$p/$path" && test -x "$p/$path"; then
42973            new_path="$p/$path"
42974            break
42975          fi
42976        done
42977        IFS="$IFS_save"
42978      else
42979        # This is an absolute path, we can use it without further modifications.
42980        new_path="$path"
42981      fi
42982
42983      if test "x$new_path" = x; then
42984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42985$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42986        has_space=`$ECHO "$complete" | $GREP " "`
42987        if test "x$has_space" != x; then
42988          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42990        fi
42991        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42992      fi
42993    fi
42994
42995    # Now join together the path and the arguments once again
42996    if test "x$arguments" != xEOL; then
42997      new_complete="$new_path ${arguments% *}"
42998    else
42999      new_complete="$new_path"
43000    fi
43001
43002    if test "x$complete" != "x$new_complete"; then
43003      OBJDUMP="$new_complete"
43004      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43005$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43006    fi
43007  fi
43008
43009  fi
43010
43011
43012  # Restore old path.
43013  PATH="$OLD_PATH"
43014
43015  # Restore the flags to the user specified values.
43016  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43017  CFLAGS="$ORG_CFLAGS"
43018  CXXFLAGS="$ORG_CXXFLAGS"
43019
43020
43021# Finally do some processing after the detection phase
43022
43023  if test "x$COMPILE_TYPE" = "xcross"; then
43024    # Now we need to find a C/C++ compiler that can build executables for the
43025    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43026    # used once. Also, we need to do this without adding a tools dir to the
43027    # path, otherwise we might pick up cross-compilers which don't use standard
43028    # naming.
43029
43030    OLDPATH="$PATH"
43031
43032
43033# Check whether --with-build-devkit was given.
43034if test "${with_build_devkit+set}" = set; then :
43035  withval=$with_build_devkit;
43036fi
43037
43038    if test "x$with_build_devkit" = "xyes"; then
43039      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43040    elif test -n "$with_build_devkit"; then
43041      if test ! -d "$with_build_devkit"; then
43042        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43043      else
43044
43045  # Only process if variable expands to non-empty
43046
43047  if test "x$with_build_devkit" != x; then
43048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43049
43050  # Input might be given as Windows format, start by converting to
43051  # unix format.
43052  path="$with_build_devkit"
43053  new_path=`$CYGPATH -u "$path"`
43054
43055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43058  # "foo.exe" is OK but "foo" is an error.
43059  #
43060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43061  # It is also a way to make sure we got the proper file name for the real test later on.
43062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43063  if test "x$test_shortpath" = x; then
43064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43065$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43066    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43067  fi
43068
43069  # Call helper function which possibly converts this using DOS-style short mode.
43070  # If so, the updated path is stored in $new_path.
43071
43072  input_path="$new_path"
43073  # Check if we need to convert this using DOS-style short mode. If the path
43074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43075  # take no chances and rewrite it.
43076  # Note: m4 eats our [], so we need to use [ and ] instead.
43077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43078  if test "x$has_forbidden_chars" != x; then
43079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43083      # Going to short mode and back again did indeed matter. Since short mode is
43084      # case insensitive, let's make it lowercase to improve readability.
43085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43086      # Now convert it back to Unix-style (cygpath)
43087      input_path=`$CYGPATH -u "$shortmode_path"`
43088      new_path="$input_path"
43089    fi
43090  fi
43091
43092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43093  if test "x$test_cygdrive_prefix" = x; then
43094    # As a simple fix, exclude /usr/bin since it's not a real path.
43095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43097      # a path prefixed by /cygdrive for fixpath to work.
43098      new_path="$CYGWIN_ROOT_PATH$input_path"
43099    fi
43100  fi
43101
43102
43103  if test "x$path" != "x$new_path"; then
43104    with_build_devkit="$new_path"
43105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43106$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43107  fi
43108
43109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43110
43111  path="$with_build_devkit"
43112  has_colon=`$ECHO $path | $GREP ^.:`
43113  new_path="$path"
43114  if test "x$has_colon" = x; then
43115    # Not in mixed or Windows style, start by that.
43116    new_path=`cmd //c echo $path`
43117  fi
43118
43119
43120  input_path="$new_path"
43121  # Check if we need to convert this using DOS-style short mode. If the path
43122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43123  # take no chances and rewrite it.
43124  # Note: m4 eats our [], so we need to use [ and ] instead.
43125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43126  if test "x$has_forbidden_chars" != x; then
43127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43129  fi
43130
43131
43132  windows_path="$new_path"
43133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43134    unix_path=`$CYGPATH -u "$windows_path"`
43135    new_path="$unix_path"
43136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43138    new_path="$unix_path"
43139  fi
43140
43141  if test "x$path" != "x$new_path"; then
43142    with_build_devkit="$new_path"
43143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43144$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43145  fi
43146
43147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43149
43150    else
43151      # We're on a unix platform. Hooray! :)
43152      path="$with_build_devkit"
43153      has_space=`$ECHO "$path" | $GREP " "`
43154      if test "x$has_space" != x; then
43155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43156$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43158      fi
43159
43160      # Use eval to expand a potential ~
43161      eval path="$path"
43162      if test ! -f "$path" && test ! -d "$path"; then
43163        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43164      fi
43165
43166      if test -d "$path"; then
43167        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43168      else
43169        dir="`$DIRNAME "$path"`"
43170        base="`$BASENAME "$path"`"
43171        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43172      fi
43173    fi
43174  fi
43175
43176        BUILD_DEVKIT_ROOT="$with_build_devkit"
43177        # Check for a meta data info file in the root of the devkit
43178        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43179          # Process devkit.info so that existing devkit variables are not
43180          # modified by this
43181          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43182              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43183              -e "s/\$host/\$build/g" \
43184              $BUILD_DEVKIT_ROOT/devkit.info \
43185              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43186          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43187          # This potentially sets the following:
43188          # A descriptive name of the devkit
43189
43190  if test "x$BUILD_DEVKIT_NAME" = x; then
43191    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43192  fi
43193
43194          # Corresponds to --with-extra-path
43195
43196  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43197    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43198  fi
43199
43200          # Corresponds to --with-toolchain-path
43201
43202  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43203    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43204  fi
43205
43206          # Corresponds to --with-sysroot
43207
43208  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43209    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43210  fi
43211
43212          # Skip the Window specific parts
43213        fi
43214
43215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43216$as_echo_n "checking for build platform devkit... " >&6; }
43217        if test "x$BUILD_DEVKIT_NAME" != x; then
43218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43219$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43220        else
43221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43222$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43223        fi
43224
43225        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43226
43227  if test "x$BUILD_SYSROOT" != "x"; then
43228    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43229      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43230        # Solaris Studio does not have a concept of sysroot. Instead we must
43231        # make sure the default include and lib dirs are appended to each
43232        # compile and link command line.
43233        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43234        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43235            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43236            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43237      fi
43238    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43239      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43240      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43241    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43242      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43243      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43244    fi
43245    # Propagate the sysroot args to hotspot
43246    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43247    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43248    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43249    # The global CFLAGS and LDFLAGS variables need these for configure to function
43250    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43251    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43252    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43253    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43254  fi
43255
43256  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43257    # We also need -iframework<path>/System/Library/Frameworks
43258    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43259    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43260    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43261    # set this here so it doesn't have to be peppered throughout the forest
43262    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43263    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43264  fi
43265
43266
43267
43268
43269
43270         # Fallback default of just /bin if DEVKIT_PATH is not defined
43271        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43272          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43273        fi
43274        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43275      fi
43276    fi
43277
43278    # FIXME: we should list the discovered compilers as an exclude pattern!
43279    # If we do that, we can do this detection before POST_DETECTION, and still
43280    # find the build compilers in the tools dir, if needed.
43281
43282
43283
43284  # Publish this variable in the help.
43285
43286
43287  if [ -z "${BUILD_CC+x}" ]; then
43288    # The variable is not set by user, try to locate tool using the code snippet
43289    for ac_prog in cl cc gcc
43290do
43291  # Extract the first word of "$ac_prog", so it can be a program name with args.
43292set dummy $ac_prog; ac_word=$2
43293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43294$as_echo_n "checking for $ac_word... " >&6; }
43295if ${ac_cv_path_BUILD_CC+:} false; then :
43296  $as_echo_n "(cached) " >&6
43297else
43298  case $BUILD_CC in
43299  [\\/]* | ?:[\\/]*)
43300  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43301  ;;
43302  *)
43303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43304for as_dir in $PATH
43305do
43306  IFS=$as_save_IFS
43307  test -z "$as_dir" && as_dir=.
43308    for ac_exec_ext in '' $ac_executable_extensions; do
43309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43310    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43312    break 2
43313  fi
43314done
43315  done
43316IFS=$as_save_IFS
43317
43318  ;;
43319esac
43320fi
43321BUILD_CC=$ac_cv_path_BUILD_CC
43322if test -n "$BUILD_CC"; then
43323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43324$as_echo "$BUILD_CC" >&6; }
43325else
43326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43327$as_echo "no" >&6; }
43328fi
43329
43330
43331  test -n "$BUILD_CC" && break
43332done
43333
43334  else
43335    # The variable is set, but is it from the command line or the environment?
43336
43337    # Try to remove the string !BUILD_CC! from our list.
43338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43340      # If it failed, the variable was not from the command line. Ignore it,
43341      # but warn the user (except for BASH, which is always set by the calling BASH).
43342      if test "xBUILD_CC" != xBASH; then
43343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43344$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43345      fi
43346      # Try to locate tool using the code snippet
43347      for ac_prog in cl cc gcc
43348do
43349  # Extract the first word of "$ac_prog", so it can be a program name with args.
43350set dummy $ac_prog; ac_word=$2
43351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43352$as_echo_n "checking for $ac_word... " >&6; }
43353if ${ac_cv_path_BUILD_CC+:} false; then :
43354  $as_echo_n "(cached) " >&6
43355else
43356  case $BUILD_CC in
43357  [\\/]* | ?:[\\/]*)
43358  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43359  ;;
43360  *)
43361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43362for as_dir in $PATH
43363do
43364  IFS=$as_save_IFS
43365  test -z "$as_dir" && as_dir=.
43366    for ac_exec_ext in '' $ac_executable_extensions; do
43367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43368    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43370    break 2
43371  fi
43372done
43373  done
43374IFS=$as_save_IFS
43375
43376  ;;
43377esac
43378fi
43379BUILD_CC=$ac_cv_path_BUILD_CC
43380if test -n "$BUILD_CC"; then
43381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43382$as_echo "$BUILD_CC" >&6; }
43383else
43384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43385$as_echo "no" >&6; }
43386fi
43387
43388
43389  test -n "$BUILD_CC" && break
43390done
43391
43392    else
43393      # If it succeeded, then it was overridden by the user. We will use it
43394      # for the tool.
43395
43396      # First remove it from the list of overridden variables, so we can test
43397      # for unknown variables in the end.
43398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43399
43400      # Check if we try to supply an empty value
43401      if test "x$BUILD_CC" = x; then
43402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43403$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43405$as_echo_n "checking for BUILD_CC... " >&6; }
43406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43407$as_echo "disabled" >&6; }
43408      else
43409        # Check if the provided tool contains a complete path.
43410        tool_specified="$BUILD_CC"
43411        tool_basename="${tool_specified##*/}"
43412        if test "x$tool_basename" = "x$tool_specified"; then
43413          # A command without a complete path is provided, search $PATH.
43414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43415$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43416          # Extract the first word of "$tool_basename", so it can be a program name with args.
43417set dummy $tool_basename; ac_word=$2
43418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43419$as_echo_n "checking for $ac_word... " >&6; }
43420if ${ac_cv_path_BUILD_CC+:} false; then :
43421  $as_echo_n "(cached) " >&6
43422else
43423  case $BUILD_CC in
43424  [\\/]* | ?:[\\/]*)
43425  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43426  ;;
43427  *)
43428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43429for as_dir in $PATH
43430do
43431  IFS=$as_save_IFS
43432  test -z "$as_dir" && as_dir=.
43433    for ac_exec_ext in '' $ac_executable_extensions; do
43434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43435    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43437    break 2
43438  fi
43439done
43440  done
43441IFS=$as_save_IFS
43442
43443  ;;
43444esac
43445fi
43446BUILD_CC=$ac_cv_path_BUILD_CC
43447if test -n "$BUILD_CC"; then
43448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43449$as_echo "$BUILD_CC" >&6; }
43450else
43451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43452$as_echo "no" >&6; }
43453fi
43454
43455
43456          if test "x$BUILD_CC" = x; then
43457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43458          fi
43459        else
43460          # Otherwise we believe it is a complete path. Use it as it is.
43461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43462$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43464$as_echo_n "checking for BUILD_CC... " >&6; }
43465          if test ! -x "$tool_specified"; then
43466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43467$as_echo "not found" >&6; }
43468            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43469          fi
43470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43471$as_echo "$tool_specified" >&6; }
43472        fi
43473      fi
43474    fi
43475
43476  fi
43477
43478
43479
43480  if test "x$BUILD_CC" = x; then
43481    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43482  fi
43483
43484
43485
43486  # Only process if variable expands to non-empty
43487
43488  if test "x$BUILD_CC" != x; then
43489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43490
43491  # First separate the path from the arguments. This will split at the first
43492  # space.
43493  complete="$BUILD_CC"
43494  path="${complete%% *}"
43495  tmp="$complete EOL"
43496  arguments="${tmp#* }"
43497
43498  # Input might be given as Windows format, start by converting to
43499  # unix format.
43500  new_path=`$CYGPATH -u "$path"`
43501
43502  # Now try to locate executable using which
43503  new_path=`$WHICH "$new_path" 2> /dev/null`
43504  # bat and cmd files are not always considered executable in cygwin causing which
43505  # to not find them
43506  if test "x$new_path" = x \
43507      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43508      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43509    new_path=`$CYGPATH -u "$path"`
43510  fi
43511  if test "x$new_path" = x; then
43512    # Oops. Which didn't find the executable.
43513    # The splitting of arguments from the executable at a space might have been incorrect,
43514    # since paths with space are more likely in Windows. Give it another try with the whole
43515    # argument.
43516    path="$complete"
43517    arguments="EOL"
43518    new_path=`$CYGPATH -u "$path"`
43519    new_path=`$WHICH "$new_path" 2> /dev/null`
43520    # bat and cmd files are not always considered executable in cygwin causing which
43521    # to not find them
43522    if test "x$new_path" = x \
43523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43525      new_path=`$CYGPATH -u "$path"`
43526    fi
43527    if test "x$new_path" = x; then
43528      # It's still not found. Now this is an unrecoverable error.
43529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43530$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43531      has_space=`$ECHO "$complete" | $GREP " "`
43532      if test "x$has_space" != x; then
43533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43535      fi
43536      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43537    fi
43538  fi
43539
43540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43543  # "foo.exe" is OK but "foo" is an error.
43544  #
43545  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43546  # It is also a way to make sure we got the proper file name for the real test later on.
43547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43548  if test "x$test_shortpath" = x; then
43549    # Short path failed, file does not exist as specified.
43550    # Try adding .exe or .cmd
43551    if test -f "${new_path}.exe"; then
43552      input_to_shortpath="${new_path}.exe"
43553    elif test -f "${new_path}.cmd"; then
43554      input_to_shortpath="${new_path}.cmd"
43555    else
43556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43557$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43558      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43559$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43560      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43561    fi
43562  else
43563    input_to_shortpath="$new_path"
43564  fi
43565
43566  # Call helper function which possibly converts this using DOS-style short mode.
43567  # If so, the updated path is stored in $new_path.
43568  new_path="$input_to_shortpath"
43569
43570  input_path="$input_to_shortpath"
43571  # Check if we need to convert this using DOS-style short mode. If the path
43572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43573  # take no chances and rewrite it.
43574  # Note: m4 eats our [], so we need to use [ and ] instead.
43575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43576  if test "x$has_forbidden_chars" != x; then
43577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43581      # Going to short mode and back again did indeed matter. Since short mode is
43582      # case insensitive, let's make it lowercase to improve readability.
43583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43584      # Now convert it back to Unix-style (cygpath)
43585      input_path=`$CYGPATH -u "$shortmode_path"`
43586      new_path="$input_path"
43587    fi
43588  fi
43589
43590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43591  if test "x$test_cygdrive_prefix" = x; then
43592    # As a simple fix, exclude /usr/bin since it's not a real path.
43593    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43595      # a path prefixed by /cygdrive for fixpath to work.
43596      new_path="$CYGWIN_ROOT_PATH$input_path"
43597    fi
43598  fi
43599
43600  # remove trailing .exe if any
43601  new_path="${new_path/%.exe/}"
43602
43603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43604
43605  # First separate the path from the arguments. This will split at the first
43606  # space.
43607  complete="$BUILD_CC"
43608  path="${complete%% *}"
43609  tmp="$complete EOL"
43610  arguments="${tmp#* }"
43611
43612  # Input might be given as Windows format, start by converting to
43613  # unix format.
43614  new_path="$path"
43615
43616  windows_path="$new_path"
43617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43618    unix_path=`$CYGPATH -u "$windows_path"`
43619    new_path="$unix_path"
43620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43622    new_path="$unix_path"
43623  fi
43624
43625
43626  # Now try to locate executable using which
43627  new_path=`$WHICH "$new_path" 2> /dev/null`
43628
43629  if test "x$new_path" = x; then
43630    # Oops. Which didn't find the executable.
43631    # The splitting of arguments from the executable at a space might have been incorrect,
43632    # since paths with space are more likely in Windows. Give it another try with the whole
43633    # argument.
43634    path="$complete"
43635    arguments="EOL"
43636    new_path="$path"
43637
43638  windows_path="$new_path"
43639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43640    unix_path=`$CYGPATH -u "$windows_path"`
43641    new_path="$unix_path"
43642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43644    new_path="$unix_path"
43645  fi
43646
43647
43648    new_path=`$WHICH "$new_path" 2> /dev/null`
43649    # bat and cmd files are not always considered executable in MSYS causing which
43650    # to not find them
43651    if test "x$new_path" = x \
43652        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43653        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43654      new_path="$path"
43655
43656  windows_path="$new_path"
43657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43658    unix_path=`$CYGPATH -u "$windows_path"`
43659    new_path="$unix_path"
43660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43662    new_path="$unix_path"
43663  fi
43664
43665    fi
43666
43667    if test "x$new_path" = x; then
43668      # It's still not found. Now this is an unrecoverable error.
43669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43670$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43671      has_space=`$ECHO "$complete" | $GREP " "`
43672      if test "x$has_space" != x; then
43673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43675      fi
43676      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43677    fi
43678  fi
43679
43680  # Now new_path has a complete unix path to the binary
43681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43682    # Keep paths in /bin as-is, but remove trailing .exe if any
43683    new_path="${new_path/%.exe/}"
43684    # Do not save /bin paths to all_fixpath_prefixes!
43685  else
43686    # Not in mixed or Windows style, start by that.
43687    new_path=`cmd //c echo $new_path`
43688
43689  input_path="$new_path"
43690  # Check if we need to convert this using DOS-style short mode. If the path
43691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43692  # take no chances and rewrite it.
43693  # Note: m4 eats our [], so we need to use [ and ] instead.
43694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43695  if test "x$has_forbidden_chars" != x; then
43696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43698  fi
43699
43700    # Output is in $new_path
43701
43702  windows_path="$new_path"
43703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43704    unix_path=`$CYGPATH -u "$windows_path"`
43705    new_path="$unix_path"
43706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43708    new_path="$unix_path"
43709  fi
43710
43711    # remove trailing .exe if any
43712    new_path="${new_path/%.exe/}"
43713
43714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43716  fi
43717
43718    else
43719      # We're on a unix platform. Hooray! :)
43720      # First separate the path from the arguments. This will split at the first
43721      # space.
43722      complete="$BUILD_CC"
43723      path="${complete%% *}"
43724      tmp="$complete EOL"
43725      arguments="${tmp#* }"
43726
43727      # Cannot rely on the command "which" here since it doesn't always work.
43728      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43729      if test -z "$is_absolute_path"; then
43730        # Path to executable is not absolute. Find it.
43731        IFS_save="$IFS"
43732        IFS=:
43733        for p in $PATH; do
43734          if test -f "$p/$path" && test -x "$p/$path"; then
43735            new_path="$p/$path"
43736            break
43737          fi
43738        done
43739        IFS="$IFS_save"
43740      else
43741        # This is an absolute path, we can use it without further modifications.
43742        new_path="$path"
43743      fi
43744
43745      if test "x$new_path" = x; then
43746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43747$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43748        has_space=`$ECHO "$complete" | $GREP " "`
43749        if test "x$has_space" != x; then
43750          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43751$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43752        fi
43753        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43754      fi
43755    fi
43756
43757    # Now join together the path and the arguments once again
43758    if test "x$arguments" != xEOL; then
43759      new_complete="$new_path ${arguments% *}"
43760    else
43761      new_complete="$new_path"
43762    fi
43763
43764    if test "x$complete" != "x$new_complete"; then
43765      BUILD_CC="$new_complete"
43766      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43767$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43768    fi
43769  fi
43770
43771
43772
43773
43774  # Publish this variable in the help.
43775
43776
43777  if [ -z "${BUILD_CXX+x}" ]; then
43778    # The variable is not set by user, try to locate tool using the code snippet
43779    for ac_prog in cl CC g++
43780do
43781  # Extract the first word of "$ac_prog", so it can be a program name with args.
43782set dummy $ac_prog; ac_word=$2
43783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43784$as_echo_n "checking for $ac_word... " >&6; }
43785if ${ac_cv_path_BUILD_CXX+:} false; then :
43786  $as_echo_n "(cached) " >&6
43787else
43788  case $BUILD_CXX in
43789  [\\/]* | ?:[\\/]*)
43790  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43791  ;;
43792  *)
43793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43794for as_dir in $PATH
43795do
43796  IFS=$as_save_IFS
43797  test -z "$as_dir" && as_dir=.
43798    for ac_exec_ext in '' $ac_executable_extensions; do
43799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43800    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43802    break 2
43803  fi
43804done
43805  done
43806IFS=$as_save_IFS
43807
43808  ;;
43809esac
43810fi
43811BUILD_CXX=$ac_cv_path_BUILD_CXX
43812if test -n "$BUILD_CXX"; then
43813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43814$as_echo "$BUILD_CXX" >&6; }
43815else
43816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43817$as_echo "no" >&6; }
43818fi
43819
43820
43821  test -n "$BUILD_CXX" && break
43822done
43823
43824  else
43825    # The variable is set, but is it from the command line or the environment?
43826
43827    # Try to remove the string !BUILD_CXX! from our list.
43828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43830      # If it failed, the variable was not from the command line. Ignore it,
43831      # but warn the user (except for BASH, which is always set by the calling BASH).
43832      if test "xBUILD_CXX" != xBASH; then
43833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43834$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43835      fi
43836      # Try to locate tool using the code snippet
43837      for ac_prog in cl CC g++
43838do
43839  # Extract the first word of "$ac_prog", so it can be a program name with args.
43840set dummy $ac_prog; ac_word=$2
43841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43842$as_echo_n "checking for $ac_word... " >&6; }
43843if ${ac_cv_path_BUILD_CXX+:} false; then :
43844  $as_echo_n "(cached) " >&6
43845else
43846  case $BUILD_CXX in
43847  [\\/]* | ?:[\\/]*)
43848  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43849  ;;
43850  *)
43851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43852for as_dir in $PATH
43853do
43854  IFS=$as_save_IFS
43855  test -z "$as_dir" && as_dir=.
43856    for ac_exec_ext in '' $ac_executable_extensions; do
43857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43858    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43860    break 2
43861  fi
43862done
43863  done
43864IFS=$as_save_IFS
43865
43866  ;;
43867esac
43868fi
43869BUILD_CXX=$ac_cv_path_BUILD_CXX
43870if test -n "$BUILD_CXX"; then
43871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43872$as_echo "$BUILD_CXX" >&6; }
43873else
43874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43875$as_echo "no" >&6; }
43876fi
43877
43878
43879  test -n "$BUILD_CXX" && break
43880done
43881
43882    else
43883      # If it succeeded, then it was overridden by the user. We will use it
43884      # for the tool.
43885
43886      # First remove it from the list of overridden variables, so we can test
43887      # for unknown variables in the end.
43888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43889
43890      # Check if we try to supply an empty value
43891      if test "x$BUILD_CXX" = x; then
43892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43893$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43895$as_echo_n "checking for BUILD_CXX... " >&6; }
43896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43897$as_echo "disabled" >&6; }
43898      else
43899        # Check if the provided tool contains a complete path.
43900        tool_specified="$BUILD_CXX"
43901        tool_basename="${tool_specified##*/}"
43902        if test "x$tool_basename" = "x$tool_specified"; then
43903          # A command without a complete path is provided, search $PATH.
43904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43905$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43906          # Extract the first word of "$tool_basename", so it can be a program name with args.
43907set dummy $tool_basename; ac_word=$2
43908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43909$as_echo_n "checking for $ac_word... " >&6; }
43910if ${ac_cv_path_BUILD_CXX+:} false; then :
43911  $as_echo_n "(cached) " >&6
43912else
43913  case $BUILD_CXX in
43914  [\\/]* | ?:[\\/]*)
43915  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43916  ;;
43917  *)
43918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43919for as_dir in $PATH
43920do
43921  IFS=$as_save_IFS
43922  test -z "$as_dir" && as_dir=.
43923    for ac_exec_ext in '' $ac_executable_extensions; do
43924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43925    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43927    break 2
43928  fi
43929done
43930  done
43931IFS=$as_save_IFS
43932
43933  ;;
43934esac
43935fi
43936BUILD_CXX=$ac_cv_path_BUILD_CXX
43937if test -n "$BUILD_CXX"; then
43938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43939$as_echo "$BUILD_CXX" >&6; }
43940else
43941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43942$as_echo "no" >&6; }
43943fi
43944
43945
43946          if test "x$BUILD_CXX" = x; then
43947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43948          fi
43949        else
43950          # Otherwise we believe it is a complete path. Use it as it is.
43951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43952$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43954$as_echo_n "checking for BUILD_CXX... " >&6; }
43955          if test ! -x "$tool_specified"; then
43956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43957$as_echo "not found" >&6; }
43958            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43959          fi
43960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43961$as_echo "$tool_specified" >&6; }
43962        fi
43963      fi
43964    fi
43965
43966  fi
43967
43968
43969
43970  if test "x$BUILD_CXX" = x; then
43971    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43972  fi
43973
43974
43975
43976  # Only process if variable expands to non-empty
43977
43978  if test "x$BUILD_CXX" != x; then
43979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43980
43981  # First separate the path from the arguments. This will split at the first
43982  # space.
43983  complete="$BUILD_CXX"
43984  path="${complete%% *}"
43985  tmp="$complete EOL"
43986  arguments="${tmp#* }"
43987
43988  # Input might be given as Windows format, start by converting to
43989  # unix format.
43990  new_path=`$CYGPATH -u "$path"`
43991
43992  # Now try to locate executable using which
43993  new_path=`$WHICH "$new_path" 2> /dev/null`
43994  # bat and cmd files are not always considered executable in cygwin causing which
43995  # to not find them
43996  if test "x$new_path" = x \
43997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43999    new_path=`$CYGPATH -u "$path"`
44000  fi
44001  if test "x$new_path" = x; then
44002    # Oops. Which didn't find the executable.
44003    # The splitting of arguments from the executable at a space might have been incorrect,
44004    # since paths with space are more likely in Windows. Give it another try with the whole
44005    # argument.
44006    path="$complete"
44007    arguments="EOL"
44008    new_path=`$CYGPATH -u "$path"`
44009    new_path=`$WHICH "$new_path" 2> /dev/null`
44010    # bat and cmd files are not always considered executable in cygwin causing which
44011    # to not find them
44012    if test "x$new_path" = x \
44013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44015      new_path=`$CYGPATH -u "$path"`
44016    fi
44017    if test "x$new_path" = x; then
44018      # It's still not found. Now this is an unrecoverable error.
44019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44020$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44021      has_space=`$ECHO "$complete" | $GREP " "`
44022      if test "x$has_space" != x; then
44023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44025      fi
44026      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44027    fi
44028  fi
44029
44030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44033  # "foo.exe" is OK but "foo" is an error.
44034  #
44035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44036  # It is also a way to make sure we got the proper file name for the real test later on.
44037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44038  if test "x$test_shortpath" = x; then
44039    # Short path failed, file does not exist as specified.
44040    # Try adding .exe or .cmd
44041    if test -f "${new_path}.exe"; then
44042      input_to_shortpath="${new_path}.exe"
44043    elif test -f "${new_path}.cmd"; then
44044      input_to_shortpath="${new_path}.cmd"
44045    else
44046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44047$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44050      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44051    fi
44052  else
44053    input_to_shortpath="$new_path"
44054  fi
44055
44056  # Call helper function which possibly converts this using DOS-style short mode.
44057  # If so, the updated path is stored in $new_path.
44058  new_path="$input_to_shortpath"
44059
44060  input_path="$input_to_shortpath"
44061  # Check if we need to convert this using DOS-style short mode. If the path
44062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44063  # take no chances and rewrite it.
44064  # Note: m4 eats our [], so we need to use [ and ] instead.
44065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44066  if test "x$has_forbidden_chars" != x; then
44067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44071      # Going to short mode and back again did indeed matter. Since short mode is
44072      # case insensitive, let's make it lowercase to improve readability.
44073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44074      # Now convert it back to Unix-style (cygpath)
44075      input_path=`$CYGPATH -u "$shortmode_path"`
44076      new_path="$input_path"
44077    fi
44078  fi
44079
44080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44081  if test "x$test_cygdrive_prefix" = x; then
44082    # As a simple fix, exclude /usr/bin since it's not a real path.
44083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44085      # a path prefixed by /cygdrive for fixpath to work.
44086      new_path="$CYGWIN_ROOT_PATH$input_path"
44087    fi
44088  fi
44089
44090  # remove trailing .exe if any
44091  new_path="${new_path/%.exe/}"
44092
44093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44094
44095  # First separate the path from the arguments. This will split at the first
44096  # space.
44097  complete="$BUILD_CXX"
44098  path="${complete%% *}"
44099  tmp="$complete EOL"
44100  arguments="${tmp#* }"
44101
44102  # Input might be given as Windows format, start by converting to
44103  # unix format.
44104  new_path="$path"
44105
44106  windows_path="$new_path"
44107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44108    unix_path=`$CYGPATH -u "$windows_path"`
44109    new_path="$unix_path"
44110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44112    new_path="$unix_path"
44113  fi
44114
44115
44116  # Now try to locate executable using which
44117  new_path=`$WHICH "$new_path" 2> /dev/null`
44118
44119  if test "x$new_path" = x; then
44120    # Oops. Which didn't find the executable.
44121    # The splitting of arguments from the executable at a space might have been incorrect,
44122    # since paths with space are more likely in Windows. Give it another try with the whole
44123    # argument.
44124    path="$complete"
44125    arguments="EOL"
44126    new_path="$path"
44127
44128  windows_path="$new_path"
44129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44130    unix_path=`$CYGPATH -u "$windows_path"`
44131    new_path="$unix_path"
44132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44134    new_path="$unix_path"
44135  fi
44136
44137
44138    new_path=`$WHICH "$new_path" 2> /dev/null`
44139    # bat and cmd files are not always considered executable in MSYS causing which
44140    # to not find them
44141    if test "x$new_path" = x \
44142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44144      new_path="$path"
44145
44146  windows_path="$new_path"
44147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44148    unix_path=`$CYGPATH -u "$windows_path"`
44149    new_path="$unix_path"
44150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44152    new_path="$unix_path"
44153  fi
44154
44155    fi
44156
44157    if test "x$new_path" = x; then
44158      # It's still not found. Now this is an unrecoverable error.
44159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44160$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44161      has_space=`$ECHO "$complete" | $GREP " "`
44162      if test "x$has_space" != x; then
44163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44165      fi
44166      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44167    fi
44168  fi
44169
44170  # Now new_path has a complete unix path to the binary
44171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44172    # Keep paths in /bin as-is, but remove trailing .exe if any
44173    new_path="${new_path/%.exe/}"
44174    # Do not save /bin paths to all_fixpath_prefixes!
44175  else
44176    # Not in mixed or Windows style, start by that.
44177    new_path=`cmd //c echo $new_path`
44178
44179  input_path="$new_path"
44180  # Check if we need to convert this using DOS-style short mode. If the path
44181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44182  # take no chances and rewrite it.
44183  # Note: m4 eats our [], so we need to use [ and ] instead.
44184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44185  if test "x$has_forbidden_chars" != x; then
44186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44188  fi
44189
44190    # Output is in $new_path
44191
44192  windows_path="$new_path"
44193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44194    unix_path=`$CYGPATH -u "$windows_path"`
44195    new_path="$unix_path"
44196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44198    new_path="$unix_path"
44199  fi
44200
44201    # remove trailing .exe if any
44202    new_path="${new_path/%.exe/}"
44203
44204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44206  fi
44207
44208    else
44209      # We're on a unix platform. Hooray! :)
44210      # First separate the path from the arguments. This will split at the first
44211      # space.
44212      complete="$BUILD_CXX"
44213      path="${complete%% *}"
44214      tmp="$complete EOL"
44215      arguments="${tmp#* }"
44216
44217      # Cannot rely on the command "which" here since it doesn't always work.
44218      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44219      if test -z "$is_absolute_path"; then
44220        # Path to executable is not absolute. Find it.
44221        IFS_save="$IFS"
44222        IFS=:
44223        for p in $PATH; do
44224          if test -f "$p/$path" && test -x "$p/$path"; then
44225            new_path="$p/$path"
44226            break
44227          fi
44228        done
44229        IFS="$IFS_save"
44230      else
44231        # This is an absolute path, we can use it without further modifications.
44232        new_path="$path"
44233      fi
44234
44235      if test "x$new_path" = x; then
44236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44237$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44238        has_space=`$ECHO "$complete" | $GREP " "`
44239        if test "x$has_space" != x; then
44240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44242        fi
44243        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44244      fi
44245    fi
44246
44247    # Now join together the path and the arguments once again
44248    if test "x$arguments" != xEOL; then
44249      new_complete="$new_path ${arguments% *}"
44250    else
44251      new_complete="$new_path"
44252    fi
44253
44254    if test "x$complete" != "x$new_complete"; then
44255      BUILD_CXX="$new_complete"
44256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44257$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44258    fi
44259  fi
44260
44261
44262
44263  # Publish this variable in the help.
44264
44265
44266  if [ -z "${BUILD_NM+x}" ]; then
44267    # The variable is not set by user, try to locate tool using the code snippet
44268    for ac_prog in nm gcc-nm
44269do
44270  # Extract the first word of "$ac_prog", so it can be a program name with args.
44271set dummy $ac_prog; ac_word=$2
44272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44273$as_echo_n "checking for $ac_word... " >&6; }
44274if ${ac_cv_path_BUILD_NM+:} false; then :
44275  $as_echo_n "(cached) " >&6
44276else
44277  case $BUILD_NM in
44278  [\\/]* | ?:[\\/]*)
44279  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44280  ;;
44281  *)
44282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44283for as_dir in $PATH
44284do
44285  IFS=$as_save_IFS
44286  test -z "$as_dir" && as_dir=.
44287    for ac_exec_ext in '' $ac_executable_extensions; do
44288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44289    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44291    break 2
44292  fi
44293done
44294  done
44295IFS=$as_save_IFS
44296
44297  ;;
44298esac
44299fi
44300BUILD_NM=$ac_cv_path_BUILD_NM
44301if test -n "$BUILD_NM"; then
44302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44303$as_echo "$BUILD_NM" >&6; }
44304else
44305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44306$as_echo "no" >&6; }
44307fi
44308
44309
44310  test -n "$BUILD_NM" && break
44311done
44312
44313  else
44314    # The variable is set, but is it from the command line or the environment?
44315
44316    # Try to remove the string !BUILD_NM! from our list.
44317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44319      # If it failed, the variable was not from the command line. Ignore it,
44320      # but warn the user (except for BASH, which is always set by the calling BASH).
44321      if test "xBUILD_NM" != xBASH; then
44322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44323$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44324      fi
44325      # Try to locate tool using the code snippet
44326      for ac_prog in nm gcc-nm
44327do
44328  # Extract the first word of "$ac_prog", so it can be a program name with args.
44329set dummy $ac_prog; ac_word=$2
44330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44331$as_echo_n "checking for $ac_word... " >&6; }
44332if ${ac_cv_path_BUILD_NM+:} false; then :
44333  $as_echo_n "(cached) " >&6
44334else
44335  case $BUILD_NM in
44336  [\\/]* | ?:[\\/]*)
44337  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44338  ;;
44339  *)
44340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44341for as_dir in $PATH
44342do
44343  IFS=$as_save_IFS
44344  test -z "$as_dir" && as_dir=.
44345    for ac_exec_ext in '' $ac_executable_extensions; do
44346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44347    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44349    break 2
44350  fi
44351done
44352  done
44353IFS=$as_save_IFS
44354
44355  ;;
44356esac
44357fi
44358BUILD_NM=$ac_cv_path_BUILD_NM
44359if test -n "$BUILD_NM"; then
44360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44361$as_echo "$BUILD_NM" >&6; }
44362else
44363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44364$as_echo "no" >&6; }
44365fi
44366
44367
44368  test -n "$BUILD_NM" && break
44369done
44370
44371    else
44372      # If it succeeded, then it was overridden by the user. We will use it
44373      # for the tool.
44374
44375      # First remove it from the list of overridden variables, so we can test
44376      # for unknown variables in the end.
44377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44378
44379      # Check if we try to supply an empty value
44380      if test "x$BUILD_NM" = x; then
44381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44382$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44384$as_echo_n "checking for BUILD_NM... " >&6; }
44385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44386$as_echo "disabled" >&6; }
44387      else
44388        # Check if the provided tool contains a complete path.
44389        tool_specified="$BUILD_NM"
44390        tool_basename="${tool_specified##*/}"
44391        if test "x$tool_basename" = "x$tool_specified"; then
44392          # A command without a complete path is provided, search $PATH.
44393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44394$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44395          # Extract the first word of "$tool_basename", so it can be a program name with args.
44396set dummy $tool_basename; ac_word=$2
44397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44398$as_echo_n "checking for $ac_word... " >&6; }
44399if ${ac_cv_path_BUILD_NM+:} false; then :
44400  $as_echo_n "(cached) " >&6
44401else
44402  case $BUILD_NM in
44403  [\\/]* | ?:[\\/]*)
44404  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44405  ;;
44406  *)
44407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44408for as_dir in $PATH
44409do
44410  IFS=$as_save_IFS
44411  test -z "$as_dir" && as_dir=.
44412    for ac_exec_ext in '' $ac_executable_extensions; do
44413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44414    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44416    break 2
44417  fi
44418done
44419  done
44420IFS=$as_save_IFS
44421
44422  ;;
44423esac
44424fi
44425BUILD_NM=$ac_cv_path_BUILD_NM
44426if test -n "$BUILD_NM"; then
44427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44428$as_echo "$BUILD_NM" >&6; }
44429else
44430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44431$as_echo "no" >&6; }
44432fi
44433
44434
44435          if test "x$BUILD_NM" = x; then
44436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44437          fi
44438        else
44439          # Otherwise we believe it is a complete path. Use it as it is.
44440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44441$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44443$as_echo_n "checking for BUILD_NM... " >&6; }
44444          if test ! -x "$tool_specified"; then
44445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44446$as_echo "not found" >&6; }
44447            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44448          fi
44449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44450$as_echo "$tool_specified" >&6; }
44451        fi
44452      fi
44453    fi
44454
44455  fi
44456
44457
44458
44459  # Only process if variable expands to non-empty
44460
44461  if test "x$BUILD_NM" != x; then
44462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44463
44464  # First separate the path from the arguments. This will split at the first
44465  # space.
44466  complete="$BUILD_NM"
44467  path="${complete%% *}"
44468  tmp="$complete EOL"
44469  arguments="${tmp#* }"
44470
44471  # Input might be given as Windows format, start by converting to
44472  # unix format.
44473  new_path=`$CYGPATH -u "$path"`
44474
44475  # Now try to locate executable using which
44476  new_path=`$WHICH "$new_path" 2> /dev/null`
44477  # bat and cmd files are not always considered executable in cygwin causing which
44478  # to not find them
44479  if test "x$new_path" = x \
44480      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44481      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44482    new_path=`$CYGPATH -u "$path"`
44483  fi
44484  if test "x$new_path" = x; then
44485    # Oops. Which didn't find the executable.
44486    # The splitting of arguments from the executable at a space might have been incorrect,
44487    # since paths with space are more likely in Windows. Give it another try with the whole
44488    # argument.
44489    path="$complete"
44490    arguments="EOL"
44491    new_path=`$CYGPATH -u "$path"`
44492    new_path=`$WHICH "$new_path" 2> /dev/null`
44493    # bat and cmd files are not always considered executable in cygwin causing which
44494    # to not find them
44495    if test "x$new_path" = x \
44496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44498      new_path=`$CYGPATH -u "$path"`
44499    fi
44500    if test "x$new_path" = x; then
44501      # It's still not found. Now this is an unrecoverable error.
44502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44503$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44504      has_space=`$ECHO "$complete" | $GREP " "`
44505      if test "x$has_space" != x; then
44506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44508      fi
44509      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44510    fi
44511  fi
44512
44513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44516  # "foo.exe" is OK but "foo" is an error.
44517  #
44518  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44519  # It is also a way to make sure we got the proper file name for the real test later on.
44520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44521  if test "x$test_shortpath" = x; then
44522    # Short path failed, file does not exist as specified.
44523    # Try adding .exe or .cmd
44524    if test -f "${new_path}.exe"; then
44525      input_to_shortpath="${new_path}.exe"
44526    elif test -f "${new_path}.cmd"; then
44527      input_to_shortpath="${new_path}.cmd"
44528    else
44529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44530$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44533      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44534    fi
44535  else
44536    input_to_shortpath="$new_path"
44537  fi
44538
44539  # Call helper function which possibly converts this using DOS-style short mode.
44540  # If so, the updated path is stored in $new_path.
44541  new_path="$input_to_shortpath"
44542
44543  input_path="$input_to_shortpath"
44544  # Check if we need to convert this using DOS-style short mode. If the path
44545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44546  # take no chances and rewrite it.
44547  # Note: m4 eats our [], so we need to use [ and ] instead.
44548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44549  if test "x$has_forbidden_chars" != x; then
44550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44554      # Going to short mode and back again did indeed matter. Since short mode is
44555      # case insensitive, let's make it lowercase to improve readability.
44556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44557      # Now convert it back to Unix-style (cygpath)
44558      input_path=`$CYGPATH -u "$shortmode_path"`
44559      new_path="$input_path"
44560    fi
44561  fi
44562
44563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44564  if test "x$test_cygdrive_prefix" = x; then
44565    # As a simple fix, exclude /usr/bin since it's not a real path.
44566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44568      # a path prefixed by /cygdrive for fixpath to work.
44569      new_path="$CYGWIN_ROOT_PATH$input_path"
44570    fi
44571  fi
44572
44573  # remove trailing .exe if any
44574  new_path="${new_path/%.exe/}"
44575
44576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577
44578  # First separate the path from the arguments. This will split at the first
44579  # space.
44580  complete="$BUILD_NM"
44581  path="${complete%% *}"
44582  tmp="$complete EOL"
44583  arguments="${tmp#* }"
44584
44585  # Input might be given as Windows format, start by converting to
44586  # unix format.
44587  new_path="$path"
44588
44589  windows_path="$new_path"
44590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44591    unix_path=`$CYGPATH -u "$windows_path"`
44592    new_path="$unix_path"
44593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44595    new_path="$unix_path"
44596  fi
44597
44598
44599  # Now try to locate executable using which
44600  new_path=`$WHICH "$new_path" 2> /dev/null`
44601
44602  if test "x$new_path" = x; then
44603    # Oops. Which didn't find the executable.
44604    # The splitting of arguments from the executable at a space might have been incorrect,
44605    # since paths with space are more likely in Windows. Give it another try with the whole
44606    # argument.
44607    path="$complete"
44608    arguments="EOL"
44609    new_path="$path"
44610
44611  windows_path="$new_path"
44612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44613    unix_path=`$CYGPATH -u "$windows_path"`
44614    new_path="$unix_path"
44615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44617    new_path="$unix_path"
44618  fi
44619
44620
44621    new_path=`$WHICH "$new_path" 2> /dev/null`
44622    # bat and cmd files are not always considered executable in MSYS causing which
44623    # to not find them
44624    if test "x$new_path" = x \
44625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44627      new_path="$path"
44628
44629  windows_path="$new_path"
44630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44631    unix_path=`$CYGPATH -u "$windows_path"`
44632    new_path="$unix_path"
44633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44635    new_path="$unix_path"
44636  fi
44637
44638    fi
44639
44640    if test "x$new_path" = x; then
44641      # It's still not found. Now this is an unrecoverable error.
44642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44643$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44644      has_space=`$ECHO "$complete" | $GREP " "`
44645      if test "x$has_space" != x; then
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44648      fi
44649      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44650    fi
44651  fi
44652
44653  # Now new_path has a complete unix path to the binary
44654  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44655    # Keep paths in /bin as-is, but remove trailing .exe if any
44656    new_path="${new_path/%.exe/}"
44657    # Do not save /bin paths to all_fixpath_prefixes!
44658  else
44659    # Not in mixed or Windows style, start by that.
44660    new_path=`cmd //c echo $new_path`
44661
44662  input_path="$new_path"
44663  # Check if we need to convert this using DOS-style short mode. If the path
44664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44665  # take no chances and rewrite it.
44666  # Note: m4 eats our [], so we need to use [ and ] instead.
44667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44668  if test "x$has_forbidden_chars" != x; then
44669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44671  fi
44672
44673    # Output is in $new_path
44674
44675  windows_path="$new_path"
44676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44677    unix_path=`$CYGPATH -u "$windows_path"`
44678    new_path="$unix_path"
44679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44681    new_path="$unix_path"
44682  fi
44683
44684    # remove trailing .exe if any
44685    new_path="${new_path/%.exe/}"
44686
44687    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44688    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44689  fi
44690
44691    else
44692      # We're on a unix platform. Hooray! :)
44693      # First separate the path from the arguments. This will split at the first
44694      # space.
44695      complete="$BUILD_NM"
44696      path="${complete%% *}"
44697      tmp="$complete EOL"
44698      arguments="${tmp#* }"
44699
44700      # Cannot rely on the command "which" here since it doesn't always work.
44701      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44702      if test -z "$is_absolute_path"; then
44703        # Path to executable is not absolute. Find it.
44704        IFS_save="$IFS"
44705        IFS=:
44706        for p in $PATH; do
44707          if test -f "$p/$path" && test -x "$p/$path"; then
44708            new_path="$p/$path"
44709            break
44710          fi
44711        done
44712        IFS="$IFS_save"
44713      else
44714        # This is an absolute path, we can use it without further modifications.
44715        new_path="$path"
44716      fi
44717
44718      if test "x$new_path" = x; then
44719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44720$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44721        has_space=`$ECHO "$complete" | $GREP " "`
44722        if test "x$has_space" != x; then
44723          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44725        fi
44726        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44727      fi
44728    fi
44729
44730    # Now join together the path and the arguments once again
44731    if test "x$arguments" != xEOL; then
44732      new_complete="$new_path ${arguments% *}"
44733    else
44734      new_complete="$new_path"
44735    fi
44736
44737    if test "x$complete" != "x$new_complete"; then
44738      BUILD_NM="$new_complete"
44739      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44740$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44741    fi
44742  fi
44743
44744
44745
44746  # Publish this variable in the help.
44747
44748
44749  if [ -z "${BUILD_AR+x}" ]; then
44750    # The variable is not set by user, try to locate tool using the code snippet
44751    for ac_prog in ar gcc-ar
44752do
44753  # Extract the first word of "$ac_prog", so it can be a program name with args.
44754set dummy $ac_prog; ac_word=$2
44755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44756$as_echo_n "checking for $ac_word... " >&6; }
44757if ${ac_cv_path_BUILD_AR+:} false; then :
44758  $as_echo_n "(cached) " >&6
44759else
44760  case $BUILD_AR in
44761  [\\/]* | ?:[\\/]*)
44762  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44763  ;;
44764  *)
44765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44766for as_dir in $PATH
44767do
44768  IFS=$as_save_IFS
44769  test -z "$as_dir" && as_dir=.
44770    for ac_exec_ext in '' $ac_executable_extensions; do
44771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44772    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44774    break 2
44775  fi
44776done
44777  done
44778IFS=$as_save_IFS
44779
44780  ;;
44781esac
44782fi
44783BUILD_AR=$ac_cv_path_BUILD_AR
44784if test -n "$BUILD_AR"; then
44785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44786$as_echo "$BUILD_AR" >&6; }
44787else
44788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44789$as_echo "no" >&6; }
44790fi
44791
44792
44793  test -n "$BUILD_AR" && break
44794done
44795
44796  else
44797    # The variable is set, but is it from the command line or the environment?
44798
44799    # Try to remove the string !BUILD_AR! from our list.
44800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44802      # If it failed, the variable was not from the command line. Ignore it,
44803      # but warn the user (except for BASH, which is always set by the calling BASH).
44804      if test "xBUILD_AR" != xBASH; then
44805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44806$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44807      fi
44808      # Try to locate tool using the code snippet
44809      for ac_prog in ar gcc-ar
44810do
44811  # Extract the first word of "$ac_prog", so it can be a program name with args.
44812set dummy $ac_prog; ac_word=$2
44813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44814$as_echo_n "checking for $ac_word... " >&6; }
44815if ${ac_cv_path_BUILD_AR+:} false; then :
44816  $as_echo_n "(cached) " >&6
44817else
44818  case $BUILD_AR in
44819  [\\/]* | ?:[\\/]*)
44820  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44821  ;;
44822  *)
44823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44824for as_dir in $PATH
44825do
44826  IFS=$as_save_IFS
44827  test -z "$as_dir" && as_dir=.
44828    for ac_exec_ext in '' $ac_executable_extensions; do
44829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44830    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44832    break 2
44833  fi
44834done
44835  done
44836IFS=$as_save_IFS
44837
44838  ;;
44839esac
44840fi
44841BUILD_AR=$ac_cv_path_BUILD_AR
44842if test -n "$BUILD_AR"; then
44843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44844$as_echo "$BUILD_AR" >&6; }
44845else
44846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44847$as_echo "no" >&6; }
44848fi
44849
44850
44851  test -n "$BUILD_AR" && break
44852done
44853
44854    else
44855      # If it succeeded, then it was overridden by the user. We will use it
44856      # for the tool.
44857
44858      # First remove it from the list of overridden variables, so we can test
44859      # for unknown variables in the end.
44860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44861
44862      # Check if we try to supply an empty value
44863      if test "x$BUILD_AR" = x; then
44864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44865$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44867$as_echo_n "checking for BUILD_AR... " >&6; }
44868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44869$as_echo "disabled" >&6; }
44870      else
44871        # Check if the provided tool contains a complete path.
44872        tool_specified="$BUILD_AR"
44873        tool_basename="${tool_specified##*/}"
44874        if test "x$tool_basename" = "x$tool_specified"; then
44875          # A command without a complete path is provided, search $PATH.
44876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44877$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44878          # Extract the first word of "$tool_basename", so it can be a program name with args.
44879set dummy $tool_basename; ac_word=$2
44880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44881$as_echo_n "checking for $ac_word... " >&6; }
44882if ${ac_cv_path_BUILD_AR+:} false; then :
44883  $as_echo_n "(cached) " >&6
44884else
44885  case $BUILD_AR in
44886  [\\/]* | ?:[\\/]*)
44887  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44888  ;;
44889  *)
44890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44891for as_dir in $PATH
44892do
44893  IFS=$as_save_IFS
44894  test -z "$as_dir" && as_dir=.
44895    for ac_exec_ext in '' $ac_executable_extensions; do
44896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44897    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44899    break 2
44900  fi
44901done
44902  done
44903IFS=$as_save_IFS
44904
44905  ;;
44906esac
44907fi
44908BUILD_AR=$ac_cv_path_BUILD_AR
44909if test -n "$BUILD_AR"; then
44910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44911$as_echo "$BUILD_AR" >&6; }
44912else
44913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44914$as_echo "no" >&6; }
44915fi
44916
44917
44918          if test "x$BUILD_AR" = x; then
44919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44920          fi
44921        else
44922          # Otherwise we believe it is a complete path. Use it as it is.
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44924$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44926$as_echo_n "checking for BUILD_AR... " >&6; }
44927          if test ! -x "$tool_specified"; then
44928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44929$as_echo "not found" >&6; }
44930            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44931          fi
44932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44933$as_echo "$tool_specified" >&6; }
44934        fi
44935      fi
44936    fi
44937
44938  fi
44939
44940
44941
44942  # Only process if variable expands to non-empty
44943
44944  if test "x$BUILD_AR" != x; then
44945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44946
44947  # First separate the path from the arguments. This will split at the first
44948  # space.
44949  complete="$BUILD_AR"
44950  path="${complete%% *}"
44951  tmp="$complete EOL"
44952  arguments="${tmp#* }"
44953
44954  # Input might be given as Windows format, start by converting to
44955  # unix format.
44956  new_path=`$CYGPATH -u "$path"`
44957
44958  # Now try to locate executable using which
44959  new_path=`$WHICH "$new_path" 2> /dev/null`
44960  # bat and cmd files are not always considered executable in cygwin causing which
44961  # to not find them
44962  if test "x$new_path" = x \
44963      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44964      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44965    new_path=`$CYGPATH -u "$path"`
44966  fi
44967  if test "x$new_path" = x; then
44968    # Oops. Which didn't find the executable.
44969    # The splitting of arguments from the executable at a space might have been incorrect,
44970    # since paths with space are more likely in Windows. Give it another try with the whole
44971    # argument.
44972    path="$complete"
44973    arguments="EOL"
44974    new_path=`$CYGPATH -u "$path"`
44975    new_path=`$WHICH "$new_path" 2> /dev/null`
44976    # bat and cmd files are not always considered executable in cygwin causing which
44977    # to not find them
44978    if test "x$new_path" = x \
44979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44981      new_path=`$CYGPATH -u "$path"`
44982    fi
44983    if test "x$new_path" = x; then
44984      # It's still not found. Now this is an unrecoverable error.
44985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44986$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44987      has_space=`$ECHO "$complete" | $GREP " "`
44988      if test "x$has_space" != x; then
44989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44991      fi
44992      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44993    fi
44994  fi
44995
44996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44999  # "foo.exe" is OK but "foo" is an error.
45000  #
45001  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45002  # It is also a way to make sure we got the proper file name for the real test later on.
45003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45004  if test "x$test_shortpath" = x; then
45005    # Short path failed, file does not exist as specified.
45006    # Try adding .exe or .cmd
45007    if test -f "${new_path}.exe"; then
45008      input_to_shortpath="${new_path}.exe"
45009    elif test -f "${new_path}.cmd"; then
45010      input_to_shortpath="${new_path}.cmd"
45011    else
45012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45013$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45016      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45017    fi
45018  else
45019    input_to_shortpath="$new_path"
45020  fi
45021
45022  # Call helper function which possibly converts this using DOS-style short mode.
45023  # If so, the updated path is stored in $new_path.
45024  new_path="$input_to_shortpath"
45025
45026  input_path="$input_to_shortpath"
45027  # Check if we need to convert this using DOS-style short mode. If the path
45028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45029  # take no chances and rewrite it.
45030  # Note: m4 eats our [], so we need to use [ and ] instead.
45031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45032  if test "x$has_forbidden_chars" != x; then
45033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45037      # Going to short mode and back again did indeed matter. Since short mode is
45038      # case insensitive, let's make it lowercase to improve readability.
45039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45040      # Now convert it back to Unix-style (cygpath)
45041      input_path=`$CYGPATH -u "$shortmode_path"`
45042      new_path="$input_path"
45043    fi
45044  fi
45045
45046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45047  if test "x$test_cygdrive_prefix" = x; then
45048    # As a simple fix, exclude /usr/bin since it's not a real path.
45049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45051      # a path prefixed by /cygdrive for fixpath to work.
45052      new_path="$CYGWIN_ROOT_PATH$input_path"
45053    fi
45054  fi
45055
45056  # remove trailing .exe if any
45057  new_path="${new_path/%.exe/}"
45058
45059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45060
45061  # First separate the path from the arguments. This will split at the first
45062  # space.
45063  complete="$BUILD_AR"
45064  path="${complete%% *}"
45065  tmp="$complete EOL"
45066  arguments="${tmp#* }"
45067
45068  # Input might be given as Windows format, start by converting to
45069  # unix format.
45070  new_path="$path"
45071
45072  windows_path="$new_path"
45073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45074    unix_path=`$CYGPATH -u "$windows_path"`
45075    new_path="$unix_path"
45076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45078    new_path="$unix_path"
45079  fi
45080
45081
45082  # Now try to locate executable using which
45083  new_path=`$WHICH "$new_path" 2> /dev/null`
45084
45085  if test "x$new_path" = x; then
45086    # Oops. Which didn't find the executable.
45087    # The splitting of arguments from the executable at a space might have been incorrect,
45088    # since paths with space are more likely in Windows. Give it another try with the whole
45089    # argument.
45090    path="$complete"
45091    arguments="EOL"
45092    new_path="$path"
45093
45094  windows_path="$new_path"
45095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45096    unix_path=`$CYGPATH -u "$windows_path"`
45097    new_path="$unix_path"
45098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45100    new_path="$unix_path"
45101  fi
45102
45103
45104    new_path=`$WHICH "$new_path" 2> /dev/null`
45105    # bat and cmd files are not always considered executable in MSYS causing which
45106    # to not find them
45107    if test "x$new_path" = x \
45108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45110      new_path="$path"
45111
45112  windows_path="$new_path"
45113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45114    unix_path=`$CYGPATH -u "$windows_path"`
45115    new_path="$unix_path"
45116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45118    new_path="$unix_path"
45119  fi
45120
45121    fi
45122
45123    if test "x$new_path" = x; then
45124      # It's still not found. Now this is an unrecoverable error.
45125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45126$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45127      has_space=`$ECHO "$complete" | $GREP " "`
45128      if test "x$has_space" != x; then
45129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45131      fi
45132      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45133    fi
45134  fi
45135
45136  # Now new_path has a complete unix path to the binary
45137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45138    # Keep paths in /bin as-is, but remove trailing .exe if any
45139    new_path="${new_path/%.exe/}"
45140    # Do not save /bin paths to all_fixpath_prefixes!
45141  else
45142    # Not in mixed or Windows style, start by that.
45143    new_path=`cmd //c echo $new_path`
45144
45145  input_path="$new_path"
45146  # Check if we need to convert this using DOS-style short mode. If the path
45147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45148  # take no chances and rewrite it.
45149  # Note: m4 eats our [], so we need to use [ and ] instead.
45150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45151  if test "x$has_forbidden_chars" != x; then
45152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45154  fi
45155
45156    # Output is in $new_path
45157
45158  windows_path="$new_path"
45159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45160    unix_path=`$CYGPATH -u "$windows_path"`
45161    new_path="$unix_path"
45162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45164    new_path="$unix_path"
45165  fi
45166
45167    # remove trailing .exe if any
45168    new_path="${new_path/%.exe/}"
45169
45170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45172  fi
45173
45174    else
45175      # We're on a unix platform. Hooray! :)
45176      # First separate the path from the arguments. This will split at the first
45177      # space.
45178      complete="$BUILD_AR"
45179      path="${complete%% *}"
45180      tmp="$complete EOL"
45181      arguments="${tmp#* }"
45182
45183      # Cannot rely on the command "which" here since it doesn't always work.
45184      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45185      if test -z "$is_absolute_path"; then
45186        # Path to executable is not absolute. Find it.
45187        IFS_save="$IFS"
45188        IFS=:
45189        for p in $PATH; do
45190          if test -f "$p/$path" && test -x "$p/$path"; then
45191            new_path="$p/$path"
45192            break
45193          fi
45194        done
45195        IFS="$IFS_save"
45196      else
45197        # This is an absolute path, we can use it without further modifications.
45198        new_path="$path"
45199      fi
45200
45201      if test "x$new_path" = x; then
45202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45203$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45204        has_space=`$ECHO "$complete" | $GREP " "`
45205        if test "x$has_space" != x; then
45206          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45207$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45208        fi
45209        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45210      fi
45211    fi
45212
45213    # Now join together the path and the arguments once again
45214    if test "x$arguments" != xEOL; then
45215      new_complete="$new_path ${arguments% *}"
45216    else
45217      new_complete="$new_path"
45218    fi
45219
45220    if test "x$complete" != "x$new_complete"; then
45221      BUILD_AR="$new_complete"
45222      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45223$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45224    fi
45225  fi
45226
45227    # Assume the C compiler is the assembler
45228    BUILD_AS="$BUILD_CC -c"
45229    # Just like for the target compiler, use the compiler as linker
45230    BUILD_LD="$BUILD_CC"
45231    BUILD_LDCXX="$BUILD_CXX"
45232
45233    PATH="$OLDPATH"
45234  else
45235    # If we are not cross compiling, use the normal target compilers for
45236    # building the build platform executables.
45237    BUILD_CC="$CC"
45238    BUILD_CXX="$CXX"
45239    BUILD_LD="$LD"
45240    BUILD_LDCXX="$LDCXX"
45241    BUILD_NM="$NM"
45242    BUILD_AS="$AS"
45243    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45244    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45245    BUILD_AR="$AR"
45246  fi
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45260    # For hotspot, we need these in Windows mixed path,
45261    # so rewrite them all. Need added .exe suffix.
45262    HOTSPOT_CXX="$CXX.exe"
45263    HOTSPOT_LD="$LD.exe"
45264    HOTSPOT_MT="$MT.exe"
45265    HOTSPOT_RC="$RC.exe"
45266
45267  unix_path="$HOTSPOT_CXX"
45268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45269    windows_path=`$CYGPATH -m "$unix_path"`
45270    HOTSPOT_CXX="$windows_path"
45271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45272    windows_path=`cmd //c echo $unix_path`
45273    HOTSPOT_CXX="$windows_path"
45274  fi
45275
45276
45277  unix_path="$HOTSPOT_LD"
45278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45279    windows_path=`$CYGPATH -m "$unix_path"`
45280    HOTSPOT_LD="$windows_path"
45281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45282    windows_path=`cmd //c echo $unix_path`
45283    HOTSPOT_LD="$windows_path"
45284  fi
45285
45286
45287  unix_path="$HOTSPOT_MT"
45288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45289    windows_path=`$CYGPATH -m "$unix_path"`
45290    HOTSPOT_MT="$windows_path"
45291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45292    windows_path=`cmd //c echo $unix_path`
45293    HOTSPOT_MT="$windows_path"
45294  fi
45295
45296
45297  unix_path="$HOTSPOT_RC"
45298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45299    windows_path=`$CYGPATH -m "$unix_path"`
45300    HOTSPOT_RC="$windows_path"
45301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45302    windows_path=`cmd //c echo $unix_path`
45303    HOTSPOT_RC="$windows_path"
45304  fi
45305
45306
45307
45308  else
45309    HOTSPOT_CXX="$CXX"
45310    HOTSPOT_LD="$LD"
45311  fi
45312
45313
45314
45315  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45316    USE_CLANG=true
45317  fi
45318
45319
45320
45321
45322
45323  # The package path is used only on macosx?
45324  # FIXME: clean this up, and/or move it elsewhere.
45325  PACKAGE_PATH=/opt/local
45326
45327
45328  # Check for extra potential brokenness.
45329  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45330    # On Windows, double-check that we got the right compiler.
45331    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45332    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45333    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45334      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45335        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
45336      fi
45337    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45338      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45339        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45340      fi
45341    fi
45342  fi
45343
45344  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45345    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45346    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45347    # This is later checked when setting flags.
45348
45349    # "-Og" suppported for GCC 4.8 and later
45350    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45351
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45353$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45354  supports=yes
45355
45356  saved_cflags="$CFLAGS"
45357  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45358  ac_ext=c
45359ac_cpp='$CPP $CPPFLAGS'
45360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45362ac_compiler_gnu=$ac_cv_c_compiler_gnu
45363
45364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45365/* end confdefs.h.  */
45366int i;
45367_ACEOF
45368if ac_fn_c_try_compile "$LINENO"; then :
45369
45370else
45371  supports=no
45372fi
45373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45374  ac_ext=cpp
45375ac_cpp='$CXXCPP $CPPFLAGS'
45376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45379
45380  CFLAGS="$saved_cflags"
45381
45382  saved_cxxflags="$CXXFLAGS"
45383  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45384  ac_ext=cpp
45385ac_cpp='$CXXCPP $CPPFLAGS'
45386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45389
45390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45391/* end confdefs.h.  */
45392int i;
45393_ACEOF
45394if ac_fn_cxx_try_compile "$LINENO"; then :
45395
45396else
45397  supports=no
45398fi
45399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45400  ac_ext=cpp
45401ac_cpp='$CXXCPP $CPPFLAGS'
45402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45405
45406  CXXFLAGS="$saved_cxxflags"
45407
45408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45409$as_echo "$supports" >&6; }
45410  if test "x$supports" = "xyes" ; then
45411    HAS_CFLAG_OPTIMIZE_DEBUG=true
45412  else
45413    HAS_CFLAG_OPTIMIZE_DEBUG=false
45414  fi
45415
45416
45417    # "-z relro" supported in GNU binutils 2.17 and later
45418    LINKER_RELRO_FLAG="-Wl,-z,relro"
45419
45420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45421$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45422  supports=yes
45423
45424  saved_ldflags="$LDFLAGS"
45425  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45426  ac_ext=c
45427ac_cpp='$CPP $CPPFLAGS'
45428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45430ac_compiler_gnu=$ac_cv_c_compiler_gnu
45431
45432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45433/* end confdefs.h.  */
45434
45435int
45436main ()
45437{
45438
45439  ;
45440  return 0;
45441}
45442_ACEOF
45443if ac_fn_c_try_link "$LINENO"; then :
45444
45445else
45446  supports=no
45447fi
45448rm -f core conftest.err conftest.$ac_objext \
45449    conftest$ac_exeext conftest.$ac_ext
45450  ac_ext=cpp
45451ac_cpp='$CXXCPP $CPPFLAGS'
45452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45455
45456  LDFLAGS="$saved_ldflags"
45457
45458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45459$as_echo "$supports" >&6; }
45460  if test "x$supports" = "xyes" ; then
45461    HAS_LINKER_RELRO=true
45462  else
45463    HAS_LINKER_RELRO=false
45464  fi
45465
45466
45467    # "-z now" supported in GNU binutils 2.11 and later
45468    LINKER_NOW_FLAG="-Wl,-z,now"
45469
45470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45471$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45472  supports=yes
45473
45474  saved_ldflags="$LDFLAGS"
45475  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45476  ac_ext=c
45477ac_cpp='$CPP $CPPFLAGS'
45478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45480ac_compiler_gnu=$ac_cv_c_compiler_gnu
45481
45482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45483/* end confdefs.h.  */
45484
45485int
45486main ()
45487{
45488
45489  ;
45490  return 0;
45491}
45492_ACEOF
45493if ac_fn_c_try_link "$LINENO"; then :
45494
45495else
45496  supports=no
45497fi
45498rm -f core conftest.err conftest.$ac_objext \
45499    conftest$ac_exeext conftest.$ac_ext
45500  ac_ext=cpp
45501ac_cpp='$CXXCPP $CPPFLAGS'
45502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45505
45506  LDFLAGS="$saved_ldflags"
45507
45508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45509$as_echo "$supports" >&6; }
45510  if test "x$supports" = "xyes" ; then
45511    HAS_LINKER_NOW=true
45512  else
45513    HAS_LINKER_NOW=false
45514  fi
45515
45516  fi
45517
45518  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45519  # in executable.'
45520  USING_BROKEN_SUSE_LD=no
45521  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45523$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45524    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45525    $ECHO "int main() { }" > main.c
45526    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45528$as_echo "no" >&6; }
45529      USING_BROKEN_SUSE_LD=no
45530    else
45531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45532$as_echo "yes" >&6; }
45533      USING_BROKEN_SUSE_LD=yes
45534    fi
45535    rm -rf version-script.map main.c a.out
45536  fi
45537
45538
45539
45540# Setup the JTReg Regression Test Harness.
45541
45542
45543# Check whether --with-jtreg was given.
45544if test "${with_jtreg+set}" = set; then :
45545  withval=$with_jtreg;
45546else
45547  with_jtreg=no
45548fi
45549
45550
45551  if test "x$with_jtreg" = xno; then
45552    # jtreg disabled
45553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45554$as_echo_n "checking for jtreg... " >&6; }
45555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45556$as_echo "no" >&6; }
45557  else
45558    if test "x$with_jtreg" != xyes; then
45559      # with path specified.
45560      JT_HOME="$with_jtreg"
45561    fi
45562
45563    if test "x$JT_HOME" != x; then
45564      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45565$as_echo_n "checking for jtreg... " >&6; }
45566
45567      # use JT_HOME enviroment var.
45568
45569  # Only process if variable expands to non-empty
45570
45571  if test "x$JT_HOME" != x; then
45572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45573
45574  # Input might be given as Windows format, start by converting to
45575  # unix format.
45576  path="$JT_HOME"
45577  new_path=`$CYGPATH -u "$path"`
45578
45579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45582  # "foo.exe" is OK but "foo" is an error.
45583  #
45584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45585  # It is also a way to make sure we got the proper file name for the real test later on.
45586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45587  if test "x$test_shortpath" = x; then
45588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45589$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45590    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45591  fi
45592
45593  # Call helper function which possibly converts this using DOS-style short mode.
45594  # If so, the updated path is stored in $new_path.
45595
45596  input_path="$new_path"
45597  # Check if we need to convert this using DOS-style short mode. If the path
45598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45599  # take no chances and rewrite it.
45600  # Note: m4 eats our [], so we need to use [ and ] instead.
45601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45602  if test "x$has_forbidden_chars" != x; then
45603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45607      # Going to short mode and back again did indeed matter. Since short mode is
45608      # case insensitive, let's make it lowercase to improve readability.
45609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45610      # Now convert it back to Unix-style (cygpath)
45611      input_path=`$CYGPATH -u "$shortmode_path"`
45612      new_path="$input_path"
45613    fi
45614  fi
45615
45616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45617  if test "x$test_cygdrive_prefix" = x; then
45618    # As a simple fix, exclude /usr/bin since it's not a real path.
45619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45621      # a path prefixed by /cygdrive for fixpath to work.
45622      new_path="$CYGWIN_ROOT_PATH$input_path"
45623    fi
45624  fi
45625
45626
45627  if test "x$path" != "x$new_path"; then
45628    JT_HOME="$new_path"
45629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45630$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45631  fi
45632
45633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45634
45635  path="$JT_HOME"
45636  has_colon=`$ECHO $path | $GREP ^.:`
45637  new_path="$path"
45638  if test "x$has_colon" = x; then
45639    # Not in mixed or Windows style, start by that.
45640    new_path=`cmd //c echo $path`
45641  fi
45642
45643
45644  input_path="$new_path"
45645  # Check if we need to convert this using DOS-style short mode. If the path
45646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45647  # take no chances and rewrite it.
45648  # Note: m4 eats our [], so we need to use [ and ] instead.
45649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45650  if test "x$has_forbidden_chars" != x; then
45651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45653  fi
45654
45655
45656  windows_path="$new_path"
45657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45658    unix_path=`$CYGPATH -u "$windows_path"`
45659    new_path="$unix_path"
45660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45662    new_path="$unix_path"
45663  fi
45664
45665  if test "x$path" != "x$new_path"; then
45666    JT_HOME="$new_path"
45667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45668$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45669  fi
45670
45671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45673
45674    else
45675      # We're on a unix platform. Hooray! :)
45676      path="$JT_HOME"
45677      has_space=`$ECHO "$path" | $GREP " "`
45678      if test "x$has_space" != x; then
45679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45680$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45682      fi
45683
45684      # Use eval to expand a potential ~
45685      eval path="$path"
45686      if test ! -f "$path" && test ! -d "$path"; then
45687        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45688      fi
45689
45690      if test -d "$path"; then
45691        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45692      else
45693        dir="`$DIRNAME "$path"`"
45694        base="`$BASENAME "$path"`"
45695        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45696      fi
45697    fi
45698  fi
45699
45700
45701      # jtreg win32 script works for everybody
45702      JTREGEXE="$JT_HOME/bin/jtreg"
45703
45704      if test ! -f "$JTREGEXE"; then
45705        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45706      fi
45707
45708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45709$as_echo "$JTREGEXE" >&6; }
45710    else
45711      # try to find jtreg on path
45712
45713
45714
45715  # Publish this variable in the help.
45716
45717
45718  if [ -z "${JTREGEXE+x}" ]; then
45719    # The variable is not set by user, try to locate tool using the code snippet
45720    for ac_prog in jtreg
45721do
45722  # Extract the first word of "$ac_prog", so it can be a program name with args.
45723set dummy $ac_prog; ac_word=$2
45724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45725$as_echo_n "checking for $ac_word... " >&6; }
45726if ${ac_cv_path_JTREGEXE+:} false; then :
45727  $as_echo_n "(cached) " >&6
45728else
45729  case $JTREGEXE in
45730  [\\/]* | ?:[\\/]*)
45731  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45732  ;;
45733  *)
45734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45735for as_dir in $PATH
45736do
45737  IFS=$as_save_IFS
45738  test -z "$as_dir" && as_dir=.
45739    for ac_exec_ext in '' $ac_executable_extensions; do
45740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45741    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45743    break 2
45744  fi
45745done
45746  done
45747IFS=$as_save_IFS
45748
45749  ;;
45750esac
45751fi
45752JTREGEXE=$ac_cv_path_JTREGEXE
45753if test -n "$JTREGEXE"; then
45754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45755$as_echo "$JTREGEXE" >&6; }
45756else
45757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45758$as_echo "no" >&6; }
45759fi
45760
45761
45762  test -n "$JTREGEXE" && break
45763done
45764
45765  else
45766    # The variable is set, but is it from the command line or the environment?
45767
45768    # Try to remove the string !JTREGEXE! from our list.
45769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45771      # If it failed, the variable was not from the command line. Ignore it,
45772      # but warn the user (except for BASH, which is always set by the calling BASH).
45773      if test "xJTREGEXE" != xBASH; then
45774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45775$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45776      fi
45777      # Try to locate tool using the code snippet
45778      for ac_prog in jtreg
45779do
45780  # Extract the first word of "$ac_prog", so it can be a program name with args.
45781set dummy $ac_prog; ac_word=$2
45782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45783$as_echo_n "checking for $ac_word... " >&6; }
45784if ${ac_cv_path_JTREGEXE+:} false; then :
45785  $as_echo_n "(cached) " >&6
45786else
45787  case $JTREGEXE in
45788  [\\/]* | ?:[\\/]*)
45789  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45790  ;;
45791  *)
45792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45793for as_dir in $PATH
45794do
45795  IFS=$as_save_IFS
45796  test -z "$as_dir" && as_dir=.
45797    for ac_exec_ext in '' $ac_executable_extensions; do
45798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45799    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45801    break 2
45802  fi
45803done
45804  done
45805IFS=$as_save_IFS
45806
45807  ;;
45808esac
45809fi
45810JTREGEXE=$ac_cv_path_JTREGEXE
45811if test -n "$JTREGEXE"; then
45812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45813$as_echo "$JTREGEXE" >&6; }
45814else
45815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45816$as_echo "no" >&6; }
45817fi
45818
45819
45820  test -n "$JTREGEXE" && break
45821done
45822
45823    else
45824      # If it succeeded, then it was overridden by the user. We will use it
45825      # for the tool.
45826
45827      # First remove it from the list of overridden variables, so we can test
45828      # for unknown variables in the end.
45829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45830
45831      # Check if we try to supply an empty value
45832      if test "x$JTREGEXE" = x; then
45833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45834$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45836$as_echo_n "checking for JTREGEXE... " >&6; }
45837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45838$as_echo "disabled" >&6; }
45839      else
45840        # Check if the provided tool contains a complete path.
45841        tool_specified="$JTREGEXE"
45842        tool_basename="${tool_specified##*/}"
45843        if test "x$tool_basename" = "x$tool_specified"; then
45844          # A command without a complete path is provided, search $PATH.
45845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45846$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45847          # Extract the first word of "$tool_basename", so it can be a program name with args.
45848set dummy $tool_basename; ac_word=$2
45849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45850$as_echo_n "checking for $ac_word... " >&6; }
45851if ${ac_cv_path_JTREGEXE+:} false; then :
45852  $as_echo_n "(cached) " >&6
45853else
45854  case $JTREGEXE in
45855  [\\/]* | ?:[\\/]*)
45856  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45857  ;;
45858  *)
45859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45860for as_dir in $PATH
45861do
45862  IFS=$as_save_IFS
45863  test -z "$as_dir" && as_dir=.
45864    for ac_exec_ext in '' $ac_executable_extensions; do
45865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45866    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45868    break 2
45869  fi
45870done
45871  done
45872IFS=$as_save_IFS
45873
45874  ;;
45875esac
45876fi
45877JTREGEXE=$ac_cv_path_JTREGEXE
45878if test -n "$JTREGEXE"; then
45879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45880$as_echo "$JTREGEXE" >&6; }
45881else
45882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45883$as_echo "no" >&6; }
45884fi
45885
45886
45887          if test "x$JTREGEXE" = x; then
45888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45889          fi
45890        else
45891          # Otherwise we believe it is a complete path. Use it as it is.
45892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45893$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45895$as_echo_n "checking for JTREGEXE... " >&6; }
45896          if test ! -x "$tool_specified"; then
45897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45898$as_echo "not found" >&6; }
45899            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45900          fi
45901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45902$as_echo "$tool_specified" >&6; }
45903        fi
45904      fi
45905    fi
45906
45907  fi
45908
45909
45910
45911  if test "x$JTREGEXE" = x; then
45912    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45913  fi
45914
45915
45916      JT_HOME="`$DIRNAME $JTREGEXE`"
45917    fi
45918  fi
45919
45920
45921
45922
45923
45924
45925  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45926  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45927  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45928    COMPILER_TARGET_BITS_FLAG="-q"
45929    COMPILER_COMMAND_FILE_FLAG="-f"
45930  else
45931    COMPILER_TARGET_BITS_FLAG="-m"
45932    COMPILER_COMMAND_FILE_FLAG="@"
45933  fi
45934
45935
45936
45937  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45938  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45939    ARFLAGS="-r"
45940  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45941    ARFLAGS="-X64"
45942  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45943    # lib.exe is used as AR to create static libraries.
45944    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45945  else
45946    ARFLAGS=""
45947  fi
45948
45949
45950  ## Setup strip.
45951  # FIXME: should this really be per platform, or should it be per toolchain type?
45952  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45953  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45954  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45955    STRIPFLAGS="-g"
45956  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45957    STRIPFLAGS="-x"
45958  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45959    STRIPFLAGS="-S"
45960  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45961    STRIPFLAGS="-X32_64"
45962  fi
45963
45964
45965
45966  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45967    CC_OUT_OPTION=-Fo
45968    EXE_OUT_OPTION=-out:
45969    LD_OUT_OPTION=-out:
45970    AR_OUT_OPTION=-out:
45971  else
45972    # The option used to specify the target .o,.a or .so file.
45973    # When compiling, how to specify the to be created object file.
45974    CC_OUT_OPTION='-o$(SPACE)'
45975    # When linking, how to specify the to be created executable.
45976    EXE_OUT_OPTION='-o$(SPACE)'
45977    # When linking, how to specify the to be created dynamically linkable library.
45978    LD_OUT_OPTION='-o$(SPACE)'
45979    # When archiving, how to specify the to be create static archive for object files.
45980    AR_OUT_OPTION='rcs$(SPACE)'
45981  fi
45982
45983
45984
45985
45986
45987  # On Windows, we need to set RC flags.
45988  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45989    RC_FLAGS="-nologo -l0x409"
45990    if test "x$VARIANT" = xOPT; then
45991      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45992    fi
45993
45994    # The version variables used to create RC_FLAGS may be overridden
45995    # in a custom configure script, or possibly the command line.
45996    # Let those variables be expanded at make time in spec.gmk.
45997    # The \$ are escaped to the shell, and the $(...) variables
45998    # are evaluated by make.
45999    RC_FLAGS="$RC_FLAGS \
46000        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
46001        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
46002        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
46003        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
46004        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
46005        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
46006        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
46007  fi
46008
46009
46010  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46011    # silence copyright notice and other headers.
46012    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
46013  fi
46014
46015
46016# FIXME: Currently we must test this after toolchain but before flags. Fix!
46017
46018# Now we can test some aspects on the target using configure macros.
46019
46020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46021$as_echo_n "checking for ANSI C header files... " >&6; }
46022if ${ac_cv_header_stdc+:} false; then :
46023  $as_echo_n "(cached) " >&6
46024else
46025  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46026/* end confdefs.h.  */
46027#include <stdlib.h>
46028#include <stdarg.h>
46029#include <string.h>
46030#include <float.h>
46031
46032int
46033main ()
46034{
46035
46036  ;
46037  return 0;
46038}
46039_ACEOF
46040if ac_fn_cxx_try_compile "$LINENO"; then :
46041  ac_cv_header_stdc=yes
46042else
46043  ac_cv_header_stdc=no
46044fi
46045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46046
46047if test $ac_cv_header_stdc = yes; then
46048  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46050/* end confdefs.h.  */
46051#include <string.h>
46052
46053_ACEOF
46054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46055  $EGREP "memchr" >/dev/null 2>&1; then :
46056
46057else
46058  ac_cv_header_stdc=no
46059fi
46060rm -f conftest*
46061
46062fi
46063
46064if test $ac_cv_header_stdc = yes; then
46065  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46067/* end confdefs.h.  */
46068#include <stdlib.h>
46069
46070_ACEOF
46071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46072  $EGREP "free" >/dev/null 2>&1; then :
46073
46074else
46075  ac_cv_header_stdc=no
46076fi
46077rm -f conftest*
46078
46079fi
46080
46081if test $ac_cv_header_stdc = yes; then
46082  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46083  if test "$cross_compiling" = yes; then :
46084  :
46085else
46086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46087/* end confdefs.h.  */
46088#include <ctype.h>
46089#include <stdlib.h>
46090#if ((' ' & 0x0FF) == 0x020)
46091# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46092# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46093#else
46094# define ISLOWER(c) \
46095		   (('a' <= (c) && (c) <= 'i') \
46096		     || ('j' <= (c) && (c) <= 'r') \
46097		     || ('s' <= (c) && (c) <= 'z'))
46098# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46099#endif
46100
46101#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46102int
46103main ()
46104{
46105  int i;
46106  for (i = 0; i < 256; i++)
46107    if (XOR (islower (i), ISLOWER (i))
46108	|| toupper (i) != TOUPPER (i))
46109      return 2;
46110  return 0;
46111}
46112_ACEOF
46113if ac_fn_cxx_try_run "$LINENO"; then :
46114
46115else
46116  ac_cv_header_stdc=no
46117fi
46118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46119  conftest.$ac_objext conftest.beam conftest.$ac_ext
46120fi
46121
46122fi
46123fi
46124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46125$as_echo "$ac_cv_header_stdc" >&6; }
46126if test $ac_cv_header_stdc = yes; then
46127
46128$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46129
46130fi
46131
46132# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46133for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46134		  inttypes.h stdint.h unistd.h
46135do :
46136  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46137ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46138"
46139if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46140  cat >>confdefs.h <<_ACEOF
46141#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46142_ACEOF
46143
46144fi
46145
46146done
46147
46148
46149
46150  ###############################################################################
46151  #
46152  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46153  # (The JVM can use 32 or 64 bit Java pointers but that decision
46154  # is made at runtime.)
46155  #
46156
46157  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46158    # Always specify -m flag on Solaris
46159    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46160
46161  # When we add flags to the "official" CFLAGS etc, we need to
46162  # keep track of these additions in ADDED_CFLAGS etc. These
46163  # will later be checked to make sure only controlled additions
46164  # have been made to CFLAGS etc.
46165  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46166  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46167  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46168
46169  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46170  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46171  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46172
46173  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46174  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46175  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46176
46177  elif test "x$COMPILE_TYPE" = xreduced; then
46178    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46179      # Specify -m if running reduced on unix platforms
46180
46181  # When we add flags to the "official" CFLAGS etc, we need to
46182  # keep track of these additions in ADDED_CFLAGS etc. These
46183  # will later be checked to make sure only controlled additions
46184  # have been made to CFLAGS etc.
46185  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46186  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46187  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46188
46189  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46190  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46191  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46192
46193  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46194  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46195  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46196
46197    fi
46198  fi
46199
46200  # Make compilation sanity check
46201  for ac_header in stdio.h
46202do :
46203  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46204if test "x$ac_cv_header_stdio_h" = xyes; then :
46205  cat >>confdefs.h <<_ACEOF
46206#define HAVE_STDIO_H 1
46207_ACEOF
46208
46209else
46210
46211    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46212$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46213    if test "x$COMPILE_TYPE" = xreduced; then
46214
46215  # Print a helpful message on how to acquire the necessary build dependency.
46216  # reduced is the help tag: freetype, cups, alsa etc
46217  MISSING_DEPENDENCY=reduced
46218
46219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46220    cygwin_help $MISSING_DEPENDENCY
46221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46222    msys_help $MISSING_DEPENDENCY
46223  else
46224    PKGHANDLER_COMMAND=
46225
46226    case $PKGHANDLER in
46227      apt-get)
46228        apt_help     $MISSING_DEPENDENCY ;;
46229      yum)
46230        yum_help     $MISSING_DEPENDENCY ;;
46231      port)
46232        port_help    $MISSING_DEPENDENCY ;;
46233      pkgutil)
46234        pkgutil_help $MISSING_DEPENDENCY ;;
46235      pkgadd)
46236        pkgadd_help  $MISSING_DEPENDENCY ;;
46237    esac
46238
46239    if test "x$PKGHANDLER_COMMAND" != x; then
46240      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46241    fi
46242  fi
46243
46244      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46245$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46246    elif test "x$COMPILE_TYPE" = xcross; then
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46248$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46249    fi
46250    as_fn_error $? "Cannot continue." "$LINENO" 5
46251
46252fi
46253
46254done
46255
46256
46257  # The cast to long int works around a bug in the HP C Compiler
46258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46260# This bug is HP SR number 8606223364.
46261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46262$as_echo_n "checking size of int *... " >&6; }
46263if ${ac_cv_sizeof_int_p+:} false; then :
46264  $as_echo_n "(cached) " >&6
46265else
46266  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46267
46268else
46269  if test "$ac_cv_type_int_p" = yes; then
46270     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46272as_fn_error 77 "cannot compute sizeof (int *)
46273See \`config.log' for more details" "$LINENO" 5; }
46274   else
46275     ac_cv_sizeof_int_p=0
46276   fi
46277fi
46278
46279fi
46280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46281$as_echo "$ac_cv_sizeof_int_p" >&6; }
46282
46283
46284
46285cat >>confdefs.h <<_ACEOF
46286#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46287_ACEOF
46288
46289
46290
46291  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46292  if test "x$ac_cv_sizeof_int_p" = x; then
46293    # The test failed, lets stick to the assumed value.
46294    { $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
46295$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46296  else
46297    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46298
46299    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46300      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46301      # Let's try to implicitely set the compilers target architecture and retry the test
46302      { $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
46303$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;}
46304      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46305$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46306
46307  # When we add flags to the "official" CFLAGS etc, we need to
46308  # keep track of these additions in ADDED_CFLAGS etc. These
46309  # will later be checked to make sure only controlled additions
46310  # have been made to CFLAGS etc.
46311  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46312  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46313  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46314
46315  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46316  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46317  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46318
46319  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46320  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46321  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46322
46323
46324      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46325      unset ac_cv_sizeof_int_p
46326      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46327      cat >>confdefs.h <<_ACEOF
46328#undef SIZEOF_INT_P
46329_ACEOF
46330
46331      # The cast to long int works around a bug in the HP C Compiler
46332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46334# This bug is HP SR number 8606223364.
46335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46336$as_echo_n "checking size of int *... " >&6; }
46337if ${ac_cv_sizeof_int_p+:} false; then :
46338  $as_echo_n "(cached) " >&6
46339else
46340  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46341
46342else
46343  if test "$ac_cv_type_int_p" = yes; then
46344     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46346as_fn_error 77 "cannot compute sizeof (int *)
46347See \`config.log' for more details" "$LINENO" 5; }
46348   else
46349     ac_cv_sizeof_int_p=0
46350   fi
46351fi
46352
46353fi
46354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46355$as_echo "$ac_cv_sizeof_int_p" >&6; }
46356
46357
46358
46359cat >>confdefs.h <<_ACEOF
46360#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46361_ACEOF
46362
46363
46364
46365      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46366
46367      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46368        { $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
46369$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;}
46370        if test "x$COMPILE_TYPE" = xreduced; then
46371
46372  # Print a helpful message on how to acquire the necessary build dependency.
46373  # reduced is the help tag: freetype, cups, alsa etc
46374  MISSING_DEPENDENCY=reduced
46375
46376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46377    cygwin_help $MISSING_DEPENDENCY
46378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46379    msys_help $MISSING_DEPENDENCY
46380  else
46381    PKGHANDLER_COMMAND=
46382
46383    case $PKGHANDLER in
46384      apt-get)
46385        apt_help     $MISSING_DEPENDENCY ;;
46386      yum)
46387        yum_help     $MISSING_DEPENDENCY ;;
46388      port)
46389        port_help    $MISSING_DEPENDENCY ;;
46390      pkgutil)
46391        pkgutil_help $MISSING_DEPENDENCY ;;
46392      pkgadd)
46393        pkgadd_help  $MISSING_DEPENDENCY ;;
46394    esac
46395
46396    if test "x$PKGHANDLER_COMMAND" != x; then
46397      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46398    fi
46399  fi
46400
46401          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46402$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46403        elif test "x$COMPILE_TYPE" = xcross; then
46404          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46405$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46406        fi
46407        as_fn_error $? "Cannot continue." "$LINENO" 5
46408      fi
46409    fi
46410  fi
46411
46412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46413$as_echo_n "checking for target address size... " >&6; }
46414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46415$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46416
46417
46418  ###############################################################################
46419  #
46420  # Is the target little of big endian?
46421  #
46422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46423$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46424if ${ac_cv_c_bigendian+:} false; then :
46425  $as_echo_n "(cached) " >&6
46426else
46427  ac_cv_c_bigendian=unknown
46428    # See if we're dealing with a universal compiler.
46429    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46430/* end confdefs.h.  */
46431#ifndef __APPLE_CC__
46432	       not a universal capable compiler
46433	     #endif
46434	     typedef int dummy;
46435
46436_ACEOF
46437if ac_fn_cxx_try_compile "$LINENO"; then :
46438
46439	# Check for potential -arch flags.  It is not universal unless
46440	# there are at least two -arch flags with different values.
46441	ac_arch=
46442	ac_prev=
46443	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46444	 if test -n "$ac_prev"; then
46445	   case $ac_word in
46446	     i?86 | x86_64 | ppc | ppc64)
46447	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46448		 ac_arch=$ac_word
46449	       else
46450		 ac_cv_c_bigendian=universal
46451		 break
46452	       fi
46453	       ;;
46454	   esac
46455	   ac_prev=
46456	 elif test "x$ac_word" = "x-arch"; then
46457	   ac_prev=arch
46458	 fi
46459       done
46460fi
46461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46462    if test $ac_cv_c_bigendian = unknown; then
46463      # See if sys/param.h defines the BYTE_ORDER macro.
46464      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46465/* end confdefs.h.  */
46466#include <sys/types.h>
46467	     #include <sys/param.h>
46468
46469int
46470main ()
46471{
46472#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46473		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46474		     && LITTLE_ENDIAN)
46475	      bogus endian macros
46476	     #endif
46477
46478  ;
46479  return 0;
46480}
46481_ACEOF
46482if ac_fn_cxx_try_compile "$LINENO"; then :
46483  # It does; now see whether it defined to BIG_ENDIAN or not.
46484	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46485/* end confdefs.h.  */
46486#include <sys/types.h>
46487		#include <sys/param.h>
46488
46489int
46490main ()
46491{
46492#if BYTE_ORDER != BIG_ENDIAN
46493		 not big endian
46494		#endif
46495
46496  ;
46497  return 0;
46498}
46499_ACEOF
46500if ac_fn_cxx_try_compile "$LINENO"; then :
46501  ac_cv_c_bigendian=yes
46502else
46503  ac_cv_c_bigendian=no
46504fi
46505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46506fi
46507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46508    fi
46509    if test $ac_cv_c_bigendian = unknown; then
46510      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46511      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46512/* end confdefs.h.  */
46513#include <limits.h>
46514
46515int
46516main ()
46517{
46518#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46519	      bogus endian macros
46520	     #endif
46521
46522  ;
46523  return 0;
46524}
46525_ACEOF
46526if ac_fn_cxx_try_compile "$LINENO"; then :
46527  # It does; now see whether it defined to _BIG_ENDIAN or not.
46528	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46529/* end confdefs.h.  */
46530#include <limits.h>
46531
46532int
46533main ()
46534{
46535#ifndef _BIG_ENDIAN
46536		 not big endian
46537		#endif
46538
46539  ;
46540  return 0;
46541}
46542_ACEOF
46543if ac_fn_cxx_try_compile "$LINENO"; then :
46544  ac_cv_c_bigendian=yes
46545else
46546  ac_cv_c_bigendian=no
46547fi
46548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46549fi
46550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46551    fi
46552    if test $ac_cv_c_bigendian = unknown; then
46553      # Compile a test program.
46554      if test "$cross_compiling" = yes; then :
46555  # Try to guess by grepping values from an object file.
46556	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46557/* end confdefs.h.  */
46558short int ascii_mm[] =
46559		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46560		short int ascii_ii[] =
46561		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46562		int use_ascii (int i) {
46563		  return ascii_mm[i] + ascii_ii[i];
46564		}
46565		short int ebcdic_ii[] =
46566		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46567		short int ebcdic_mm[] =
46568		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46569		int use_ebcdic (int i) {
46570		  return ebcdic_mm[i] + ebcdic_ii[i];
46571		}
46572		extern int foo;
46573
46574int
46575main ()
46576{
46577return use_ascii (foo) == use_ebcdic (foo);
46578  ;
46579  return 0;
46580}
46581_ACEOF
46582if ac_fn_cxx_try_compile "$LINENO"; then :
46583  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46584	      ac_cv_c_bigendian=yes
46585	    fi
46586	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46587	      if test "$ac_cv_c_bigendian" = unknown; then
46588		ac_cv_c_bigendian=no
46589	      else
46590		# finding both strings is unlikely to happen, but who knows?
46591		ac_cv_c_bigendian=unknown
46592	      fi
46593	    fi
46594fi
46595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46596else
46597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46598/* end confdefs.h.  */
46599$ac_includes_default
46600int
46601main ()
46602{
46603
46604	     /* Are we little or big endian?  From Harbison&Steele.  */
46605	     union
46606	     {
46607	       long int l;
46608	       char c[sizeof (long int)];
46609	     } u;
46610	     u.l = 1;
46611	     return u.c[sizeof (long int) - 1] == 1;
46612
46613  ;
46614  return 0;
46615}
46616_ACEOF
46617if ac_fn_cxx_try_run "$LINENO"; then :
46618  ac_cv_c_bigendian=no
46619else
46620  ac_cv_c_bigendian=yes
46621fi
46622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46623  conftest.$ac_objext conftest.beam conftest.$ac_ext
46624fi
46625
46626    fi
46627fi
46628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46629$as_echo "$ac_cv_c_bigendian" >&6; }
46630 case $ac_cv_c_bigendian in #(
46631   yes)
46632     ENDIAN="big";; #(
46633   no)
46634     ENDIAN="little" ;; #(
46635   universal)
46636     ENDIAN="universal_endianness"
46637     ;; #(
46638   *)
46639     ENDIAN="unknown" ;;
46640 esac
46641
46642
46643  if test "x$ENDIAN" = xuniversal_endianness; then
46644    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46645  fi
46646  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46647    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
46648  fi
46649
46650
46651# Configure flags for the tools
46652
46653  ###############################################################################
46654  #
46655  # How to compile shared libraries.
46656  #
46657
46658  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46659    PICFLAG="-fPIC"
46660    C_FLAG_REORDER=''
46661    CXX_FLAG_REORDER=''
46662
46663    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46664      # Linking is different on MacOSX
46665      if test "x$STATIC_BUILD" = xtrue; then
46666        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46667      else
46668        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46669      fi
46670      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46671      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46672      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46673      SET_SHARED_LIBRARY_MAPFILE=''
46674    else
46675      # Default works for linux, might work on other platforms as well.
46676      SHARED_LIBRARY_FLAGS='-shared'
46677      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46678      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46679      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46680      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46681    fi
46682  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46683    C_FLAG_REORDER=''
46684    CXX_FLAG_REORDER=''
46685
46686    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46687      # Linking is different on MacOSX
46688      PICFLAG=''
46689      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46690      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46691      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46692      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46693      SET_SHARED_LIBRARY_MAPFILE=''
46694    else
46695      # Default works for linux, might work on other platforms as well.
46696      PICFLAG='-fPIC'
46697      SHARED_LIBRARY_FLAGS='-shared'
46698      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46699      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46700      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46701      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46702    fi
46703  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46704    PICFLAG="-KPIC"
46705    C_FLAG_REORDER='-xF'
46706    CXX_FLAG_REORDER='-xF'
46707    SHARED_LIBRARY_FLAGS="-G"
46708    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46709    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46710    SET_SHARED_LIBRARY_NAME='-h $1'
46711    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46712  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46713    PICFLAG="-qpic=large"
46714    C_FLAG_REORDER=''
46715    CXX_FLAG_REORDER=''
46716    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46717    SET_EXECUTABLE_ORIGIN=""
46718    SET_SHARED_LIBRARY_ORIGIN=''
46719    SET_SHARED_LIBRARY_NAME=''
46720    SET_SHARED_LIBRARY_MAPFILE=''
46721  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46722    PICFLAG=""
46723    C_FLAG_REORDER=''
46724    CXX_FLAG_REORDER=''
46725    SHARED_LIBRARY_FLAGS="-dll"
46726    SET_EXECUTABLE_ORIGIN=''
46727    SET_SHARED_LIBRARY_ORIGIN=''
46728    SET_SHARED_LIBRARY_NAME=''
46729    SET_SHARED_LIBRARY_MAPFILE=''
46730  fi
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46741    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46742    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46743    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46744  fi
46745  # The (cross) compiler is now configured, we can now test capabilities
46746  # of the target platform.
46747
46748
46749
46750  ###############################################################################
46751  #
46752  # Setup the opt flags for different compilers
46753  # and different operating systems.
46754  #
46755
46756  # FIXME: this was indirectly the old default, but just inherited.
46757  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46758  #   C_FLAG_DEPS="-MMD -MF"
46759  # fi
46760
46761  # Generate make dependency files
46762  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46763    C_FLAG_DEPS="-MMD -MF"
46764  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46765    C_FLAG_DEPS="-MMD -MF"
46766  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46767    C_FLAG_DEPS="-xMMD -xMF"
46768  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46769    C_FLAG_DEPS="-qmakedep=gcc -MF"
46770  fi
46771  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46772
46773
46774
46775  # Debug symbols
46776  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46777    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46778      # reduce from default "-g2" option to save space
46779      CFLAGS_DEBUG_SYMBOLS="-g1"
46780      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46781    else
46782      CFLAGS_DEBUG_SYMBOLS="-g"
46783      CXXFLAGS_DEBUG_SYMBOLS="-g"
46784    fi
46785  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46786    CFLAGS_DEBUG_SYMBOLS="-g"
46787    CXXFLAGS_DEBUG_SYMBOLS="-g"
46788  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46789    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46790    # FIXME: likely a bug, this disables debug symbols rather than enables them
46791    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46792  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46793    CFLAGS_DEBUG_SYMBOLS="-g"
46794    CXXFLAGS_DEBUG_SYMBOLS="-g"
46795  fi
46796
46797
46798
46799  # bounds, memory and behavior checking options
46800  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46801    case $DEBUG_LEVEL in
46802    release )
46803      # no adjustment
46804      ;;
46805    fastdebug )
46806      # no adjustment
46807      ;;
46808    slowdebug )
46809      # Add runtime stack smashing and undefined behavior checks.
46810      # Not all versions of gcc support -fstack-protector
46811      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46812
46813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46814$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46815  supports=yes
46816
46817  saved_cflags="$CFLAGS"
46818  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46819  ac_ext=c
46820ac_cpp='$CPP $CPPFLAGS'
46821ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46822ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46823ac_compiler_gnu=$ac_cv_c_compiler_gnu
46824
46825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46826/* end confdefs.h.  */
46827int i;
46828_ACEOF
46829if ac_fn_c_try_compile "$LINENO"; then :
46830
46831else
46832  supports=no
46833fi
46834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46835  ac_ext=cpp
46836ac_cpp='$CXXCPP $CPPFLAGS'
46837ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46838ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46839ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46840
46841  CFLAGS="$saved_cflags"
46842
46843  saved_cxxflags="$CXXFLAGS"
46844  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46852/* end confdefs.h.  */
46853int i;
46854_ACEOF
46855if ac_fn_cxx_try_compile "$LINENO"; then :
46856
46857else
46858  supports=no
46859fi
46860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46861  ac_ext=cpp
46862ac_cpp='$CXXCPP $CPPFLAGS'
46863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46866
46867  CXXFLAGS="$saved_cxxflags"
46868
46869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46870$as_echo "$supports" >&6; }
46871  if test "x$supports" = "xyes" ; then
46872    :
46873  else
46874    STACK_PROTECTOR_CFLAG=""
46875  fi
46876
46877
46878      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46879      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46880      ;;
46881    esac
46882  fi
46883
46884  # Optimization levels
46885  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46886    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46887
46888    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46889      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46890      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46891      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46892      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46893      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46894      C_O_FLAG_NONE="-xregs=no%frameptr"
46895      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46896      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46897      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46898      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46899      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46900      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46901        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46902        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46903      fi
46904    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46905      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46906      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46907      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46908      C_O_FLAG_DEBUG=""
46909      C_O_FLAG_NONE=""
46910      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46911      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46912      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46913      C_O_FLAG_DEBUG=""
46914      CXX_O_FLAG_NONE=""
46915    fi
46916  else
46917    # The remaining toolchains share opt flags between CC and CXX;
46918    # setup for C and duplicate afterwards.
46919    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46920      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46921        # On MacOSX we optimize for size, something
46922        # we should do for all platforms?
46923        C_O_FLAG_HIGHEST="-Os"
46924        C_O_FLAG_HI="-Os"
46925        C_O_FLAG_NORM="-Os"
46926      else
46927        C_O_FLAG_HIGHEST="-O3"
46928        C_O_FLAG_HI="-O3"
46929        C_O_FLAG_NORM="-O2"
46930      fi
46931      C_O_FLAG_DEBUG="-O0"
46932      C_O_FLAG_NONE="-O0"
46933    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46934      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46935        # On MacOSX we optimize for size, something
46936        # we should do for all platforms?
46937        C_O_FLAG_HIGHEST="-Os"
46938        C_O_FLAG_HI="-Os"
46939        C_O_FLAG_NORM="-Os"
46940      else
46941        C_O_FLAG_HIGHEST="-O3"
46942        C_O_FLAG_HI="-O3"
46943        C_O_FLAG_NORM="-O2"
46944      fi
46945      C_O_FLAG_DEBUG="-O0"
46946      C_O_FLAG_NONE="-O0"
46947    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46948      C_O_FLAG_HIGHEST="-O3"
46949      C_O_FLAG_HI="-O3 -qstrict"
46950      C_O_FLAG_NORM="-O2"
46951      C_O_FLAG_DEBUG="-qnoopt"
46952      C_O_FLAG_NONE="-qnoop"
46953    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46954      C_O_FLAG_HIGHEST="-O2"
46955      C_O_FLAG_HI="-O1"
46956      C_O_FLAG_NORM="-O1"
46957      C_O_FLAG_DEBUG="-Od"
46958      C_O_FLAG_NONE="-Od"
46959    fi
46960    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46961    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46962    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46963    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46964    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46965  fi
46966
46967  # Adjust optimization flags according to debug level.
46968  case $DEBUG_LEVEL in
46969    release )
46970      # no adjustment
46971      ;;
46972    fastdebug )
46973      # Not quite so much optimization
46974      C_O_FLAG_HI="$C_O_FLAG_NORM"
46975      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46976      ;;
46977    slowdebug )
46978      # Disable optimization
46979      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46980      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46981      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46982      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46983      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46984      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46985      ;;
46986  esac
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000  # Special extras...
47001  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47002    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47003      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47004      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47005    fi
47006    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47007    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47008  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47009    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47010    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47011  fi
47012
47013  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
47014  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
47015  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
47016
47017  ###############################################################################
47018  #
47019  # Now setup the CFLAGS and LDFLAGS for the JDK build.
47020  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
47021  #
47022
47023  # Setup compiler/platform specific flags into
47024  #    CFLAGS_JDK    - C Compiler flags
47025  #    CXXFLAGS_JDK  - C++ Compiler flags
47026  #    COMMON_CCXXFLAGS_JDK - common to C and C++
47027  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47028    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47029      # Force compatibility with i586 on 32 bit intel platforms.
47030      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47031    fi
47032    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47033        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47034    case $OPENJDK_TARGET_CPU_ARCH in
47035      arm )
47036        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47037        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47038        ;;
47039      ppc )
47040        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47041        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47042        ;;
47043      * )
47044        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47045        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47046        ;;
47047    esac
47048  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47049    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47050	    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47051	      # Force compatibility with i586 on 32 bit intel platforms.
47052	      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47053	    fi
47054	    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47055	        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47056	    case $OPENJDK_TARGET_CPU_ARCH in
47057	      ppc )
47058	        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47059	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47060	        ;;
47061	      * )
47062	        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47063	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47064	        ;;
47065	    esac
47066    fi
47067  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47068    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47069    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47070      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47071    fi
47072
47073    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47074    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47075  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47076    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47077    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47078  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47079    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47080        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47081        -DWIN32_LEAN_AND_MEAN \
47082        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47083        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47084        -DWIN32 -DIAL"
47085    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47086      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47087    else
47088      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47089    fi
47090    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47091    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47092    # studio.
47093    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47094      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47095          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47096    fi
47097  fi
47098
47099  ###############################################################################
47100
47101  # Adjust flags according to debug level.
47102  case $DEBUG_LEVEL in
47103    fastdebug | slowdebug )
47104      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47105      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47106      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47107      ;;
47108    release )
47109      ;;
47110    * )
47111      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47112      ;;
47113  esac
47114
47115  # Setup LP64
47116  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47117
47118  # Set some common defines. These works for all compilers, but assume
47119  # -D is universally accepted.
47120
47121  # Setup endianness
47122  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47123    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47124    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47125    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47126    #   Note: -Dmacro         is the same as    #define macro 1
47127    #         -Dmacro=        is the same as    #define macro
47128    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47129      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47130    else
47131      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47132    fi
47133  else
47134    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47135    # are defined in the system?
47136    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47137      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47138    else
47139      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47140    fi
47141  fi
47142
47143  # Setup target OS define. Use OS target name but in upper case.
47144  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47145  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47146
47147  # Setup target CPU
47148  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47149
47150  # Setup debug/release defines
47151  if test "x$DEBUG_LEVEL" = xrelease; then
47152    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47153    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47154      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47155    fi
47156  else
47157    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47158  fi
47159
47160  # Set some additional per-OS defines.
47161  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47162    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47163  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47164    # FIXME: PPC64 should not be here.
47165    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47166  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47167    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47168  fi
47169
47170  # Additional macosx handling
47171  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47172    # Setting these parameters makes it an error to link to macosx APIs that are
47173    # newer than the given OS version and makes the linked binaries compatible
47174    # even if built on a newer version of the OS.
47175    # The expected format is X.Y.Z
47176    MACOSX_VERSION_MIN=10.7.0
47177
47178
47179    # The macro takes the version with no dots, ex: 1070
47180    # Let the flags variables get resolved in make for easier override on make
47181    # command line.
47182    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47183    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47184  fi
47185
47186  # Setup some hard coded includes
47187  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47188      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47189      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47190      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47191      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47192      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47193
47194  # The shared libraries are compiled using the picflag.
47195  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47196  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47197
47198  # Executable flags
47199  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47200  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47201
47202
47203
47204
47205
47206
47207  # Flags for compiling test libraries
47208  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47209  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47210
47211  # Flags for compiling test executables
47212  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47213  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47214
47215
47216
47217
47218
47219
47220  # Setup LDFLAGS et al.
47221  #
47222
47223  # Now this is odd. The JDK native libraries have to link against libjvm.so
47224  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47225  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47226  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47227  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47228  # libraries will link to whatever is in memory. Yuck.
47229  #
47230  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47231  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47232    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47233    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47234      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47235    fi
47236    # TODO: make -debug optional "--disable-full-debug-symbols"
47237    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47238  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47239    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47240    # We have previously set HAS_GNU_HASH if this is the case
47241    if test -n "$HAS_GNU_HASH"; then
47242      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
47243    fi
47244    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47245      # And since we now know that the linker is gnu, then add -z defs, to forbid
47246      # undefined symbols in object files.
47247      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
47248      case $DEBUG_LEVEL in
47249        release )
47250          # tell linker to optimize libraries.
47251          # Should this be supplied to the OSS linker as well?
47252          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
47253          ;;
47254        slowdebug )
47255          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47256            # do relocations at load
47257            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47258            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47259          fi
47260          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47261            # mark relocations read only
47262            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47263            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47264          fi
47265          ;;
47266        fastdebug )
47267          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47268            # mark relocations read only
47269            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47270            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47271          fi
47272          ;;
47273        * )
47274          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47275          ;;
47276        esac
47277    fi
47278  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47279    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
47280    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47281  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47282    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47283  fi
47284
47285  # Customize LDFLAGS for executables
47286
47287  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47288
47289  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47290    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47291      LDFLAGS_STACK_SIZE=1048576
47292    else
47293      LDFLAGS_STACK_SIZE=327680
47294    fi
47295    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47296  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47297    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
47298  fi
47299
47300  # Customize LDFLAGS for libs
47301  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47302
47303  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
47304  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47305    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47306        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47307    JDKLIB_LIBS=""
47308  else
47309    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47310        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47311
47312    # On some platforms (mac) the linker warns about non existing -L dirs.
47313    # Add server first if available. Linking aginst client does not always produce the same results.
47314    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47315    # Default to server for other variants.
47316    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47317      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47318    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47319      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47320    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47321      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47322    else
47323      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47324    fi
47325
47326    JDKLIB_LIBS="-ljava -ljvm"
47327    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47328      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47329    fi
47330  fi
47331
47332
47333
47334
47335
47336
47337
47338  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47339  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47340
47341
47342
47343
47344
47345  # Some Zero and Shark settings.
47346  # ZERO_ARCHFLAG tells the compiler which mode to build for
47347  case "${OPENJDK_TARGET_CPU}" in
47348    s390)
47349      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47350      ;;
47351    *)
47352      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47353  esac
47354
47355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47356$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47357  supports=yes
47358
47359  saved_cflags="$CFLAGS"
47360  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47361  ac_ext=c
47362ac_cpp='$CPP $CPPFLAGS'
47363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47365ac_compiler_gnu=$ac_cv_c_compiler_gnu
47366
47367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47368/* end confdefs.h.  */
47369int i;
47370_ACEOF
47371if ac_fn_c_try_compile "$LINENO"; then :
47372
47373else
47374  supports=no
47375fi
47376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47377  ac_ext=cpp
47378ac_cpp='$CXXCPP $CPPFLAGS'
47379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47382
47383  CFLAGS="$saved_cflags"
47384
47385  saved_cxxflags="$CXXFLAGS"
47386  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47387  ac_ext=cpp
47388ac_cpp='$CXXCPP $CPPFLAGS'
47389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47392
47393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47394/* end confdefs.h.  */
47395int i;
47396_ACEOF
47397if ac_fn_cxx_try_compile "$LINENO"; then :
47398
47399else
47400  supports=no
47401fi
47402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47403  ac_ext=cpp
47404ac_cpp='$CXXCPP $CPPFLAGS'
47405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47408
47409  CXXFLAGS="$saved_cxxflags"
47410
47411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47412$as_echo "$supports" >&6; }
47413  if test "x$supports" = "xyes" ; then
47414    :
47415  else
47416    ZERO_ARCHFLAG=""
47417  fi
47418
47419
47420
47421  # Check that the compiler supports -mX (or -qX on AIX) flags
47422  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47423
47424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47425$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47426  supports=yes
47427
47428  saved_cflags="$CFLAGS"
47429  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47430  ac_ext=c
47431ac_cpp='$CPP $CPPFLAGS'
47432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47434ac_compiler_gnu=$ac_cv_c_compiler_gnu
47435
47436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47437/* end confdefs.h.  */
47438int i;
47439_ACEOF
47440if ac_fn_c_try_compile "$LINENO"; then :
47441
47442else
47443  supports=no
47444fi
47445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47446  ac_ext=cpp
47447ac_cpp='$CXXCPP $CPPFLAGS'
47448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47451
47452  CFLAGS="$saved_cflags"
47453
47454  saved_cxxflags="$CXXFLAGS"
47455  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47456  ac_ext=cpp
47457ac_cpp='$CXXCPP $CPPFLAGS'
47458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47461
47462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47463/* end confdefs.h.  */
47464int i;
47465_ACEOF
47466if ac_fn_cxx_try_compile "$LINENO"; then :
47467
47468else
47469  supports=no
47470fi
47471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47472  ac_ext=cpp
47473ac_cpp='$CXXCPP $CPPFLAGS'
47474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47477
47478  CXXFLAGS="$saved_cxxflags"
47479
47480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47481$as_echo "$supports" >&6; }
47482  if test "x$supports" = "xyes" ; then
47483    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47484  else
47485    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47486  fi
47487
47488
47489
47490  # Check whether --enable-warnings-as-errors was given.
47491if test "${enable_warnings_as_errors+set}" = set; then :
47492  enableval=$enable_warnings_as_errors;
47493fi
47494
47495
47496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47497$as_echo_n "checking if native warnings are errors... " >&6; }
47498  if test "x$enable_warnings_as_errors" = "xyes"; then
47499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47500$as_echo "yes (explicitely set)" >&6; }
47501    WARNINGS_AS_ERRORS=true
47502  elif test "x$enable_warnings_as_errors" = "xno"; then
47503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47504$as_echo "no" >&6; }
47505    WARNINGS_AS_ERRORS=false
47506  elif test "x$enable_warnings_as_errors" = "x"; then
47507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47508$as_echo "yes (default)" >&6; }
47509    WARNINGS_AS_ERRORS=true
47510  else
47511    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47512  fi
47513
47514  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47515    # Set legacy hotspot variable
47516    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47517  else
47518    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47519  fi
47520
47521
47522
47523
47524  case "${TOOLCHAIN_TYPE}" in
47525    microsoft)
47526      DISABLE_WARNING_PREFIX="-wd"
47527      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47528      ;;
47529    solstudio)
47530      DISABLE_WARNING_PREFIX="-erroff="
47531      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47532      ;;
47533    gcc)
47534      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47535
47536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47537$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47538  supports=yes
47539
47540  saved_cflags="$CFLAGS"
47541  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47542  ac_ext=c
47543ac_cpp='$CPP $CPPFLAGS'
47544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47546ac_compiler_gnu=$ac_cv_c_compiler_gnu
47547
47548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47549/* end confdefs.h.  */
47550int i;
47551_ACEOF
47552if ac_fn_c_try_compile "$LINENO"; then :
47553
47554else
47555  supports=no
47556fi
47557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47558  ac_ext=cpp
47559ac_cpp='$CXXCPP $CPPFLAGS'
47560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47563
47564  CFLAGS="$saved_cflags"
47565
47566  saved_cxxflags="$CXXFLAGS"
47567  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47568  ac_ext=cpp
47569ac_cpp='$CXXCPP $CPPFLAGS'
47570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47573
47574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47575/* end confdefs.h.  */
47576int i;
47577_ACEOF
47578if ac_fn_cxx_try_compile "$LINENO"; then :
47579
47580else
47581  supports=no
47582fi
47583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47584  ac_ext=cpp
47585ac_cpp='$CXXCPP $CPPFLAGS'
47586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47589
47590  CXXFLAGS="$saved_cxxflags"
47591
47592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47593$as_echo "$supports" >&6; }
47594  if test "x$supports" = "xyes" ; then
47595    GCC_CAN_DISABLE_WARNINGS=true
47596  else
47597    GCC_CAN_DISABLE_WARNINGS=false
47598
47599  fi
47600
47601      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47602        DISABLE_WARNING_PREFIX="-Wno-"
47603      else
47604        DISABLE_WARNING_PREFIX=
47605      fi
47606      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47607      # Repeate the check for the BUILD_CC
47608      CC_OLD="$CC"
47609      CC="$BUILD_CC"
47610
47611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47612$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47613  supports=yes
47614
47615  saved_cflags="$CFLAGS"
47616  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47617  ac_ext=c
47618ac_cpp='$CPP $CPPFLAGS'
47619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47621ac_compiler_gnu=$ac_cv_c_compiler_gnu
47622
47623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47624/* end confdefs.h.  */
47625int i;
47626_ACEOF
47627if ac_fn_c_try_compile "$LINENO"; then :
47628
47629else
47630  supports=no
47631fi
47632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47633  ac_ext=cpp
47634ac_cpp='$CXXCPP $CPPFLAGS'
47635ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47636ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47637ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47638
47639  CFLAGS="$saved_cflags"
47640
47641  saved_cxxflags="$CXXFLAGS"
47642  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47643  ac_ext=cpp
47644ac_cpp='$CXXCPP $CPPFLAGS'
47645ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47646ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47647ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47648
47649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47650/* end confdefs.h.  */
47651int i;
47652_ACEOF
47653if ac_fn_cxx_try_compile "$LINENO"; then :
47654
47655else
47656  supports=no
47657fi
47658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47659  ac_ext=cpp
47660ac_cpp='$CXXCPP $CPPFLAGS'
47661ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47662ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47663ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47664
47665  CXXFLAGS="$saved_cxxflags"
47666
47667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47668$as_echo "$supports" >&6; }
47669  if test "x$supports" = "xyes" ; then
47670    BUILD_CC_CAN_DISABLE_WARNINGS=true
47671  else
47672    BUILD_CC_CAN_DISABLE_WARNINGS=false
47673
47674  fi
47675
47676      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47677        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47678      else
47679        BUILD_CC_DISABLE_WARNING_PREFIX=
47680      fi
47681      CC="$CC_OLD"
47682      ;;
47683    clang)
47684      DISABLE_WARNING_PREFIX="-Wno-"
47685      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47686      ;;
47687  esac
47688
47689
47690
47691
47692# Setup debug symbols (need objcopy from the toolchain for that)
47693
47694  #
47695  # NATIVE_DEBUG_SYMBOLS
47696  # This must be done after the toolchain is setup, since we're looking at objcopy.
47697  #
47698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47699$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47700
47701# Check whether --with-native-debug-symbols was given.
47702if test "${with_native_debug_symbols+set}" = set; then :
47703  withval=$with_native_debug_symbols;
47704else
47705  with_native_debug_symbols="zipped"
47706fi
47707
47708  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47710$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47711
47712  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47713
47714    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47715      if test "x$OBJCOPY" = x; then
47716        # enabling of enable-debug-symbols and can't find objcopy
47717        # this is an error
47718        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47719      fi
47720    fi
47721
47722    ENABLE_DEBUG_SYMBOLS=true
47723    ZIP_DEBUGINFO_FILES=true
47724    DEBUG_BINARIES=true
47725    STRIP_POLICY=min_strip
47726  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47727    ENABLE_DEBUG_SYMBOLS=false
47728    ZIP_DEBUGINFO_FILES=false
47729    DEBUG_BINARIES=false
47730    STRIP_POLICY=no_strip
47731  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47732    ENABLE_DEBUG_SYMBOLS=false  # -g option only
47733    ZIP_DEBUGINFO_FILES=false
47734    DEBUG_BINARIES=true
47735    STRIP_POLICY=no_strip
47736    STRIP=""
47737  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47738
47739    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47740      if test "x$OBJCOPY" = x; then
47741        # enabling of enable-debug-symbols and can't find objcopy
47742        # this is an error
47743        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47744      fi
47745    fi
47746
47747    ENABLE_DEBUG_SYMBOLS=true
47748    ZIP_DEBUGINFO_FILES=false
47749    DEBUG_BINARIES=true
47750    STRIP_POLICY=min_strip
47751  else
47752    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47753  fi
47754
47755  # --enable-debug-symbols is deprecated.
47756  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47757
47758  # Check whether --enable-debug-symbols was given.
47759if test "${enable_debug_symbols+set}" = set; then :
47760  enableval=$enable_debug_symbols;
47761fi
47762
47763  if test "x$enable_debug_symbols" != x; then
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47765$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47766
47767    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47768      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47769$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47770    fi
47771
47772  fi
47773
47774
47775  # --enable-zip-debug-info is deprecated.
47776  # Please use --with-native-debug-symbols=zipped .
47777
47778  # Check whether --enable-zip-debug-info was given.
47779if test "${enable_zip_debug_info+set}" = set; then :
47780  enableval=$enable_zip_debug_info;
47781fi
47782
47783  if test "x$enable_zip_debug_info" != x; then
47784    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47785$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47786
47787    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47788      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47789$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47790    fi
47791
47792  fi
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802  # Check whether --enable-native-coverage was given.
47803if test "${enable_native_coverage+set}" = set; then :
47804  enableval=$enable_native_coverage;
47805fi
47806
47807  GCOV_ENABLED="false"
47808  if test "x$enable_native_coverage" = "xyes"; then
47809    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47811$as_echo_n "checking if native coverage is enabled... " >&6; }
47812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47813$as_echo "yes" >&6; }
47814      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47815      GCOV_LDFLAGS="-fprofile-arcs"
47816      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47817      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47818      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47819      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47820      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47821      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47822      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47823      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47824      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47825      GCOV_ENABLED="true"
47826    else
47827      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47828    fi
47829  elif test "x$enable_native_coverage" = "xno"; then
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47831$as_echo_n "checking if native coverage is enabled... " >&6; }
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47833$as_echo "no" >&6; }
47834  elif test "x$enable_native_coverage" != "x"; then
47835    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47836  fi
47837
47838
47839
47840
47841###############################################################################
47842#
47843# Check dependencies for external and internal libraries.
47844#
47845###############################################################################
47846
47847# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47848
47849  # When using cygwin or msys, we need a wrapper binary that renames
47850  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47851  # @files and rewrites these too! This wrapper binary is
47852  # called fixpath.
47853  FIXPATH=
47854  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47856$as_echo_n "checking if fixpath can be created... " >&6; }
47857    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47858    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47859    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47860    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47861      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47862      FIXPATH="$FIXPATH_BIN -c"
47863    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47864      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47865      # @ was chosen as separator to minimize risk of other tools messing around with it
47866      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47867          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47868      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47869      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47870    fi
47871    FIXPATH_SRC_W="$FIXPATH_SRC"
47872    FIXPATH_BIN_W="$FIXPATH_BIN"
47873
47874  unix_path="$FIXPATH_SRC_W"
47875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47876    windows_path=`$CYGPATH -m "$unix_path"`
47877    FIXPATH_SRC_W="$windows_path"
47878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47879    windows_path=`cmd //c echo $unix_path`
47880    FIXPATH_SRC_W="$windows_path"
47881  fi
47882
47883
47884  unix_path="$FIXPATH_BIN_W"
47885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47886    windows_path=`$CYGPATH -m "$unix_path"`
47887    FIXPATH_BIN_W="$windows_path"
47888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47889    windows_path=`cmd //c echo $unix_path`
47890    FIXPATH_BIN_W="$windows_path"
47891  fi
47892
47893    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47894    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47895    cd $FIXPATH_DIR
47896    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47897    cd $CURDIR
47898
47899    if test ! -x $FIXPATH_BIN; then
47900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47901$as_echo "no" >&6; }
47902      cat $FIXPATH_DIR/fixpath1.log
47903      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47904    fi
47905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47906$as_echo "yes" >&6; }
47907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47908$as_echo_n "checking if fixpath.exe works... " >&6; }
47909    cd $FIXPATH_DIR
47910    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47911        > $FIXPATH_DIR/fixpath2.log 2>&1
47912    cd $CURDIR
47913    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47915$as_echo "no" >&6; }
47916      cat $FIXPATH_DIR/fixpath2.log
47917      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47918    fi
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47920$as_echo "yes" >&6; }
47921
47922    FIXPATH_DETACH_FLAG="--detach"
47923  fi
47924
47925
47926
47927
47928
47929
47930  # Check if X11 is needed
47931  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47932    # No X11 support on windows or macosx
47933    NEEDS_LIB_X11=false
47934  else
47935    if test "x$SUPPORT_HEADFUL" = xno; then
47936      # No X11 support if building headless-only
47937      NEEDS_LIB_X11=false
47938    else
47939      # All other instances need X11
47940      NEEDS_LIB_X11=true
47941    fi
47942  fi
47943
47944  # Check if cups is needed
47945  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47946    # Windows have a separate print system
47947    NEEDS_LIB_CUPS=false
47948  else
47949    NEEDS_LIB_CUPS=true
47950  fi
47951
47952  # Check if freetype is needed
47953  if test "x$OPENJDK" = "xtrue"; then
47954    NEEDS_LIB_FREETYPE=true
47955  else
47956    NEEDS_LIB_FREETYPE=false
47957  fi
47958
47959  # Check if alsa is needed
47960  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47961    NEEDS_LIB_ALSA=true
47962  else
47963    NEEDS_LIB_ALSA=false
47964  fi
47965
47966  # Check if ffi is needed
47967  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47968    NEEDS_LIB_FFI=true
47969  else
47970    NEEDS_LIB_FFI=false
47971  fi
47972
47973
47974  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47975  # dynamic build is configured on command line.
47976
47977# Check whether --with-stdc++lib was given.
47978if test "${with_stdc__lib+set}" = set; then :
47979  withval=$with_stdc__lib;
47980        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47981                && test "x$with_stdc__lib" != xdefault; then
47982          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47983        fi
47984
47985else
47986  with_stdc__lib=default
47987
47988fi
47989
47990
47991  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47992    # Test if -lstdc++ works.
47993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47994$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47995    ac_ext=cpp
47996ac_cpp='$CXXCPP $CPPFLAGS'
47997ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47998ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47999ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48000
48001    OLD_CXXFLAGS="$CXXFLAGS"
48002    CXXFLAGS="$CXXFLAGS -lstdc++"
48003    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48004/* end confdefs.h.  */
48005
48006int
48007main ()
48008{
48009return 0;
48010  ;
48011  return 0;
48012}
48013_ACEOF
48014if ac_fn_cxx_try_link "$LINENO"; then :
48015  has_dynamic_libstdcxx=yes
48016else
48017  has_dynamic_libstdcxx=no
48018fi
48019rm -f core conftest.err conftest.$ac_objext \
48020    conftest$ac_exeext conftest.$ac_ext
48021    CXXFLAGS="$OLD_CXXFLAGS"
48022    ac_ext=cpp
48023ac_cpp='$CXXCPP $CPPFLAGS'
48024ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48025ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48026ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48027
48028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48029$as_echo "$has_dynamic_libstdcxx" >&6; }
48030
48031    # Test if stdc++ can be linked statically.
48032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48033$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48034    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48035    ac_ext=cpp
48036ac_cpp='$CXXCPP $CPPFLAGS'
48037ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48038ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48039ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48040
48041    OLD_LIBS="$LIBS"
48042    OLD_CXX="$CXX"
48043    LIBS="$STATIC_STDCXX_FLAGS"
48044    CXX="$CC"
48045    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48046/* end confdefs.h.  */
48047
48048int
48049main ()
48050{
48051return 0;
48052  ;
48053  return 0;
48054}
48055_ACEOF
48056if ac_fn_cxx_try_link "$LINENO"; then :
48057  has_static_libstdcxx=yes
48058else
48059  has_static_libstdcxx=no
48060fi
48061rm -f core conftest.err conftest.$ac_objext \
48062    conftest$ac_exeext conftest.$ac_ext
48063    LIBS="$OLD_LIBS"
48064    CXX="$OLD_CXX"
48065    ac_ext=cpp
48066ac_cpp='$CXXCPP $CPPFLAGS'
48067ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48068ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48069ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48070
48071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48072$as_echo "$has_static_libstdcxx" >&6; }
48073
48074    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48075      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48076    fi
48077
48078    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48079      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48080    fi
48081
48082    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48083      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48084    fi
48085
48086    # If dynamic was requested, it's available since it would fail above otherwise.
48087    # If dynamic wasn't requested, go with static unless it isn't available.
48088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48089$as_echo_n "checking how to link with libstdc++... " >&6; }
48090    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48091      LIBCXX="$LIBCXX -lstdc++"
48092      LDCXX="$CXX"
48093      STATIC_CXX_SETTING="STATIC_CXX=false"
48094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48095$as_echo "dynamic" >&6; }
48096    else
48097      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48098      LDCXX="$CC"
48099      STATIC_CXX_SETTING="STATIC_CXX=true"
48100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48101$as_echo "static" >&6; }
48102    fi
48103  fi
48104
48105
48106  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48107  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48108    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48109  fi
48110
48111  # TODO better (platform agnostic) test
48112  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48113    LIBCXX="-lstdc++"
48114  fi
48115
48116
48117  # Setup Windows runtime dlls
48118  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48119
48120
48121# Check whether --with-msvcr-dll was given.
48122if test "${with_msvcr_dll+set}" = set; then :
48123  withval=$with_msvcr_dll;
48124fi
48125
48126
48127  if test "x$with_msvcr_dll" != x; then
48128    # If given explicitely by user, do not probe. If not present, fail directly.
48129
48130  DLL_NAME="$MSVCR_NAME"
48131  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48132  METHOD="--with-msvcr-dll"
48133  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48134    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48135$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48136
48137    # Need to check if the found msvcr is correct architecture
48138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48139$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48140    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48142      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48143      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48144      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48145        CORRECT_MSVCR_ARCH="PE32 executable"
48146      else
48147        CORRECT_MSVCR_ARCH="PE32+ executable"
48148      fi
48149    else
48150      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48151        CORRECT_MSVCR_ARCH=386
48152      else
48153        CORRECT_MSVCR_ARCH=x86-64
48154      fi
48155    fi
48156    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48158$as_echo "ok" >&6; }
48159      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48160
48161  # Only process if variable expands to non-empty
48162
48163  if test "x$MSVC_DLL" != x; then
48164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48165
48166  # Input might be given as Windows format, start by converting to
48167  # unix format.
48168  path="$MSVC_DLL"
48169  new_path=`$CYGPATH -u "$path"`
48170
48171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48174  # "foo.exe" is OK but "foo" is an error.
48175  #
48176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48177  # It is also a way to make sure we got the proper file name for the real test later on.
48178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48179  if test "x$test_shortpath" = x; then
48180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48181$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48182    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48183  fi
48184
48185  # Call helper function which possibly converts this using DOS-style short mode.
48186  # If so, the updated path is stored in $new_path.
48187
48188  input_path="$new_path"
48189  # Check if we need to convert this using DOS-style short mode. If the path
48190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48191  # take no chances and rewrite it.
48192  # Note: m4 eats our [], so we need to use [ and ] instead.
48193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48194  if test "x$has_forbidden_chars" != x; then
48195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48199      # Going to short mode and back again did indeed matter. Since short mode is
48200      # case insensitive, let's make it lowercase to improve readability.
48201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48202      # Now convert it back to Unix-style (cygpath)
48203      input_path=`$CYGPATH -u "$shortmode_path"`
48204      new_path="$input_path"
48205    fi
48206  fi
48207
48208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48209  if test "x$test_cygdrive_prefix" = x; then
48210    # As a simple fix, exclude /usr/bin since it's not a real path.
48211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48213      # a path prefixed by /cygdrive for fixpath to work.
48214      new_path="$CYGWIN_ROOT_PATH$input_path"
48215    fi
48216  fi
48217
48218
48219  if test "x$path" != "x$new_path"; then
48220    MSVC_DLL="$new_path"
48221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48222$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48223  fi
48224
48225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48226
48227  path="$MSVC_DLL"
48228  has_colon=`$ECHO $path | $GREP ^.:`
48229  new_path="$path"
48230  if test "x$has_colon" = x; then
48231    # Not in mixed or Windows style, start by that.
48232    new_path=`cmd //c echo $path`
48233  fi
48234
48235
48236  input_path="$new_path"
48237  # Check if we need to convert this using DOS-style short mode. If the path
48238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48239  # take no chances and rewrite it.
48240  # Note: m4 eats our [], so we need to use [ and ] instead.
48241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48242  if test "x$has_forbidden_chars" != x; then
48243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48245  fi
48246
48247
48248  windows_path="$new_path"
48249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48250    unix_path=`$CYGPATH -u "$windows_path"`
48251    new_path="$unix_path"
48252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48254    new_path="$unix_path"
48255  fi
48256
48257  if test "x$path" != "x$new_path"; then
48258    MSVC_DLL="$new_path"
48259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48260$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48261  fi
48262
48263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48265
48266    else
48267      # We're on a unix platform. Hooray! :)
48268      path="$MSVC_DLL"
48269      has_space=`$ECHO "$path" | $GREP " "`
48270      if test "x$has_space" != x; then
48271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48272$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48274      fi
48275
48276      # Use eval to expand a potential ~
48277      eval path="$path"
48278      if test ! -f "$path" && test ! -d "$path"; then
48279        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48280      fi
48281
48282      if test -d "$path"; then
48283        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48284      else
48285        dir="`$DIRNAME "$path"`"
48286        base="`$BASENAME "$path"`"
48287        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48288      fi
48289    fi
48290  fi
48291
48292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48293$as_echo_n "checking for $DLL_NAME... " >&6; }
48294      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48295$as_echo "$MSVC_DLL" >&6; }
48296    else
48297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48298$as_echo "incorrect, ignoring" >&6; }
48299      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48300$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48301    fi
48302  fi
48303
48304    if test "x$MSVC_DLL" = x; then
48305      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48306    fi
48307    MSVCR_DLL="$MSVC_DLL"
48308  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48309
48310  DLL_NAME="$MSVCR_NAME"
48311  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48312  METHOD="devkit"
48313  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48315$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48316
48317    # Need to check if the found msvcr is correct architecture
48318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48319$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48320    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48322      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48323      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48324      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48325        CORRECT_MSVCR_ARCH="PE32 executable"
48326      else
48327        CORRECT_MSVCR_ARCH="PE32+ executable"
48328      fi
48329    else
48330      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48331        CORRECT_MSVCR_ARCH=386
48332      else
48333        CORRECT_MSVCR_ARCH=x86-64
48334      fi
48335    fi
48336    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48338$as_echo "ok" >&6; }
48339      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48340
48341  # Only process if variable expands to non-empty
48342
48343  if test "x$MSVC_DLL" != x; then
48344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48345
48346  # Input might be given as Windows format, start by converting to
48347  # unix format.
48348  path="$MSVC_DLL"
48349  new_path=`$CYGPATH -u "$path"`
48350
48351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48354  # "foo.exe" is OK but "foo" is an error.
48355  #
48356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48357  # It is also a way to make sure we got the proper file name for the real test later on.
48358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48359  if test "x$test_shortpath" = x; then
48360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48361$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48362    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48363  fi
48364
48365  # Call helper function which possibly converts this using DOS-style short mode.
48366  # If so, the updated path is stored in $new_path.
48367
48368  input_path="$new_path"
48369  # Check if we need to convert this using DOS-style short mode. If the path
48370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48371  # take no chances and rewrite it.
48372  # Note: m4 eats our [], so we need to use [ and ] instead.
48373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48374  if test "x$has_forbidden_chars" != x; then
48375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48379      # Going to short mode and back again did indeed matter. Since short mode is
48380      # case insensitive, let's make it lowercase to improve readability.
48381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48382      # Now convert it back to Unix-style (cygpath)
48383      input_path=`$CYGPATH -u "$shortmode_path"`
48384      new_path="$input_path"
48385    fi
48386  fi
48387
48388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48389  if test "x$test_cygdrive_prefix" = x; then
48390    # As a simple fix, exclude /usr/bin since it's not a real path.
48391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48393      # a path prefixed by /cygdrive for fixpath to work.
48394      new_path="$CYGWIN_ROOT_PATH$input_path"
48395    fi
48396  fi
48397
48398
48399  if test "x$path" != "x$new_path"; then
48400    MSVC_DLL="$new_path"
48401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48402$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48403  fi
48404
48405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48406
48407  path="$MSVC_DLL"
48408  has_colon=`$ECHO $path | $GREP ^.:`
48409  new_path="$path"
48410  if test "x$has_colon" = x; then
48411    # Not in mixed or Windows style, start by that.
48412    new_path=`cmd //c echo $path`
48413  fi
48414
48415
48416  input_path="$new_path"
48417  # Check if we need to convert this using DOS-style short mode. If the path
48418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48419  # take no chances and rewrite it.
48420  # Note: m4 eats our [], so we need to use [ and ] instead.
48421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48422  if test "x$has_forbidden_chars" != x; then
48423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48425  fi
48426
48427
48428  windows_path="$new_path"
48429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48430    unix_path=`$CYGPATH -u "$windows_path"`
48431    new_path="$unix_path"
48432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48434    new_path="$unix_path"
48435  fi
48436
48437  if test "x$path" != "x$new_path"; then
48438    MSVC_DLL="$new_path"
48439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48440$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48441  fi
48442
48443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48445
48446    else
48447      # We're on a unix platform. Hooray! :)
48448      path="$MSVC_DLL"
48449      has_space=`$ECHO "$path" | $GREP " "`
48450      if test "x$has_space" != x; then
48451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48452$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48454      fi
48455
48456      # Use eval to expand a potential ~
48457      eval path="$path"
48458      if test ! -f "$path" && test ! -d "$path"; then
48459        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48460      fi
48461
48462      if test -d "$path"; then
48463        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48464      else
48465        dir="`$DIRNAME "$path"`"
48466        base="`$BASENAME "$path"`"
48467        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48468      fi
48469    fi
48470  fi
48471
48472      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48473$as_echo_n "checking for $DLL_NAME... " >&6; }
48474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48475$as_echo "$MSVC_DLL" >&6; }
48476    else
48477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48478$as_echo "incorrect, ignoring" >&6; }
48479      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48480$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48481    fi
48482  fi
48483
48484    if test "x$MSVC_DLL" = x; then
48485      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48486    fi
48487    MSVCR_DLL="$MSVC_DLL"
48488  else
48489
48490  DLL_NAME="${MSVCR_NAME}"
48491  MSVC_DLL=
48492
48493  if test "x$MSVC_DLL" = x; then
48494    # Probe: Using well-known location from Visual Studio 10.0
48495    if test "x$VCINSTALLDIR" != x; then
48496      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48497
48498  windows_path="$CYGWIN_VC_INSTALL_DIR"
48499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48500    unix_path=`$CYGPATH -u "$windows_path"`
48501    CYGWIN_VC_INSTALL_DIR="$unix_path"
48502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48504    CYGWIN_VC_INSTALL_DIR="$unix_path"
48505  fi
48506
48507      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48508        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48509      else
48510        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48511      fi
48512      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48513
48514  DLL_NAME="$DLL_NAME"
48515  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48516  METHOD="well-known location in VCINSTALLDIR"
48517  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48518    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48519$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48520
48521    # Need to check if the found msvcr is correct architecture
48522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48523$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48524    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48526      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48527      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48528      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48529        CORRECT_MSVCR_ARCH="PE32 executable"
48530      else
48531        CORRECT_MSVCR_ARCH="PE32+ executable"
48532      fi
48533    else
48534      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48535        CORRECT_MSVCR_ARCH=386
48536      else
48537        CORRECT_MSVCR_ARCH=x86-64
48538      fi
48539    fi
48540    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48542$as_echo "ok" >&6; }
48543      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48544
48545  # Only process if variable expands to non-empty
48546
48547  if test "x$MSVC_DLL" != x; then
48548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48549
48550  # Input might be given as Windows format, start by converting to
48551  # unix format.
48552  path="$MSVC_DLL"
48553  new_path=`$CYGPATH -u "$path"`
48554
48555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48558  # "foo.exe" is OK but "foo" is an error.
48559  #
48560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48561  # It is also a way to make sure we got the proper file name for the real test later on.
48562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48563  if test "x$test_shortpath" = x; then
48564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48565$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48566    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48567  fi
48568
48569  # Call helper function which possibly converts this using DOS-style short mode.
48570  # If so, the updated path is stored in $new_path.
48571
48572  input_path="$new_path"
48573  # Check if we need to convert this using DOS-style short mode. If the path
48574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48575  # take no chances and rewrite it.
48576  # Note: m4 eats our [], so we need to use [ and ] instead.
48577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48578  if test "x$has_forbidden_chars" != x; then
48579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48583      # Going to short mode and back again did indeed matter. Since short mode is
48584      # case insensitive, let's make it lowercase to improve readability.
48585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48586      # Now convert it back to Unix-style (cygpath)
48587      input_path=`$CYGPATH -u "$shortmode_path"`
48588      new_path="$input_path"
48589    fi
48590  fi
48591
48592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48593  if test "x$test_cygdrive_prefix" = x; then
48594    # As a simple fix, exclude /usr/bin since it's not a real path.
48595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48597      # a path prefixed by /cygdrive for fixpath to work.
48598      new_path="$CYGWIN_ROOT_PATH$input_path"
48599    fi
48600  fi
48601
48602
48603  if test "x$path" != "x$new_path"; then
48604    MSVC_DLL="$new_path"
48605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48606$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48607  fi
48608
48609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48610
48611  path="$MSVC_DLL"
48612  has_colon=`$ECHO $path | $GREP ^.:`
48613  new_path="$path"
48614  if test "x$has_colon" = x; then
48615    # Not in mixed or Windows style, start by that.
48616    new_path=`cmd //c echo $path`
48617  fi
48618
48619
48620  input_path="$new_path"
48621  # Check if we need to convert this using DOS-style short mode. If the path
48622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48623  # take no chances and rewrite it.
48624  # Note: m4 eats our [], so we need to use [ and ] instead.
48625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48626  if test "x$has_forbidden_chars" != x; then
48627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48629  fi
48630
48631
48632  windows_path="$new_path"
48633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48634    unix_path=`$CYGPATH -u "$windows_path"`
48635    new_path="$unix_path"
48636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48638    new_path="$unix_path"
48639  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48649
48650    else
48651      # We're on a unix platform. Hooray! :)
48652      path="$MSVC_DLL"
48653      has_space=`$ECHO "$path" | $GREP " "`
48654      if test "x$has_space" != x; then
48655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48656$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48658      fi
48659
48660      # Use eval to expand a potential ~
48661      eval path="$path"
48662      if test ! -f "$path" && test ! -d "$path"; then
48663        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48664      fi
48665
48666      if test -d "$path"; then
48667        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48668      else
48669        dir="`$DIRNAME "$path"`"
48670        base="`$BASENAME "$path"`"
48671        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48672      fi
48673    fi
48674  fi
48675
48676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48677$as_echo_n "checking for $DLL_NAME... " >&6; }
48678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48679$as_echo "$MSVC_DLL" >&6; }
48680    else
48681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48682$as_echo "incorrect, ignoring" >&6; }
48683      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48684$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48685    fi
48686  fi
48687
48688    fi
48689  fi
48690
48691  if test "x$MSVC_DLL" = x; then
48692    # Probe: Check in the Boot JDK directory.
48693    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48694
48695  DLL_NAME="$DLL_NAME"
48696  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48697  METHOD="well-known location in Boot JDK"
48698  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48700$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48701
48702    # Need to check if the found msvcr is correct architecture
48703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48704$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48705    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48707      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48708      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48709      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48710        CORRECT_MSVCR_ARCH="PE32 executable"
48711      else
48712        CORRECT_MSVCR_ARCH="PE32+ executable"
48713      fi
48714    else
48715      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48716        CORRECT_MSVCR_ARCH=386
48717      else
48718        CORRECT_MSVCR_ARCH=x86-64
48719      fi
48720    fi
48721    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48723$as_echo "ok" >&6; }
48724      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48725
48726  # Only process if variable expands to non-empty
48727
48728  if test "x$MSVC_DLL" != x; then
48729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48730
48731  # Input might be given as Windows format, start by converting to
48732  # unix format.
48733  path="$MSVC_DLL"
48734  new_path=`$CYGPATH -u "$path"`
48735
48736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48739  # "foo.exe" is OK but "foo" is an error.
48740  #
48741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48742  # It is also a way to make sure we got the proper file name for the real test later on.
48743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48744  if test "x$test_shortpath" = x; then
48745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48746$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48747    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48748  fi
48749
48750  # Call helper function which possibly converts this using DOS-style short mode.
48751  # If so, the updated path is stored in $new_path.
48752
48753  input_path="$new_path"
48754  # Check if we need to convert this using DOS-style short mode. If the path
48755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48756  # take no chances and rewrite it.
48757  # Note: m4 eats our [], so we need to use [ and ] instead.
48758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48759  if test "x$has_forbidden_chars" != x; then
48760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48764      # Going to short mode and back again did indeed matter. Since short mode is
48765      # case insensitive, let's make it lowercase to improve readability.
48766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48767      # Now convert it back to Unix-style (cygpath)
48768      input_path=`$CYGPATH -u "$shortmode_path"`
48769      new_path="$input_path"
48770    fi
48771  fi
48772
48773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48774  if test "x$test_cygdrive_prefix" = x; then
48775    # As a simple fix, exclude /usr/bin since it's not a real path.
48776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48778      # a path prefixed by /cygdrive for fixpath to work.
48779      new_path="$CYGWIN_ROOT_PATH$input_path"
48780    fi
48781  fi
48782
48783
48784  if test "x$path" != "x$new_path"; then
48785    MSVC_DLL="$new_path"
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48787$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48788  fi
48789
48790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48791
48792  path="$MSVC_DLL"
48793  has_colon=`$ECHO $path | $GREP ^.:`
48794  new_path="$path"
48795  if test "x$has_colon" = x; then
48796    # Not in mixed or Windows style, start by that.
48797    new_path=`cmd //c echo $path`
48798  fi
48799
48800
48801  input_path="$new_path"
48802  # Check if we need to convert this using DOS-style short mode. If the path
48803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48804  # take no chances and rewrite it.
48805  # Note: m4 eats our [], so we need to use [ and ] instead.
48806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48807  if test "x$has_forbidden_chars" != x; then
48808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48810  fi
48811
48812
48813  windows_path="$new_path"
48814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48815    unix_path=`$CYGPATH -u "$windows_path"`
48816    new_path="$unix_path"
48817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48819    new_path="$unix_path"
48820  fi
48821
48822  if test "x$path" != "x$new_path"; then
48823    MSVC_DLL="$new_path"
48824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48825$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48826  fi
48827
48828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48830
48831    else
48832      # We're on a unix platform. Hooray! :)
48833      path="$MSVC_DLL"
48834      has_space=`$ECHO "$path" | $GREP " "`
48835      if test "x$has_space" != x; then
48836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48837$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48839      fi
48840
48841      # Use eval to expand a potential ~
48842      eval path="$path"
48843      if test ! -f "$path" && test ! -d "$path"; then
48844        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48845      fi
48846
48847      if test -d "$path"; then
48848        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48849      else
48850        dir="`$DIRNAME "$path"`"
48851        base="`$BASENAME "$path"`"
48852        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48853      fi
48854    fi
48855  fi
48856
48857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48858$as_echo_n "checking for $DLL_NAME... " >&6; }
48859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48860$as_echo "$MSVC_DLL" >&6; }
48861    else
48862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48863$as_echo "incorrect, ignoring" >&6; }
48864      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48865$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48866    fi
48867  fi
48868
48869  fi
48870
48871  if test "x$MSVC_DLL" = x; then
48872    # Probe: Look in the Windows system32 directory
48873    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48874
48875  windows_path="$CYGWIN_SYSTEMROOT"
48876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48877    unix_path=`$CYGPATH -u "$windows_path"`
48878    CYGWIN_SYSTEMROOT="$unix_path"
48879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48881    CYGWIN_SYSTEMROOT="$unix_path"
48882  fi
48883
48884    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48885
48886  DLL_NAME="$DLL_NAME"
48887  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48888  METHOD="well-known location in SYSTEMROOT"
48889  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48890    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48891$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48892
48893    # Need to check if the found msvcr is correct architecture
48894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48895$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48896    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48898      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48899      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48900      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48901        CORRECT_MSVCR_ARCH="PE32 executable"
48902      else
48903        CORRECT_MSVCR_ARCH="PE32+ executable"
48904      fi
48905    else
48906      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48907        CORRECT_MSVCR_ARCH=386
48908      else
48909        CORRECT_MSVCR_ARCH=x86-64
48910      fi
48911    fi
48912    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48914$as_echo "ok" >&6; }
48915      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48916
48917  # Only process if variable expands to non-empty
48918
48919  if test "x$MSVC_DLL" != x; then
48920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48921
48922  # Input might be given as Windows format, start by converting to
48923  # unix format.
48924  path="$MSVC_DLL"
48925  new_path=`$CYGPATH -u "$path"`
48926
48927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48930  # "foo.exe" is OK but "foo" is an error.
48931  #
48932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48933  # It is also a way to make sure we got the proper file name for the real test later on.
48934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48935  if test "x$test_shortpath" = x; then
48936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48937$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48938    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48939  fi
48940
48941  # Call helper function which possibly converts this using DOS-style short mode.
48942  # If so, the updated path is stored in $new_path.
48943
48944  input_path="$new_path"
48945  # Check if we need to convert this using DOS-style short mode. If the path
48946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48947  # take no chances and rewrite it.
48948  # Note: m4 eats our [], so we need to use [ and ] instead.
48949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48950  if test "x$has_forbidden_chars" != x; then
48951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48955      # Going to short mode and back again did indeed matter. Since short mode is
48956      # case insensitive, let's make it lowercase to improve readability.
48957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48958      # Now convert it back to Unix-style (cygpath)
48959      input_path=`$CYGPATH -u "$shortmode_path"`
48960      new_path="$input_path"
48961    fi
48962  fi
48963
48964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48965  if test "x$test_cygdrive_prefix" = x; then
48966    # As a simple fix, exclude /usr/bin since it's not a real path.
48967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48969      # a path prefixed by /cygdrive for fixpath to work.
48970      new_path="$CYGWIN_ROOT_PATH$input_path"
48971    fi
48972  fi
48973
48974
48975  if test "x$path" != "x$new_path"; then
48976    MSVC_DLL="$new_path"
48977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48978$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48979  fi
48980
48981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48982
48983  path="$MSVC_DLL"
48984  has_colon=`$ECHO $path | $GREP ^.:`
48985  new_path="$path"
48986  if test "x$has_colon" = x; then
48987    # Not in mixed or Windows style, start by that.
48988    new_path=`cmd //c echo $path`
48989  fi
48990
48991
48992  input_path="$new_path"
48993  # Check if we need to convert this using DOS-style short mode. If the path
48994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48995  # take no chances and rewrite it.
48996  # Note: m4 eats our [], so we need to use [ and ] instead.
48997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48998  if test "x$has_forbidden_chars" != x; then
48999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49001  fi
49002
49003
49004  windows_path="$new_path"
49005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49006    unix_path=`$CYGPATH -u "$windows_path"`
49007    new_path="$unix_path"
49008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49010    new_path="$unix_path"
49011  fi
49012
49013  if test "x$path" != "x$new_path"; then
49014    MSVC_DLL="$new_path"
49015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49016$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49017  fi
49018
49019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49021
49022    else
49023      # We're on a unix platform. Hooray! :)
49024      path="$MSVC_DLL"
49025      has_space=`$ECHO "$path" | $GREP " "`
49026      if test "x$has_space" != x; then
49027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49028$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49030      fi
49031
49032      # Use eval to expand a potential ~
49033      eval path="$path"
49034      if test ! -f "$path" && test ! -d "$path"; then
49035        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49036      fi
49037
49038      if test -d "$path"; then
49039        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49040      else
49041        dir="`$DIRNAME "$path"`"
49042        base="`$BASENAME "$path"`"
49043        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49044      fi
49045    fi
49046  fi
49047
49048      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49049$as_echo_n "checking for $DLL_NAME... " >&6; }
49050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49051$as_echo "$MSVC_DLL" >&6; }
49052    else
49053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49054$as_echo "incorrect, ignoring" >&6; }
49055      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49056$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49057    fi
49058  fi
49059
49060  fi
49061
49062  if test "x$MSVC_DLL" = x; then
49063    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49064    if test "x$VS100COMNTOOLS" != x; then
49065      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49066
49067  windows_path="$CYGWIN_VS_TOOLS_DIR"
49068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49069    unix_path=`$CYGPATH -u "$windows_path"`
49070    CYGWIN_VS_TOOLS_DIR="$unix_path"
49071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49073    CYGWIN_VS_TOOLS_DIR="$unix_path"
49074  fi
49075
49076      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49077        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49078	    | $GREP -i /x64/ | $HEAD --lines 1`
49079      else
49080        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49081	    | $GREP -i /x86/ | $HEAD --lines 1`
49082      fi
49083
49084  DLL_NAME="$DLL_NAME"
49085  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49086  METHOD="search of VS100COMNTOOLS"
49087  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49089$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49090
49091    # Need to check if the found msvcr is correct architecture
49092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49093$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49094    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49096      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49097      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49098      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49099        CORRECT_MSVCR_ARCH="PE32 executable"
49100      else
49101        CORRECT_MSVCR_ARCH="PE32+ executable"
49102      fi
49103    else
49104      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49105        CORRECT_MSVCR_ARCH=386
49106      else
49107        CORRECT_MSVCR_ARCH=x86-64
49108      fi
49109    fi
49110    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49112$as_echo "ok" >&6; }
49113      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49114
49115  # Only process if variable expands to non-empty
49116
49117  if test "x$MSVC_DLL" != x; then
49118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49119
49120  # Input might be given as Windows format, start by converting to
49121  # unix format.
49122  path="$MSVC_DLL"
49123  new_path=`$CYGPATH -u "$path"`
49124
49125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49128  # "foo.exe" is OK but "foo" is an error.
49129  #
49130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49131  # It is also a way to make sure we got the proper file name for the real test later on.
49132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49133  if test "x$test_shortpath" = x; then
49134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49135$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49136    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49137  fi
49138
49139  # Call helper function which possibly converts this using DOS-style short mode.
49140  # If so, the updated path is stored in $new_path.
49141
49142  input_path="$new_path"
49143  # Check if we need to convert this using DOS-style short mode. If the path
49144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49145  # take no chances and rewrite it.
49146  # Note: m4 eats our [], so we need to use [ and ] instead.
49147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49148  if test "x$has_forbidden_chars" != x; then
49149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49153      # Going to short mode and back again did indeed matter. Since short mode is
49154      # case insensitive, let's make it lowercase to improve readability.
49155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49156      # Now convert it back to Unix-style (cygpath)
49157      input_path=`$CYGPATH -u "$shortmode_path"`
49158      new_path="$input_path"
49159    fi
49160  fi
49161
49162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49163  if test "x$test_cygdrive_prefix" = x; then
49164    # As a simple fix, exclude /usr/bin since it's not a real path.
49165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49167      # a path prefixed by /cygdrive for fixpath to work.
49168      new_path="$CYGWIN_ROOT_PATH$input_path"
49169    fi
49170  fi
49171
49172
49173  if test "x$path" != "x$new_path"; then
49174    MSVC_DLL="$new_path"
49175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49177  fi
49178
49179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49180
49181  path="$MSVC_DLL"
49182  has_colon=`$ECHO $path | $GREP ^.:`
49183  new_path="$path"
49184  if test "x$has_colon" = x; then
49185    # Not in mixed or Windows style, start by that.
49186    new_path=`cmd //c echo $path`
49187  fi
49188
49189
49190  input_path="$new_path"
49191  # Check if we need to convert this using DOS-style short mode. If the path
49192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49193  # take no chances and rewrite it.
49194  # Note: m4 eats our [], so we need to use [ and ] instead.
49195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49196  if test "x$has_forbidden_chars" != x; then
49197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49199  fi
49200
49201
49202  windows_path="$new_path"
49203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49204    unix_path=`$CYGPATH -u "$windows_path"`
49205    new_path="$unix_path"
49206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49208    new_path="$unix_path"
49209  fi
49210
49211  if test "x$path" != "x$new_path"; then
49212    MSVC_DLL="$new_path"
49213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49215  fi
49216
49217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49219
49220    else
49221      # We're on a unix platform. Hooray! :)
49222      path="$MSVC_DLL"
49223      has_space=`$ECHO "$path" | $GREP " "`
49224      if test "x$has_space" != x; then
49225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49226$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49228      fi
49229
49230      # Use eval to expand a potential ~
49231      eval path="$path"
49232      if test ! -f "$path" && test ! -d "$path"; then
49233        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49234      fi
49235
49236      if test -d "$path"; then
49237        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49238      else
49239        dir="`$DIRNAME "$path"`"
49240        base="`$BASENAME "$path"`"
49241        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49242      fi
49243    fi
49244  fi
49245
49246      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49247$as_echo_n "checking for $DLL_NAME... " >&6; }
49248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49249$as_echo "$MSVC_DLL" >&6; }
49250    else
49251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49252$as_echo "incorrect, ignoring" >&6; }
49253      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49254$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49255    fi
49256  fi
49257
49258    fi
49259  fi
49260
49261  if test "x$MSVC_DLL" = x; then
49262    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49263    # (This was the original behaviour; kept since it might turn something up)
49264    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49265      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49266        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49267	    | $GREP x64 | $HEAD --lines 1`
49268      else
49269        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49270	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49271        if test "x$POSSIBLE_MSVC_DLL" = x; then
49272          # We're grasping at straws now...
49273          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49274	      | $HEAD --lines 1`
49275        fi
49276      fi
49277
49278
49279  DLL_NAME="$DLL_NAME"
49280  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49281  METHOD="search of VCINSTALLDIR"
49282  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49283    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49284$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49285
49286    # Need to check if the found msvcr is correct architecture
49287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49288$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49289    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49291      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49292      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49293      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49294        CORRECT_MSVCR_ARCH="PE32 executable"
49295      else
49296        CORRECT_MSVCR_ARCH="PE32+ executable"
49297      fi
49298    else
49299      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49300        CORRECT_MSVCR_ARCH=386
49301      else
49302        CORRECT_MSVCR_ARCH=x86-64
49303      fi
49304    fi
49305    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49307$as_echo "ok" >&6; }
49308      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49309
49310  # Only process if variable expands to non-empty
49311
49312  if test "x$MSVC_DLL" != x; then
49313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49314
49315  # Input might be given as Windows format, start by converting to
49316  # unix format.
49317  path="$MSVC_DLL"
49318  new_path=`$CYGPATH -u "$path"`
49319
49320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49323  # "foo.exe" is OK but "foo" is an error.
49324  #
49325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49326  # It is also a way to make sure we got the proper file name for the real test later on.
49327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49328  if test "x$test_shortpath" = x; then
49329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49330$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49331    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49332  fi
49333
49334  # Call helper function which possibly converts this using DOS-style short mode.
49335  # If so, the updated path is stored in $new_path.
49336
49337  input_path="$new_path"
49338  # Check if we need to convert this using DOS-style short mode. If the path
49339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49340  # take no chances and rewrite it.
49341  # Note: m4 eats our [], so we need to use [ and ] instead.
49342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49343  if test "x$has_forbidden_chars" != x; then
49344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49348      # Going to short mode and back again did indeed matter. Since short mode is
49349      # case insensitive, let's make it lowercase to improve readability.
49350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49351      # Now convert it back to Unix-style (cygpath)
49352      input_path=`$CYGPATH -u "$shortmode_path"`
49353      new_path="$input_path"
49354    fi
49355  fi
49356
49357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49358  if test "x$test_cygdrive_prefix" = x; then
49359    # As a simple fix, exclude /usr/bin since it's not a real path.
49360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49362      # a path prefixed by /cygdrive for fixpath to work.
49363      new_path="$CYGWIN_ROOT_PATH$input_path"
49364    fi
49365  fi
49366
49367
49368  if test "x$path" != "x$new_path"; then
49369    MSVC_DLL="$new_path"
49370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49372  fi
49373
49374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49375
49376  path="$MSVC_DLL"
49377  has_colon=`$ECHO $path | $GREP ^.:`
49378  new_path="$path"
49379  if test "x$has_colon" = x; then
49380    # Not in mixed or Windows style, start by that.
49381    new_path=`cmd //c echo $path`
49382  fi
49383
49384
49385  input_path="$new_path"
49386  # Check if we need to convert this using DOS-style short mode. If the path
49387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49388  # take no chances and rewrite it.
49389  # Note: m4 eats our [], so we need to use [ and ] instead.
49390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49391  if test "x$has_forbidden_chars" != x; then
49392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49394  fi
49395
49396
49397  windows_path="$new_path"
49398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49399    unix_path=`$CYGPATH -u "$windows_path"`
49400    new_path="$unix_path"
49401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49403    new_path="$unix_path"
49404  fi
49405
49406  if test "x$path" != "x$new_path"; then
49407    MSVC_DLL="$new_path"
49408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49409$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49410  fi
49411
49412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49414
49415    else
49416      # We're on a unix platform. Hooray! :)
49417      path="$MSVC_DLL"
49418      has_space=`$ECHO "$path" | $GREP " "`
49419      if test "x$has_space" != x; then
49420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49421$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49423      fi
49424
49425      # Use eval to expand a potential ~
49426      eval path="$path"
49427      if test ! -f "$path" && test ! -d "$path"; then
49428        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49429      fi
49430
49431      if test -d "$path"; then
49432        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49433      else
49434        dir="`$DIRNAME "$path"`"
49435        base="`$BASENAME "$path"`"
49436        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49437      fi
49438    fi
49439  fi
49440
49441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49442$as_echo_n "checking for $DLL_NAME... " >&6; }
49443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49444$as_echo "$MSVC_DLL" >&6; }
49445    else
49446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49447$as_echo "incorrect, ignoring" >&6; }
49448      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49449$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49450    fi
49451  fi
49452
49453    fi
49454  fi
49455
49456  if test "x$MSVC_DLL" = x; then
49457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49458$as_echo_n "checking for $DLL_NAME... " >&6; }
49459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49460$as_echo "no" >&6; }
49461    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49462  fi
49463
49464    MSVCR_DLL="$MSVC_DLL"
49465  fi
49466
49467
49468
49469# Check whether --with-msvcp-dll was given.
49470if test "${with_msvcp_dll+set}" = set; then :
49471  withval=$with_msvcp_dll;
49472fi
49473
49474
49475  if test "x$MSVCP_NAME" != "x"; then
49476    if test "x$with_msvcp_dll" != x; then
49477      # If given explicitely by user, do not probe. If not present, fail directly.
49478
49479  DLL_NAME="$MSVCP_NAME"
49480  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49481  METHOD="--with-msvcp-dll"
49482  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49483    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49484$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49485
49486    # Need to check if the found msvcr is correct architecture
49487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49488$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49489    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49491      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49492      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49493      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49494        CORRECT_MSVCR_ARCH="PE32 executable"
49495      else
49496        CORRECT_MSVCR_ARCH="PE32+ executable"
49497      fi
49498    else
49499      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49500        CORRECT_MSVCR_ARCH=386
49501      else
49502        CORRECT_MSVCR_ARCH=x86-64
49503      fi
49504    fi
49505    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49507$as_echo "ok" >&6; }
49508      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49509
49510  # Only process if variable expands to non-empty
49511
49512  if test "x$MSVC_DLL" != x; then
49513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49514
49515  # Input might be given as Windows format, start by converting to
49516  # unix format.
49517  path="$MSVC_DLL"
49518  new_path=`$CYGPATH -u "$path"`
49519
49520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49523  # "foo.exe" is OK but "foo" is an error.
49524  #
49525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49526  # It is also a way to make sure we got the proper file name for the real test later on.
49527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49528  if test "x$test_shortpath" = x; then
49529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49530$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49531    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49532  fi
49533
49534  # Call helper function which possibly converts this using DOS-style short mode.
49535  # If so, the updated path is stored in $new_path.
49536
49537  input_path="$new_path"
49538  # Check if we need to convert this using DOS-style short mode. If the path
49539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49540  # take no chances and rewrite it.
49541  # Note: m4 eats our [], so we need to use [ and ] instead.
49542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49543  if test "x$has_forbidden_chars" != x; then
49544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49548      # Going to short mode and back again did indeed matter. Since short mode is
49549      # case insensitive, let's make it lowercase to improve readability.
49550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49551      # Now convert it back to Unix-style (cygpath)
49552      input_path=`$CYGPATH -u "$shortmode_path"`
49553      new_path="$input_path"
49554    fi
49555  fi
49556
49557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49558  if test "x$test_cygdrive_prefix" = x; then
49559    # As a simple fix, exclude /usr/bin since it's not a real path.
49560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49562      # a path prefixed by /cygdrive for fixpath to work.
49563      new_path="$CYGWIN_ROOT_PATH$input_path"
49564    fi
49565  fi
49566
49567
49568  if test "x$path" != "x$new_path"; then
49569    MSVC_DLL="$new_path"
49570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49571$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49572  fi
49573
49574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49575
49576  path="$MSVC_DLL"
49577  has_colon=`$ECHO $path | $GREP ^.:`
49578  new_path="$path"
49579  if test "x$has_colon" = x; then
49580    # Not in mixed or Windows style, start by that.
49581    new_path=`cmd //c echo $path`
49582  fi
49583
49584
49585  input_path="$new_path"
49586  # Check if we need to convert this using DOS-style short mode. If the path
49587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49588  # take no chances and rewrite it.
49589  # Note: m4 eats our [], so we need to use [ and ] instead.
49590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49591  if test "x$has_forbidden_chars" != x; then
49592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49594  fi
49595
49596
49597  windows_path="$new_path"
49598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49599    unix_path=`$CYGPATH -u "$windows_path"`
49600    new_path="$unix_path"
49601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49603    new_path="$unix_path"
49604  fi
49605
49606  if test "x$path" != "x$new_path"; then
49607    MSVC_DLL="$new_path"
49608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49609$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49610  fi
49611
49612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49614
49615    else
49616      # We're on a unix platform. Hooray! :)
49617      path="$MSVC_DLL"
49618      has_space=`$ECHO "$path" | $GREP " "`
49619      if test "x$has_space" != x; then
49620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49621$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49622        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49623      fi
49624
49625      # Use eval to expand a potential ~
49626      eval path="$path"
49627      if test ! -f "$path" && test ! -d "$path"; then
49628        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49629      fi
49630
49631      if test -d "$path"; then
49632        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49633      else
49634        dir="`$DIRNAME "$path"`"
49635        base="`$BASENAME "$path"`"
49636        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49637      fi
49638    fi
49639  fi
49640
49641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49642$as_echo_n "checking for $DLL_NAME... " >&6; }
49643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49644$as_echo "$MSVC_DLL" >&6; }
49645    else
49646      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49647$as_echo "incorrect, ignoring" >&6; }
49648      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49649$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49650    fi
49651  fi
49652
49653      if test "x$MSVC_DLL" = x; then
49654        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49655      fi
49656      MSVCP_DLL="$MSVC_DLL"
49657    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49658
49659  DLL_NAME="$MSVCP_NAME"
49660  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49661  METHOD="devkit"
49662  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49663    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49664$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49665
49666    # Need to check if the found msvcr is correct architecture
49667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49668$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49669    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49671      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49672      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49673      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49674        CORRECT_MSVCR_ARCH="PE32 executable"
49675      else
49676        CORRECT_MSVCR_ARCH="PE32+ executable"
49677      fi
49678    else
49679      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49680        CORRECT_MSVCR_ARCH=386
49681      else
49682        CORRECT_MSVCR_ARCH=x86-64
49683      fi
49684    fi
49685    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49687$as_echo "ok" >&6; }
49688      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49689
49690  # Only process if variable expands to non-empty
49691
49692  if test "x$MSVC_DLL" != x; then
49693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49694
49695  # Input might be given as Windows format, start by converting to
49696  # unix format.
49697  path="$MSVC_DLL"
49698  new_path=`$CYGPATH -u "$path"`
49699
49700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49703  # "foo.exe" is OK but "foo" is an error.
49704  #
49705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49706  # It is also a way to make sure we got the proper file name for the real test later on.
49707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49708  if test "x$test_shortpath" = x; then
49709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49710$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49711    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49712  fi
49713
49714  # Call helper function which possibly converts this using DOS-style short mode.
49715  # If so, the updated path is stored in $new_path.
49716
49717  input_path="$new_path"
49718  # Check if we need to convert this using DOS-style short mode. If the path
49719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49720  # take no chances and rewrite it.
49721  # Note: m4 eats our [], so we need to use [ and ] instead.
49722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49723  if test "x$has_forbidden_chars" != x; then
49724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49728      # Going to short mode and back again did indeed matter. Since short mode is
49729      # case insensitive, let's make it lowercase to improve readability.
49730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49731      # Now convert it back to Unix-style (cygpath)
49732      input_path=`$CYGPATH -u "$shortmode_path"`
49733      new_path="$input_path"
49734    fi
49735  fi
49736
49737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49738  if test "x$test_cygdrive_prefix" = x; then
49739    # As a simple fix, exclude /usr/bin since it's not a real path.
49740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49742      # a path prefixed by /cygdrive for fixpath to work.
49743      new_path="$CYGWIN_ROOT_PATH$input_path"
49744    fi
49745  fi
49746
49747
49748  if test "x$path" != "x$new_path"; then
49749    MSVC_DLL="$new_path"
49750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49751$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49752  fi
49753
49754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49755
49756  path="$MSVC_DLL"
49757  has_colon=`$ECHO $path | $GREP ^.:`
49758  new_path="$path"
49759  if test "x$has_colon" = x; then
49760    # Not in mixed or Windows style, start by that.
49761    new_path=`cmd //c echo $path`
49762  fi
49763
49764
49765  input_path="$new_path"
49766  # Check if we need to convert this using DOS-style short mode. If the path
49767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49768  # take no chances and rewrite it.
49769  # Note: m4 eats our [], so we need to use [ and ] instead.
49770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49771  if test "x$has_forbidden_chars" != x; then
49772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49774  fi
49775
49776
49777  windows_path="$new_path"
49778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49779    unix_path=`$CYGPATH -u "$windows_path"`
49780    new_path="$unix_path"
49781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49783    new_path="$unix_path"
49784  fi
49785
49786  if test "x$path" != "x$new_path"; then
49787    MSVC_DLL="$new_path"
49788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49789$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49790  fi
49791
49792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49794
49795    else
49796      # We're on a unix platform. Hooray! :)
49797      path="$MSVC_DLL"
49798      has_space=`$ECHO "$path" | $GREP " "`
49799      if test "x$has_space" != x; then
49800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49801$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49803      fi
49804
49805      # Use eval to expand a potential ~
49806      eval path="$path"
49807      if test ! -f "$path" && test ! -d "$path"; then
49808        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49809      fi
49810
49811      if test -d "$path"; then
49812        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49813      else
49814        dir="`$DIRNAME "$path"`"
49815        base="`$BASENAME "$path"`"
49816        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49817      fi
49818    fi
49819  fi
49820
49821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49822$as_echo_n "checking for $DLL_NAME... " >&6; }
49823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49824$as_echo "$MSVC_DLL" >&6; }
49825    else
49826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49827$as_echo "incorrect, ignoring" >&6; }
49828      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49829$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49830    fi
49831  fi
49832
49833      if test "x$MSVC_DLL" = x; then
49834        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49835      fi
49836      MSVCP_DLL="$MSVC_DLL"
49837    else
49838
49839  DLL_NAME="${MSVCP_NAME}"
49840  MSVC_DLL=
49841
49842  if test "x$MSVC_DLL" = x; then
49843    # Probe: Using well-known location from Visual Studio 10.0
49844    if test "x$VCINSTALLDIR" != x; then
49845      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49846
49847  windows_path="$CYGWIN_VC_INSTALL_DIR"
49848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49849    unix_path=`$CYGPATH -u "$windows_path"`
49850    CYGWIN_VC_INSTALL_DIR="$unix_path"
49851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49853    CYGWIN_VC_INSTALL_DIR="$unix_path"
49854  fi
49855
49856      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49857        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49858      else
49859        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49860      fi
49861      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49862
49863  DLL_NAME="$DLL_NAME"
49864  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49865  METHOD="well-known location in VCINSTALLDIR"
49866  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49867    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49868$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49869
49870    # Need to check if the found msvcr is correct architecture
49871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49872$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49873    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49875      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49876      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49877      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49878        CORRECT_MSVCR_ARCH="PE32 executable"
49879      else
49880        CORRECT_MSVCR_ARCH="PE32+ executable"
49881      fi
49882    else
49883      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49884        CORRECT_MSVCR_ARCH=386
49885      else
49886        CORRECT_MSVCR_ARCH=x86-64
49887      fi
49888    fi
49889    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49891$as_echo "ok" >&6; }
49892      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49893
49894  # Only process if variable expands to non-empty
49895
49896  if test "x$MSVC_DLL" != x; then
49897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49898
49899  # Input might be given as Windows format, start by converting to
49900  # unix format.
49901  path="$MSVC_DLL"
49902  new_path=`$CYGPATH -u "$path"`
49903
49904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49907  # "foo.exe" is OK but "foo" is an error.
49908  #
49909  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49910  # It is also a way to make sure we got the proper file name for the real test later on.
49911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49912  if test "x$test_shortpath" = x; then
49913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49914$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49915    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49916  fi
49917
49918  # Call helper function which possibly converts this using DOS-style short mode.
49919  # If so, the updated path is stored in $new_path.
49920
49921  input_path="$new_path"
49922  # Check if we need to convert this using DOS-style short mode. If the path
49923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49924  # take no chances and rewrite it.
49925  # Note: m4 eats our [], so we need to use [ and ] instead.
49926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49927  if test "x$has_forbidden_chars" != x; then
49928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49932      # Going to short mode and back again did indeed matter. Since short mode is
49933      # case insensitive, let's make it lowercase to improve readability.
49934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49935      # Now convert it back to Unix-style (cygpath)
49936      input_path=`$CYGPATH -u "$shortmode_path"`
49937      new_path="$input_path"
49938    fi
49939  fi
49940
49941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49942  if test "x$test_cygdrive_prefix" = x; then
49943    # As a simple fix, exclude /usr/bin since it's not a real path.
49944    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49946      # a path prefixed by /cygdrive for fixpath to work.
49947      new_path="$CYGWIN_ROOT_PATH$input_path"
49948    fi
49949  fi
49950
49951
49952  if test "x$path" != "x$new_path"; then
49953    MSVC_DLL="$new_path"
49954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49955$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49956  fi
49957
49958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49959
49960  path="$MSVC_DLL"
49961  has_colon=`$ECHO $path | $GREP ^.:`
49962  new_path="$path"
49963  if test "x$has_colon" = x; then
49964    # Not in mixed or Windows style, start by that.
49965    new_path=`cmd //c echo $path`
49966  fi
49967
49968
49969  input_path="$new_path"
49970  # Check if we need to convert this using DOS-style short mode. If the path
49971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49972  # take no chances and rewrite it.
49973  # Note: m4 eats our [], so we need to use [ and ] instead.
49974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49975  if test "x$has_forbidden_chars" != x; then
49976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49978  fi
49979
49980
49981  windows_path="$new_path"
49982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49983    unix_path=`$CYGPATH -u "$windows_path"`
49984    new_path="$unix_path"
49985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49987    new_path="$unix_path"
49988  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49997  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49998
49999    else
50000      # We're on a unix platform. Hooray! :)
50001      path="$MSVC_DLL"
50002      has_space=`$ECHO "$path" | $GREP " "`
50003      if test "x$has_space" != x; then
50004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50005$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50006        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50007      fi
50008
50009      # Use eval to expand a potential ~
50010      eval path="$path"
50011      if test ! -f "$path" && test ! -d "$path"; then
50012        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50013      fi
50014
50015      if test -d "$path"; then
50016        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50017      else
50018        dir="`$DIRNAME "$path"`"
50019        base="`$BASENAME "$path"`"
50020        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50021      fi
50022    fi
50023  fi
50024
50025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50026$as_echo_n "checking for $DLL_NAME... " >&6; }
50027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50028$as_echo "$MSVC_DLL" >&6; }
50029    else
50030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50031$as_echo "incorrect, ignoring" >&6; }
50032      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50033$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50034    fi
50035  fi
50036
50037    fi
50038  fi
50039
50040  if test "x$MSVC_DLL" = x; then
50041    # Probe: Check in the Boot JDK directory.
50042    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50043
50044  DLL_NAME="$DLL_NAME"
50045  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50046  METHOD="well-known location in Boot JDK"
50047  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50049$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50050
50051    # Need to check if the found msvcr is correct architecture
50052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50053$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50054    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50056      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50057      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50058      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50059        CORRECT_MSVCR_ARCH="PE32 executable"
50060      else
50061        CORRECT_MSVCR_ARCH="PE32+ executable"
50062      fi
50063    else
50064      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50065        CORRECT_MSVCR_ARCH=386
50066      else
50067        CORRECT_MSVCR_ARCH=x86-64
50068      fi
50069    fi
50070    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50072$as_echo "ok" >&6; }
50073      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50074
50075  # Only process if variable expands to non-empty
50076
50077  if test "x$MSVC_DLL" != x; then
50078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50079
50080  # Input might be given as Windows format, start by converting to
50081  # unix format.
50082  path="$MSVC_DLL"
50083  new_path=`$CYGPATH -u "$path"`
50084
50085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50088  # "foo.exe" is OK but "foo" is an error.
50089  #
50090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50091  # It is also a way to make sure we got the proper file name for the real test later on.
50092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50093  if test "x$test_shortpath" = x; then
50094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50095$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50096    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50097  fi
50098
50099  # Call helper function which possibly converts this using DOS-style short mode.
50100  # If so, the updated path is stored in $new_path.
50101
50102  input_path="$new_path"
50103  # Check if we need to convert this using DOS-style short mode. If the path
50104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50105  # take no chances and rewrite it.
50106  # Note: m4 eats our [], so we need to use [ and ] instead.
50107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50108  if test "x$has_forbidden_chars" != x; then
50109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50113      # Going to short mode and back again did indeed matter. Since short mode is
50114      # case insensitive, let's make it lowercase to improve readability.
50115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50116      # Now convert it back to Unix-style (cygpath)
50117      input_path=`$CYGPATH -u "$shortmode_path"`
50118      new_path="$input_path"
50119    fi
50120  fi
50121
50122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50123  if test "x$test_cygdrive_prefix" = x; then
50124    # As a simple fix, exclude /usr/bin since it's not a real path.
50125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50127      # a path prefixed by /cygdrive for fixpath to work.
50128      new_path="$CYGWIN_ROOT_PATH$input_path"
50129    fi
50130  fi
50131
50132
50133  if test "x$path" != "x$new_path"; then
50134    MSVC_DLL="$new_path"
50135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50136$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50137  fi
50138
50139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50140
50141  path="$MSVC_DLL"
50142  has_colon=`$ECHO $path | $GREP ^.:`
50143  new_path="$path"
50144  if test "x$has_colon" = x; then
50145    # Not in mixed or Windows style, start by that.
50146    new_path=`cmd //c echo $path`
50147  fi
50148
50149
50150  input_path="$new_path"
50151  # Check if we need to convert this using DOS-style short mode. If the path
50152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50153  # take no chances and rewrite it.
50154  # Note: m4 eats our [], so we need to use [ and ] instead.
50155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50156  if test "x$has_forbidden_chars" != x; then
50157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50159  fi
50160
50161
50162  windows_path="$new_path"
50163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50164    unix_path=`$CYGPATH -u "$windows_path"`
50165    new_path="$unix_path"
50166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50168    new_path="$unix_path"
50169  fi
50170
50171  if test "x$path" != "x$new_path"; then
50172    MSVC_DLL="$new_path"
50173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50174$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50175  fi
50176
50177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50179
50180    else
50181      # We're on a unix platform. Hooray! :)
50182      path="$MSVC_DLL"
50183      has_space=`$ECHO "$path" | $GREP " "`
50184      if test "x$has_space" != x; then
50185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50186$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50188      fi
50189
50190      # Use eval to expand a potential ~
50191      eval path="$path"
50192      if test ! -f "$path" && test ! -d "$path"; then
50193        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50194      fi
50195
50196      if test -d "$path"; then
50197        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50198      else
50199        dir="`$DIRNAME "$path"`"
50200        base="`$BASENAME "$path"`"
50201        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50202      fi
50203    fi
50204  fi
50205
50206      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50207$as_echo_n "checking for $DLL_NAME... " >&6; }
50208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50209$as_echo "$MSVC_DLL" >&6; }
50210    else
50211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50212$as_echo "incorrect, ignoring" >&6; }
50213      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50214$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50215    fi
50216  fi
50217
50218  fi
50219
50220  if test "x$MSVC_DLL" = x; then
50221    # Probe: Look in the Windows system32 directory
50222    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50223
50224  windows_path="$CYGWIN_SYSTEMROOT"
50225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50226    unix_path=`$CYGPATH -u "$windows_path"`
50227    CYGWIN_SYSTEMROOT="$unix_path"
50228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50230    CYGWIN_SYSTEMROOT="$unix_path"
50231  fi
50232
50233    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50234
50235  DLL_NAME="$DLL_NAME"
50236  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50237  METHOD="well-known location in SYSTEMROOT"
50238  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50240$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50241
50242    # Need to check if the found msvcr is correct architecture
50243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50244$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50245    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50247      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50248      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50249      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50250        CORRECT_MSVCR_ARCH="PE32 executable"
50251      else
50252        CORRECT_MSVCR_ARCH="PE32+ executable"
50253      fi
50254    else
50255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50256        CORRECT_MSVCR_ARCH=386
50257      else
50258        CORRECT_MSVCR_ARCH=x86-64
50259      fi
50260    fi
50261    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50263$as_echo "ok" >&6; }
50264      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50265
50266  # Only process if variable expands to non-empty
50267
50268  if test "x$MSVC_DLL" != x; then
50269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50270
50271  # Input might be given as Windows format, start by converting to
50272  # unix format.
50273  path="$MSVC_DLL"
50274  new_path=`$CYGPATH -u "$path"`
50275
50276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50279  # "foo.exe" is OK but "foo" is an error.
50280  #
50281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50282  # It is also a way to make sure we got the proper file name for the real test later on.
50283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50284  if test "x$test_shortpath" = x; then
50285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50286$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50287    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50288  fi
50289
50290  # Call helper function which possibly converts this using DOS-style short mode.
50291  # If so, the updated path is stored in $new_path.
50292
50293  input_path="$new_path"
50294  # Check if we need to convert this using DOS-style short mode. If the path
50295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50296  # take no chances and rewrite it.
50297  # Note: m4 eats our [], so we need to use [ and ] instead.
50298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50299  if test "x$has_forbidden_chars" != x; then
50300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50304      # Going to short mode and back again did indeed matter. Since short mode is
50305      # case insensitive, let's make it lowercase to improve readability.
50306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50307      # Now convert it back to Unix-style (cygpath)
50308      input_path=`$CYGPATH -u "$shortmode_path"`
50309      new_path="$input_path"
50310    fi
50311  fi
50312
50313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50314  if test "x$test_cygdrive_prefix" = x; then
50315    # As a simple fix, exclude /usr/bin since it's not a real path.
50316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50318      # a path prefixed by /cygdrive for fixpath to work.
50319      new_path="$CYGWIN_ROOT_PATH$input_path"
50320    fi
50321  fi
50322
50323
50324  if test "x$path" != "x$new_path"; then
50325    MSVC_DLL="$new_path"
50326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50327$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50328  fi
50329
50330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50331
50332  path="$MSVC_DLL"
50333  has_colon=`$ECHO $path | $GREP ^.:`
50334  new_path="$path"
50335  if test "x$has_colon" = x; then
50336    # Not in mixed or Windows style, start by that.
50337    new_path=`cmd //c echo $path`
50338  fi
50339
50340
50341  input_path="$new_path"
50342  # Check if we need to convert this using DOS-style short mode. If the path
50343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50344  # take no chances and rewrite it.
50345  # Note: m4 eats our [], so we need to use [ and ] instead.
50346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50347  if test "x$has_forbidden_chars" != x; then
50348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50350  fi
50351
50352
50353  windows_path="$new_path"
50354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50355    unix_path=`$CYGPATH -u "$windows_path"`
50356    new_path="$unix_path"
50357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50359    new_path="$unix_path"
50360  fi
50361
50362  if test "x$path" != "x$new_path"; then
50363    MSVC_DLL="$new_path"
50364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50365$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50366  fi
50367
50368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50370
50371    else
50372      # We're on a unix platform. Hooray! :)
50373      path="$MSVC_DLL"
50374      has_space=`$ECHO "$path" | $GREP " "`
50375      if test "x$has_space" != x; then
50376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50377$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50379      fi
50380
50381      # Use eval to expand a potential ~
50382      eval path="$path"
50383      if test ! -f "$path" && test ! -d "$path"; then
50384        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50385      fi
50386
50387      if test -d "$path"; then
50388        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50389      else
50390        dir="`$DIRNAME "$path"`"
50391        base="`$BASENAME "$path"`"
50392        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50393      fi
50394    fi
50395  fi
50396
50397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50398$as_echo_n "checking for $DLL_NAME... " >&6; }
50399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50400$as_echo "$MSVC_DLL" >&6; }
50401    else
50402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50403$as_echo "incorrect, ignoring" >&6; }
50404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50406    fi
50407  fi
50408
50409  fi
50410
50411  if test "x$MSVC_DLL" = x; then
50412    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50413    if test "x$VS100COMNTOOLS" != x; then
50414      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50415
50416  windows_path="$CYGWIN_VS_TOOLS_DIR"
50417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50418    unix_path=`$CYGPATH -u "$windows_path"`
50419    CYGWIN_VS_TOOLS_DIR="$unix_path"
50420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50422    CYGWIN_VS_TOOLS_DIR="$unix_path"
50423  fi
50424
50425      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50426        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50427	    | $GREP -i /x64/ | $HEAD --lines 1`
50428      else
50429        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50430	    | $GREP -i /x86/ | $HEAD --lines 1`
50431      fi
50432
50433  DLL_NAME="$DLL_NAME"
50434  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50435  METHOD="search of VS100COMNTOOLS"
50436  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50437    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50438$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50439
50440    # Need to check if the found msvcr is correct architecture
50441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50442$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50443    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50445      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50446      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50448        CORRECT_MSVCR_ARCH="PE32 executable"
50449      else
50450        CORRECT_MSVCR_ARCH="PE32+ executable"
50451      fi
50452    else
50453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50454        CORRECT_MSVCR_ARCH=386
50455      else
50456        CORRECT_MSVCR_ARCH=x86-64
50457      fi
50458    fi
50459    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50461$as_echo "ok" >&6; }
50462      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50463
50464  # Only process if variable expands to non-empty
50465
50466  if test "x$MSVC_DLL" != x; then
50467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50468
50469  # Input might be given as Windows format, start by converting to
50470  # unix format.
50471  path="$MSVC_DLL"
50472  new_path=`$CYGPATH -u "$path"`
50473
50474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50477  # "foo.exe" is OK but "foo" is an error.
50478  #
50479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50480  # It is also a way to make sure we got the proper file name for the real test later on.
50481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50482  if test "x$test_shortpath" = x; then
50483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50484$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50485    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50486  fi
50487
50488  # Call helper function which possibly converts this using DOS-style short mode.
50489  # If so, the updated path is stored in $new_path.
50490
50491  input_path="$new_path"
50492  # Check if we need to convert this using DOS-style short mode. If the path
50493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50494  # take no chances and rewrite it.
50495  # Note: m4 eats our [], so we need to use [ and ] instead.
50496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50497  if test "x$has_forbidden_chars" != x; then
50498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50502      # Going to short mode and back again did indeed matter. Since short mode is
50503      # case insensitive, let's make it lowercase to improve readability.
50504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50505      # Now convert it back to Unix-style (cygpath)
50506      input_path=`$CYGPATH -u "$shortmode_path"`
50507      new_path="$input_path"
50508    fi
50509  fi
50510
50511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50512  if test "x$test_cygdrive_prefix" = x; then
50513    # As a simple fix, exclude /usr/bin since it's not a real path.
50514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50516      # a path prefixed by /cygdrive for fixpath to work.
50517      new_path="$CYGWIN_ROOT_PATH$input_path"
50518    fi
50519  fi
50520
50521
50522  if test "x$path" != "x$new_path"; then
50523    MSVC_DLL="$new_path"
50524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50526  fi
50527
50528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50529
50530  path="$MSVC_DLL"
50531  has_colon=`$ECHO $path | $GREP ^.:`
50532  new_path="$path"
50533  if test "x$has_colon" = x; then
50534    # Not in mixed or Windows style, start by that.
50535    new_path=`cmd //c echo $path`
50536  fi
50537
50538
50539  input_path="$new_path"
50540  # Check if we need to convert this using DOS-style short mode. If the path
50541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50542  # take no chances and rewrite it.
50543  # Note: m4 eats our [], so we need to use [ and ] instead.
50544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50545  if test "x$has_forbidden_chars" != x; then
50546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50548  fi
50549
50550
50551  windows_path="$new_path"
50552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50553    unix_path=`$CYGPATH -u "$windows_path"`
50554    new_path="$unix_path"
50555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50557    new_path="$unix_path"
50558  fi
50559
50560  if test "x$path" != "x$new_path"; then
50561    MSVC_DLL="$new_path"
50562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50564  fi
50565
50566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50568
50569    else
50570      # We're on a unix platform. Hooray! :)
50571      path="$MSVC_DLL"
50572      has_space=`$ECHO "$path" | $GREP " "`
50573      if test "x$has_space" != x; then
50574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50577      fi
50578
50579      # Use eval to expand a potential ~
50580      eval path="$path"
50581      if test ! -f "$path" && test ! -d "$path"; then
50582        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50583      fi
50584
50585      if test -d "$path"; then
50586        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50587      else
50588        dir="`$DIRNAME "$path"`"
50589        base="`$BASENAME "$path"`"
50590        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50591      fi
50592    fi
50593  fi
50594
50595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50596$as_echo_n "checking for $DLL_NAME... " >&6; }
50597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50598$as_echo "$MSVC_DLL" >&6; }
50599    else
50600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50601$as_echo "incorrect, ignoring" >&6; }
50602      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50603$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50604    fi
50605  fi
50606
50607    fi
50608  fi
50609
50610  if test "x$MSVC_DLL" = x; then
50611    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50612    # (This was the original behaviour; kept since it might turn something up)
50613    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50614      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50615        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50616	    | $GREP x64 | $HEAD --lines 1`
50617      else
50618        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50619	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50620        if test "x$POSSIBLE_MSVC_DLL" = x; then
50621          # We're grasping at straws now...
50622          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50623	      | $HEAD --lines 1`
50624        fi
50625      fi
50626
50627
50628  DLL_NAME="$DLL_NAME"
50629  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50630  METHOD="search of VCINSTALLDIR"
50631  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50633$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50634
50635    # Need to check if the found msvcr is correct architecture
50636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50637$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50638    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50640      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50641      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50642      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50643        CORRECT_MSVCR_ARCH="PE32 executable"
50644      else
50645        CORRECT_MSVCR_ARCH="PE32+ executable"
50646      fi
50647    else
50648      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50649        CORRECT_MSVCR_ARCH=386
50650      else
50651        CORRECT_MSVCR_ARCH=x86-64
50652      fi
50653    fi
50654    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50656$as_echo "ok" >&6; }
50657      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50658
50659  # Only process if variable expands to non-empty
50660
50661  if test "x$MSVC_DLL" != x; then
50662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50663
50664  # Input might be given as Windows format, start by converting to
50665  # unix format.
50666  path="$MSVC_DLL"
50667  new_path=`$CYGPATH -u "$path"`
50668
50669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50672  # "foo.exe" is OK but "foo" is an error.
50673  #
50674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50675  # It is also a way to make sure we got the proper file name for the real test later on.
50676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50677  if test "x$test_shortpath" = x; then
50678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50679$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50680    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50681  fi
50682
50683  # Call helper function which possibly converts this using DOS-style short mode.
50684  # If so, the updated path is stored in $new_path.
50685
50686  input_path="$new_path"
50687  # Check if we need to convert this using DOS-style short mode. If the path
50688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50689  # take no chances and rewrite it.
50690  # Note: m4 eats our [], so we need to use [ and ] instead.
50691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50692  if test "x$has_forbidden_chars" != x; then
50693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50697      # Going to short mode and back again did indeed matter. Since short mode is
50698      # case insensitive, let's make it lowercase to improve readability.
50699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50700      # Now convert it back to Unix-style (cygpath)
50701      input_path=`$CYGPATH -u "$shortmode_path"`
50702      new_path="$input_path"
50703    fi
50704  fi
50705
50706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50707  if test "x$test_cygdrive_prefix" = x; then
50708    # As a simple fix, exclude /usr/bin since it's not a real path.
50709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50711      # a path prefixed by /cygdrive for fixpath to work.
50712      new_path="$CYGWIN_ROOT_PATH$input_path"
50713    fi
50714  fi
50715
50716
50717  if test "x$path" != "x$new_path"; then
50718    MSVC_DLL="$new_path"
50719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50720$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50721  fi
50722
50723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50724
50725  path="$MSVC_DLL"
50726  has_colon=`$ECHO $path | $GREP ^.:`
50727  new_path="$path"
50728  if test "x$has_colon" = x; then
50729    # Not in mixed or Windows style, start by that.
50730    new_path=`cmd //c echo $path`
50731  fi
50732
50733
50734  input_path="$new_path"
50735  # Check if we need to convert this using DOS-style short mode. If the path
50736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50737  # take no chances and rewrite it.
50738  # Note: m4 eats our [], so we need to use [ and ] instead.
50739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50740  if test "x$has_forbidden_chars" != x; then
50741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50743  fi
50744
50745
50746  windows_path="$new_path"
50747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50748    unix_path=`$CYGPATH -u "$windows_path"`
50749    new_path="$unix_path"
50750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50752    new_path="$unix_path"
50753  fi
50754
50755  if test "x$path" != "x$new_path"; then
50756    MSVC_DLL="$new_path"
50757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50758$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50759  fi
50760
50761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50763
50764    else
50765      # We're on a unix platform. Hooray! :)
50766      path="$MSVC_DLL"
50767      has_space=`$ECHO "$path" | $GREP " "`
50768      if test "x$has_space" != x; then
50769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50770$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50772      fi
50773
50774      # Use eval to expand a potential ~
50775      eval path="$path"
50776      if test ! -f "$path" && test ! -d "$path"; then
50777        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50778      fi
50779
50780      if test -d "$path"; then
50781        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50782      else
50783        dir="`$DIRNAME "$path"`"
50784        base="`$BASENAME "$path"`"
50785        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50786      fi
50787    fi
50788  fi
50789
50790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50791$as_echo_n "checking for $DLL_NAME... " >&6; }
50792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50793$as_echo "$MSVC_DLL" >&6; }
50794    else
50795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50796$as_echo "incorrect, ignoring" >&6; }
50797      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50798$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50799    fi
50800  fi
50801
50802    fi
50803  fi
50804
50805  if test "x$MSVC_DLL" = x; then
50806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50807$as_echo_n "checking for $DLL_NAME... " >&6; }
50808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50809$as_echo "no" >&6; }
50810    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50811  fi
50812
50813      MSVCP_DLL="$MSVC_DLL"
50814    fi
50815
50816  fi
50817
50818  fi
50819
50820
50821  if test "x$NEEDS_LIB_X11" = xfalse; then
50822    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50823      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50824$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50825    fi
50826    X_CFLAGS=
50827    X_LIBS=
50828  else
50829
50830    if test "x${with_x}" = xno; then
50831      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50832    fi
50833
50834    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50835      # The user has specified a X11 base directory. Use it for includes and
50836      # libraries, unless explicitely overridden.
50837      if test "x$x_includes" = xNONE; then
50838        x_includes="${with_x}/include"
50839      fi
50840      if test "x$x_libraries" = xNONE; then
50841        x_libraries="${with_x}/lib"
50842      fi
50843    else
50844      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50845      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50846      # --x-libraries for the sysroot, if that seems to be correct.
50847      if test "x$SYSROOT" != "x"; then
50848        if test "x$x_includes" = xNONE; then
50849          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50850            x_includes="$SYSROOT/usr/X11R6/include"
50851          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50852            x_includes="$SYSROOT/usr/include"
50853          fi
50854        fi
50855        if test "x$x_libraries" = xNONE; then
50856          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50857            x_libraries="$SYSROOT/usr/X11R6/lib"
50858          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50859            x_libraries="$SYSROOT/usr/lib64"
50860          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50861            x_libraries="$SYSROOT/usr/lib"
50862          fi
50863        fi
50864      fi
50865    fi
50866
50867    # Now let autoconf do it's magic
50868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50869$as_echo_n "checking for X... " >&6; }
50870
50871
50872# Check whether --with-x was given.
50873if test "${with_x+set}" = set; then :
50874  withval=$with_x;
50875fi
50876
50877# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50878if test "x$with_x" = xno; then
50879  # The user explicitly disabled X.
50880  have_x=disabled
50881else
50882  case $x_includes,$x_libraries in #(
50883    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50884    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50885  $as_echo_n "(cached) " >&6
50886else
50887  # One or both of the vars are not set, and there is no cached value.
50888ac_x_includes=no ac_x_libraries=no
50889rm -f -r conftest.dir
50890if mkdir conftest.dir; then
50891  cd conftest.dir
50892  cat >Imakefile <<'_ACEOF'
50893incroot:
50894	@echo incroot='${INCROOT}'
50895usrlibdir:
50896	@echo usrlibdir='${USRLIBDIR}'
50897libdir:
50898	@echo libdir='${LIBDIR}'
50899_ACEOF
50900  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50901    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50902    for ac_var in incroot usrlibdir libdir; do
50903      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50904    done
50905    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50906    for ac_extension in a so sl dylib la dll; do
50907      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50908	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50909	ac_im_usrlibdir=$ac_im_libdir; break
50910      fi
50911    done
50912    # Screen out bogus values from the imake configuration.  They are
50913    # bogus both because they are the default anyway, and because
50914    # using them would break gcc on systems where it needs fixed includes.
50915    case $ac_im_incroot in
50916	/usr/include) ac_x_includes= ;;
50917	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50918    esac
50919    case $ac_im_usrlibdir in
50920	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50921	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50922    esac
50923  fi
50924  cd ..
50925  rm -f -r conftest.dir
50926fi
50927
50928# Standard set of common directories for X headers.
50929# Check X11 before X11Rn because it is often a symlink to the current release.
50930ac_x_header_dirs='
50931/usr/X11/include
50932/usr/X11R7/include
50933/usr/X11R6/include
50934/usr/X11R5/include
50935/usr/X11R4/include
50936
50937/usr/include/X11
50938/usr/include/X11R7
50939/usr/include/X11R6
50940/usr/include/X11R5
50941/usr/include/X11R4
50942
50943/usr/local/X11/include
50944/usr/local/X11R7/include
50945/usr/local/X11R6/include
50946/usr/local/X11R5/include
50947/usr/local/X11R4/include
50948
50949/usr/local/include/X11
50950/usr/local/include/X11R7
50951/usr/local/include/X11R6
50952/usr/local/include/X11R5
50953/usr/local/include/X11R4
50954
50955/usr/X386/include
50956/usr/x386/include
50957/usr/XFree86/include/X11
50958
50959/usr/include
50960/usr/local/include
50961/usr/unsupported/include
50962/usr/athena/include
50963/usr/local/x11r5/include
50964/usr/lpp/Xamples/include
50965
50966/usr/openwin/include
50967/usr/openwin/share/include'
50968
50969if test "$ac_x_includes" = no; then
50970  # Guess where to find include files, by looking for Xlib.h.
50971  # First, try using that file with no special directory specified.
50972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50973/* end confdefs.h.  */
50974#include <X11/Xlib.h>
50975_ACEOF
50976if ac_fn_cxx_try_cpp "$LINENO"; then :
50977  # We can compile using X headers with no special include directory.
50978ac_x_includes=
50979else
50980  for ac_dir in $ac_x_header_dirs; do
50981  if test -r "$ac_dir/X11/Xlib.h"; then
50982    ac_x_includes=$ac_dir
50983    break
50984  fi
50985done
50986fi
50987rm -f conftest.err conftest.i conftest.$ac_ext
50988fi # $ac_x_includes = no
50989
50990if test "$ac_x_libraries" = no; then
50991  # Check for the libraries.
50992  # See if we find them without any special options.
50993  # Don't add to $LIBS permanently.
50994  ac_save_LIBS=$LIBS
50995  LIBS="-lX11 $LIBS"
50996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50997/* end confdefs.h.  */
50998#include <X11/Xlib.h>
50999int
51000main ()
51001{
51002XrmInitialize ()
51003  ;
51004  return 0;
51005}
51006_ACEOF
51007if ac_fn_cxx_try_link "$LINENO"; then :
51008  LIBS=$ac_save_LIBS
51009# We can link X programs with no special library path.
51010ac_x_libraries=
51011else
51012  LIBS=$ac_save_LIBS
51013for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
51014do
51015  # Don't even attempt the hair of trying to link an X program!
51016  for ac_extension in a so sl dylib la dll; do
51017    if test -r "$ac_dir/libX11.$ac_extension"; then
51018      ac_x_libraries=$ac_dir
51019      break 2
51020    fi
51021  done
51022done
51023fi
51024rm -f core conftest.err conftest.$ac_objext \
51025    conftest$ac_exeext conftest.$ac_ext
51026fi # $ac_x_libraries = no
51027
51028case $ac_x_includes,$ac_x_libraries in #(
51029  no,* | *,no | *\'*)
51030    # Didn't find X, or a directory has "'" in its name.
51031    ac_cv_have_x="have_x=no";; #(
51032  *)
51033    # Record where we found X for the cache.
51034    ac_cv_have_x="have_x=yes\
51035	ac_x_includes='$ac_x_includes'\
51036	ac_x_libraries='$ac_x_libraries'"
51037esac
51038fi
51039;; #(
51040    *) have_x=yes;;
51041  esac
51042  eval "$ac_cv_have_x"
51043fi # $with_x != no
51044
51045if test "$have_x" != yes; then
51046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
51047$as_echo "$have_x" >&6; }
51048  no_x=yes
51049else
51050  # If each of the values was on the command line, it overrides each guess.
51051  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
51052  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
51053  # Update the cache value to reflect the command line values.
51054  ac_cv_have_x="have_x=yes\
51055	ac_x_includes='$x_includes'\
51056	ac_x_libraries='$x_libraries'"
51057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
51058$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
51059fi
51060
51061    if test "$no_x" = yes; then
51062  # Not all programs may use this symbol, but it does not hurt to define it.
51063
51064$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
51065
51066  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
51067else
51068  if test -n "$x_includes"; then
51069    X_CFLAGS="$X_CFLAGS -I$x_includes"
51070  fi
51071
51072  # It would also be nice to do this for all -L options, not just this one.
51073  if test -n "$x_libraries"; then
51074    X_LIBS="$X_LIBS -L$x_libraries"
51075    # For Solaris; some versions of Sun CC require a space after -R and
51076    # others require no space.  Words are not sufficient . . . .
51077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
51078$as_echo_n "checking whether -R must be followed by a space... " >&6; }
51079    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
51080    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
51081    ac_cxx_werror_flag=yes
51082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51083/* end confdefs.h.  */
51084
51085int
51086main ()
51087{
51088
51089  ;
51090  return 0;
51091}
51092_ACEOF
51093if ac_fn_cxx_try_link "$LINENO"; then :
51094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51095$as_echo "no" >&6; }
51096       X_LIBS="$X_LIBS -R$x_libraries"
51097else
51098  LIBS="$ac_xsave_LIBS -R $x_libraries"
51099       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51100/* end confdefs.h.  */
51101
51102int
51103main ()
51104{
51105
51106  ;
51107  return 0;
51108}
51109_ACEOF
51110if ac_fn_cxx_try_link "$LINENO"; then :
51111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51112$as_echo "yes" >&6; }
51113	  X_LIBS="$X_LIBS -R $x_libraries"
51114else
51115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51116$as_echo "neither works" >&6; }
51117fi
51118rm -f core conftest.err conftest.$ac_objext \
51119    conftest$ac_exeext conftest.$ac_ext
51120fi
51121rm -f core conftest.err conftest.$ac_objext \
51122    conftest$ac_exeext conftest.$ac_ext
51123    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51124    LIBS=$ac_xsave_LIBS
51125  fi
51126
51127  # Check for system-dependent libraries X programs must link with.
51128  # Do this before checking for the system-independent R6 libraries
51129  # (-lICE), since we may need -lsocket or whatever for X linking.
51130
51131  if test "$ISC" = yes; then
51132    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51133  else
51134    # Martyn Johnson says this is needed for Ultrix, if the X
51135    # libraries were built with DECnet support.  And Karl Berry says
51136    # the Alpha needs dnet_stub (dnet does not exist).
51137    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51138    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51139/* end confdefs.h.  */
51140
51141/* Override any GCC internal prototype to avoid an error.
51142   Use char because int might match the return type of a GCC
51143   builtin and then its argument prototype would still apply.  */
51144#ifdef __cplusplus
51145extern "C"
51146#endif
51147char XOpenDisplay ();
51148int
51149main ()
51150{
51151return XOpenDisplay ();
51152  ;
51153  return 0;
51154}
51155_ACEOF
51156if ac_fn_cxx_try_link "$LINENO"; then :
51157
51158else
51159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51160$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51161if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51162  $as_echo_n "(cached) " >&6
51163else
51164  ac_check_lib_save_LIBS=$LIBS
51165LIBS="-ldnet  $LIBS"
51166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51167/* end confdefs.h.  */
51168
51169/* Override any GCC internal prototype to avoid an error.
51170   Use char because int might match the return type of a GCC
51171   builtin and then its argument prototype would still apply.  */
51172#ifdef __cplusplus
51173extern "C"
51174#endif
51175char dnet_ntoa ();
51176int
51177main ()
51178{
51179return dnet_ntoa ();
51180  ;
51181  return 0;
51182}
51183_ACEOF
51184if ac_fn_cxx_try_link "$LINENO"; then :
51185  ac_cv_lib_dnet_dnet_ntoa=yes
51186else
51187  ac_cv_lib_dnet_dnet_ntoa=no
51188fi
51189rm -f core conftest.err conftest.$ac_objext \
51190    conftest$ac_exeext conftest.$ac_ext
51191LIBS=$ac_check_lib_save_LIBS
51192fi
51193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51194$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51195if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51196  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51197fi
51198
51199    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51201$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51202if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51203  $as_echo_n "(cached) " >&6
51204else
51205  ac_check_lib_save_LIBS=$LIBS
51206LIBS="-ldnet_stub  $LIBS"
51207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51208/* end confdefs.h.  */
51209
51210/* Override any GCC internal prototype to avoid an error.
51211   Use char because int might match the return type of a GCC
51212   builtin and then its argument prototype would still apply.  */
51213#ifdef __cplusplus
51214extern "C"
51215#endif
51216char dnet_ntoa ();
51217int
51218main ()
51219{
51220return dnet_ntoa ();
51221  ;
51222  return 0;
51223}
51224_ACEOF
51225if ac_fn_cxx_try_link "$LINENO"; then :
51226  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51227else
51228  ac_cv_lib_dnet_stub_dnet_ntoa=no
51229fi
51230rm -f core conftest.err conftest.$ac_objext \
51231    conftest$ac_exeext conftest.$ac_ext
51232LIBS=$ac_check_lib_save_LIBS
51233fi
51234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51235$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51236if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51237  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51238fi
51239
51240    fi
51241fi
51242rm -f core conftest.err conftest.$ac_objext \
51243    conftest$ac_exeext conftest.$ac_ext
51244    LIBS="$ac_xsave_LIBS"
51245
51246    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51247    # to get the SysV transport functions.
51248    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51249    # needs -lnsl.
51250    # The nsl library prevents programs from opening the X display
51251    # on Irix 5.2, according to T.E. Dickey.
51252    # The functions gethostbyname, getservbyname, and inet_addr are
51253    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51254    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51255if test "x$ac_cv_func_gethostbyname" = xyes; then :
51256
51257fi
51258
51259    if test $ac_cv_func_gethostbyname = no; then
51260      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51261$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51262if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51263  $as_echo_n "(cached) " >&6
51264else
51265  ac_check_lib_save_LIBS=$LIBS
51266LIBS="-lnsl  $LIBS"
51267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51268/* end confdefs.h.  */
51269
51270/* Override any GCC internal prototype to avoid an error.
51271   Use char because int might match the return type of a GCC
51272   builtin and then its argument prototype would still apply.  */
51273#ifdef __cplusplus
51274extern "C"
51275#endif
51276char gethostbyname ();
51277int
51278main ()
51279{
51280return gethostbyname ();
51281  ;
51282  return 0;
51283}
51284_ACEOF
51285if ac_fn_cxx_try_link "$LINENO"; then :
51286  ac_cv_lib_nsl_gethostbyname=yes
51287else
51288  ac_cv_lib_nsl_gethostbyname=no
51289fi
51290rm -f core conftest.err conftest.$ac_objext \
51291    conftest$ac_exeext conftest.$ac_ext
51292LIBS=$ac_check_lib_save_LIBS
51293fi
51294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51295$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51296if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51297  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51298fi
51299
51300      if test $ac_cv_lib_nsl_gethostbyname = no; then
51301	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51302$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51303if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51304  $as_echo_n "(cached) " >&6
51305else
51306  ac_check_lib_save_LIBS=$LIBS
51307LIBS="-lbsd  $LIBS"
51308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51309/* end confdefs.h.  */
51310
51311/* Override any GCC internal prototype to avoid an error.
51312   Use char because int might match the return type of a GCC
51313   builtin and then its argument prototype would still apply.  */
51314#ifdef __cplusplus
51315extern "C"
51316#endif
51317char gethostbyname ();
51318int
51319main ()
51320{
51321return gethostbyname ();
51322  ;
51323  return 0;
51324}
51325_ACEOF
51326if ac_fn_cxx_try_link "$LINENO"; then :
51327  ac_cv_lib_bsd_gethostbyname=yes
51328else
51329  ac_cv_lib_bsd_gethostbyname=no
51330fi
51331rm -f core conftest.err conftest.$ac_objext \
51332    conftest$ac_exeext conftest.$ac_ext
51333LIBS=$ac_check_lib_save_LIBS
51334fi
51335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51336$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51337if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51338  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51339fi
51340
51341      fi
51342    fi
51343
51344    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51345    # socket/setsockopt and other routines are undefined under SCO ODT
51346    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51347    # on later versions), says Simon Leinen: it contains gethostby*
51348    # variants that don't use the name server (or something).  -lsocket
51349    # must be given before -lnsl if both are needed.  We assume that
51350    # if connect needs -lnsl, so does gethostbyname.
51351    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51352if test "x$ac_cv_func_connect" = xyes; then :
51353
51354fi
51355
51356    if test $ac_cv_func_connect = no; then
51357      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51358$as_echo_n "checking for connect in -lsocket... " >&6; }
51359if ${ac_cv_lib_socket_connect+:} false; then :
51360  $as_echo_n "(cached) " >&6
51361else
51362  ac_check_lib_save_LIBS=$LIBS
51363LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51365/* end confdefs.h.  */
51366
51367/* Override any GCC internal prototype to avoid an error.
51368   Use char because int might match the return type of a GCC
51369   builtin and then its argument prototype would still apply.  */
51370#ifdef __cplusplus
51371extern "C"
51372#endif
51373char connect ();
51374int
51375main ()
51376{
51377return connect ();
51378  ;
51379  return 0;
51380}
51381_ACEOF
51382if ac_fn_cxx_try_link "$LINENO"; then :
51383  ac_cv_lib_socket_connect=yes
51384else
51385  ac_cv_lib_socket_connect=no
51386fi
51387rm -f core conftest.err conftest.$ac_objext \
51388    conftest$ac_exeext conftest.$ac_ext
51389LIBS=$ac_check_lib_save_LIBS
51390fi
51391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51392$as_echo "$ac_cv_lib_socket_connect" >&6; }
51393if test "x$ac_cv_lib_socket_connect" = xyes; then :
51394  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51395fi
51396
51397    fi
51398
51399    # Guillermo Gomez says -lposix is necessary on A/UX.
51400    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51401if test "x$ac_cv_func_remove" = xyes; then :
51402
51403fi
51404
51405    if test $ac_cv_func_remove = no; then
51406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51407$as_echo_n "checking for remove in -lposix... " >&6; }
51408if ${ac_cv_lib_posix_remove+:} false; then :
51409  $as_echo_n "(cached) " >&6
51410else
51411  ac_check_lib_save_LIBS=$LIBS
51412LIBS="-lposix  $LIBS"
51413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51414/* end confdefs.h.  */
51415
51416/* Override any GCC internal prototype to avoid an error.
51417   Use char because int might match the return type of a GCC
51418   builtin and then its argument prototype would still apply.  */
51419#ifdef __cplusplus
51420extern "C"
51421#endif
51422char remove ();
51423int
51424main ()
51425{
51426return remove ();
51427  ;
51428  return 0;
51429}
51430_ACEOF
51431if ac_fn_cxx_try_link "$LINENO"; then :
51432  ac_cv_lib_posix_remove=yes
51433else
51434  ac_cv_lib_posix_remove=no
51435fi
51436rm -f core conftest.err conftest.$ac_objext \
51437    conftest$ac_exeext conftest.$ac_ext
51438LIBS=$ac_check_lib_save_LIBS
51439fi
51440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51441$as_echo "$ac_cv_lib_posix_remove" >&6; }
51442if test "x$ac_cv_lib_posix_remove" = xyes; then :
51443  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51444fi
51445
51446    fi
51447
51448    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51449    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51450if test "x$ac_cv_func_shmat" = xyes; then :
51451
51452fi
51453
51454    if test $ac_cv_func_shmat = no; then
51455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51456$as_echo_n "checking for shmat in -lipc... " >&6; }
51457if ${ac_cv_lib_ipc_shmat+:} false; then :
51458  $as_echo_n "(cached) " >&6
51459else
51460  ac_check_lib_save_LIBS=$LIBS
51461LIBS="-lipc  $LIBS"
51462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51463/* end confdefs.h.  */
51464
51465/* Override any GCC internal prototype to avoid an error.
51466   Use char because int might match the return type of a GCC
51467   builtin and then its argument prototype would still apply.  */
51468#ifdef __cplusplus
51469extern "C"
51470#endif
51471char shmat ();
51472int
51473main ()
51474{
51475return shmat ();
51476  ;
51477  return 0;
51478}
51479_ACEOF
51480if ac_fn_cxx_try_link "$LINENO"; then :
51481  ac_cv_lib_ipc_shmat=yes
51482else
51483  ac_cv_lib_ipc_shmat=no
51484fi
51485rm -f core conftest.err conftest.$ac_objext \
51486    conftest$ac_exeext conftest.$ac_ext
51487LIBS=$ac_check_lib_save_LIBS
51488fi
51489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51490$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51491if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51492  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51493fi
51494
51495    fi
51496  fi
51497
51498  # Check for libraries that X11R6 Xt/Xaw programs need.
51499  ac_save_LDFLAGS=$LDFLAGS
51500  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51501  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51502  # check for ICE first), but we must link in the order -lSM -lICE or
51503  # we get undefined symbols.  So assume we have SM if we have ICE.
51504  # These have to be linked with before -lX11, unlike the other
51505  # libraries we check for below, so use a different variable.
51506  # John Interrante, Karl Berry
51507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51508$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51509if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51510  $as_echo_n "(cached) " >&6
51511else
51512  ac_check_lib_save_LIBS=$LIBS
51513LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51515/* end confdefs.h.  */
51516
51517/* Override any GCC internal prototype to avoid an error.
51518   Use char because int might match the return type of a GCC
51519   builtin and then its argument prototype would still apply.  */
51520#ifdef __cplusplus
51521extern "C"
51522#endif
51523char IceConnectionNumber ();
51524int
51525main ()
51526{
51527return IceConnectionNumber ();
51528  ;
51529  return 0;
51530}
51531_ACEOF
51532if ac_fn_cxx_try_link "$LINENO"; then :
51533  ac_cv_lib_ICE_IceConnectionNumber=yes
51534else
51535  ac_cv_lib_ICE_IceConnectionNumber=no
51536fi
51537rm -f core conftest.err conftest.$ac_objext \
51538    conftest$ac_exeext conftest.$ac_ext
51539LIBS=$ac_check_lib_save_LIBS
51540fi
51541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51542$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51543if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51544  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51545fi
51546
51547  LDFLAGS=$ac_save_LDFLAGS
51548
51549fi
51550
51551
51552    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51553    # this doesn't make sense so we remove it.
51554    if test "x$COMPILE_TYPE" = xcross; then
51555      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51556    fi
51557
51558    if test "x$no_x" = xyes; then
51559
51560  # Print a helpful message on how to acquire the necessary build dependency.
51561  # x11 is the help tag: freetype, cups, alsa etc
51562  MISSING_DEPENDENCY=x11
51563
51564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51565    cygwin_help $MISSING_DEPENDENCY
51566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51567    msys_help $MISSING_DEPENDENCY
51568  else
51569    PKGHANDLER_COMMAND=
51570
51571    case $PKGHANDLER in
51572      apt-get)
51573        apt_help     $MISSING_DEPENDENCY ;;
51574      yum)
51575        yum_help     $MISSING_DEPENDENCY ;;
51576      port)
51577        port_help    $MISSING_DEPENDENCY ;;
51578      pkgutil)
51579        pkgutil_help $MISSING_DEPENDENCY ;;
51580      pkgadd)
51581        pkgadd_help  $MISSING_DEPENDENCY ;;
51582    esac
51583
51584    if test "x$PKGHANDLER_COMMAND" != x; then
51585      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51586    fi
51587  fi
51588
51589      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51590    fi
51591
51592    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51593      OPENWIN_HOME="/usr/openwin"
51594      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51595      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51596          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51597          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51598          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51599    fi
51600
51601    ac_ext=c
51602ac_cpp='$CPP $CPPFLAGS'
51603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51605ac_compiler_gnu=$ac_cv_c_compiler_gnu
51606
51607    OLD_CFLAGS="$CFLAGS"
51608    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51609
51610    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51611    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51612do :
51613  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51614ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51615          # include <X11/Xlib.h>
51616          # include <X11/Xutil.h>
51617
51618
51619"
51620if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51621  cat >>confdefs.h <<_ACEOF
51622#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51623_ACEOF
51624 X11_HEADERS_OK=yes
51625else
51626  X11_HEADERS_OK=no; break
51627fi
51628
51629done
51630
51631
51632    if test "x$X11_HEADERS_OK" = xno; then
51633
51634  # Print a helpful message on how to acquire the necessary build dependency.
51635  # x11 is the help tag: freetype, cups, alsa etc
51636  MISSING_DEPENDENCY=x11
51637
51638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51639    cygwin_help $MISSING_DEPENDENCY
51640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51641    msys_help $MISSING_DEPENDENCY
51642  else
51643    PKGHANDLER_COMMAND=
51644
51645    case $PKGHANDLER in
51646      apt-get)
51647        apt_help     $MISSING_DEPENDENCY ;;
51648      yum)
51649        yum_help     $MISSING_DEPENDENCY ;;
51650      port)
51651        port_help    $MISSING_DEPENDENCY ;;
51652      pkgutil)
51653        pkgutil_help $MISSING_DEPENDENCY ;;
51654      pkgadd)
51655        pkgadd_help  $MISSING_DEPENDENCY ;;
51656    esac
51657
51658    if test "x$PKGHANDLER_COMMAND" != x; then
51659      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51660    fi
51661  fi
51662
51663      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51664    fi
51665
51666    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51667    # defined in libawt_xawt.
51668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51669$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51670    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51671/* end confdefs.h.  */
51672#include <X11/extensions/Xrender.h>
51673int
51674main ()
51675{
51676XLinearGradient x;
51677  ;
51678  return 0;
51679}
51680_ACEOF
51681if ac_fn_c_try_compile "$LINENO"; then :
51682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51683$as_echo "yes" >&6; }
51684else
51685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51686$as_echo "no" >&6; }
51687         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51688fi
51689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51690
51691    CFLAGS="$OLD_CFLAGS"
51692    ac_ext=cpp
51693ac_cpp='$CXXCPP $CPPFLAGS'
51694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51697
51698  fi # NEEDS_LIB_X11
51699
51700
51701
51702
51703
51704
51705# Check whether --with-cups was given.
51706if test "${with_cups+set}" = set; then :
51707  withval=$with_cups;
51708fi
51709
51710
51711# Check whether --with-cups-include was given.
51712if test "${with_cups_include+set}" = set; then :
51713  withval=$with_cups_include;
51714fi
51715
51716
51717  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51718    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51719        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51720      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51721$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51722    fi
51723    CUPS_CFLAGS=
51724  else
51725    CUPS_FOUND=no
51726
51727    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51728      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51729    fi
51730
51731    if test "x${with_cups}" != x; then
51732      CUPS_CFLAGS="-I${with_cups}/include"
51733      CUPS_FOUND=yes
51734    fi
51735    if test "x${with_cups_include}" != x; then
51736      CUPS_CFLAGS="-I${with_cups_include}"
51737      CUPS_FOUND=yes
51738    fi
51739    if test "x$CUPS_FOUND" = xno; then
51740      # Are the cups headers installed in the default /usr/include location?
51741      for ac_header in cups/cups.h cups/ppd.h
51742do :
51743  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51744ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51745if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51746  cat >>confdefs.h <<_ACEOF
51747#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51748_ACEOF
51749
51750          CUPS_FOUND=yes
51751          CUPS_CFLAGS=
51752          DEFAULT_CUPS=yes
51753
51754fi
51755
51756done
51757
51758    fi
51759    if test "x$CUPS_FOUND" = xno; then
51760      # Getting nervous now? Lets poke around for standard Solaris third-party
51761      # package installation locations.
51762      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51763$as_echo_n "checking for cups headers... " >&6; }
51764      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51765        # An SFW package seems to be installed!
51766        CUPS_FOUND=yes
51767        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51768      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51769        # A CSW package seems to be installed!
51770        CUPS_FOUND=yes
51771        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51772      fi
51773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51774$as_echo "$CUPS_FOUND" >&6; }
51775    fi
51776    if test "x$CUPS_FOUND" = xno; then
51777
51778  # Print a helpful message on how to acquire the necessary build dependency.
51779  # cups is the help tag: freetype, cups, alsa etc
51780  MISSING_DEPENDENCY=cups
51781
51782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51783    cygwin_help $MISSING_DEPENDENCY
51784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51785    msys_help $MISSING_DEPENDENCY
51786  else
51787    PKGHANDLER_COMMAND=
51788
51789    case $PKGHANDLER in
51790      apt-get)
51791        apt_help     $MISSING_DEPENDENCY ;;
51792      yum)
51793        yum_help     $MISSING_DEPENDENCY ;;
51794      port)
51795        port_help    $MISSING_DEPENDENCY ;;
51796      pkgutil)
51797        pkgutil_help $MISSING_DEPENDENCY ;;
51798      pkgadd)
51799        pkgadd_help  $MISSING_DEPENDENCY ;;
51800    esac
51801
51802    if test "x$PKGHANDLER_COMMAND" != x; then
51803      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51804    fi
51805  fi
51806
51807      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51808    fi
51809  fi
51810
51811
51812
51813
51814
51815# Check whether --with-freetype was given.
51816if test "${with_freetype+set}" = set; then :
51817  withval=$with_freetype;
51818fi
51819
51820
51821# Check whether --with-freetype-include was given.
51822if test "${with_freetype_include+set}" = set; then :
51823  withval=$with_freetype_include;
51824fi
51825
51826
51827# Check whether --with-freetype-lib was given.
51828if test "${with_freetype_lib+set}" = set; then :
51829  withval=$with_freetype_lib;
51830fi
51831
51832
51833# Check whether --with-freetype-src was given.
51834if test "${with_freetype_src+set}" = set; then :
51835  withval=$with_freetype_src;
51836fi
51837
51838  # Check whether --enable-freetype-bundling was given.
51839if test "${enable_freetype_bundling+set}" = set; then :
51840  enableval=$enable_freetype_bundling;
51841fi
51842
51843
51844  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51845  FREETYPE_BASE_NAME=freetype
51846  FREETYPE_CFLAGS=
51847  FREETYPE_LIBS=
51848  FREETYPE_BUNDLE_LIB_PATH=
51849
51850  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51851    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51852        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51853        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51854        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51855      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51856$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51857    fi
51858    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51860$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51861    fi
51862  else
51863    # freetype is needed to build; go get it!
51864
51865    BUNDLE_FREETYPE="$enable_freetype_bundling"
51866
51867    if  test "x$with_freetype_src" != x; then
51868      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51869        # Try to build freetype if --with-freetype-src was given on Windows
51870
51871  FREETYPE_SRC_PATH="$with_freetype_src"
51872  BUILD_FREETYPE=yes
51873
51874  # Check if the freetype sources are acessible..
51875  if ! test -d $FREETYPE_SRC_PATH; then
51876    { $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
51877$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51878    BUILD_FREETYPE=no
51879  fi
51880  # ..and contain a vc2010 project file
51881  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51882  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51883    { $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
51884$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51885    BUILD_FREETYPE=no
51886  fi
51887  # Now check if configure found a version of 'msbuild.exe'
51888  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51889    { $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
51890$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;}
51891    BUILD_FREETYPE=no
51892  fi
51893
51894  # Ready to go..
51895  if test "x$BUILD_FREETYPE" = xyes; then
51896    # msbuild requires trailing slashes for output directories
51897    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51898    freetype_lib_path_unix="$freetype_lib_path"
51899    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51900
51901  unix_path="$vcxproj_path"
51902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51903    windows_path=`$CYGPATH -m "$unix_path"`
51904    vcxproj_path="$windows_path"
51905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51906    windows_path=`cmd //c echo $unix_path`
51907    vcxproj_path="$windows_path"
51908  fi
51909
51910
51911  unix_path="$freetype_lib_path"
51912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51913    windows_path=`$CYGPATH -m "$unix_path"`
51914    freetype_lib_path="$windows_path"
51915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51916    windows_path=`cmd //c echo $unix_path`
51917    freetype_lib_path="$windows_path"
51918  fi
51919
51920
51921  unix_path="$freetype_obj_path"
51922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51923    windows_path=`$CYGPATH -m "$unix_path"`
51924    freetype_obj_path="$windows_path"
51925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51926    windows_path=`cmd //c echo $unix_path`
51927    freetype_obj_path="$windows_path"
51928  fi
51929
51930    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51931      freetype_platform=x64
51932    else
51933      freetype_platform=win32
51934    fi
51935
51936    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51937    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51938    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51939    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51940    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51941$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51942
51943    # First we try to build the freetype.dll
51944    $ECHO -e "@echo off\n"\
51945        "$MSBUILD $vcxproj_path "\
51946        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51947        "/p:Configuration=\"Release Multithreaded\" "\
51948        "/p:Platform=$freetype_platform "\
51949        "/p:ConfigurationType=DynamicLibrary "\
51950        "/p:TargetName=freetype "\
51951        "/p:OutDir=\"$freetype_lib_path\" "\
51952        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51953    cmd /c freetype.bat
51954
51955    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51956      # If that succeeds we also build freetype.lib
51957      $ECHO -e "@echo off\n"\
51958          "$MSBUILD $vcxproj_path "\
51959          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51960          "/p:Configuration=\"Release Multithreaded\" "\
51961          "/p:Platform=$freetype_platform "\
51962          "/p:ConfigurationType=StaticLibrary "\
51963          "/p:TargetName=freetype "\
51964          "/p:OutDir=\"$freetype_lib_path\" "\
51965          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51966      cmd /c freetype.bat
51967
51968      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51969        # Once we build both, lib and dll, set freetype lib and include path appropriately
51970        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51971        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51972        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51973$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51974      else
51975        BUILD_FREETYPE=no
51976      fi
51977    else
51978      BUILD_FREETYPE=no
51979    fi
51980  fi
51981
51982        if test "x$BUILD_FREETYPE" = xyes; then
51983          # Okay, we built it. Check that it works.
51984
51985  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51986  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51987  METHOD="--with-freetype-src"
51988
51989  # Let's start with an optimistic view of the world :-)
51990  FOUND_FREETYPE=yes
51991
51992  # First look for the canonical freetype main include file ft2build.h.
51993  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51994    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51995    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51996    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51997      # Fail.
51998      FOUND_FREETYPE=no
51999    fi
52000  fi
52001
52002  if test "x$FOUND_FREETYPE" = xyes; then
52003    # Include file found, let's continue the sanity check.
52004    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52005$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52006
52007    # Reset to default value
52008    FREETYPE_BASE_NAME=freetype
52009    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52010    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52011      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52012          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52013        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52014        # for the .6 version explicitly.
52015        FREETYPE_BASE_NAME=freetype.6
52016        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52017        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52018$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52019      else
52020        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52021$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52022        FOUND_FREETYPE=no
52023      fi
52024    else
52025      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52026        # On Windows, we will need both .lib and .dll file.
52027        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52028          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52029$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52030          FOUND_FREETYPE=no
52031        fi
52032      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52033          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52034        # Found lib in isa dir, use that instead.
52035        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52036        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52037$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52038      fi
52039    fi
52040  fi
52041
52042  if test "x$FOUND_FREETYPE" = xyes; then
52043
52044  # Only process if variable expands to non-empty
52045
52046  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52048
52049  # Input might be given as Windows format, start by converting to
52050  # unix format.
52051  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52052  new_path=`$CYGPATH -u "$path"`
52053
52054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52057  # "foo.exe" is OK but "foo" is an error.
52058  #
52059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52060  # It is also a way to make sure we got the proper file name for the real test later on.
52061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52062  if test "x$test_shortpath" = x; then
52063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52065    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52066  fi
52067
52068  # Call helper function which possibly converts this using DOS-style short mode.
52069  # If so, the updated path is stored in $new_path.
52070
52071  input_path="$new_path"
52072  # Check if we need to convert this using DOS-style short mode. If the path
52073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52074  # take no chances and rewrite it.
52075  # Note: m4 eats our [], so we need to use [ and ] instead.
52076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52077  if test "x$has_forbidden_chars" != x; then
52078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52082      # Going to short mode and back again did indeed matter. Since short mode is
52083      # case insensitive, let's make it lowercase to improve readability.
52084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52085      # Now convert it back to Unix-style (cygpath)
52086      input_path=`$CYGPATH -u "$shortmode_path"`
52087      new_path="$input_path"
52088    fi
52089  fi
52090
52091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52092  if test "x$test_cygdrive_prefix" = x; then
52093    # As a simple fix, exclude /usr/bin since it's not a real path.
52094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52096      # a path prefixed by /cygdrive for fixpath to work.
52097      new_path="$CYGWIN_ROOT_PATH$input_path"
52098    fi
52099  fi
52100
52101
52102  if test "x$path" != "x$new_path"; then
52103    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52106  fi
52107
52108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52109
52110  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52111  has_colon=`$ECHO $path | $GREP ^.:`
52112  new_path="$path"
52113  if test "x$has_colon" = x; then
52114    # Not in mixed or Windows style, start by that.
52115    new_path=`cmd //c echo $path`
52116  fi
52117
52118
52119  input_path="$new_path"
52120  # Check if we need to convert this using DOS-style short mode. If the path
52121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52122  # take no chances and rewrite it.
52123  # Note: m4 eats our [], so we need to use [ and ] instead.
52124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52125  if test "x$has_forbidden_chars" != x; then
52126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52128  fi
52129
52130
52131  windows_path="$new_path"
52132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52133    unix_path=`$CYGPATH -u "$windows_path"`
52134    new_path="$unix_path"
52135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52137    new_path="$unix_path"
52138  fi
52139
52140  if test "x$path" != "x$new_path"; then
52141    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52144  fi
52145
52146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52148
52149    else
52150      # We're on a unix platform. Hooray! :)
52151      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52152      has_space=`$ECHO "$path" | $GREP " "`
52153      if test "x$has_space" != x; then
52154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52157      fi
52158
52159      # Use eval to expand a potential ~
52160      eval path="$path"
52161      if test ! -f "$path" && test ! -d "$path"; then
52162        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52163      fi
52164
52165      if test -d "$path"; then
52166        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52167      else
52168        dir="`$DIRNAME "$path"`"
52169        base="`$BASENAME "$path"`"
52170        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52171      fi
52172    fi
52173  fi
52174
52175
52176  # Only process if variable expands to non-empty
52177
52178  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52180
52181  # Input might be given as Windows format, start by converting to
52182  # unix format.
52183  path="$POTENTIAL_FREETYPE_LIB_PATH"
52184  new_path=`$CYGPATH -u "$path"`
52185
52186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52189  # "foo.exe" is OK but "foo" is an error.
52190  #
52191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52192  # It is also a way to make sure we got the proper file name for the real test later on.
52193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52194  if test "x$test_shortpath" = x; then
52195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52197    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52198  fi
52199
52200  # Call helper function which possibly converts this using DOS-style short mode.
52201  # If so, the updated path is stored in $new_path.
52202
52203  input_path="$new_path"
52204  # Check if we need to convert this using DOS-style short mode. If the path
52205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52206  # take no chances and rewrite it.
52207  # Note: m4 eats our [], so we need to use [ and ] instead.
52208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52209  if test "x$has_forbidden_chars" != x; then
52210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52214      # Going to short mode and back again did indeed matter. Since short mode is
52215      # case insensitive, let's make it lowercase to improve readability.
52216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52217      # Now convert it back to Unix-style (cygpath)
52218      input_path=`$CYGPATH -u "$shortmode_path"`
52219      new_path="$input_path"
52220    fi
52221  fi
52222
52223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52224  if test "x$test_cygdrive_prefix" = x; then
52225    # As a simple fix, exclude /usr/bin since it's not a real path.
52226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52228      # a path prefixed by /cygdrive for fixpath to work.
52229      new_path="$CYGWIN_ROOT_PATH$input_path"
52230    fi
52231  fi
52232
52233
52234  if test "x$path" != "x$new_path"; then
52235    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52238  fi
52239
52240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52241
52242  path="$POTENTIAL_FREETYPE_LIB_PATH"
52243  has_colon=`$ECHO $path | $GREP ^.:`
52244  new_path="$path"
52245  if test "x$has_colon" = x; then
52246    # Not in mixed or Windows style, start by that.
52247    new_path=`cmd //c echo $path`
52248  fi
52249
52250
52251  input_path="$new_path"
52252  # Check if we need to convert this using DOS-style short mode. If the path
52253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52254  # take no chances and rewrite it.
52255  # Note: m4 eats our [], so we need to use [ and ] instead.
52256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52257  if test "x$has_forbidden_chars" != x; then
52258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52260  fi
52261
52262
52263  windows_path="$new_path"
52264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52265    unix_path=`$CYGPATH -u "$windows_path"`
52266    new_path="$unix_path"
52267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52269    new_path="$unix_path"
52270  fi
52271
52272  if test "x$path" != "x$new_path"; then
52273    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52276  fi
52277
52278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52280
52281    else
52282      # We're on a unix platform. Hooray! :)
52283      path="$POTENTIAL_FREETYPE_LIB_PATH"
52284      has_space=`$ECHO "$path" | $GREP " "`
52285      if test "x$has_space" != x; then
52286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52287$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52289      fi
52290
52291      # Use eval to expand a potential ~
52292      eval path="$path"
52293      if test ! -f "$path" && test ! -d "$path"; then
52294        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52295      fi
52296
52297      if test -d "$path"; then
52298        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52299      else
52300        dir="`$DIRNAME "$path"`"
52301        base="`$BASENAME "$path"`"
52302        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52303      fi
52304    fi
52305  fi
52306
52307
52308    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52310$as_echo_n "checking for freetype includes... " >&6; }
52311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52312$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52313    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52315$as_echo_n "checking for freetype libraries... " >&6; }
52316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52317$as_echo "$FREETYPE_LIB_PATH" >&6; }
52318  fi
52319
52320          if test "x$FOUND_FREETYPE" != xyes; then
52321            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52322          fi
52323        else
52324          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52325$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52326          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52327        fi
52328      else
52329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52330$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52331      fi
52332    fi
52333
52334    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52335      # User has specified settings
52336
52337      if test "x$BUNDLE_FREETYPE" = x; then
52338        # If not specified, default is to bundle freetype
52339        BUNDLE_FREETYPE=yes
52340      fi
52341
52342      if test "x$with_freetype" != x; then
52343        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52344        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52345      fi
52346
52347      # Allow --with-freetype-lib and --with-freetype-include to override
52348      if test "x$with_freetype_include" != x; then
52349        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52350      fi
52351      if test "x$with_freetype_lib" != x; then
52352        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52353      fi
52354
52355      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52356        # Okay, we got it. Check that it works.
52357
52358  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52359  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52360  METHOD="--with-freetype"
52361
52362  # Let's start with an optimistic view of the world :-)
52363  FOUND_FREETYPE=yes
52364
52365  # First look for the canonical freetype main include file ft2build.h.
52366  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52367    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52368    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52369    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52370      # Fail.
52371      FOUND_FREETYPE=no
52372    fi
52373  fi
52374
52375  if test "x$FOUND_FREETYPE" = xyes; then
52376    # Include file found, let's continue the sanity check.
52377    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52378$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52379
52380    # Reset to default value
52381    FREETYPE_BASE_NAME=freetype
52382    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52383    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52384      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52385          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52386        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52387        # for the .6 version explicitly.
52388        FREETYPE_BASE_NAME=freetype.6
52389        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52390        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52391$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52392      else
52393        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52394$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52395        FOUND_FREETYPE=no
52396      fi
52397    else
52398      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52399        # On Windows, we will need both .lib and .dll file.
52400        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52401          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52402$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52403          FOUND_FREETYPE=no
52404        fi
52405      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52406          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52407        # Found lib in isa dir, use that instead.
52408        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52409        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52410$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52411      fi
52412    fi
52413  fi
52414
52415  if test "x$FOUND_FREETYPE" = xyes; then
52416
52417  # Only process if variable expands to non-empty
52418
52419  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52421
52422  # Input might be given as Windows format, start by converting to
52423  # unix format.
52424  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52425  new_path=`$CYGPATH -u "$path"`
52426
52427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52430  # "foo.exe" is OK but "foo" is an error.
52431  #
52432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52433  # It is also a way to make sure we got the proper file name for the real test later on.
52434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52435  if test "x$test_shortpath" = x; then
52436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52438    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52439  fi
52440
52441  # Call helper function which possibly converts this using DOS-style short mode.
52442  # If so, the updated path is stored in $new_path.
52443
52444  input_path="$new_path"
52445  # Check if we need to convert this using DOS-style short mode. If the path
52446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52447  # take no chances and rewrite it.
52448  # Note: m4 eats our [], so we need to use [ and ] instead.
52449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52450  if test "x$has_forbidden_chars" != x; then
52451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52455      # Going to short mode and back again did indeed matter. Since short mode is
52456      # case insensitive, let's make it lowercase to improve readability.
52457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52458      # Now convert it back to Unix-style (cygpath)
52459      input_path=`$CYGPATH -u "$shortmode_path"`
52460      new_path="$input_path"
52461    fi
52462  fi
52463
52464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52465  if test "x$test_cygdrive_prefix" = x; then
52466    # As a simple fix, exclude /usr/bin since it's not a real path.
52467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52469      # a path prefixed by /cygdrive for fixpath to work.
52470      new_path="$CYGWIN_ROOT_PATH$input_path"
52471    fi
52472  fi
52473
52474
52475  if test "x$path" != "x$new_path"; then
52476    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52478$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52479  fi
52480
52481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52482
52483  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52484  has_colon=`$ECHO $path | $GREP ^.:`
52485  new_path="$path"
52486  if test "x$has_colon" = x; then
52487    # Not in mixed or Windows style, start by that.
52488    new_path=`cmd //c echo $path`
52489  fi
52490
52491
52492  input_path="$new_path"
52493  # Check if we need to convert this using DOS-style short mode. If the path
52494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52495  # take no chances and rewrite it.
52496  # Note: m4 eats our [], so we need to use [ and ] instead.
52497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52498  if test "x$has_forbidden_chars" != x; then
52499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52501  fi
52502
52503
52504  windows_path="$new_path"
52505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52506    unix_path=`$CYGPATH -u "$windows_path"`
52507    new_path="$unix_path"
52508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52510    new_path="$unix_path"
52511  fi
52512
52513  if test "x$path" != "x$new_path"; then
52514    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52516$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52517  fi
52518
52519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52521
52522    else
52523      # We're on a unix platform. Hooray! :)
52524      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52525      has_space=`$ECHO "$path" | $GREP " "`
52526      if test "x$has_space" != x; then
52527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52530      fi
52531
52532      # Use eval to expand a potential ~
52533      eval path="$path"
52534      if test ! -f "$path" && test ! -d "$path"; then
52535        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52536      fi
52537
52538      if test -d "$path"; then
52539        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52540      else
52541        dir="`$DIRNAME "$path"`"
52542        base="`$BASENAME "$path"`"
52543        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52544      fi
52545    fi
52546  fi
52547
52548
52549  # Only process if variable expands to non-empty
52550
52551  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52553
52554  # Input might be given as Windows format, start by converting to
52555  # unix format.
52556  path="$POTENTIAL_FREETYPE_LIB_PATH"
52557  new_path=`$CYGPATH -u "$path"`
52558
52559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52562  # "foo.exe" is OK but "foo" is an error.
52563  #
52564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52565  # It is also a way to make sure we got the proper file name for the real test later on.
52566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52567  if test "x$test_shortpath" = x; then
52568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52570    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52571  fi
52572
52573  # Call helper function which possibly converts this using DOS-style short mode.
52574  # If so, the updated path is stored in $new_path.
52575
52576  input_path="$new_path"
52577  # Check if we need to convert this using DOS-style short mode. If the path
52578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52579  # take no chances and rewrite it.
52580  # Note: m4 eats our [], so we need to use [ and ] instead.
52581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52582  if test "x$has_forbidden_chars" != x; then
52583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52587      # Going to short mode and back again did indeed matter. Since short mode is
52588      # case insensitive, let's make it lowercase to improve readability.
52589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52590      # Now convert it back to Unix-style (cygpath)
52591      input_path=`$CYGPATH -u "$shortmode_path"`
52592      new_path="$input_path"
52593    fi
52594  fi
52595
52596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52597  if test "x$test_cygdrive_prefix" = x; then
52598    # As a simple fix, exclude /usr/bin since it's not a real path.
52599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52601      # a path prefixed by /cygdrive for fixpath to work.
52602      new_path="$CYGWIN_ROOT_PATH$input_path"
52603    fi
52604  fi
52605
52606
52607  if test "x$path" != "x$new_path"; then
52608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52611  fi
52612
52613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52614
52615  path="$POTENTIAL_FREETYPE_LIB_PATH"
52616  has_colon=`$ECHO $path | $GREP ^.:`
52617  new_path="$path"
52618  if test "x$has_colon" = x; then
52619    # Not in mixed or Windows style, start by that.
52620    new_path=`cmd //c echo $path`
52621  fi
52622
52623
52624  input_path="$new_path"
52625  # Check if we need to convert this using DOS-style short mode. If the path
52626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52627  # take no chances and rewrite it.
52628  # Note: m4 eats our [], so we need to use [ and ] instead.
52629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52630  if test "x$has_forbidden_chars" != x; then
52631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52633  fi
52634
52635
52636  windows_path="$new_path"
52637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52638    unix_path=`$CYGPATH -u "$windows_path"`
52639    new_path="$unix_path"
52640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52642    new_path="$unix_path"
52643  fi
52644
52645  if test "x$path" != "x$new_path"; then
52646    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52649  fi
52650
52651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52653
52654    else
52655      # We're on a unix platform. Hooray! :)
52656      path="$POTENTIAL_FREETYPE_LIB_PATH"
52657      has_space=`$ECHO "$path" | $GREP " "`
52658      if test "x$has_space" != x; then
52659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52662      fi
52663
52664      # Use eval to expand a potential ~
52665      eval path="$path"
52666      if test ! -f "$path" && test ! -d "$path"; then
52667        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52668      fi
52669
52670      if test -d "$path"; then
52671        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52672      else
52673        dir="`$DIRNAME "$path"`"
52674        base="`$BASENAME "$path"`"
52675        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52676      fi
52677    fi
52678  fi
52679
52680
52681    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52683$as_echo_n "checking for freetype includes... " >&6; }
52684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52685$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52686    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52688$as_echo_n "checking for freetype libraries... " >&6; }
52689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52690$as_echo "$FREETYPE_LIB_PATH" >&6; }
52691  fi
52692
52693        if test "x$FOUND_FREETYPE" != xyes; then
52694          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52695        fi
52696      else
52697        # User specified only one of lib or include. This is an error.
52698        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52699          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52700$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52701          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52702        else
52703          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52704$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52705          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52706        fi
52707      fi
52708    else
52709      # User did not specify settings, but we need freetype. Try to locate it.
52710
52711      if test "x$BUNDLE_FREETYPE" = x; then
52712        # If not specified, default is to bundle freetype only on windows
52713        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52714          BUNDLE_FREETYPE=yes
52715        else
52716          BUNDLE_FREETYPE=no
52717        fi
52718      fi
52719
52720      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52721      if test "x$SYSROOT" = x; then
52722        if test "x$FOUND_FREETYPE" != xyes; then
52723          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52724          if test "x$PKG_CONFIG" != x; then
52725
52726pkg_failed=no
52727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52728$as_echo_n "checking for FREETYPE... " >&6; }
52729
52730if test -n "$FREETYPE_CFLAGS"; then
52731    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52732 elif test -n "$PKG_CONFIG"; then
52733    if test -n "$PKG_CONFIG" && \
52734    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52735  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52736  ac_status=$?
52737  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52738  test $ac_status = 0; }; then
52739  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52740else
52741  pkg_failed=yes
52742fi
52743 else
52744    pkg_failed=untried
52745fi
52746if test -n "$FREETYPE_LIBS"; then
52747    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52748 elif test -n "$PKG_CONFIG"; then
52749    if test -n "$PKG_CONFIG" && \
52750    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52751  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52752  ac_status=$?
52753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52754  test $ac_status = 0; }; then
52755  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52756else
52757  pkg_failed=yes
52758fi
52759 else
52760    pkg_failed=untried
52761fi
52762
52763
52764
52765if test $pkg_failed = yes; then
52766
52767if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52768        _pkg_short_errors_supported=yes
52769else
52770        _pkg_short_errors_supported=no
52771fi
52772        if test $_pkg_short_errors_supported = yes; then
52773	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52774        else
52775	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52776        fi
52777	# Put the nasty error message in config.log where it belongs
52778	echo "$FREETYPE_PKG_ERRORS" >&5
52779
52780	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52781$as_echo "no" >&6; }
52782                FOUND_FREETYPE=no
52783elif test $pkg_failed = untried; then
52784	FOUND_FREETYPE=no
52785else
52786	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52787	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52789$as_echo "yes" >&6; }
52790	FOUND_FREETYPE=yes
52791fi
52792            if test "x$FOUND_FREETYPE" = xyes; then
52793              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52794              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52795              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52796              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52797                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52798              fi
52799              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52800              if test "x$BUNDLE_FREETYPE" = xyes; then
52801                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52802$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52803                FOUND_FREETYPE=no
52804              else
52805                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52806$as_echo_n "checking for freetype... " >&6; }
52807                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52808$as_echo "yes (using pkg-config)" >&6; }
52809              fi
52810            fi
52811          fi
52812        fi
52813      fi
52814
52815      if test "x$FOUND_FREETYPE" != xyes; then
52816        # Check in well-known locations
52817        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52818          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52819
52820  windows_path="$FREETYPE_BASE_DIR"
52821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52822    unix_path=`$CYGPATH -u "$windows_path"`
52823    FREETYPE_BASE_DIR="$unix_path"
52824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52826    FREETYPE_BASE_DIR="$unix_path"
52827  fi
52828
52829
52830  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52831  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52832  METHOD="well-known location"
52833
52834  # Let's start with an optimistic view of the world :-)
52835  FOUND_FREETYPE=yes
52836
52837  # First look for the canonical freetype main include file ft2build.h.
52838  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52839    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52840    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52841    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52842      # Fail.
52843      FOUND_FREETYPE=no
52844    fi
52845  fi
52846
52847  if test "x$FOUND_FREETYPE" = xyes; then
52848    # Include file found, let's continue the sanity check.
52849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52850$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52851
52852    # Reset to default value
52853    FREETYPE_BASE_NAME=freetype
52854    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52855    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52856      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52857          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52858        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52859        # for the .6 version explicitly.
52860        FREETYPE_BASE_NAME=freetype.6
52861        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52862        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52863$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52864      else
52865        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52867        FOUND_FREETYPE=no
52868      fi
52869    else
52870      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52871        # On Windows, we will need both .lib and .dll file.
52872        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52873          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52874$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52875          FOUND_FREETYPE=no
52876        fi
52877      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52878          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52879        # Found lib in isa dir, use that instead.
52880        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52881        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52882$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52883      fi
52884    fi
52885  fi
52886
52887  if test "x$FOUND_FREETYPE" = xyes; then
52888
52889  # Only process if variable expands to non-empty
52890
52891  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52893
52894  # Input might be given as Windows format, start by converting to
52895  # unix format.
52896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52897  new_path=`$CYGPATH -u "$path"`
52898
52899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52902  # "foo.exe" is OK but "foo" is an error.
52903  #
52904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52905  # It is also a way to make sure we got the proper file name for the real test later on.
52906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52907  if test "x$test_shortpath" = x; then
52908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52911  fi
52912
52913  # Call helper function which possibly converts this using DOS-style short mode.
52914  # If so, the updated path is stored in $new_path.
52915
52916  input_path="$new_path"
52917  # Check if we need to convert this using DOS-style short mode. If the path
52918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52919  # take no chances and rewrite it.
52920  # Note: m4 eats our [], so we need to use [ and ] instead.
52921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52922  if test "x$has_forbidden_chars" != x; then
52923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52927      # Going to short mode and back again did indeed matter. Since short mode is
52928      # case insensitive, let's make it lowercase to improve readability.
52929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52930      # Now convert it back to Unix-style (cygpath)
52931      input_path=`$CYGPATH -u "$shortmode_path"`
52932      new_path="$input_path"
52933    fi
52934  fi
52935
52936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52937  if test "x$test_cygdrive_prefix" = x; then
52938    # As a simple fix, exclude /usr/bin since it's not a real path.
52939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52941      # a path prefixed by /cygdrive for fixpath to work.
52942      new_path="$CYGWIN_ROOT_PATH$input_path"
52943    fi
52944  fi
52945
52946
52947  if test "x$path" != "x$new_path"; then
52948    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52951  fi
52952
52953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52954
52955  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52956  has_colon=`$ECHO $path | $GREP ^.:`
52957  new_path="$path"
52958  if test "x$has_colon" = x; then
52959    # Not in mixed or Windows style, start by that.
52960    new_path=`cmd //c echo $path`
52961  fi
52962
52963
52964  input_path="$new_path"
52965  # Check if we need to convert this using DOS-style short mode. If the path
52966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52967  # take no chances and rewrite it.
52968  # Note: m4 eats our [], so we need to use [ and ] instead.
52969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52970  if test "x$has_forbidden_chars" != x; then
52971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52973  fi
52974
52975
52976  windows_path="$new_path"
52977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52978    unix_path=`$CYGPATH -u "$windows_path"`
52979    new_path="$unix_path"
52980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52982    new_path="$unix_path"
52983  fi
52984
52985  if test "x$path" != "x$new_path"; then
52986    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52989  fi
52990
52991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52993
52994    else
52995      # We're on a unix platform. Hooray! :)
52996      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52997      has_space=`$ECHO "$path" | $GREP " "`
52998      if test "x$has_space" != x; then
52999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53002      fi
53003
53004      # Use eval to expand a potential ~
53005      eval path="$path"
53006      if test ! -f "$path" && test ! -d "$path"; then
53007        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53008      fi
53009
53010      if test -d "$path"; then
53011        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53012      else
53013        dir="`$DIRNAME "$path"`"
53014        base="`$BASENAME "$path"`"
53015        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53016      fi
53017    fi
53018  fi
53019
53020
53021  # Only process if variable expands to non-empty
53022
53023  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53025
53026  # Input might be given as Windows format, start by converting to
53027  # unix format.
53028  path="$POTENTIAL_FREETYPE_LIB_PATH"
53029  new_path=`$CYGPATH -u "$path"`
53030
53031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53034  # "foo.exe" is OK but "foo" is an error.
53035  #
53036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53037  # It is also a way to make sure we got the proper file name for the real test later on.
53038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53039  if test "x$test_shortpath" = x; then
53040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53042    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53043  fi
53044
53045  # Call helper function which possibly converts this using DOS-style short mode.
53046  # If so, the updated path is stored in $new_path.
53047
53048  input_path="$new_path"
53049  # Check if we need to convert this using DOS-style short mode. If the path
53050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53051  # take no chances and rewrite it.
53052  # Note: m4 eats our [], so we need to use [ and ] instead.
53053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53054  if test "x$has_forbidden_chars" != x; then
53055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53059      # Going to short mode and back again did indeed matter. Since short mode is
53060      # case insensitive, let's make it lowercase to improve readability.
53061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53062      # Now convert it back to Unix-style (cygpath)
53063      input_path=`$CYGPATH -u "$shortmode_path"`
53064      new_path="$input_path"
53065    fi
53066  fi
53067
53068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53069  if test "x$test_cygdrive_prefix" = x; then
53070    # As a simple fix, exclude /usr/bin since it's not a real path.
53071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53073      # a path prefixed by /cygdrive for fixpath to work.
53074      new_path="$CYGWIN_ROOT_PATH$input_path"
53075    fi
53076  fi
53077
53078
53079  if test "x$path" != "x$new_path"; then
53080    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53083  fi
53084
53085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53086
53087  path="$POTENTIAL_FREETYPE_LIB_PATH"
53088  has_colon=`$ECHO $path | $GREP ^.:`
53089  new_path="$path"
53090  if test "x$has_colon" = x; then
53091    # Not in mixed or Windows style, start by that.
53092    new_path=`cmd //c echo $path`
53093  fi
53094
53095
53096  input_path="$new_path"
53097  # Check if we need to convert this using DOS-style short mode. If the path
53098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53099  # take no chances and rewrite it.
53100  # Note: m4 eats our [], so we need to use [ and ] instead.
53101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53102  if test "x$has_forbidden_chars" != x; then
53103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53105  fi
53106
53107
53108  windows_path="$new_path"
53109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53110    unix_path=`$CYGPATH -u "$windows_path"`
53111    new_path="$unix_path"
53112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53114    new_path="$unix_path"
53115  fi
53116
53117  if test "x$path" != "x$new_path"; then
53118    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53121  fi
53122
53123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53125
53126    else
53127      # We're on a unix platform. Hooray! :)
53128      path="$POTENTIAL_FREETYPE_LIB_PATH"
53129      has_space=`$ECHO "$path" | $GREP " "`
53130      if test "x$has_space" != x; then
53131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53134      fi
53135
53136      # Use eval to expand a potential ~
53137      eval path="$path"
53138      if test ! -f "$path" && test ! -d "$path"; then
53139        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53140      fi
53141
53142      if test -d "$path"; then
53143        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53144      else
53145        dir="`$DIRNAME "$path"`"
53146        base="`$BASENAME "$path"`"
53147        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53148      fi
53149    fi
53150  fi
53151
53152
53153    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53155$as_echo_n "checking for freetype includes... " >&6; }
53156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53157$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53158    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53160$as_echo_n "checking for freetype libraries... " >&6; }
53161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53162$as_echo "$FREETYPE_LIB_PATH" >&6; }
53163  fi
53164
53165          if test "x$FOUND_FREETYPE" != xyes; then
53166            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53167
53168  windows_path="$FREETYPE_BASE_DIR"
53169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53170    unix_path=`$CYGPATH -u "$windows_path"`
53171    FREETYPE_BASE_DIR="$unix_path"
53172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53174    FREETYPE_BASE_DIR="$unix_path"
53175  fi
53176
53177
53178  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53179  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53180  METHOD="well-known location"
53181
53182  # Let's start with an optimistic view of the world :-)
53183  FOUND_FREETYPE=yes
53184
53185  # First look for the canonical freetype main include file ft2build.h.
53186  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53187    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53188    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53189    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53190      # Fail.
53191      FOUND_FREETYPE=no
53192    fi
53193  fi
53194
53195  if test "x$FOUND_FREETYPE" = xyes; then
53196    # Include file found, let's continue the sanity check.
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53198$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53199
53200    # Reset to default value
53201    FREETYPE_BASE_NAME=freetype
53202    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53203    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53204      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53205          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53206        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53207        # for the .6 version explicitly.
53208        FREETYPE_BASE_NAME=freetype.6
53209        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53210        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53211$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53212      else
53213        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53214$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53215        FOUND_FREETYPE=no
53216      fi
53217    else
53218      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53219        # On Windows, we will need both .lib and .dll file.
53220        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53221          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53222$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53223          FOUND_FREETYPE=no
53224        fi
53225      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53226          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53227        # Found lib in isa dir, use that instead.
53228        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53229        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53230$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53231      fi
53232    fi
53233  fi
53234
53235  if test "x$FOUND_FREETYPE" = xyes; then
53236
53237  # Only process if variable expands to non-empty
53238
53239  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53241
53242  # Input might be given as Windows format, start by converting to
53243  # unix format.
53244  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53245  new_path=`$CYGPATH -u "$path"`
53246
53247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53250  # "foo.exe" is OK but "foo" is an error.
53251  #
53252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53253  # It is also a way to make sure we got the proper file name for the real test later on.
53254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53255  if test "x$test_shortpath" = x; then
53256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53257$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53258    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53259  fi
53260
53261  # Call helper function which possibly converts this using DOS-style short mode.
53262  # If so, the updated path is stored in $new_path.
53263
53264  input_path="$new_path"
53265  # Check if we need to convert this using DOS-style short mode. If the path
53266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53267  # take no chances and rewrite it.
53268  # Note: m4 eats our [], so we need to use [ and ] instead.
53269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53270  if test "x$has_forbidden_chars" != x; then
53271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53275      # Going to short mode and back again did indeed matter. Since short mode is
53276      # case insensitive, let's make it lowercase to improve readability.
53277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53278      # Now convert it back to Unix-style (cygpath)
53279      input_path=`$CYGPATH -u "$shortmode_path"`
53280      new_path="$input_path"
53281    fi
53282  fi
53283
53284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53285  if test "x$test_cygdrive_prefix" = x; then
53286    # As a simple fix, exclude /usr/bin since it's not a real path.
53287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53289      # a path prefixed by /cygdrive for fixpath to work.
53290      new_path="$CYGWIN_ROOT_PATH$input_path"
53291    fi
53292  fi
53293
53294
53295  if test "x$path" != "x$new_path"; then
53296    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53298$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53299  fi
53300
53301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53302
53303  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53304  has_colon=`$ECHO $path | $GREP ^.:`
53305  new_path="$path"
53306  if test "x$has_colon" = x; then
53307    # Not in mixed or Windows style, start by that.
53308    new_path=`cmd //c echo $path`
53309  fi
53310
53311
53312  input_path="$new_path"
53313  # Check if we need to convert this using DOS-style short mode. If the path
53314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53315  # take no chances and rewrite it.
53316  # Note: m4 eats our [], so we need to use [ and ] instead.
53317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53318  if test "x$has_forbidden_chars" != x; then
53319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53321  fi
53322
53323
53324  windows_path="$new_path"
53325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53326    unix_path=`$CYGPATH -u "$windows_path"`
53327    new_path="$unix_path"
53328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53330    new_path="$unix_path"
53331  fi
53332
53333  if test "x$path" != "x$new_path"; then
53334    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53336$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53337  fi
53338
53339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53341
53342    else
53343      # We're on a unix platform. Hooray! :)
53344      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53345      has_space=`$ECHO "$path" | $GREP " "`
53346      if test "x$has_space" != x; then
53347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53348$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53350      fi
53351
53352      # Use eval to expand a potential ~
53353      eval path="$path"
53354      if test ! -f "$path" && test ! -d "$path"; then
53355        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53356      fi
53357
53358      if test -d "$path"; then
53359        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53360      else
53361        dir="`$DIRNAME "$path"`"
53362        base="`$BASENAME "$path"`"
53363        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53364      fi
53365    fi
53366  fi
53367
53368
53369  # Only process if variable expands to non-empty
53370
53371  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53373
53374  # Input might be given as Windows format, start by converting to
53375  # unix format.
53376  path="$POTENTIAL_FREETYPE_LIB_PATH"
53377  new_path=`$CYGPATH -u "$path"`
53378
53379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53382  # "foo.exe" is OK but "foo" is an error.
53383  #
53384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53385  # It is also a way to make sure we got the proper file name for the real test later on.
53386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53387  if test "x$test_shortpath" = x; then
53388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53391  fi
53392
53393  # Call helper function which possibly converts this using DOS-style short mode.
53394  # If so, the updated path is stored in $new_path.
53395
53396  input_path="$new_path"
53397  # Check if we need to convert this using DOS-style short mode. If the path
53398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53399  # take no chances and rewrite it.
53400  # Note: m4 eats our [], so we need to use [ and ] instead.
53401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53402  if test "x$has_forbidden_chars" != x; then
53403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53407      # Going to short mode and back again did indeed matter. Since short mode is
53408      # case insensitive, let's make it lowercase to improve readability.
53409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53410      # Now convert it back to Unix-style (cygpath)
53411      input_path=`$CYGPATH -u "$shortmode_path"`
53412      new_path="$input_path"
53413    fi
53414  fi
53415
53416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53417  if test "x$test_cygdrive_prefix" = x; then
53418    # As a simple fix, exclude /usr/bin since it's not a real path.
53419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53421      # a path prefixed by /cygdrive for fixpath to work.
53422      new_path="$CYGWIN_ROOT_PATH$input_path"
53423    fi
53424  fi
53425
53426
53427  if test "x$path" != "x$new_path"; then
53428    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53431  fi
53432
53433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53434
53435  path="$POTENTIAL_FREETYPE_LIB_PATH"
53436  has_colon=`$ECHO $path | $GREP ^.:`
53437  new_path="$path"
53438  if test "x$has_colon" = x; then
53439    # Not in mixed or Windows style, start by that.
53440    new_path=`cmd //c echo $path`
53441  fi
53442
53443
53444  input_path="$new_path"
53445  # Check if we need to convert this using DOS-style short mode. If the path
53446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53447  # take no chances and rewrite it.
53448  # Note: m4 eats our [], so we need to use [ and ] instead.
53449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53450  if test "x$has_forbidden_chars" != x; then
53451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53453  fi
53454
53455
53456  windows_path="$new_path"
53457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53458    unix_path=`$CYGPATH -u "$windows_path"`
53459    new_path="$unix_path"
53460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53462    new_path="$unix_path"
53463  fi
53464
53465  if test "x$path" != "x$new_path"; then
53466    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53469  fi
53470
53471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53473
53474    else
53475      # We're on a unix platform. Hooray! :)
53476      path="$POTENTIAL_FREETYPE_LIB_PATH"
53477      has_space=`$ECHO "$path" | $GREP " "`
53478      if test "x$has_space" != x; then
53479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53482      fi
53483
53484      # Use eval to expand a potential ~
53485      eval path="$path"
53486      if test ! -f "$path" && test ! -d "$path"; then
53487        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53488      fi
53489
53490      if test -d "$path"; then
53491        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53492      else
53493        dir="`$DIRNAME "$path"`"
53494        base="`$BASENAME "$path"`"
53495        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53496      fi
53497    fi
53498  fi
53499
53500
53501    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53503$as_echo_n "checking for freetype includes... " >&6; }
53504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53505$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53506    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53508$as_echo_n "checking for freetype libraries... " >&6; }
53509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53510$as_echo "$FREETYPE_LIB_PATH" >&6; }
53511  fi
53512
53513          fi
53514          if test "x$FOUND_FREETYPE" != xyes; then
53515            FREETYPE_BASE_DIR="$HOME/freetype"
53516
53517  windows_path="$FREETYPE_BASE_DIR"
53518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53519    unix_path=`$CYGPATH -u "$windows_path"`
53520    FREETYPE_BASE_DIR="$unix_path"
53521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53523    FREETYPE_BASE_DIR="$unix_path"
53524  fi
53525
53526            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53527
53528  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53529  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53530  METHOD="well-known location"
53531
53532  # Let's start with an optimistic view of the world :-)
53533  FOUND_FREETYPE=yes
53534
53535  # First look for the canonical freetype main include file ft2build.h.
53536  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53537    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53538    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53539    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53540      # Fail.
53541      FOUND_FREETYPE=no
53542    fi
53543  fi
53544
53545  if test "x$FOUND_FREETYPE" = xyes; then
53546    # Include file found, let's continue the sanity check.
53547    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53548$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53549
53550    # Reset to default value
53551    FREETYPE_BASE_NAME=freetype
53552    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53553    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53554      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53555          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53556        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53557        # for the .6 version explicitly.
53558        FREETYPE_BASE_NAME=freetype.6
53559        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53560        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53561$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53562      else
53563        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53564$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53565        FOUND_FREETYPE=no
53566      fi
53567    else
53568      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53569        # On Windows, we will need both .lib and .dll file.
53570        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53571          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53572$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53573          FOUND_FREETYPE=no
53574        fi
53575      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53576          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53577        # Found lib in isa dir, use that instead.
53578        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53579        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53580$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53581      fi
53582    fi
53583  fi
53584
53585  if test "x$FOUND_FREETYPE" = xyes; then
53586
53587  # Only process if variable expands to non-empty
53588
53589  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53591
53592  # Input might be given as Windows format, start by converting to
53593  # unix format.
53594  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53595  new_path=`$CYGPATH -u "$path"`
53596
53597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53600  # "foo.exe" is OK but "foo" is an error.
53601  #
53602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53603  # It is also a way to make sure we got the proper file name for the real test later on.
53604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53605  if test "x$test_shortpath" = x; then
53606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53607$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53608    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53609  fi
53610
53611  # Call helper function which possibly converts this using DOS-style short mode.
53612  # If so, the updated path is stored in $new_path.
53613
53614  input_path="$new_path"
53615  # Check if we need to convert this using DOS-style short mode. If the path
53616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53617  # take no chances and rewrite it.
53618  # Note: m4 eats our [], so we need to use [ and ] instead.
53619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53620  if test "x$has_forbidden_chars" != x; then
53621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53625      # Going to short mode and back again did indeed matter. Since short mode is
53626      # case insensitive, let's make it lowercase to improve readability.
53627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53628      # Now convert it back to Unix-style (cygpath)
53629      input_path=`$CYGPATH -u "$shortmode_path"`
53630      new_path="$input_path"
53631    fi
53632  fi
53633
53634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53635  if test "x$test_cygdrive_prefix" = x; then
53636    # As a simple fix, exclude /usr/bin since it's not a real path.
53637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53639      # a path prefixed by /cygdrive for fixpath to work.
53640      new_path="$CYGWIN_ROOT_PATH$input_path"
53641    fi
53642  fi
53643
53644
53645  if test "x$path" != "x$new_path"; then
53646    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53649  fi
53650
53651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53652
53653  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53654  has_colon=`$ECHO $path | $GREP ^.:`
53655  new_path="$path"
53656  if test "x$has_colon" = x; then
53657    # Not in mixed or Windows style, start by that.
53658    new_path=`cmd //c echo $path`
53659  fi
53660
53661
53662  input_path="$new_path"
53663  # Check if we need to convert this using DOS-style short mode. If the path
53664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53665  # take no chances and rewrite it.
53666  # Note: m4 eats our [], so we need to use [ and ] instead.
53667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53668  if test "x$has_forbidden_chars" != x; then
53669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53671  fi
53672
53673
53674  windows_path="$new_path"
53675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53676    unix_path=`$CYGPATH -u "$windows_path"`
53677    new_path="$unix_path"
53678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53680    new_path="$unix_path"
53681  fi
53682
53683  if test "x$path" != "x$new_path"; then
53684    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53686$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53687  fi
53688
53689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53691
53692    else
53693      # We're on a unix platform. Hooray! :)
53694      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53695      has_space=`$ECHO "$path" | $GREP " "`
53696      if test "x$has_space" != x; then
53697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53700      fi
53701
53702      # Use eval to expand a potential ~
53703      eval path="$path"
53704      if test ! -f "$path" && test ! -d "$path"; then
53705        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53706      fi
53707
53708      if test -d "$path"; then
53709        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53710      else
53711        dir="`$DIRNAME "$path"`"
53712        base="`$BASENAME "$path"`"
53713        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53714      fi
53715    fi
53716  fi
53717
53718
53719  # Only process if variable expands to non-empty
53720
53721  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53723
53724  # Input might be given as Windows format, start by converting to
53725  # unix format.
53726  path="$POTENTIAL_FREETYPE_LIB_PATH"
53727  new_path=`$CYGPATH -u "$path"`
53728
53729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53732  # "foo.exe" is OK but "foo" is an error.
53733  #
53734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53735  # It is also a way to make sure we got the proper file name for the real test later on.
53736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53737  if test "x$test_shortpath" = x; then
53738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53740    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53741  fi
53742
53743  # Call helper function which possibly converts this using DOS-style short mode.
53744  # If so, the updated path is stored in $new_path.
53745
53746  input_path="$new_path"
53747  # Check if we need to convert this using DOS-style short mode. If the path
53748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53749  # take no chances and rewrite it.
53750  # Note: m4 eats our [], so we need to use [ and ] instead.
53751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53752  if test "x$has_forbidden_chars" != x; then
53753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53757      # Going to short mode and back again did indeed matter. Since short mode is
53758      # case insensitive, let's make it lowercase to improve readability.
53759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53760      # Now convert it back to Unix-style (cygpath)
53761      input_path=`$CYGPATH -u "$shortmode_path"`
53762      new_path="$input_path"
53763    fi
53764  fi
53765
53766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53767  if test "x$test_cygdrive_prefix" = x; then
53768    # As a simple fix, exclude /usr/bin since it's not a real path.
53769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53771      # a path prefixed by /cygdrive for fixpath to work.
53772      new_path="$CYGWIN_ROOT_PATH$input_path"
53773    fi
53774  fi
53775
53776
53777  if test "x$path" != "x$new_path"; then
53778    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53780$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53781  fi
53782
53783    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53784
53785  path="$POTENTIAL_FREETYPE_LIB_PATH"
53786  has_colon=`$ECHO $path | $GREP ^.:`
53787  new_path="$path"
53788  if test "x$has_colon" = x; then
53789    # Not in mixed or Windows style, start by that.
53790    new_path=`cmd //c echo $path`
53791  fi
53792
53793
53794  input_path="$new_path"
53795  # Check if we need to convert this using DOS-style short mode. If the path
53796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53797  # take no chances and rewrite it.
53798  # Note: m4 eats our [], so we need to use [ and ] instead.
53799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53800  if test "x$has_forbidden_chars" != x; then
53801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53803  fi
53804
53805
53806  windows_path="$new_path"
53807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53808    unix_path=`$CYGPATH -u "$windows_path"`
53809    new_path="$unix_path"
53810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53812    new_path="$unix_path"
53813  fi
53814
53815  if test "x$path" != "x$new_path"; then
53816    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53818$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53819  fi
53820
53821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53823
53824    else
53825      # We're on a unix platform. Hooray! :)
53826      path="$POTENTIAL_FREETYPE_LIB_PATH"
53827      has_space=`$ECHO "$path" | $GREP " "`
53828      if test "x$has_space" != x; then
53829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53831        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53832      fi
53833
53834      # Use eval to expand a potential ~
53835      eval path="$path"
53836      if test ! -f "$path" && test ! -d "$path"; then
53837        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53838      fi
53839
53840      if test -d "$path"; then
53841        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53842      else
53843        dir="`$DIRNAME "$path"`"
53844        base="`$BASENAME "$path"`"
53845        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53846      fi
53847    fi
53848  fi
53849
53850
53851    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53853$as_echo_n "checking for freetype includes... " >&6; }
53854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53855$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53856    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53858$as_echo_n "checking for freetype libraries... " >&6; }
53859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53860$as_echo "$FREETYPE_LIB_PATH" >&6; }
53861  fi
53862
53863            else
53864
53865  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53866  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53867  METHOD="well-known location"
53868
53869  # Let's start with an optimistic view of the world :-)
53870  FOUND_FREETYPE=yes
53871
53872  # First look for the canonical freetype main include file ft2build.h.
53873  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53874    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53875    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53876    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53877      # Fail.
53878      FOUND_FREETYPE=no
53879    fi
53880  fi
53881
53882  if test "x$FOUND_FREETYPE" = xyes; then
53883    # Include file found, let's continue the sanity check.
53884    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53885$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53886
53887    # Reset to default value
53888    FREETYPE_BASE_NAME=freetype
53889    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53890    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53891      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53892          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53893        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53894        # for the .6 version explicitly.
53895        FREETYPE_BASE_NAME=freetype.6
53896        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53897        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53898$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53899      else
53900        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53902        FOUND_FREETYPE=no
53903      fi
53904    else
53905      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53906        # On Windows, we will need both .lib and .dll file.
53907        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53908          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53909$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53910          FOUND_FREETYPE=no
53911        fi
53912      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53913          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53914        # Found lib in isa dir, use that instead.
53915        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53916        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53917$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53918      fi
53919    fi
53920  fi
53921
53922  if test "x$FOUND_FREETYPE" = xyes; then
53923
53924  # Only process if variable expands to non-empty
53925
53926  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53928
53929  # Input might be given as Windows format, start by converting to
53930  # unix format.
53931  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53932  new_path=`$CYGPATH -u "$path"`
53933
53934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53937  # "foo.exe" is OK but "foo" is an error.
53938  #
53939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53940  # It is also a way to make sure we got the proper file name for the real test later on.
53941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53942  if test "x$test_shortpath" = x; then
53943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53945    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53946  fi
53947
53948  # Call helper function which possibly converts this using DOS-style short mode.
53949  # If so, the updated path is stored in $new_path.
53950
53951  input_path="$new_path"
53952  # Check if we need to convert this using DOS-style short mode. If the path
53953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53954  # take no chances and rewrite it.
53955  # Note: m4 eats our [], so we need to use [ and ] instead.
53956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53957  if test "x$has_forbidden_chars" != x; then
53958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53962      # Going to short mode and back again did indeed matter. Since short mode is
53963      # case insensitive, let's make it lowercase to improve readability.
53964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53965      # Now convert it back to Unix-style (cygpath)
53966      input_path=`$CYGPATH -u "$shortmode_path"`
53967      new_path="$input_path"
53968    fi
53969  fi
53970
53971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53972  if test "x$test_cygdrive_prefix" = x; then
53973    # As a simple fix, exclude /usr/bin since it's not a real path.
53974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53976      # a path prefixed by /cygdrive for fixpath to work.
53977      new_path="$CYGWIN_ROOT_PATH$input_path"
53978    fi
53979  fi
53980
53981
53982  if test "x$path" != "x$new_path"; then
53983    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53985$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53986  fi
53987
53988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53989
53990  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53991  has_colon=`$ECHO $path | $GREP ^.:`
53992  new_path="$path"
53993  if test "x$has_colon" = x; then
53994    # Not in mixed or Windows style, start by that.
53995    new_path=`cmd //c echo $path`
53996  fi
53997
53998
53999  input_path="$new_path"
54000  # Check if we need to convert this using DOS-style short mode. If the path
54001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54002  # take no chances and rewrite it.
54003  # Note: m4 eats our [], so we need to use [ and ] instead.
54004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54005  if test "x$has_forbidden_chars" != x; then
54006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54008  fi
54009
54010
54011  windows_path="$new_path"
54012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54013    unix_path=`$CYGPATH -u "$windows_path"`
54014    new_path="$unix_path"
54015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54017    new_path="$unix_path"
54018  fi
54019
54020  if test "x$path" != "x$new_path"; then
54021    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54024  fi
54025
54026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54028
54029    else
54030      # We're on a unix platform. Hooray! :)
54031      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54032      has_space=`$ECHO "$path" | $GREP " "`
54033      if test "x$has_space" != x; then
54034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54037      fi
54038
54039      # Use eval to expand a potential ~
54040      eval path="$path"
54041      if test ! -f "$path" && test ! -d "$path"; then
54042        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54043      fi
54044
54045      if test -d "$path"; then
54046        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54047      else
54048        dir="`$DIRNAME "$path"`"
54049        base="`$BASENAME "$path"`"
54050        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54051      fi
54052    fi
54053  fi
54054
54055
54056  # Only process if variable expands to non-empty
54057
54058  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54060
54061  # Input might be given as Windows format, start by converting to
54062  # unix format.
54063  path="$POTENTIAL_FREETYPE_LIB_PATH"
54064  new_path=`$CYGPATH -u "$path"`
54065
54066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54069  # "foo.exe" is OK but "foo" is an error.
54070  #
54071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54072  # It is also a way to make sure we got the proper file name for the real test later on.
54073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54074  if test "x$test_shortpath" = x; then
54075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54076$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54077    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54078  fi
54079
54080  # Call helper function which possibly converts this using DOS-style short mode.
54081  # If so, the updated path is stored in $new_path.
54082
54083  input_path="$new_path"
54084  # Check if we need to convert this using DOS-style short mode. If the path
54085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54086  # take no chances and rewrite it.
54087  # Note: m4 eats our [], so we need to use [ and ] instead.
54088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54089  if test "x$has_forbidden_chars" != x; then
54090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54094      # Going to short mode and back again did indeed matter. Since short mode is
54095      # case insensitive, let's make it lowercase to improve readability.
54096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54097      # Now convert it back to Unix-style (cygpath)
54098      input_path=`$CYGPATH -u "$shortmode_path"`
54099      new_path="$input_path"
54100    fi
54101  fi
54102
54103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54104  if test "x$test_cygdrive_prefix" = x; then
54105    # As a simple fix, exclude /usr/bin since it's not a real path.
54106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54108      # a path prefixed by /cygdrive for fixpath to work.
54109      new_path="$CYGWIN_ROOT_PATH$input_path"
54110    fi
54111  fi
54112
54113
54114  if test "x$path" != "x$new_path"; then
54115    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54117$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54118  fi
54119
54120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54121
54122  path="$POTENTIAL_FREETYPE_LIB_PATH"
54123  has_colon=`$ECHO $path | $GREP ^.:`
54124  new_path="$path"
54125  if test "x$has_colon" = x; then
54126    # Not in mixed or Windows style, start by that.
54127    new_path=`cmd //c echo $path`
54128  fi
54129
54130
54131  input_path="$new_path"
54132  # Check if we need to convert this using DOS-style short mode. If the path
54133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54134  # take no chances and rewrite it.
54135  # Note: m4 eats our [], so we need to use [ and ] instead.
54136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54137  if test "x$has_forbidden_chars" != x; then
54138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54140  fi
54141
54142
54143  windows_path="$new_path"
54144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54145    unix_path=`$CYGPATH -u "$windows_path"`
54146    new_path="$unix_path"
54147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54149    new_path="$unix_path"
54150  fi
54151
54152  if test "x$path" != "x$new_path"; then
54153    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54156  fi
54157
54158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54160
54161    else
54162      # We're on a unix platform. Hooray! :)
54163      path="$POTENTIAL_FREETYPE_LIB_PATH"
54164      has_space=`$ECHO "$path" | $GREP " "`
54165      if test "x$has_space" != x; then
54166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54167$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54168        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54169      fi
54170
54171      # Use eval to expand a potential ~
54172      eval path="$path"
54173      if test ! -f "$path" && test ! -d "$path"; then
54174        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54175      fi
54176
54177      if test -d "$path"; then
54178        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54179      else
54180        dir="`$DIRNAME "$path"`"
54181        base="`$BASENAME "$path"`"
54182        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54183      fi
54184    fi
54185  fi
54186
54187
54188    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54190$as_echo_n "checking for freetype includes... " >&6; }
54191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54192$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54193    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54195$as_echo_n "checking for freetype libraries... " >&6; }
54196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54197$as_echo "$FREETYPE_LIB_PATH" >&6; }
54198  fi
54199
54200            fi
54201            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54202                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54203              # Source is available, as a last resort try to build freetype in default location
54204
54205  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54206  BUILD_FREETYPE=yes
54207
54208  # Check if the freetype sources are acessible..
54209  if ! test -d $FREETYPE_SRC_PATH; then
54210    { $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
54211$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54212    BUILD_FREETYPE=no
54213  fi
54214  # ..and contain a vc2010 project file
54215  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54216  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54217    { $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
54218$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54219    BUILD_FREETYPE=no
54220  fi
54221  # Now check if configure found a version of 'msbuild.exe'
54222  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54223    { $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
54224$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;}
54225    BUILD_FREETYPE=no
54226  fi
54227
54228  # Ready to go..
54229  if test "x$BUILD_FREETYPE" = xyes; then
54230    # msbuild requires trailing slashes for output directories
54231    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54232    freetype_lib_path_unix="$freetype_lib_path"
54233    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54234
54235  unix_path="$vcxproj_path"
54236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54237    windows_path=`$CYGPATH -m "$unix_path"`
54238    vcxproj_path="$windows_path"
54239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54240    windows_path=`cmd //c echo $unix_path`
54241    vcxproj_path="$windows_path"
54242  fi
54243
54244
54245  unix_path="$freetype_lib_path"
54246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54247    windows_path=`$CYGPATH -m "$unix_path"`
54248    freetype_lib_path="$windows_path"
54249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54250    windows_path=`cmd //c echo $unix_path`
54251    freetype_lib_path="$windows_path"
54252  fi
54253
54254
54255  unix_path="$freetype_obj_path"
54256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54257    windows_path=`$CYGPATH -m "$unix_path"`
54258    freetype_obj_path="$windows_path"
54259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54260    windows_path=`cmd //c echo $unix_path`
54261    freetype_obj_path="$windows_path"
54262  fi
54263
54264    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54265      freetype_platform=x64
54266    else
54267      freetype_platform=win32
54268    fi
54269
54270    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54271    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54272    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54273    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54274    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54275$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54276
54277    # First we try to build the freetype.dll
54278    $ECHO -e "@echo off\n"\
54279        "$MSBUILD $vcxproj_path "\
54280        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54281        "/p:Configuration=\"Release Multithreaded\" "\
54282        "/p:Platform=$freetype_platform "\
54283        "/p:ConfigurationType=DynamicLibrary "\
54284        "/p:TargetName=freetype "\
54285        "/p:OutDir=\"$freetype_lib_path\" "\
54286        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54287    cmd /c freetype.bat
54288
54289    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54290      # If that succeeds we also build freetype.lib
54291      $ECHO -e "@echo off\n"\
54292          "$MSBUILD $vcxproj_path "\
54293          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54294          "/p:Configuration=\"Release Multithreaded\" "\
54295          "/p:Platform=$freetype_platform "\
54296          "/p:ConfigurationType=StaticLibrary "\
54297          "/p:TargetName=freetype "\
54298          "/p:OutDir=\"$freetype_lib_path\" "\
54299          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54300      cmd /c freetype.bat
54301
54302      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54303        # Once we build both, lib and dll, set freetype lib and include path appropriately
54304        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54305        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54306        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54307$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54308      else
54309        BUILD_FREETYPE=no
54310      fi
54311    else
54312      BUILD_FREETYPE=no
54313    fi
54314  fi
54315
54316              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54317
54318  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54319  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54320  METHOD="well-known location"
54321
54322  # Let's start with an optimistic view of the world :-)
54323  FOUND_FREETYPE=yes
54324
54325  # First look for the canonical freetype main include file ft2build.h.
54326  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54327    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54328    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54329    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54330      # Fail.
54331      FOUND_FREETYPE=no
54332    fi
54333  fi
54334
54335  if test "x$FOUND_FREETYPE" = xyes; then
54336    # Include file found, let's continue the sanity check.
54337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54338$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54339
54340    # Reset to default value
54341    FREETYPE_BASE_NAME=freetype
54342    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54343    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54344      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54345          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54346        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54347        # for the .6 version explicitly.
54348        FREETYPE_BASE_NAME=freetype.6
54349        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54350        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54351$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54352      else
54353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54354$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54355        FOUND_FREETYPE=no
54356      fi
54357    else
54358      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54359        # On Windows, we will need both .lib and .dll file.
54360        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54361          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54362$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54363          FOUND_FREETYPE=no
54364        fi
54365      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54366          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54367        # Found lib in isa dir, use that instead.
54368        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54369        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54370$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54371      fi
54372    fi
54373  fi
54374
54375  if test "x$FOUND_FREETYPE" = xyes; then
54376
54377  # Only process if variable expands to non-empty
54378
54379  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54381
54382  # Input might be given as Windows format, start by converting to
54383  # unix format.
54384  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54385  new_path=`$CYGPATH -u "$path"`
54386
54387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54390  # "foo.exe" is OK but "foo" is an error.
54391  #
54392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54393  # It is also a way to make sure we got the proper file name for the real test later on.
54394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54395  if test "x$test_shortpath" = x; then
54396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54398    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54399  fi
54400
54401  # Call helper function which possibly converts this using DOS-style short mode.
54402  # If so, the updated path is stored in $new_path.
54403
54404  input_path="$new_path"
54405  # Check if we need to convert this using DOS-style short mode. If the path
54406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54407  # take no chances and rewrite it.
54408  # Note: m4 eats our [], so we need to use [ and ] instead.
54409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54410  if test "x$has_forbidden_chars" != x; then
54411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54415      # Going to short mode and back again did indeed matter. Since short mode is
54416      # case insensitive, let's make it lowercase to improve readability.
54417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54418      # Now convert it back to Unix-style (cygpath)
54419      input_path=`$CYGPATH -u "$shortmode_path"`
54420      new_path="$input_path"
54421    fi
54422  fi
54423
54424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54425  if test "x$test_cygdrive_prefix" = x; then
54426    # As a simple fix, exclude /usr/bin since it's not a real path.
54427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54429      # a path prefixed by /cygdrive for fixpath to work.
54430      new_path="$CYGWIN_ROOT_PATH$input_path"
54431    fi
54432  fi
54433
54434
54435  if test "x$path" != "x$new_path"; then
54436    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54439  fi
54440
54441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54442
54443  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54444  has_colon=`$ECHO $path | $GREP ^.:`
54445  new_path="$path"
54446  if test "x$has_colon" = x; then
54447    # Not in mixed or Windows style, start by that.
54448    new_path=`cmd //c echo $path`
54449  fi
54450
54451
54452  input_path="$new_path"
54453  # Check if we need to convert this using DOS-style short mode. If the path
54454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54455  # take no chances and rewrite it.
54456  # Note: m4 eats our [], so we need to use [ and ] instead.
54457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54458  if test "x$has_forbidden_chars" != x; then
54459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54461  fi
54462
54463
54464  windows_path="$new_path"
54465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54466    unix_path=`$CYGPATH -u "$windows_path"`
54467    new_path="$unix_path"
54468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54470    new_path="$unix_path"
54471  fi
54472
54473  if test "x$path" != "x$new_path"; then
54474    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54476$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54477  fi
54478
54479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54481
54482    else
54483      # We're on a unix platform. Hooray! :)
54484      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54485      has_space=`$ECHO "$path" | $GREP " "`
54486      if test "x$has_space" != x; then
54487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54490      fi
54491
54492      # Use eval to expand a potential ~
54493      eval path="$path"
54494      if test ! -f "$path" && test ! -d "$path"; then
54495        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54496      fi
54497
54498      if test -d "$path"; then
54499        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54500      else
54501        dir="`$DIRNAME "$path"`"
54502        base="`$BASENAME "$path"`"
54503        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54504      fi
54505    fi
54506  fi
54507
54508
54509  # Only process if variable expands to non-empty
54510
54511  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54513
54514  # Input might be given as Windows format, start by converting to
54515  # unix format.
54516  path="$POTENTIAL_FREETYPE_LIB_PATH"
54517  new_path=`$CYGPATH -u "$path"`
54518
54519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54522  # "foo.exe" is OK but "foo" is an error.
54523  #
54524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54525  # It is also a way to make sure we got the proper file name for the real test later on.
54526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54527  if test "x$test_shortpath" = x; then
54528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54529$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54530    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54531  fi
54532
54533  # Call helper function which possibly converts this using DOS-style short mode.
54534  # If so, the updated path is stored in $new_path.
54535
54536  input_path="$new_path"
54537  # Check if we need to convert this using DOS-style short mode. If the path
54538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54539  # take no chances and rewrite it.
54540  # Note: m4 eats our [], so we need to use [ and ] instead.
54541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54542  if test "x$has_forbidden_chars" != x; then
54543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54547      # Going to short mode and back again did indeed matter. Since short mode is
54548      # case insensitive, let's make it lowercase to improve readability.
54549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54550      # Now convert it back to Unix-style (cygpath)
54551      input_path=`$CYGPATH -u "$shortmode_path"`
54552      new_path="$input_path"
54553    fi
54554  fi
54555
54556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54557  if test "x$test_cygdrive_prefix" = x; then
54558    # As a simple fix, exclude /usr/bin since it's not a real path.
54559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54561      # a path prefixed by /cygdrive for fixpath to work.
54562      new_path="$CYGWIN_ROOT_PATH$input_path"
54563    fi
54564  fi
54565
54566
54567  if test "x$path" != "x$new_path"; then
54568    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54570$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54571  fi
54572
54573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54574
54575  path="$POTENTIAL_FREETYPE_LIB_PATH"
54576  has_colon=`$ECHO $path | $GREP ^.:`
54577  new_path="$path"
54578  if test "x$has_colon" = x; then
54579    # Not in mixed or Windows style, start by that.
54580    new_path=`cmd //c echo $path`
54581  fi
54582
54583
54584  input_path="$new_path"
54585  # Check if we need to convert this using DOS-style short mode. If the path
54586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54587  # take no chances and rewrite it.
54588  # Note: m4 eats our [], so we need to use [ and ] instead.
54589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54590  if test "x$has_forbidden_chars" != x; then
54591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54593  fi
54594
54595
54596  windows_path="$new_path"
54597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54598    unix_path=`$CYGPATH -u "$windows_path"`
54599    new_path="$unix_path"
54600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54602    new_path="$unix_path"
54603  fi
54604
54605  if test "x$path" != "x$new_path"; then
54606    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54608$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54609  fi
54610
54611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54613
54614    else
54615      # We're on a unix platform. Hooray! :)
54616      path="$POTENTIAL_FREETYPE_LIB_PATH"
54617      has_space=`$ECHO "$path" | $GREP " "`
54618      if test "x$has_space" != x; then
54619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54620$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54622      fi
54623
54624      # Use eval to expand a potential ~
54625      eval path="$path"
54626      if test ! -f "$path" && test ! -d "$path"; then
54627        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54628      fi
54629
54630      if test -d "$path"; then
54631        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54632      else
54633        dir="`$DIRNAME "$path"`"
54634        base="`$BASENAME "$path"`"
54635        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54636      fi
54637    fi
54638  fi
54639
54640
54641    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54643$as_echo_n "checking for freetype includes... " >&6; }
54644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54645$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54646    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54648$as_echo_n "checking for freetype libraries... " >&6; }
54649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54650$as_echo "$FREETYPE_LIB_PATH" >&6; }
54651  fi
54652
54653              else
54654
54655  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54656  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54657  METHOD="well-known location"
54658
54659  # Let's start with an optimistic view of the world :-)
54660  FOUND_FREETYPE=yes
54661
54662  # First look for the canonical freetype main include file ft2build.h.
54663  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54664    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54665    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54666    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54667      # Fail.
54668      FOUND_FREETYPE=no
54669    fi
54670  fi
54671
54672  if test "x$FOUND_FREETYPE" = xyes; then
54673    # Include file found, let's continue the sanity check.
54674    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54675$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54676
54677    # Reset to default value
54678    FREETYPE_BASE_NAME=freetype
54679    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54680    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54681      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54682          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54683        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54684        # for the .6 version explicitly.
54685        FREETYPE_BASE_NAME=freetype.6
54686        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54687        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54688$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54689      else
54690        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54691$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54692        FOUND_FREETYPE=no
54693      fi
54694    else
54695      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54696        # On Windows, we will need both .lib and .dll file.
54697        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54698          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54699$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54700          FOUND_FREETYPE=no
54701        fi
54702      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54703          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54704        # Found lib in isa dir, use that instead.
54705        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54706        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54707$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54708      fi
54709    fi
54710  fi
54711
54712  if test "x$FOUND_FREETYPE" = xyes; then
54713
54714  # Only process if variable expands to non-empty
54715
54716  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54718
54719  # Input might be given as Windows format, start by converting to
54720  # unix format.
54721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54722  new_path=`$CYGPATH -u "$path"`
54723
54724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54727  # "foo.exe" is OK but "foo" is an error.
54728  #
54729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54730  # It is also a way to make sure we got the proper file name for the real test later on.
54731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54732  if test "x$test_shortpath" = x; then
54733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54735    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54736  fi
54737
54738  # Call helper function which possibly converts this using DOS-style short mode.
54739  # If so, the updated path is stored in $new_path.
54740
54741  input_path="$new_path"
54742  # Check if we need to convert this using DOS-style short mode. If the path
54743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54744  # take no chances and rewrite it.
54745  # Note: m4 eats our [], so we need to use [ and ] instead.
54746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54747  if test "x$has_forbidden_chars" != x; then
54748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54752      # Going to short mode and back again did indeed matter. Since short mode is
54753      # case insensitive, let's make it lowercase to improve readability.
54754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54755      # Now convert it back to Unix-style (cygpath)
54756      input_path=`$CYGPATH -u "$shortmode_path"`
54757      new_path="$input_path"
54758    fi
54759  fi
54760
54761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54762  if test "x$test_cygdrive_prefix" = x; then
54763    # As a simple fix, exclude /usr/bin since it's not a real path.
54764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54766      # a path prefixed by /cygdrive for fixpath to work.
54767      new_path="$CYGWIN_ROOT_PATH$input_path"
54768    fi
54769  fi
54770
54771
54772  if test "x$path" != "x$new_path"; then
54773    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54776  fi
54777
54778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54779
54780  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54781  has_colon=`$ECHO $path | $GREP ^.:`
54782  new_path="$path"
54783  if test "x$has_colon" = x; then
54784    # Not in mixed or Windows style, start by that.
54785    new_path=`cmd //c echo $path`
54786  fi
54787
54788
54789  input_path="$new_path"
54790  # Check if we need to convert this using DOS-style short mode. If the path
54791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54792  # take no chances and rewrite it.
54793  # Note: m4 eats our [], so we need to use [ and ] instead.
54794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54795  if test "x$has_forbidden_chars" != x; then
54796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54798  fi
54799
54800
54801  windows_path="$new_path"
54802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54803    unix_path=`$CYGPATH -u "$windows_path"`
54804    new_path="$unix_path"
54805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54807    new_path="$unix_path"
54808  fi
54809
54810  if test "x$path" != "x$new_path"; then
54811    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54814  fi
54815
54816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54818
54819    else
54820      # We're on a unix platform. Hooray! :)
54821      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54822      has_space=`$ECHO "$path" | $GREP " "`
54823      if test "x$has_space" != x; then
54824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54827      fi
54828
54829      # Use eval to expand a potential ~
54830      eval path="$path"
54831      if test ! -f "$path" && test ! -d "$path"; then
54832        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54833      fi
54834
54835      if test -d "$path"; then
54836        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54837      else
54838        dir="`$DIRNAME "$path"`"
54839        base="`$BASENAME "$path"`"
54840        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54841      fi
54842    fi
54843  fi
54844
54845
54846  # Only process if variable expands to non-empty
54847
54848  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54850
54851  # Input might be given as Windows format, start by converting to
54852  # unix format.
54853  path="$POTENTIAL_FREETYPE_LIB_PATH"
54854  new_path=`$CYGPATH -u "$path"`
54855
54856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54859  # "foo.exe" is OK but "foo" is an error.
54860  #
54861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54862  # It is also a way to make sure we got the proper file name for the real test later on.
54863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54864  if test "x$test_shortpath" = x; then
54865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54867    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54868  fi
54869
54870  # Call helper function which possibly converts this using DOS-style short mode.
54871  # If so, the updated path is stored in $new_path.
54872
54873  input_path="$new_path"
54874  # Check if we need to convert this using DOS-style short mode. If the path
54875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54876  # take no chances and rewrite it.
54877  # Note: m4 eats our [], so we need to use [ and ] instead.
54878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54879  if test "x$has_forbidden_chars" != x; then
54880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54884      # Going to short mode and back again did indeed matter. Since short mode is
54885      # case insensitive, let's make it lowercase to improve readability.
54886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54887      # Now convert it back to Unix-style (cygpath)
54888      input_path=`$CYGPATH -u "$shortmode_path"`
54889      new_path="$input_path"
54890    fi
54891  fi
54892
54893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54894  if test "x$test_cygdrive_prefix" = x; then
54895    # As a simple fix, exclude /usr/bin since it's not a real path.
54896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54898      # a path prefixed by /cygdrive for fixpath to work.
54899      new_path="$CYGWIN_ROOT_PATH$input_path"
54900    fi
54901  fi
54902
54903
54904  if test "x$path" != "x$new_path"; then
54905    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54908  fi
54909
54910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54911
54912  path="$POTENTIAL_FREETYPE_LIB_PATH"
54913  has_colon=`$ECHO $path | $GREP ^.:`
54914  new_path="$path"
54915  if test "x$has_colon" = x; then
54916    # Not in mixed or Windows style, start by that.
54917    new_path=`cmd //c echo $path`
54918  fi
54919
54920
54921  input_path="$new_path"
54922  # Check if we need to convert this using DOS-style short mode. If the path
54923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54924  # take no chances and rewrite it.
54925  # Note: m4 eats our [], so we need to use [ and ] instead.
54926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54927  if test "x$has_forbidden_chars" != x; then
54928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54930  fi
54931
54932
54933  windows_path="$new_path"
54934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54935    unix_path=`$CYGPATH -u "$windows_path"`
54936    new_path="$unix_path"
54937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54939    new_path="$unix_path"
54940  fi
54941
54942  if test "x$path" != "x$new_path"; then
54943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54946  fi
54947
54948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54950
54951    else
54952      # We're on a unix platform. Hooray! :)
54953      path="$POTENTIAL_FREETYPE_LIB_PATH"
54954      has_space=`$ECHO "$path" | $GREP " "`
54955      if test "x$has_space" != x; then
54956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54959      fi
54960
54961      # Use eval to expand a potential ~
54962      eval path="$path"
54963      if test ! -f "$path" && test ! -d "$path"; then
54964        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54965      fi
54966
54967      if test -d "$path"; then
54968        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54969      else
54970        dir="`$DIRNAME "$path"`"
54971        base="`$BASENAME "$path"`"
54972        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54973      fi
54974    fi
54975  fi
54976
54977
54978    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54980$as_echo_n "checking for freetype includes... " >&6; }
54981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54982$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54983    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54985$as_echo_n "checking for freetype libraries... " >&6; }
54986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54987$as_echo "$FREETYPE_LIB_PATH" >&6; }
54988  fi
54989
54990              fi
54991            fi
54992          fi
54993        else
54994          FREETYPE_BASE_DIR="$SYSROOT/usr"
54995
54996  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54997  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54998  METHOD="well-known location"
54999
55000  # Let's start with an optimistic view of the world :-)
55001  FOUND_FREETYPE=yes
55002
55003  # First look for the canonical freetype main include file ft2build.h.
55004  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55005    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55006    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55007    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55008      # Fail.
55009      FOUND_FREETYPE=no
55010    fi
55011  fi
55012
55013  if test "x$FOUND_FREETYPE" = xyes; then
55014    # Include file found, let's continue the sanity check.
55015    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55016$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55017
55018    # Reset to default value
55019    FREETYPE_BASE_NAME=freetype
55020    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55021    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55022      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55023          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55024        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55025        # for the .6 version explicitly.
55026        FREETYPE_BASE_NAME=freetype.6
55027        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55028        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55029$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55030      else
55031        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55032$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55033        FOUND_FREETYPE=no
55034      fi
55035    else
55036      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55037        # On Windows, we will need both .lib and .dll file.
55038        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55039          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55040$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55041          FOUND_FREETYPE=no
55042        fi
55043      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55044          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55045        # Found lib in isa dir, use that instead.
55046        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55047        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55048$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55049      fi
55050    fi
55051  fi
55052
55053  if test "x$FOUND_FREETYPE" = xyes; then
55054
55055  # Only process if variable expands to non-empty
55056
55057  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55059
55060  # Input might be given as Windows format, start by converting to
55061  # unix format.
55062  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55063  new_path=`$CYGPATH -u "$path"`
55064
55065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55068  # "foo.exe" is OK but "foo" is an error.
55069  #
55070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55071  # It is also a way to make sure we got the proper file name for the real test later on.
55072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55073  if test "x$test_shortpath" = x; then
55074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55076    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55077  fi
55078
55079  # Call helper function which possibly converts this using DOS-style short mode.
55080  # If so, the updated path is stored in $new_path.
55081
55082  input_path="$new_path"
55083  # Check if we need to convert this using DOS-style short mode. If the path
55084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55085  # take no chances and rewrite it.
55086  # Note: m4 eats our [], so we need to use [ and ] instead.
55087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55088  if test "x$has_forbidden_chars" != x; then
55089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55093      # Going to short mode and back again did indeed matter. Since short mode is
55094      # case insensitive, let's make it lowercase to improve readability.
55095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55096      # Now convert it back to Unix-style (cygpath)
55097      input_path=`$CYGPATH -u "$shortmode_path"`
55098      new_path="$input_path"
55099    fi
55100  fi
55101
55102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55103  if test "x$test_cygdrive_prefix" = x; then
55104    # As a simple fix, exclude /usr/bin since it's not a real path.
55105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55107      # a path prefixed by /cygdrive for fixpath to work.
55108      new_path="$CYGWIN_ROOT_PATH$input_path"
55109    fi
55110  fi
55111
55112
55113  if test "x$path" != "x$new_path"; then
55114    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55117  fi
55118
55119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55120
55121  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55122  has_colon=`$ECHO $path | $GREP ^.:`
55123  new_path="$path"
55124  if test "x$has_colon" = x; then
55125    # Not in mixed or Windows style, start by that.
55126    new_path=`cmd //c echo $path`
55127  fi
55128
55129
55130  input_path="$new_path"
55131  # Check if we need to convert this using DOS-style short mode. If the path
55132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55133  # take no chances and rewrite it.
55134  # Note: m4 eats our [], so we need to use [ and ] instead.
55135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55136  if test "x$has_forbidden_chars" != x; then
55137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55139  fi
55140
55141
55142  windows_path="$new_path"
55143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55144    unix_path=`$CYGPATH -u "$windows_path"`
55145    new_path="$unix_path"
55146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55148    new_path="$unix_path"
55149  fi
55150
55151  if test "x$path" != "x$new_path"; then
55152    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55155  fi
55156
55157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55159
55160    else
55161      # We're on a unix platform. Hooray! :)
55162      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55163      has_space=`$ECHO "$path" | $GREP " "`
55164      if test "x$has_space" != x; then
55165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55166$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55167        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55168      fi
55169
55170      # Use eval to expand a potential ~
55171      eval path="$path"
55172      if test ! -f "$path" && test ! -d "$path"; then
55173        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55174      fi
55175
55176      if test -d "$path"; then
55177        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55178      else
55179        dir="`$DIRNAME "$path"`"
55180        base="`$BASENAME "$path"`"
55181        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55182      fi
55183    fi
55184  fi
55185
55186
55187  # Only process if variable expands to non-empty
55188
55189  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55191
55192  # Input might be given as Windows format, start by converting to
55193  # unix format.
55194  path="$POTENTIAL_FREETYPE_LIB_PATH"
55195  new_path=`$CYGPATH -u "$path"`
55196
55197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55200  # "foo.exe" is OK but "foo" is an error.
55201  #
55202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55203  # It is also a way to make sure we got the proper file name for the real test later on.
55204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55205  if test "x$test_shortpath" = x; then
55206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55207$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55208    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55209  fi
55210
55211  # Call helper function which possibly converts this using DOS-style short mode.
55212  # If so, the updated path is stored in $new_path.
55213
55214  input_path="$new_path"
55215  # Check if we need to convert this using DOS-style short mode. If the path
55216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55217  # take no chances and rewrite it.
55218  # Note: m4 eats our [], so we need to use [ and ] instead.
55219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55220  if test "x$has_forbidden_chars" != x; then
55221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55225      # Going to short mode and back again did indeed matter. Since short mode is
55226      # case insensitive, let's make it lowercase to improve readability.
55227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55228      # Now convert it back to Unix-style (cygpath)
55229      input_path=`$CYGPATH -u "$shortmode_path"`
55230      new_path="$input_path"
55231    fi
55232  fi
55233
55234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55235  if test "x$test_cygdrive_prefix" = x; then
55236    # As a simple fix, exclude /usr/bin since it's not a real path.
55237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55239      # a path prefixed by /cygdrive for fixpath to work.
55240      new_path="$CYGWIN_ROOT_PATH$input_path"
55241    fi
55242  fi
55243
55244
55245  if test "x$path" != "x$new_path"; then
55246    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55248$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55249  fi
55250
55251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55252
55253  path="$POTENTIAL_FREETYPE_LIB_PATH"
55254  has_colon=`$ECHO $path | $GREP ^.:`
55255  new_path="$path"
55256  if test "x$has_colon" = x; then
55257    # Not in mixed or Windows style, start by that.
55258    new_path=`cmd //c echo $path`
55259  fi
55260
55261
55262  input_path="$new_path"
55263  # Check if we need to convert this using DOS-style short mode. If the path
55264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55265  # take no chances and rewrite it.
55266  # Note: m4 eats our [], so we need to use [ and ] instead.
55267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55268  if test "x$has_forbidden_chars" != x; then
55269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55271  fi
55272
55273
55274  windows_path="$new_path"
55275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55276    unix_path=`$CYGPATH -u "$windows_path"`
55277    new_path="$unix_path"
55278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55280    new_path="$unix_path"
55281  fi
55282
55283  if test "x$path" != "x$new_path"; then
55284    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55287  fi
55288
55289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55291
55292    else
55293      # We're on a unix platform. Hooray! :)
55294      path="$POTENTIAL_FREETYPE_LIB_PATH"
55295      has_space=`$ECHO "$path" | $GREP " "`
55296      if test "x$has_space" != x; then
55297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55298$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55300      fi
55301
55302      # Use eval to expand a potential ~
55303      eval path="$path"
55304      if test ! -f "$path" && test ! -d "$path"; then
55305        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55306      fi
55307
55308      if test -d "$path"; then
55309        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55310      else
55311        dir="`$DIRNAME "$path"`"
55312        base="`$BASENAME "$path"`"
55313        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55314      fi
55315    fi
55316  fi
55317
55318
55319    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55321$as_echo_n "checking for freetype includes... " >&6; }
55322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55323$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55324    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55326$as_echo_n "checking for freetype libraries... " >&6; }
55327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55328$as_echo "$FREETYPE_LIB_PATH" >&6; }
55329  fi
55330
55331
55332          if test "x$FOUND_FREETYPE" != xyes; then
55333            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55334
55335  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55336  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55337  METHOD="well-known location"
55338
55339  # Let's start with an optimistic view of the world :-)
55340  FOUND_FREETYPE=yes
55341
55342  # First look for the canonical freetype main include file ft2build.h.
55343  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55344    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55345    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55346    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55347      # Fail.
55348      FOUND_FREETYPE=no
55349    fi
55350  fi
55351
55352  if test "x$FOUND_FREETYPE" = xyes; then
55353    # Include file found, let's continue the sanity check.
55354    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55355$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55356
55357    # Reset to default value
55358    FREETYPE_BASE_NAME=freetype
55359    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55360    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55361      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55362          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55363        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55364        # for the .6 version explicitly.
55365        FREETYPE_BASE_NAME=freetype.6
55366        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55367        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55368$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55369      else
55370        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55371$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55372        FOUND_FREETYPE=no
55373      fi
55374    else
55375      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55376        # On Windows, we will need both .lib and .dll file.
55377        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55378          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55379$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55380          FOUND_FREETYPE=no
55381        fi
55382      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55383          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55384        # Found lib in isa dir, use that instead.
55385        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55386        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55387$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55388      fi
55389    fi
55390  fi
55391
55392  if test "x$FOUND_FREETYPE" = xyes; then
55393
55394  # Only process if variable expands to non-empty
55395
55396  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55398
55399  # Input might be given as Windows format, start by converting to
55400  # unix format.
55401  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55402  new_path=`$CYGPATH -u "$path"`
55403
55404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55407  # "foo.exe" is OK but "foo" is an error.
55408  #
55409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55410  # It is also a way to make sure we got the proper file name for the real test later on.
55411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55412  if test "x$test_shortpath" = x; then
55413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55414$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55415    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55416  fi
55417
55418  # Call helper function which possibly converts this using DOS-style short mode.
55419  # If so, the updated path is stored in $new_path.
55420
55421  input_path="$new_path"
55422  # Check if we need to convert this using DOS-style short mode. If the path
55423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55424  # take no chances and rewrite it.
55425  # Note: m4 eats our [], so we need to use [ and ] instead.
55426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55427  if test "x$has_forbidden_chars" != x; then
55428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55432      # Going to short mode and back again did indeed matter. Since short mode is
55433      # case insensitive, let's make it lowercase to improve readability.
55434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55435      # Now convert it back to Unix-style (cygpath)
55436      input_path=`$CYGPATH -u "$shortmode_path"`
55437      new_path="$input_path"
55438    fi
55439  fi
55440
55441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55442  if test "x$test_cygdrive_prefix" = x; then
55443    # As a simple fix, exclude /usr/bin since it's not a real path.
55444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55446      # a path prefixed by /cygdrive for fixpath to work.
55447      new_path="$CYGWIN_ROOT_PATH$input_path"
55448    fi
55449  fi
55450
55451
55452  if test "x$path" != "x$new_path"; then
55453    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55456  fi
55457
55458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55459
55460  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55461  has_colon=`$ECHO $path | $GREP ^.:`
55462  new_path="$path"
55463  if test "x$has_colon" = x; then
55464    # Not in mixed or Windows style, start by that.
55465    new_path=`cmd //c echo $path`
55466  fi
55467
55468
55469  input_path="$new_path"
55470  # Check if we need to convert this using DOS-style short mode. If the path
55471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55472  # take no chances and rewrite it.
55473  # Note: m4 eats our [], so we need to use [ and ] instead.
55474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55475  if test "x$has_forbidden_chars" != x; then
55476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55478  fi
55479
55480
55481  windows_path="$new_path"
55482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55483    unix_path=`$CYGPATH -u "$windows_path"`
55484    new_path="$unix_path"
55485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55487    new_path="$unix_path"
55488  fi
55489
55490  if test "x$path" != "x$new_path"; then
55491    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55494  fi
55495
55496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55498
55499    else
55500      # We're on a unix platform. Hooray! :)
55501      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55502      has_space=`$ECHO "$path" | $GREP " "`
55503      if test "x$has_space" != x; then
55504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55507      fi
55508
55509      # Use eval to expand a potential ~
55510      eval path="$path"
55511      if test ! -f "$path" && test ! -d "$path"; then
55512        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55513      fi
55514
55515      if test -d "$path"; then
55516        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55517      else
55518        dir="`$DIRNAME "$path"`"
55519        base="`$BASENAME "$path"`"
55520        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55521      fi
55522    fi
55523  fi
55524
55525
55526  # Only process if variable expands to non-empty
55527
55528  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55530
55531  # Input might be given as Windows format, start by converting to
55532  # unix format.
55533  path="$POTENTIAL_FREETYPE_LIB_PATH"
55534  new_path=`$CYGPATH -u "$path"`
55535
55536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55539  # "foo.exe" is OK but "foo" is an error.
55540  #
55541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55542  # It is also a way to make sure we got the proper file name for the real test later on.
55543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55544  if test "x$test_shortpath" = x; then
55545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55547    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55548  fi
55549
55550  # Call helper function which possibly converts this using DOS-style short mode.
55551  # If so, the updated path is stored in $new_path.
55552
55553  input_path="$new_path"
55554  # Check if we need to convert this using DOS-style short mode. If the path
55555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55556  # take no chances and rewrite it.
55557  # Note: m4 eats our [], so we need to use [ and ] instead.
55558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55559  if test "x$has_forbidden_chars" != x; then
55560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55564      # Going to short mode and back again did indeed matter. Since short mode is
55565      # case insensitive, let's make it lowercase to improve readability.
55566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55567      # Now convert it back to Unix-style (cygpath)
55568      input_path=`$CYGPATH -u "$shortmode_path"`
55569      new_path="$input_path"
55570    fi
55571  fi
55572
55573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55574  if test "x$test_cygdrive_prefix" = x; then
55575    # As a simple fix, exclude /usr/bin since it's not a real path.
55576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55578      # a path prefixed by /cygdrive for fixpath to work.
55579      new_path="$CYGWIN_ROOT_PATH$input_path"
55580    fi
55581  fi
55582
55583
55584  if test "x$path" != "x$new_path"; then
55585    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55588  fi
55589
55590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55591
55592  path="$POTENTIAL_FREETYPE_LIB_PATH"
55593  has_colon=`$ECHO $path | $GREP ^.:`
55594  new_path="$path"
55595  if test "x$has_colon" = x; then
55596    # Not in mixed or Windows style, start by that.
55597    new_path=`cmd //c echo $path`
55598  fi
55599
55600
55601  input_path="$new_path"
55602  # Check if we need to convert this using DOS-style short mode. If the path
55603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55604  # take no chances and rewrite it.
55605  # Note: m4 eats our [], so we need to use [ and ] instead.
55606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55607  if test "x$has_forbidden_chars" != x; then
55608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55610  fi
55611
55612
55613  windows_path="$new_path"
55614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55615    unix_path=`$CYGPATH -u "$windows_path"`
55616    new_path="$unix_path"
55617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55619    new_path="$unix_path"
55620  fi
55621
55622  if test "x$path" != "x$new_path"; then
55623    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55625$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55626  fi
55627
55628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55630
55631    else
55632      # We're on a unix platform. Hooray! :)
55633      path="$POTENTIAL_FREETYPE_LIB_PATH"
55634      has_space=`$ECHO "$path" | $GREP " "`
55635      if test "x$has_space" != x; then
55636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55639      fi
55640
55641      # Use eval to expand a potential ~
55642      eval path="$path"
55643      if test ! -f "$path" && test ! -d "$path"; then
55644        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55645      fi
55646
55647      if test -d "$path"; then
55648        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55649      else
55650        dir="`$DIRNAME "$path"`"
55651        base="`$BASENAME "$path"`"
55652        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55653      fi
55654    fi
55655  fi
55656
55657
55658    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55660$as_echo_n "checking for freetype includes... " >&6; }
55661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55662$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55663    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55665$as_echo_n "checking for freetype libraries... " >&6; }
55666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55667$as_echo "$FREETYPE_LIB_PATH" >&6; }
55668  fi
55669
55670          fi
55671
55672          if test "x$FOUND_FREETYPE" != xyes; then
55673            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55674
55675  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55676  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55677  METHOD="well-known location"
55678
55679  # Let's start with an optimistic view of the world :-)
55680  FOUND_FREETYPE=yes
55681
55682  # First look for the canonical freetype main include file ft2build.h.
55683  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55684    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55685    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55686    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55687      # Fail.
55688      FOUND_FREETYPE=no
55689    fi
55690  fi
55691
55692  if test "x$FOUND_FREETYPE" = xyes; then
55693    # Include file found, let's continue the sanity check.
55694    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55695$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55696
55697    # Reset to default value
55698    FREETYPE_BASE_NAME=freetype
55699    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55700    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55701      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55702          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55703        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55704        # for the .6 version explicitly.
55705        FREETYPE_BASE_NAME=freetype.6
55706        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55707        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55708$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55709      else
55710        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55711$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55712        FOUND_FREETYPE=no
55713      fi
55714    else
55715      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55716        # On Windows, we will need both .lib and .dll file.
55717        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55718          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55719$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55720          FOUND_FREETYPE=no
55721        fi
55722      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55723          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55724        # Found lib in isa dir, use that instead.
55725        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55726        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55727$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55728      fi
55729    fi
55730  fi
55731
55732  if test "x$FOUND_FREETYPE" = xyes; then
55733
55734  # Only process if variable expands to non-empty
55735
55736  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55738
55739  # Input might be given as Windows format, start by converting to
55740  # unix format.
55741  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55742  new_path=`$CYGPATH -u "$path"`
55743
55744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55747  # "foo.exe" is OK but "foo" is an error.
55748  #
55749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55750  # It is also a way to make sure we got the proper file name for the real test later on.
55751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55752  if test "x$test_shortpath" = x; then
55753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55755    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55756  fi
55757
55758  # Call helper function which possibly converts this using DOS-style short mode.
55759  # If so, the updated path is stored in $new_path.
55760
55761  input_path="$new_path"
55762  # Check if we need to convert this using DOS-style short mode. If the path
55763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55764  # take no chances and rewrite it.
55765  # Note: m4 eats our [], so we need to use [ and ] instead.
55766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55767  if test "x$has_forbidden_chars" != x; then
55768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55772      # Going to short mode and back again did indeed matter. Since short mode is
55773      # case insensitive, let's make it lowercase to improve readability.
55774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55775      # Now convert it back to Unix-style (cygpath)
55776      input_path=`$CYGPATH -u "$shortmode_path"`
55777      new_path="$input_path"
55778    fi
55779  fi
55780
55781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55782  if test "x$test_cygdrive_prefix" = x; then
55783    # As a simple fix, exclude /usr/bin since it's not a real path.
55784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55786      # a path prefixed by /cygdrive for fixpath to work.
55787      new_path="$CYGWIN_ROOT_PATH$input_path"
55788    fi
55789  fi
55790
55791
55792  if test "x$path" != "x$new_path"; then
55793    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55796  fi
55797
55798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55799
55800  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55801  has_colon=`$ECHO $path | $GREP ^.:`
55802  new_path="$path"
55803  if test "x$has_colon" = x; then
55804    # Not in mixed or Windows style, start by that.
55805    new_path=`cmd //c echo $path`
55806  fi
55807
55808
55809  input_path="$new_path"
55810  # Check if we need to convert this using DOS-style short mode. If the path
55811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55812  # take no chances and rewrite it.
55813  # Note: m4 eats our [], so we need to use [ and ] instead.
55814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55815  if test "x$has_forbidden_chars" != x; then
55816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55818  fi
55819
55820
55821  windows_path="$new_path"
55822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55823    unix_path=`$CYGPATH -u "$windows_path"`
55824    new_path="$unix_path"
55825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55827    new_path="$unix_path"
55828  fi
55829
55830  if test "x$path" != "x$new_path"; then
55831    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55833$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55834  fi
55835
55836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55838
55839    else
55840      # We're on a unix platform. Hooray! :)
55841      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55842      has_space=`$ECHO "$path" | $GREP " "`
55843      if test "x$has_space" != x; then
55844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55846        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55847      fi
55848
55849      # Use eval to expand a potential ~
55850      eval path="$path"
55851      if test ! -f "$path" && test ! -d "$path"; then
55852        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55853      fi
55854
55855      if test -d "$path"; then
55856        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55857      else
55858        dir="`$DIRNAME "$path"`"
55859        base="`$BASENAME "$path"`"
55860        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55861      fi
55862    fi
55863  fi
55864
55865
55866  # Only process if variable expands to non-empty
55867
55868  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55870
55871  # Input might be given as Windows format, start by converting to
55872  # unix format.
55873  path="$POTENTIAL_FREETYPE_LIB_PATH"
55874  new_path=`$CYGPATH -u "$path"`
55875
55876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55879  # "foo.exe" is OK but "foo" is an error.
55880  #
55881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55882  # It is also a way to make sure we got the proper file name for the real test later on.
55883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55884  if test "x$test_shortpath" = x; then
55885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55887    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55888  fi
55889
55890  # Call helper function which possibly converts this using DOS-style short mode.
55891  # If so, the updated path is stored in $new_path.
55892
55893  input_path="$new_path"
55894  # Check if we need to convert this using DOS-style short mode. If the path
55895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55896  # take no chances and rewrite it.
55897  # Note: m4 eats our [], so we need to use [ and ] instead.
55898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55899  if test "x$has_forbidden_chars" != x; then
55900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55904      # Going to short mode and back again did indeed matter. Since short mode is
55905      # case insensitive, let's make it lowercase to improve readability.
55906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55907      # Now convert it back to Unix-style (cygpath)
55908      input_path=`$CYGPATH -u "$shortmode_path"`
55909      new_path="$input_path"
55910    fi
55911  fi
55912
55913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55914  if test "x$test_cygdrive_prefix" = x; then
55915    # As a simple fix, exclude /usr/bin since it's not a real path.
55916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55918      # a path prefixed by /cygdrive for fixpath to work.
55919      new_path="$CYGWIN_ROOT_PATH$input_path"
55920    fi
55921  fi
55922
55923
55924  if test "x$path" != "x$new_path"; then
55925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55928  fi
55929
55930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55931
55932  path="$POTENTIAL_FREETYPE_LIB_PATH"
55933  has_colon=`$ECHO $path | $GREP ^.:`
55934  new_path="$path"
55935  if test "x$has_colon" = x; then
55936    # Not in mixed or Windows style, start by that.
55937    new_path=`cmd //c echo $path`
55938  fi
55939
55940
55941  input_path="$new_path"
55942  # Check if we need to convert this using DOS-style short mode. If the path
55943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55944  # take no chances and rewrite it.
55945  # Note: m4 eats our [], so we need to use [ and ] instead.
55946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55947  if test "x$has_forbidden_chars" != x; then
55948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55950  fi
55951
55952
55953  windows_path="$new_path"
55954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55955    unix_path=`$CYGPATH -u "$windows_path"`
55956    new_path="$unix_path"
55957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55959    new_path="$unix_path"
55960  fi
55961
55962  if test "x$path" != "x$new_path"; then
55963    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55966  fi
55967
55968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55970
55971    else
55972      # We're on a unix platform. Hooray! :)
55973      path="$POTENTIAL_FREETYPE_LIB_PATH"
55974      has_space=`$ECHO "$path" | $GREP " "`
55975      if test "x$has_space" != x; then
55976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55979      fi
55980
55981      # Use eval to expand a potential ~
55982      eval path="$path"
55983      if test ! -f "$path" && test ! -d "$path"; then
55984        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55985      fi
55986
55987      if test -d "$path"; then
55988        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55989      else
55990        dir="`$DIRNAME "$path"`"
55991        base="`$BASENAME "$path"`"
55992        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55993      fi
55994    fi
55995  fi
55996
55997
55998    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56000$as_echo_n "checking for freetype includes... " >&6; }
56001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56002$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56003    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56005$as_echo_n "checking for freetype libraries... " >&6; }
56006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56007$as_echo "$FREETYPE_LIB_PATH" >&6; }
56008  fi
56009
56010          fi
56011
56012          if test "x$FOUND_FREETYPE" != xyes; then
56013            FREETYPE_BASE_DIR="$SYSROOT/usr"
56014            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56015
56016  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56017  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56018  METHOD="well-known location"
56019
56020  # Let's start with an optimistic view of the world :-)
56021  FOUND_FREETYPE=yes
56022
56023  # First look for the canonical freetype main include file ft2build.h.
56024  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56025    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56026    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56027    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56028      # Fail.
56029      FOUND_FREETYPE=no
56030    fi
56031  fi
56032
56033  if test "x$FOUND_FREETYPE" = xyes; then
56034    # Include file found, let's continue the sanity check.
56035    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56036$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56037
56038    # Reset to default value
56039    FREETYPE_BASE_NAME=freetype
56040    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56041    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56042      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56043          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56044        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56045        # for the .6 version explicitly.
56046        FREETYPE_BASE_NAME=freetype.6
56047        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56048        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56049$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56050      else
56051        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56052$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56053        FOUND_FREETYPE=no
56054      fi
56055    else
56056      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56057        # On Windows, we will need both .lib and .dll file.
56058        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56059          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56060$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56061          FOUND_FREETYPE=no
56062        fi
56063      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56064          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56065        # Found lib in isa dir, use that instead.
56066        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56067        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56068$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56069      fi
56070    fi
56071  fi
56072
56073  if test "x$FOUND_FREETYPE" = xyes; then
56074
56075  # Only process if variable expands to non-empty
56076
56077  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56079
56080  # Input might be given as Windows format, start by converting to
56081  # unix format.
56082  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56083  new_path=`$CYGPATH -u "$path"`
56084
56085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56088  # "foo.exe" is OK but "foo" is an error.
56089  #
56090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56091  # It is also a way to make sure we got the proper file name for the real test later on.
56092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56093  if test "x$test_shortpath" = x; then
56094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56095$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56096    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56097  fi
56098
56099  # Call helper function which possibly converts this using DOS-style short mode.
56100  # If so, the updated path is stored in $new_path.
56101
56102  input_path="$new_path"
56103  # Check if we need to convert this using DOS-style short mode. If the path
56104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56105  # take no chances and rewrite it.
56106  # Note: m4 eats our [], so we need to use [ and ] instead.
56107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56108  if test "x$has_forbidden_chars" != x; then
56109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56113      # Going to short mode and back again did indeed matter. Since short mode is
56114      # case insensitive, let's make it lowercase to improve readability.
56115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56116      # Now convert it back to Unix-style (cygpath)
56117      input_path=`$CYGPATH -u "$shortmode_path"`
56118      new_path="$input_path"
56119    fi
56120  fi
56121
56122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56123  if test "x$test_cygdrive_prefix" = x; then
56124    # As a simple fix, exclude /usr/bin since it's not a real path.
56125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56127      # a path prefixed by /cygdrive for fixpath to work.
56128      new_path="$CYGWIN_ROOT_PATH$input_path"
56129    fi
56130  fi
56131
56132
56133  if test "x$path" != "x$new_path"; then
56134    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56136$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56137  fi
56138
56139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56140
56141  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56142  has_colon=`$ECHO $path | $GREP ^.:`
56143  new_path="$path"
56144  if test "x$has_colon" = x; then
56145    # Not in mixed or Windows style, start by that.
56146    new_path=`cmd //c echo $path`
56147  fi
56148
56149
56150  input_path="$new_path"
56151  # Check if we need to convert this using DOS-style short mode. If the path
56152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56153  # take no chances and rewrite it.
56154  # Note: m4 eats our [], so we need to use [ and ] instead.
56155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56156  if test "x$has_forbidden_chars" != x; then
56157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56159  fi
56160
56161
56162  windows_path="$new_path"
56163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56164    unix_path=`$CYGPATH -u "$windows_path"`
56165    new_path="$unix_path"
56166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56168    new_path="$unix_path"
56169  fi
56170
56171  if test "x$path" != "x$new_path"; then
56172    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56174$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56175  fi
56176
56177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56179
56180    else
56181      # We're on a unix platform. Hooray! :)
56182      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56183      has_space=`$ECHO "$path" | $GREP " "`
56184      if test "x$has_space" != x; then
56185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56188      fi
56189
56190      # Use eval to expand a potential ~
56191      eval path="$path"
56192      if test ! -f "$path" && test ! -d "$path"; then
56193        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56194      fi
56195
56196      if test -d "$path"; then
56197        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56198      else
56199        dir="`$DIRNAME "$path"`"
56200        base="`$BASENAME "$path"`"
56201        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56202      fi
56203    fi
56204  fi
56205
56206
56207  # Only process if variable expands to non-empty
56208
56209  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56211
56212  # Input might be given as Windows format, start by converting to
56213  # unix format.
56214  path="$POTENTIAL_FREETYPE_LIB_PATH"
56215  new_path=`$CYGPATH -u "$path"`
56216
56217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56220  # "foo.exe" is OK but "foo" is an error.
56221  #
56222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56223  # It is also a way to make sure we got the proper file name for the real test later on.
56224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56225  if test "x$test_shortpath" = x; then
56226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56227$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56228    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56229  fi
56230
56231  # Call helper function which possibly converts this using DOS-style short mode.
56232  # If so, the updated path is stored in $new_path.
56233
56234  input_path="$new_path"
56235  # Check if we need to convert this using DOS-style short mode. If the path
56236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56237  # take no chances and rewrite it.
56238  # Note: m4 eats our [], so we need to use [ and ] instead.
56239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56240  if test "x$has_forbidden_chars" != x; then
56241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56245      # Going to short mode and back again did indeed matter. Since short mode is
56246      # case insensitive, let's make it lowercase to improve readability.
56247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56248      # Now convert it back to Unix-style (cygpath)
56249      input_path=`$CYGPATH -u "$shortmode_path"`
56250      new_path="$input_path"
56251    fi
56252  fi
56253
56254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56255  if test "x$test_cygdrive_prefix" = x; then
56256    # As a simple fix, exclude /usr/bin since it's not a real path.
56257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56259      # a path prefixed by /cygdrive for fixpath to work.
56260      new_path="$CYGWIN_ROOT_PATH$input_path"
56261    fi
56262  fi
56263
56264
56265  if test "x$path" != "x$new_path"; then
56266    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56269  fi
56270
56271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56272
56273  path="$POTENTIAL_FREETYPE_LIB_PATH"
56274  has_colon=`$ECHO $path | $GREP ^.:`
56275  new_path="$path"
56276  if test "x$has_colon" = x; then
56277    # Not in mixed or Windows style, start by that.
56278    new_path=`cmd //c echo $path`
56279  fi
56280
56281
56282  input_path="$new_path"
56283  # Check if we need to convert this using DOS-style short mode. If the path
56284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56285  # take no chances and rewrite it.
56286  # Note: m4 eats our [], so we need to use [ and ] instead.
56287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56288  if test "x$has_forbidden_chars" != x; then
56289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56291  fi
56292
56293
56294  windows_path="$new_path"
56295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56296    unix_path=`$CYGPATH -u "$windows_path"`
56297    new_path="$unix_path"
56298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56300    new_path="$unix_path"
56301  fi
56302
56303  if test "x$path" != "x$new_path"; then
56304    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56307  fi
56308
56309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56311
56312    else
56313      # We're on a unix platform. Hooray! :)
56314      path="$POTENTIAL_FREETYPE_LIB_PATH"
56315      has_space=`$ECHO "$path" | $GREP " "`
56316      if test "x$has_space" != x; then
56317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56320      fi
56321
56322      # Use eval to expand a potential ~
56323      eval path="$path"
56324      if test ! -f "$path" && test ! -d "$path"; then
56325        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56326      fi
56327
56328      if test -d "$path"; then
56329        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56330      else
56331        dir="`$DIRNAME "$path"`"
56332        base="`$BASENAME "$path"`"
56333        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56334      fi
56335    fi
56336  fi
56337
56338
56339    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56341$as_echo_n "checking for freetype includes... " >&6; }
56342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56343$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56344    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56346$as_echo_n "checking for freetype libraries... " >&6; }
56347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56348$as_echo "$FREETYPE_LIB_PATH" >&6; }
56349  fi
56350
56351            else
56352
56353  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56354  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56355  METHOD="well-known location"
56356
56357  # Let's start with an optimistic view of the world :-)
56358  FOUND_FREETYPE=yes
56359
56360  # First look for the canonical freetype main include file ft2build.h.
56361  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56362    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56363    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56364    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56365      # Fail.
56366      FOUND_FREETYPE=no
56367    fi
56368  fi
56369
56370  if test "x$FOUND_FREETYPE" = xyes; then
56371    # Include file found, let's continue the sanity check.
56372    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56373$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56374
56375    # Reset to default value
56376    FREETYPE_BASE_NAME=freetype
56377    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56378    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56379      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56380          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56381        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56382        # for the .6 version explicitly.
56383        FREETYPE_BASE_NAME=freetype.6
56384        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56385        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56386$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56387      else
56388        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56389$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56390        FOUND_FREETYPE=no
56391      fi
56392    else
56393      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56394        # On Windows, we will need both .lib and .dll file.
56395        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56396          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56397$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56398          FOUND_FREETYPE=no
56399        fi
56400      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56401          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56402        # Found lib in isa dir, use that instead.
56403        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56404        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56405$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56406      fi
56407    fi
56408  fi
56409
56410  if test "x$FOUND_FREETYPE" = xyes; then
56411
56412  # Only process if variable expands to non-empty
56413
56414  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56416
56417  # Input might be given as Windows format, start by converting to
56418  # unix format.
56419  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56420  new_path=`$CYGPATH -u "$path"`
56421
56422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56425  # "foo.exe" is OK but "foo" is an error.
56426  #
56427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56428  # It is also a way to make sure we got the proper file name for the real test later on.
56429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56430  if test "x$test_shortpath" = x; then
56431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56433    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56434  fi
56435
56436  # Call helper function which possibly converts this using DOS-style short mode.
56437  # If so, the updated path is stored in $new_path.
56438
56439  input_path="$new_path"
56440  # Check if we need to convert this using DOS-style short mode. If the path
56441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56442  # take no chances and rewrite it.
56443  # Note: m4 eats our [], so we need to use [ and ] instead.
56444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56445  if test "x$has_forbidden_chars" != x; then
56446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56450      # Going to short mode and back again did indeed matter. Since short mode is
56451      # case insensitive, let's make it lowercase to improve readability.
56452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56453      # Now convert it back to Unix-style (cygpath)
56454      input_path=`$CYGPATH -u "$shortmode_path"`
56455      new_path="$input_path"
56456    fi
56457  fi
56458
56459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56460  if test "x$test_cygdrive_prefix" = x; then
56461    # As a simple fix, exclude /usr/bin since it's not a real path.
56462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56464      # a path prefixed by /cygdrive for fixpath to work.
56465      new_path="$CYGWIN_ROOT_PATH$input_path"
56466    fi
56467  fi
56468
56469
56470  if test "x$path" != "x$new_path"; then
56471    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56474  fi
56475
56476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56477
56478  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56479  has_colon=`$ECHO $path | $GREP ^.:`
56480  new_path="$path"
56481  if test "x$has_colon" = x; then
56482    # Not in mixed or Windows style, start by that.
56483    new_path=`cmd //c echo $path`
56484  fi
56485
56486
56487  input_path="$new_path"
56488  # Check if we need to convert this using DOS-style short mode. If the path
56489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56490  # take no chances and rewrite it.
56491  # Note: m4 eats our [], so we need to use [ and ] instead.
56492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56493  if test "x$has_forbidden_chars" != x; then
56494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56496  fi
56497
56498
56499  windows_path="$new_path"
56500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56501    unix_path=`$CYGPATH -u "$windows_path"`
56502    new_path="$unix_path"
56503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56505    new_path="$unix_path"
56506  fi
56507
56508  if test "x$path" != "x$new_path"; then
56509    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56512  fi
56513
56514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56516
56517    else
56518      # We're on a unix platform. Hooray! :)
56519      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56520      has_space=`$ECHO "$path" | $GREP " "`
56521      if test "x$has_space" != x; then
56522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56525      fi
56526
56527      # Use eval to expand a potential ~
56528      eval path="$path"
56529      if test ! -f "$path" && test ! -d "$path"; then
56530        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56531      fi
56532
56533      if test -d "$path"; then
56534        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56535      else
56536        dir="`$DIRNAME "$path"`"
56537        base="`$BASENAME "$path"`"
56538        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56539      fi
56540    fi
56541  fi
56542
56543
56544  # Only process if variable expands to non-empty
56545
56546  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56548
56549  # Input might be given as Windows format, start by converting to
56550  # unix format.
56551  path="$POTENTIAL_FREETYPE_LIB_PATH"
56552  new_path=`$CYGPATH -u "$path"`
56553
56554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56557  # "foo.exe" is OK but "foo" is an error.
56558  #
56559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56560  # It is also a way to make sure we got the proper file name for the real test later on.
56561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56562  if test "x$test_shortpath" = x; then
56563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56565    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56566  fi
56567
56568  # Call helper function which possibly converts this using DOS-style short mode.
56569  # If so, the updated path is stored in $new_path.
56570
56571  input_path="$new_path"
56572  # Check if we need to convert this using DOS-style short mode. If the path
56573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56574  # take no chances and rewrite it.
56575  # Note: m4 eats our [], so we need to use [ and ] instead.
56576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56577  if test "x$has_forbidden_chars" != x; then
56578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56582      # Going to short mode and back again did indeed matter. Since short mode is
56583      # case insensitive, let's make it lowercase to improve readability.
56584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56585      # Now convert it back to Unix-style (cygpath)
56586      input_path=`$CYGPATH -u "$shortmode_path"`
56587      new_path="$input_path"
56588    fi
56589  fi
56590
56591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56592  if test "x$test_cygdrive_prefix" = x; then
56593    # As a simple fix, exclude /usr/bin since it's not a real path.
56594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56596      # a path prefixed by /cygdrive for fixpath to work.
56597      new_path="$CYGWIN_ROOT_PATH$input_path"
56598    fi
56599  fi
56600
56601
56602  if test "x$path" != "x$new_path"; then
56603    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56606  fi
56607
56608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56609
56610  path="$POTENTIAL_FREETYPE_LIB_PATH"
56611  has_colon=`$ECHO $path | $GREP ^.:`
56612  new_path="$path"
56613  if test "x$has_colon" = x; then
56614    # Not in mixed or Windows style, start by that.
56615    new_path=`cmd //c echo $path`
56616  fi
56617
56618
56619  input_path="$new_path"
56620  # Check if we need to convert this using DOS-style short mode. If the path
56621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56622  # take no chances and rewrite it.
56623  # Note: m4 eats our [], so we need to use [ and ] instead.
56624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56625  if test "x$has_forbidden_chars" != x; then
56626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56628  fi
56629
56630
56631  windows_path="$new_path"
56632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56633    unix_path=`$CYGPATH -u "$windows_path"`
56634    new_path="$unix_path"
56635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56637    new_path="$unix_path"
56638  fi
56639
56640  if test "x$path" != "x$new_path"; then
56641    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56644  fi
56645
56646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56648
56649    else
56650      # We're on a unix platform. Hooray! :)
56651      path="$POTENTIAL_FREETYPE_LIB_PATH"
56652      has_space=`$ECHO "$path" | $GREP " "`
56653      if test "x$has_space" != x; then
56654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56657      fi
56658
56659      # Use eval to expand a potential ~
56660      eval path="$path"
56661      if test ! -f "$path" && test ! -d "$path"; then
56662        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56663      fi
56664
56665      if test -d "$path"; then
56666        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56667      else
56668        dir="`$DIRNAME "$path"`"
56669        base="`$BASENAME "$path"`"
56670        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56671      fi
56672    fi
56673  fi
56674
56675
56676    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56678$as_echo_n "checking for freetype includes... " >&6; }
56679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56680$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56681    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56683$as_echo_n "checking for freetype libraries... " >&6; }
56684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56685$as_echo "$FREETYPE_LIB_PATH" >&6; }
56686  fi
56687
56688              if test "x$FOUND_FREETYPE" != xyes; then
56689
56690  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56691  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56692  METHOD="well-known location"
56693
56694  # Let's start with an optimistic view of the world :-)
56695  FOUND_FREETYPE=yes
56696
56697  # First look for the canonical freetype main include file ft2build.h.
56698  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56699    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56700    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56701    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56702      # Fail.
56703      FOUND_FREETYPE=no
56704    fi
56705  fi
56706
56707  if test "x$FOUND_FREETYPE" = xyes; then
56708    # Include file found, let's continue the sanity check.
56709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56710$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56711
56712    # Reset to default value
56713    FREETYPE_BASE_NAME=freetype
56714    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56715    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56716      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56717          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56718        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56719        # for the .6 version explicitly.
56720        FREETYPE_BASE_NAME=freetype.6
56721        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56722        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56723$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56724      else
56725        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56726$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56727        FOUND_FREETYPE=no
56728      fi
56729    else
56730      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56731        # On Windows, we will need both .lib and .dll file.
56732        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56733          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56734$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56735          FOUND_FREETYPE=no
56736        fi
56737      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56738          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56739        # Found lib in isa dir, use that instead.
56740        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56741        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56742$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56743      fi
56744    fi
56745  fi
56746
56747  if test "x$FOUND_FREETYPE" = xyes; then
56748
56749  # Only process if variable expands to non-empty
56750
56751  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56753
56754  # Input might be given as Windows format, start by converting to
56755  # unix format.
56756  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56757  new_path=`$CYGPATH -u "$path"`
56758
56759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56762  # "foo.exe" is OK but "foo" is an error.
56763  #
56764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56765  # It is also a way to make sure we got the proper file name for the real test later on.
56766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56767  if test "x$test_shortpath" = x; then
56768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56770    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56771  fi
56772
56773  # Call helper function which possibly converts this using DOS-style short mode.
56774  # If so, the updated path is stored in $new_path.
56775
56776  input_path="$new_path"
56777  # Check if we need to convert this using DOS-style short mode. If the path
56778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56779  # take no chances and rewrite it.
56780  # Note: m4 eats our [], so we need to use [ and ] instead.
56781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56782  if test "x$has_forbidden_chars" != x; then
56783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56787      # Going to short mode and back again did indeed matter. Since short mode is
56788      # case insensitive, let's make it lowercase to improve readability.
56789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56790      # Now convert it back to Unix-style (cygpath)
56791      input_path=`$CYGPATH -u "$shortmode_path"`
56792      new_path="$input_path"
56793    fi
56794  fi
56795
56796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56797  if test "x$test_cygdrive_prefix" = x; then
56798    # As a simple fix, exclude /usr/bin since it's not a real path.
56799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56801      # a path prefixed by /cygdrive for fixpath to work.
56802      new_path="$CYGWIN_ROOT_PATH$input_path"
56803    fi
56804  fi
56805
56806
56807  if test "x$path" != "x$new_path"; then
56808    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56811  fi
56812
56813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56814
56815  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56816  has_colon=`$ECHO $path | $GREP ^.:`
56817  new_path="$path"
56818  if test "x$has_colon" = x; then
56819    # Not in mixed or Windows style, start by that.
56820    new_path=`cmd //c echo $path`
56821  fi
56822
56823
56824  input_path="$new_path"
56825  # Check if we need to convert this using DOS-style short mode. If the path
56826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56827  # take no chances and rewrite it.
56828  # Note: m4 eats our [], so we need to use [ and ] instead.
56829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56830  if test "x$has_forbidden_chars" != x; then
56831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56833  fi
56834
56835
56836  windows_path="$new_path"
56837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56838    unix_path=`$CYGPATH -u "$windows_path"`
56839    new_path="$unix_path"
56840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56842    new_path="$unix_path"
56843  fi
56844
56845  if test "x$path" != "x$new_path"; then
56846    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56849  fi
56850
56851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56853
56854    else
56855      # We're on a unix platform. Hooray! :)
56856      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56857      has_space=`$ECHO "$path" | $GREP " "`
56858      if test "x$has_space" != x; then
56859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56862      fi
56863
56864      # Use eval to expand a potential ~
56865      eval path="$path"
56866      if test ! -f "$path" && test ! -d "$path"; then
56867        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56868      fi
56869
56870      if test -d "$path"; then
56871        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56872      else
56873        dir="`$DIRNAME "$path"`"
56874        base="`$BASENAME "$path"`"
56875        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56876      fi
56877    fi
56878  fi
56879
56880
56881  # Only process if variable expands to non-empty
56882
56883  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56885
56886  # Input might be given as Windows format, start by converting to
56887  # unix format.
56888  path="$POTENTIAL_FREETYPE_LIB_PATH"
56889  new_path=`$CYGPATH -u "$path"`
56890
56891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56894  # "foo.exe" is OK but "foo" is an error.
56895  #
56896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56897  # It is also a way to make sure we got the proper file name for the real test later on.
56898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56899  if test "x$test_shortpath" = x; then
56900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56902    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56903  fi
56904
56905  # Call helper function which possibly converts this using DOS-style short mode.
56906  # If so, the updated path is stored in $new_path.
56907
56908  input_path="$new_path"
56909  # Check if we need to convert this using DOS-style short mode. If the path
56910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56911  # take no chances and rewrite it.
56912  # Note: m4 eats our [], so we need to use [ and ] instead.
56913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56914  if test "x$has_forbidden_chars" != x; then
56915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56919      # Going to short mode and back again did indeed matter. Since short mode is
56920      # case insensitive, let's make it lowercase to improve readability.
56921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56922      # Now convert it back to Unix-style (cygpath)
56923      input_path=`$CYGPATH -u "$shortmode_path"`
56924      new_path="$input_path"
56925    fi
56926  fi
56927
56928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56929  if test "x$test_cygdrive_prefix" = x; then
56930    # As a simple fix, exclude /usr/bin since it's not a real path.
56931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56933      # a path prefixed by /cygdrive for fixpath to work.
56934      new_path="$CYGWIN_ROOT_PATH$input_path"
56935    fi
56936  fi
56937
56938
56939  if test "x$path" != "x$new_path"; then
56940    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56943  fi
56944
56945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56946
56947  path="$POTENTIAL_FREETYPE_LIB_PATH"
56948  has_colon=`$ECHO $path | $GREP ^.:`
56949  new_path="$path"
56950  if test "x$has_colon" = x; then
56951    # Not in mixed or Windows style, start by that.
56952    new_path=`cmd //c echo $path`
56953  fi
56954
56955
56956  input_path="$new_path"
56957  # Check if we need to convert this using DOS-style short mode. If the path
56958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56959  # take no chances and rewrite it.
56960  # Note: m4 eats our [], so we need to use [ and ] instead.
56961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56962  if test "x$has_forbidden_chars" != x; then
56963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56965  fi
56966
56967
56968  windows_path="$new_path"
56969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56970    unix_path=`$CYGPATH -u "$windows_path"`
56971    new_path="$unix_path"
56972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56974    new_path="$unix_path"
56975  fi
56976
56977  if test "x$path" != "x$new_path"; then
56978    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56981  fi
56982
56983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56985
56986    else
56987      # We're on a unix platform. Hooray! :)
56988      path="$POTENTIAL_FREETYPE_LIB_PATH"
56989      has_space=`$ECHO "$path" | $GREP " "`
56990      if test "x$has_space" != x; then
56991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56994      fi
56995
56996      # Use eval to expand a potential ~
56997      eval path="$path"
56998      if test ! -f "$path" && test ! -d "$path"; then
56999        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57000      fi
57001
57002      if test -d "$path"; then
57003        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57004      else
57005        dir="`$DIRNAME "$path"`"
57006        base="`$BASENAME "$path"`"
57007        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57008      fi
57009    fi
57010  fi
57011
57012
57013    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57015$as_echo_n "checking for freetype includes... " >&6; }
57016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57017$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57018    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57020$as_echo_n "checking for freetype libraries... " >&6; }
57021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57022$as_echo "$FREETYPE_LIB_PATH" >&6; }
57023  fi
57024
57025              fi
57026            fi
57027          fi
57028        fi
57029      fi # end check in well-known locations
57030
57031      if test "x$FOUND_FREETYPE" != xyes; then
57032
57033  # Print a helpful message on how to acquire the necessary build dependency.
57034  # freetype is the help tag: freetype, cups, alsa etc
57035  MISSING_DEPENDENCY=freetype
57036
57037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57038    cygwin_help $MISSING_DEPENDENCY
57039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57040    msys_help $MISSING_DEPENDENCY
57041  else
57042    PKGHANDLER_COMMAND=
57043
57044    case $PKGHANDLER in
57045      apt-get)
57046        apt_help     $MISSING_DEPENDENCY ;;
57047      yum)
57048        yum_help     $MISSING_DEPENDENCY ;;
57049      port)
57050        port_help    $MISSING_DEPENDENCY ;;
57051      pkgutil)
57052        pkgutil_help $MISSING_DEPENDENCY ;;
57053      pkgadd)
57054        pkgadd_help  $MISSING_DEPENDENCY ;;
57055    esac
57056
57057    if test "x$PKGHANDLER_COMMAND" != x; then
57058      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57059    fi
57060  fi
57061
57062        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57063      fi
57064    fi # end user specified settings
57065
57066    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57067    if test "x$FREETYPE_CFLAGS" = x; then
57068
57069  # Only process if variable expands to non-empty
57070
57071  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57073
57074  # Input might be given as Windows format, start by converting to
57075  # unix format.
57076  path="$FREETYPE_INCLUDE_PATH"
57077  new_path=`$CYGPATH -u "$path"`
57078
57079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57082  # "foo.exe" is OK but "foo" is an error.
57083  #
57084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57085  # It is also a way to make sure we got the proper file name for the real test later on.
57086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57087  if test "x$test_shortpath" = x; then
57088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57089$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57090    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57091  fi
57092
57093  # Call helper function which possibly converts this using DOS-style short mode.
57094  # If so, the updated path is stored in $new_path.
57095
57096  input_path="$new_path"
57097  # Check if we need to convert this using DOS-style short mode. If the path
57098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57099  # take no chances and rewrite it.
57100  # Note: m4 eats our [], so we need to use [ and ] instead.
57101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57102  if test "x$has_forbidden_chars" != x; then
57103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57107      # Going to short mode and back again did indeed matter. Since short mode is
57108      # case insensitive, let's make it lowercase to improve readability.
57109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57110      # Now convert it back to Unix-style (cygpath)
57111      input_path=`$CYGPATH -u "$shortmode_path"`
57112      new_path="$input_path"
57113    fi
57114  fi
57115
57116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57117  if test "x$test_cygdrive_prefix" = x; then
57118    # As a simple fix, exclude /usr/bin since it's not a real path.
57119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57121      # a path prefixed by /cygdrive for fixpath to work.
57122      new_path="$CYGWIN_ROOT_PATH$input_path"
57123    fi
57124  fi
57125
57126
57127  if test "x$path" != "x$new_path"; then
57128    FREETYPE_INCLUDE_PATH="$new_path"
57129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57130$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57131  fi
57132
57133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57134
57135  path="$FREETYPE_INCLUDE_PATH"
57136  has_colon=`$ECHO $path | $GREP ^.:`
57137  new_path="$path"
57138  if test "x$has_colon" = x; then
57139    # Not in mixed or Windows style, start by that.
57140    new_path=`cmd //c echo $path`
57141  fi
57142
57143
57144  input_path="$new_path"
57145  # Check if we need to convert this using DOS-style short mode. If the path
57146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57147  # take no chances and rewrite it.
57148  # Note: m4 eats our [], so we need to use [ and ] instead.
57149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57150  if test "x$has_forbidden_chars" != x; then
57151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57153  fi
57154
57155
57156  windows_path="$new_path"
57157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57158    unix_path=`$CYGPATH -u "$windows_path"`
57159    new_path="$unix_path"
57160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57162    new_path="$unix_path"
57163  fi
57164
57165  if test "x$path" != "x$new_path"; then
57166    FREETYPE_INCLUDE_PATH="$new_path"
57167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57168$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57169  fi
57170
57171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57173
57174    else
57175      # We're on a unix platform. Hooray! :)
57176      path="$FREETYPE_INCLUDE_PATH"
57177      has_space=`$ECHO "$path" | $GREP " "`
57178      if test "x$has_space" != x; then
57179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57180$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57181        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57182      fi
57183
57184      # Use eval to expand a potential ~
57185      eval path="$path"
57186      if test ! -f "$path" && test ! -d "$path"; then
57187        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57188      fi
57189
57190      if test -d "$path"; then
57191        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57192      else
57193        dir="`$DIRNAME "$path"`"
57194        base="`$BASENAME "$path"`"
57195        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57196      fi
57197    fi
57198  fi
57199
57200      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57201        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57202      else
57203        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57204      fi
57205    fi
57206
57207    if test "x$FREETYPE_LIBS" = x; then
57208
57209  # Only process if variable expands to non-empty
57210
57211  if test "x$FREETYPE_LIB_PATH" != x; then
57212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57213
57214  # Input might be given as Windows format, start by converting to
57215  # unix format.
57216  path="$FREETYPE_LIB_PATH"
57217  new_path=`$CYGPATH -u "$path"`
57218
57219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57222  # "foo.exe" is OK but "foo" is an error.
57223  #
57224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57225  # It is also a way to make sure we got the proper file name for the real test later on.
57226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57227  if test "x$test_shortpath" = x; then
57228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57229$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57230    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57231  fi
57232
57233  # Call helper function which possibly converts this using DOS-style short mode.
57234  # If so, the updated path is stored in $new_path.
57235
57236  input_path="$new_path"
57237  # Check if we need to convert this using DOS-style short mode. If the path
57238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57239  # take no chances and rewrite it.
57240  # Note: m4 eats our [], so we need to use [ and ] instead.
57241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57242  if test "x$has_forbidden_chars" != x; then
57243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57247      # Going to short mode and back again did indeed matter. Since short mode is
57248      # case insensitive, let's make it lowercase to improve readability.
57249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57250      # Now convert it back to Unix-style (cygpath)
57251      input_path=`$CYGPATH -u "$shortmode_path"`
57252      new_path="$input_path"
57253    fi
57254  fi
57255
57256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57257  if test "x$test_cygdrive_prefix" = x; then
57258    # As a simple fix, exclude /usr/bin since it's not a real path.
57259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57261      # a path prefixed by /cygdrive for fixpath to work.
57262      new_path="$CYGWIN_ROOT_PATH$input_path"
57263    fi
57264  fi
57265
57266
57267  if test "x$path" != "x$new_path"; then
57268    FREETYPE_LIB_PATH="$new_path"
57269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57270$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57271  fi
57272
57273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57274
57275  path="$FREETYPE_LIB_PATH"
57276  has_colon=`$ECHO $path | $GREP ^.:`
57277  new_path="$path"
57278  if test "x$has_colon" = x; then
57279    # Not in mixed or Windows style, start by that.
57280    new_path=`cmd //c echo $path`
57281  fi
57282
57283
57284  input_path="$new_path"
57285  # Check if we need to convert this using DOS-style short mode. If the path
57286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57287  # take no chances and rewrite it.
57288  # Note: m4 eats our [], so we need to use [ and ] instead.
57289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57290  if test "x$has_forbidden_chars" != x; then
57291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57293  fi
57294
57295
57296  windows_path="$new_path"
57297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57298    unix_path=`$CYGPATH -u "$windows_path"`
57299    new_path="$unix_path"
57300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57302    new_path="$unix_path"
57303  fi
57304
57305  if test "x$path" != "x$new_path"; then
57306    FREETYPE_LIB_PATH="$new_path"
57307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57308$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57309  fi
57310
57311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57313
57314    else
57315      # We're on a unix platform. Hooray! :)
57316      path="$FREETYPE_LIB_PATH"
57317      has_space=`$ECHO "$path" | $GREP " "`
57318      if test "x$has_space" != x; then
57319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57320$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57322      fi
57323
57324      # Use eval to expand a potential ~
57325      eval path="$path"
57326      if test ! -f "$path" && test ! -d "$path"; then
57327        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57328      fi
57329
57330      if test -d "$path"; then
57331        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57332      else
57333        dir="`$DIRNAME "$path"`"
57334        base="`$BASENAME "$path"`"
57335        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57336      fi
57337    fi
57338  fi
57339
57340      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57341        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57342      else
57343        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57344      fi
57345    fi
57346
57347    # Try to compile it
57348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57349$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57350    ac_ext=cpp
57351ac_cpp='$CXXCPP $CPPFLAGS'
57352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57355
57356    PREV_CXXCFLAGS="$CXXFLAGS"
57357    PREV_LIBS="$LIBS"
57358    PREV_CXX="$CXX"
57359    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57360    LIBS="$LIBS $FREETYPE_LIBS"
57361    CXX="$FIXPATH $CXX"
57362    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57363/* end confdefs.h.  */
57364
57365          #include<ft2build.h>
57366          #include FT_FREETYPE_H
57367          int main () {
57368            FT_Init_FreeType(NULL);
57369            return 0;
57370          }
57371
57372_ACEOF
57373if ac_fn_cxx_try_link "$LINENO"; then :
57374
57375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57376$as_echo "yes" >&6; }
57377
57378else
57379
57380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57381$as_echo "no" >&6; }
57382          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57383$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57384          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57385$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57386
57387
57388  # Print a helpful message on how to acquire the necessary build dependency.
57389  # freetype is the help tag: freetype, cups, alsa etc
57390  MISSING_DEPENDENCY=freetype
57391
57392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57393    cygwin_help $MISSING_DEPENDENCY
57394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57395    msys_help $MISSING_DEPENDENCY
57396  else
57397    PKGHANDLER_COMMAND=
57398
57399    case $PKGHANDLER in
57400      apt-get)
57401        apt_help     $MISSING_DEPENDENCY ;;
57402      yum)
57403        yum_help     $MISSING_DEPENDENCY ;;
57404      port)
57405        port_help    $MISSING_DEPENDENCY ;;
57406      pkgutil)
57407        pkgutil_help $MISSING_DEPENDENCY ;;
57408      pkgadd)
57409        pkgadd_help  $MISSING_DEPENDENCY ;;
57410    esac
57411
57412    if test "x$PKGHANDLER_COMMAND" != x; then
57413      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57414    fi
57415  fi
57416
57417
57418          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57419
57420
57421fi
57422rm -f core conftest.err conftest.$ac_objext \
57423    conftest$ac_exeext conftest.$ac_ext
57424    CXXCFLAGS="$PREV_CXXFLAGS"
57425    LIBS="$PREV_LIBS"
57426    CXX="$PREV_CXX"
57427    ac_ext=cpp
57428ac_cpp='$CXXCPP $CPPFLAGS'
57429ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57430ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57431ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57432
57433
57434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57435$as_echo_n "checking if we should bundle freetype... " >&6; }
57436    if test "x$BUNDLE_FREETYPE" = xyes; then
57437      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57438    fi
57439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57440$as_echo "$BUNDLE_FREETYPE" >&6; }
57441
57442  fi # end freetype needed
57443
57444
57445
57446
57447
57448
57449
57450# Check whether --with-alsa was given.
57451if test "${with_alsa+set}" = set; then :
57452  withval=$with_alsa;
57453fi
57454
57455
57456# Check whether --with-alsa-include was given.
57457if test "${with_alsa_include+set}" = set; then :
57458  withval=$with_alsa_include;
57459fi
57460
57461
57462# Check whether --with-alsa-lib was given.
57463if test "${with_alsa_lib+set}" = set; then :
57464  withval=$with_alsa_lib;
57465fi
57466
57467
57468  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57469    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57470        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57471        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57472      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57473$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57474    fi
57475    ALSA_CFLAGS=
57476    ALSA_LIBS=
57477  else
57478    ALSA_FOUND=no
57479
57480    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57481      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57482    fi
57483
57484    if test "x${with_alsa}" != x; then
57485      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57486      ALSA_CFLAGS="-I${with_alsa}/include"
57487      ALSA_FOUND=yes
57488    fi
57489    if test "x${with_alsa_include}" != x; then
57490      ALSA_CFLAGS="-I${with_alsa_include}"
57491      ALSA_FOUND=yes
57492    fi
57493    if test "x${with_alsa_lib}" != x; then
57494      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57495      ALSA_FOUND=yes
57496    fi
57497    # Do not try pkg-config if we have a sysroot set.
57498    if test "x$SYSROOT" = x; then
57499      if test "x$ALSA_FOUND" = xno; then
57500
57501pkg_failed=no
57502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57503$as_echo_n "checking for ALSA... " >&6; }
57504
57505if test -n "$ALSA_CFLAGS"; then
57506    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57507 elif test -n "$PKG_CONFIG"; then
57508    if test -n "$PKG_CONFIG" && \
57509    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57510  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57511  ac_status=$?
57512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57513  test $ac_status = 0; }; then
57514  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57515else
57516  pkg_failed=yes
57517fi
57518 else
57519    pkg_failed=untried
57520fi
57521if test -n "$ALSA_LIBS"; then
57522    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57523 elif test -n "$PKG_CONFIG"; then
57524    if test -n "$PKG_CONFIG" && \
57525    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57526  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57527  ac_status=$?
57528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57529  test $ac_status = 0; }; then
57530  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57531else
57532  pkg_failed=yes
57533fi
57534 else
57535    pkg_failed=untried
57536fi
57537
57538
57539
57540if test $pkg_failed = yes; then
57541
57542if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57543        _pkg_short_errors_supported=yes
57544else
57545        _pkg_short_errors_supported=no
57546fi
57547        if test $_pkg_short_errors_supported = yes; then
57548	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57549        else
57550	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57551        fi
57552	# Put the nasty error message in config.log where it belongs
57553	echo "$ALSA_PKG_ERRORS" >&5
57554
57555	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57556$as_echo "no" >&6; }
57557                ALSA_FOUND=no
57558elif test $pkg_failed = untried; then
57559	ALSA_FOUND=no
57560else
57561	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57562	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57564$as_echo "yes" >&6; }
57565	ALSA_FOUND=yes
57566fi
57567      fi
57568    fi
57569    if test "x$ALSA_FOUND" = xno; then
57570      for ac_header in alsa/asoundlib.h
57571do :
57572  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57573if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57574  cat >>confdefs.h <<_ACEOF
57575#define HAVE_ALSA_ASOUNDLIB_H 1
57576_ACEOF
57577
57578            ALSA_FOUND=yes
57579            ALSA_CFLAGS=-Iignoreme
57580            ALSA_LIBS=-lasound
57581            DEFAULT_ALSA=yes
57582
57583else
57584  ALSA_FOUND=no
57585
57586fi
57587
57588done
57589
57590    fi
57591    if test "x$ALSA_FOUND" = xno; then
57592
57593  # Print a helpful message on how to acquire the necessary build dependency.
57594  # alsa is the help tag: freetype, cups, alsa etc
57595  MISSING_DEPENDENCY=alsa
57596
57597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57598    cygwin_help $MISSING_DEPENDENCY
57599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57600    msys_help $MISSING_DEPENDENCY
57601  else
57602    PKGHANDLER_COMMAND=
57603
57604    case $PKGHANDLER in
57605      apt-get)
57606        apt_help     $MISSING_DEPENDENCY ;;
57607      yum)
57608        yum_help     $MISSING_DEPENDENCY ;;
57609      port)
57610        port_help    $MISSING_DEPENDENCY ;;
57611      pkgutil)
57612        pkgutil_help $MISSING_DEPENDENCY ;;
57613      pkgadd)
57614        pkgadd_help  $MISSING_DEPENDENCY ;;
57615    esac
57616
57617    if test "x$PKGHANDLER_COMMAND" != x; then
57618      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57619    fi
57620  fi
57621
57622      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57623    fi
57624  fi
57625
57626
57627
57628
57629
57630
57631# Check whether --with-libffi was given.
57632if test "${with_libffi+set}" = set; then :
57633  withval=$with_libffi;
57634fi
57635
57636
57637# Check whether --with-libffi-include was given.
57638if test "${with_libffi_include+set}" = set; then :
57639  withval=$with_libffi_include;
57640fi
57641
57642
57643# Check whether --with-libffi-lib was given.
57644if test "${with_libffi_lib+set}" = set; then :
57645  withval=$with_libffi_lib;
57646fi
57647
57648
57649  if test "x$NEEDS_LIB_FFI" = xfalse; then
57650    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57651        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57652        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57653      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57654$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57655    fi
57656    LIBFFI_CFLAGS=
57657    LIBFFI_LIBS=
57658  else
57659    LIBFFI_FOUND=no
57660
57661    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57662      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57663    fi
57664
57665    if test "x${with_libffi}" != x; then
57666      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57667      LIBFFI_CFLAGS="-I${with_libffi}/include"
57668      LIBFFI_FOUND=yes
57669    fi
57670    if test "x${with_libffi_include}" != x; then
57671      LIBFFI_CFLAGS="-I${with_libffi_include}"
57672      LIBFFI_FOUND=yes
57673    fi
57674    if test "x${with_libffi_lib}" != x; then
57675      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57676      LIBFFI_FOUND=yes
57677    fi
57678    # Do not try pkg-config if we have a sysroot set.
57679    if test "x$SYSROOT" = x; then
57680      if test "x$LIBFFI_FOUND" = xno; then
57681        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57682
57683pkg_failed=no
57684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57685$as_echo_n "checking for LIBFFI... " >&6; }
57686
57687if test -n "$LIBFFI_CFLAGS"; then
57688    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57689 elif test -n "$PKG_CONFIG"; then
57690    if test -n "$PKG_CONFIG" && \
57691    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57692  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57693  ac_status=$?
57694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57695  test $ac_status = 0; }; then
57696  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57697else
57698  pkg_failed=yes
57699fi
57700 else
57701    pkg_failed=untried
57702fi
57703if test -n "$LIBFFI_LIBS"; then
57704    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57705 elif test -n "$PKG_CONFIG"; then
57706    if test -n "$PKG_CONFIG" && \
57707    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57708  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57709  ac_status=$?
57710  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57711  test $ac_status = 0; }; then
57712  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57713else
57714  pkg_failed=yes
57715fi
57716 else
57717    pkg_failed=untried
57718fi
57719
57720
57721
57722if test $pkg_failed = yes; then
57723
57724if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57725        _pkg_short_errors_supported=yes
57726else
57727        _pkg_short_errors_supported=no
57728fi
57729        if test $_pkg_short_errors_supported = yes; then
57730	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57731        else
57732	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57733        fi
57734	# Put the nasty error message in config.log where it belongs
57735	echo "$LIBFFI_PKG_ERRORS" >&5
57736
57737	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57738$as_echo "no" >&6; }
57739                LIBFFI_FOUND=no
57740elif test $pkg_failed = untried; then
57741	LIBFFI_FOUND=no
57742else
57743	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57744	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57746$as_echo "yes" >&6; }
57747	LIBFFI_FOUND=yes
57748fi
57749      fi
57750    fi
57751    if test "x$LIBFFI_FOUND" = xno; then
57752      for ac_header in ffi.h
57753do :
57754  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57755if test "x$ac_cv_header_ffi_h" = xyes; then :
57756  cat >>confdefs.h <<_ACEOF
57757#define HAVE_FFI_H 1
57758_ACEOF
57759
57760            LIBFFI_FOUND=yes
57761            LIBFFI_CFLAGS=
57762            LIBFFI_LIBS=-lffi
57763
57764else
57765  LIBFFI_FOUND=no
57766
57767fi
57768
57769done
57770
57771    fi
57772    if test "x$LIBFFI_FOUND" = xno; then
57773
57774  # Print a helpful message on how to acquire the necessary build dependency.
57775  # ffi is the help tag: freetype, cups, alsa etc
57776  MISSING_DEPENDENCY=ffi
57777
57778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57779    cygwin_help $MISSING_DEPENDENCY
57780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57781    msys_help $MISSING_DEPENDENCY
57782  else
57783    PKGHANDLER_COMMAND=
57784
57785    case $PKGHANDLER in
57786      apt-get)
57787        apt_help     $MISSING_DEPENDENCY ;;
57788      yum)
57789        yum_help     $MISSING_DEPENDENCY ;;
57790      port)
57791        port_help    $MISSING_DEPENDENCY ;;
57792      pkgutil)
57793        pkgutil_help $MISSING_DEPENDENCY ;;
57794      pkgadd)
57795        pkgadd_help  $MISSING_DEPENDENCY ;;
57796    esac
57797
57798    if test "x$PKGHANDLER_COMMAND" != x; then
57799      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57800    fi
57801  fi
57802
57803      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
57804    fi
57805
57806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
57807$as_echo_n "checking if libffi works... " >&6; }
57808    ac_ext=c
57809ac_cpp='$CPP $CPPFLAGS'
57810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57812ac_compiler_gnu=$ac_cv_c_compiler_gnu
57813
57814    OLD_CFLAGS="$CFLAGS"
57815    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
57816    OLD_LIBS="$LIBS"
57817    LIBS="$LIBS $LIBFFI_LIBS"
57818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57819/* end confdefs.h.  */
57820#include <ffi.h>
57821int
57822main ()
57823{
57824
57825          ffi_call(NULL, NULL, NULL, NULL);
57826          return 0;
57827
57828  ;
57829  return 0;
57830}
57831_ACEOF
57832if ac_fn_c_try_link "$LINENO"; then :
57833  LIBFFI_WORKS=yes
57834else
57835  LIBFFI_WORKS=no
57836
57837fi
57838rm -f core conftest.err conftest.$ac_objext \
57839    conftest$ac_exeext conftest.$ac_ext
57840    CFLAGS="$OLD_CFLAGS"
57841    LIBS="$OLD_LIBS"
57842    ac_ext=cpp
57843ac_cpp='$CXXCPP $CPPFLAGS'
57844ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57845ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57846ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57847
57848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
57849$as_echo "$LIBFFI_WORKS" >&6; }
57850
57851    if test "x$LIBFFI_WORKS" = xno; then
57852
57853  # Print a helpful message on how to acquire the necessary build dependency.
57854  # ffi is the help tag: freetype, cups, alsa etc
57855  MISSING_DEPENDENCY=ffi
57856
57857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57858    cygwin_help $MISSING_DEPENDENCY
57859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57860    msys_help $MISSING_DEPENDENCY
57861  else
57862    PKGHANDLER_COMMAND=
57863
57864    case $PKGHANDLER in
57865      apt-get)
57866        apt_help     $MISSING_DEPENDENCY ;;
57867      yum)
57868        yum_help     $MISSING_DEPENDENCY ;;
57869      port)
57870        port_help    $MISSING_DEPENDENCY ;;
57871      pkgutil)
57872        pkgutil_help $MISSING_DEPENDENCY ;;
57873      pkgadd)
57874        pkgadd_help  $MISSING_DEPENDENCY ;;
57875    esac
57876
57877    if test "x$PKGHANDLER_COMMAND" != x; then
57878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57879    fi
57880  fi
57881
57882      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
57883    fi
57884  fi
57885
57886
57887
57888
57889
57890  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
57891    # Extract the first word of "llvm-config", so it can be a program name with args.
57892set dummy llvm-config; ac_word=$2
57893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57894$as_echo_n "checking for $ac_word... " >&6; }
57895if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
57896  $as_echo_n "(cached) " >&6
57897else
57898  if test -n "$LLVM_CONFIG"; then
57899  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
57900else
57901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57902for as_dir in $PATH
57903do
57904  IFS=$as_save_IFS
57905  test -z "$as_dir" && as_dir=.
57906    for ac_exec_ext in '' $ac_executable_extensions; do
57907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57908    ac_cv_prog_LLVM_CONFIG="llvm-config"
57909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57910    break 2
57911  fi
57912done
57913  done
57914IFS=$as_save_IFS
57915
57916fi
57917fi
57918LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
57919if test -n "$LLVM_CONFIG"; then
57920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
57921$as_echo "$LLVM_CONFIG" >&6; }
57922else
57923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57924$as_echo "no" >&6; }
57925fi
57926
57927
57928
57929    if test "x$LLVM_CONFIG" != xllvm-config; then
57930      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
57931    fi
57932
57933    llvm_components="jit mcjit engine nativecodegen native"
57934    unset LLVM_CFLAGS
57935    for flag in $("$LLVM_CONFIG" --cxxflags); do
57936      if echo "${flag}" | grep -q '^-[ID]'; then
57937        if test "${flag}" != "-D_DEBUG" ; then
57938          if test "${LLVM_CFLAGS}" != "" ; then
57939            LLVM_CFLAGS="${LLVM_CFLAGS} "
57940          fi
57941          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
57942        fi
57943      fi
57944    done
57945    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
57946    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
57947
57948    unset LLVM_LDFLAGS
57949    for flag in $("${LLVM_CONFIG}" --ldflags); do
57950      if echo "${flag}" | grep -q '^-L'; then
57951        if test "${LLVM_LDFLAGS}" != ""; then
57952          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
57953        fi
57954        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
57955      fi
57956    done
57957
57958    unset LLVM_LIBS
57959    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
57960      if echo "${flag}" | grep -q '^-l'; then
57961        if test "${LLVM_LIBS}" != ""; then
57962          LLVM_LIBS="${LLVM_LIBS} "
57963        fi
57964        LLVM_LIBS="${LLVM_LIBS}${flag}"
57965      fi
57966    done
57967
57968
57969
57970
57971  fi
57972
57973
57974
57975# Check whether --with-libjpeg was given.
57976if test "${with_libjpeg+set}" = set; then :
57977  withval=$with_libjpeg;
57978fi
57979
57980
57981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
57982$as_echo_n "checking for which libjpeg to use... " >&6; }
57983  # default is bundled
57984  DEFAULT_LIBJPEG=bundled
57985  # if user didn't specify, use DEFAULT_LIBJPEG
57986  if test "x${with_libjpeg}" = "x"; then
57987    with_libjpeg=${DEFAULT_LIBJPEG}
57988  fi
57989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
57990$as_echo "${with_libjpeg}" >&6; }
57991
57992  if test "x${with_libjpeg}" = "xbundled"; then
57993    USE_EXTERNAL_LIBJPEG=false
57994  elif test "x${with_libjpeg}" = "xsystem"; then
57995    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
57996if test "x$ac_cv_header_jpeglib_h" = xyes; then :
57997
57998else
57999   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58000fi
58001
58002
58003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58004$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58005if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58006  $as_echo_n "(cached) " >&6
58007else
58008  ac_check_lib_save_LIBS=$LIBS
58009LIBS="-ljpeg  $LIBS"
58010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58011/* end confdefs.h.  */
58012
58013/* Override any GCC internal prototype to avoid an error.
58014   Use char because int might match the return type of a GCC
58015   builtin and then its argument prototype would still apply.  */
58016#ifdef __cplusplus
58017extern "C"
58018#endif
58019char jpeg_CreateDecompress ();
58020int
58021main ()
58022{
58023return jpeg_CreateDecompress ();
58024  ;
58025  return 0;
58026}
58027_ACEOF
58028if ac_fn_cxx_try_link "$LINENO"; then :
58029  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58030else
58031  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58032fi
58033rm -f core conftest.err conftest.$ac_objext \
58034    conftest$ac_exeext conftest.$ac_ext
58035LIBS=$ac_check_lib_save_LIBS
58036fi
58037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58038$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58039if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58040  cat >>confdefs.h <<_ACEOF
58041#define HAVE_LIBJPEG 1
58042_ACEOF
58043
58044  LIBS="-ljpeg $LIBS"
58045
58046else
58047   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58048fi
58049
58050
58051    USE_EXTERNAL_LIBJPEG=true
58052  else
58053    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58054  fi
58055
58056
58057
58058
58059
58060# Check whether --with-giflib was given.
58061if test "${with_giflib+set}" = set; then :
58062  withval=$with_giflib;
58063fi
58064
58065
58066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58067$as_echo_n "checking for which giflib to use... " >&6; }
58068  # default is bundled
58069  DEFAULT_GIFLIB=bundled
58070  # if user didn't specify, use DEFAULT_GIFLIB
58071  if test "x${with_giflib}" = "x"; then
58072    with_giflib=${DEFAULT_GIFLIB}
58073  fi
58074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58075$as_echo "${with_giflib}" >&6; }
58076
58077  if test "x${with_giflib}" = "xbundled"; then
58078    USE_EXTERNAL_LIBGIF=false
58079  elif test "x${with_giflib}" = "xsystem"; then
58080    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58081if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58082
58083else
58084   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58085fi
58086
58087
58088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58089$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58090if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58091  $as_echo_n "(cached) " >&6
58092else
58093  ac_check_lib_save_LIBS=$LIBS
58094LIBS="-lgif  $LIBS"
58095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58096/* end confdefs.h.  */
58097
58098/* Override any GCC internal prototype to avoid an error.
58099   Use char because int might match the return type of a GCC
58100   builtin and then its argument prototype would still apply.  */
58101#ifdef __cplusplus
58102extern "C"
58103#endif
58104char DGifGetCode ();
58105int
58106main ()
58107{
58108return DGifGetCode ();
58109  ;
58110  return 0;
58111}
58112_ACEOF
58113if ac_fn_cxx_try_link "$LINENO"; then :
58114  ac_cv_lib_gif_DGifGetCode=yes
58115else
58116  ac_cv_lib_gif_DGifGetCode=no
58117fi
58118rm -f core conftest.err conftest.$ac_objext \
58119    conftest$ac_exeext conftest.$ac_ext
58120LIBS=$ac_check_lib_save_LIBS
58121fi
58122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58123$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58124if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58125  cat >>confdefs.h <<_ACEOF
58126#define HAVE_LIBGIF 1
58127_ACEOF
58128
58129  LIBS="-lgif $LIBS"
58130
58131else
58132   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58133fi
58134
58135
58136    USE_EXTERNAL_LIBGIF=true
58137  else
58138    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58139  fi
58140
58141
58142
58143
58144
58145# Check whether --with-libpng was given.
58146if test "${with_libpng+set}" = set; then :
58147  withval=$with_libpng;
58148fi
58149
58150
58151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58152$as_echo_n "checking for which libpng to use... " >&6; }
58153
58154  # default is bundled
58155  DEFAULT_LIBPNG=bundled
58156  # if user didn't specify, use DEFAULT_LIBPNG
58157  if test "x${with_libpng}" = "x"; then
58158      with_libpng=${DEFAULT_LIBPNG}
58159  fi
58160
58161  if test "x${with_libpng}" = "xbundled"; then
58162      USE_EXTERNAL_LIBPNG=false
58163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58164$as_echo "bundled" >&6; }
58165  elif test "x${with_libpng}" = "xsystem"; then
58166
58167pkg_failed=no
58168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58169$as_echo_n "checking for PNG... " >&6; }
58170
58171if test -n "$PNG_CFLAGS"; then
58172    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58173 elif test -n "$PKG_CONFIG"; then
58174    if test -n "$PKG_CONFIG" && \
58175    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58176  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58177  ac_status=$?
58178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58179  test $ac_status = 0; }; then
58180  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58181else
58182  pkg_failed=yes
58183fi
58184 else
58185    pkg_failed=untried
58186fi
58187if test -n "$PNG_LIBS"; then
58188    pkg_cv_PNG_LIBS="$PNG_LIBS"
58189 elif test -n "$PKG_CONFIG"; then
58190    if test -n "$PKG_CONFIG" && \
58191    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58192  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58193  ac_status=$?
58194  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58195  test $ac_status = 0; }; then
58196  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58197else
58198  pkg_failed=yes
58199fi
58200 else
58201    pkg_failed=untried
58202fi
58203
58204
58205
58206if test $pkg_failed = yes; then
58207
58208if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58209        _pkg_short_errors_supported=yes
58210else
58211        _pkg_short_errors_supported=no
58212fi
58213        if test $_pkg_short_errors_supported = yes; then
58214	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58215        else
58216	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58217        fi
58218	# Put the nasty error message in config.log where it belongs
58219	echo "$PNG_PKG_ERRORS" >&5
58220
58221	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58222$as_echo "no" >&6; }
58223                 LIBPNG_FOUND=no
58224elif test $pkg_failed = untried; then
58225	 LIBPNG_FOUND=no
58226else
58227	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58228	PNG_LIBS=$pkg_cv_PNG_LIBS
58229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58230$as_echo "yes" >&6; }
58231	 LIBPNG_FOUND=yes
58232fi
58233      if test "x${LIBPNG_FOUND}" = "xyes"; then
58234          USE_EXTERNAL_LIBPNG=true
58235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58236$as_echo "system" >&6; }
58237      else
58238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58239$as_echo "system not found" >&6; }
58240          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58241      fi
58242  else
58243      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58244  fi
58245
58246
58247
58248
58249
58250# Check whether --with-zlib was given.
58251if test "${with_zlib+set}" = set; then :
58252  withval=$with_zlib;
58253fi
58254
58255
58256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58257$as_echo_n "checking for compress in -lz... " >&6; }
58258if ${ac_cv_lib_z_compress+:} false; then :
58259  $as_echo_n "(cached) " >&6
58260else
58261  ac_check_lib_save_LIBS=$LIBS
58262LIBS="-lz  $LIBS"
58263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58264/* end confdefs.h.  */
58265
58266/* Override any GCC internal prototype to avoid an error.
58267   Use char because int might match the return type of a GCC
58268   builtin and then its argument prototype would still apply.  */
58269#ifdef __cplusplus
58270extern "C"
58271#endif
58272char compress ();
58273int
58274main ()
58275{
58276return compress ();
58277  ;
58278  return 0;
58279}
58280_ACEOF
58281if ac_fn_cxx_try_link "$LINENO"; then :
58282  ac_cv_lib_z_compress=yes
58283else
58284  ac_cv_lib_z_compress=no
58285fi
58286rm -f core conftest.err conftest.$ac_objext \
58287    conftest$ac_exeext conftest.$ac_ext
58288LIBS=$ac_check_lib_save_LIBS
58289fi
58290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58291$as_echo "$ac_cv_lib_z_compress" >&6; }
58292if test "x$ac_cv_lib_z_compress" = xyes; then :
58293   ZLIB_FOUND=yes
58294else
58295   ZLIB_FOUND=no
58296fi
58297
58298
58299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58300$as_echo_n "checking for which zlib to use... " >&6; }
58301
58302  DEFAULT_ZLIB=bundled
58303  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58304    # On macosx default is system...on others default is bundled
58305    DEFAULT_ZLIB=system
58306  fi
58307
58308  if test "x${ZLIB_FOUND}" != "xyes"; then
58309    # If we don't find any system...set default to bundled
58310    DEFAULT_ZLIB=bundled
58311  fi
58312
58313  # If user didn't specify, use DEFAULT_ZLIB
58314  if test "x${with_zlib}" = "x"; then
58315    with_zlib=${DEFAULT_ZLIB}
58316  fi
58317
58318  if test "x${with_zlib}" = "xbundled"; then
58319    USE_EXTERNAL_LIBZ=false
58320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58321$as_echo "bundled" >&6; }
58322  elif test "x${with_zlib}" = "xsystem"; then
58323    if test "x${ZLIB_FOUND}" = "xyes"; then
58324      USE_EXTERNAL_LIBZ=true
58325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58326$as_echo "system" >&6; }
58327    else
58328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58329$as_echo "system not found" >&6; }
58330      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58331    fi
58332  else
58333    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58334  fi
58335
58336
58337
58338
58339
58340# Check whether --with-lcms was given.
58341if test "${with_lcms+set}" = set; then :
58342  withval=$with_lcms;
58343fi
58344
58345
58346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58347$as_echo_n "checking for which lcms to use... " >&6; }
58348
58349  DEFAULT_LCMS=bundled
58350  # If user didn't specify, use DEFAULT_LCMS
58351  if test "x${with_lcms}" = "x"; then
58352      with_lcms=${DEFAULT_LCMS}
58353  fi
58354
58355  if test "x${with_lcms}" = "xbundled"; then
58356    USE_EXTERNAL_LCMS=false
58357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58358$as_echo "bundled" >&6; }
58359  elif test "x${with_lcms}" = "xsystem"; then
58360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58361$as_echo "system" >&6; }
58362
58363pkg_failed=no
58364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58365$as_echo_n "checking for LCMS... " >&6; }
58366
58367if test -n "$LCMS_CFLAGS"; then
58368    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58369 elif test -n "$PKG_CONFIG"; then
58370    if test -n "$PKG_CONFIG" && \
58371    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58372  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58373  ac_status=$?
58374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58375  test $ac_status = 0; }; then
58376  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58377else
58378  pkg_failed=yes
58379fi
58380 else
58381    pkg_failed=untried
58382fi
58383if test -n "$LCMS_LIBS"; then
58384    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58385 elif test -n "$PKG_CONFIG"; then
58386    if test -n "$PKG_CONFIG" && \
58387    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58388  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58389  ac_status=$?
58390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58391  test $ac_status = 0; }; then
58392  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58393else
58394  pkg_failed=yes
58395fi
58396 else
58397    pkg_failed=untried
58398fi
58399
58400
58401
58402if test $pkg_failed = yes; then
58403
58404if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58405        _pkg_short_errors_supported=yes
58406else
58407        _pkg_short_errors_supported=no
58408fi
58409        if test $_pkg_short_errors_supported = yes; then
58410	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58411        else
58412	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58413        fi
58414	# Put the nasty error message in config.log where it belongs
58415	echo "$LCMS_PKG_ERRORS" >&5
58416
58417	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58418$as_echo "no" >&6; }
58419                LCMS_FOUND=no
58420elif test $pkg_failed = untried; then
58421	LCMS_FOUND=no
58422else
58423	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58424	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58426$as_echo "yes" >&6; }
58427	LCMS_FOUND=yes
58428fi
58429    if test "x${LCMS_FOUND}" = "xyes"; then
58430      USE_EXTERNAL_LCMS=true
58431    else
58432      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58433    fi
58434  else
58435    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58436  fi
58437
58438
58439
58440
58441
58442
58443
58444
58445
58446
58447
58448  # Setup libm (the maths library)
58449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58450$as_echo_n "checking for cos in -lm... " >&6; }
58451if ${ac_cv_lib_m_cos+:} false; then :
58452  $as_echo_n "(cached) " >&6
58453else
58454  ac_check_lib_save_LIBS=$LIBS
58455LIBS="-lm  $LIBS"
58456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58457/* end confdefs.h.  */
58458
58459/* Override any GCC internal prototype to avoid an error.
58460   Use char because int might match the return type of a GCC
58461   builtin and then its argument prototype would still apply.  */
58462#ifdef __cplusplus
58463extern "C"
58464#endif
58465char cos ();
58466int
58467main ()
58468{
58469return cos ();
58470  ;
58471  return 0;
58472}
58473_ACEOF
58474if ac_fn_cxx_try_link "$LINENO"; then :
58475  ac_cv_lib_m_cos=yes
58476else
58477  ac_cv_lib_m_cos=no
58478fi
58479rm -f core conftest.err conftest.$ac_objext \
58480    conftest$ac_exeext conftest.$ac_ext
58481LIBS=$ac_check_lib_save_LIBS
58482fi
58483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58484$as_echo "$ac_cv_lib_m_cos" >&6; }
58485if test "x$ac_cv_lib_m_cos" = xyes; then :
58486  cat >>confdefs.h <<_ACEOF
58487#define HAVE_LIBM 1
58488_ACEOF
58489
58490  LIBS="-lm $LIBS"
58491
58492else
58493
58494      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58495$as_echo "$as_me: Maths library was not found" >&6;}
58496
58497fi
58498
58499  LIBM=-lm
58500
58501
58502  # Setup libdl (for dynamic library loading)
58503  save_LIBS="$LIBS"
58504  LIBS=""
58505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58506$as_echo_n "checking for dlopen in -ldl... " >&6; }
58507if ${ac_cv_lib_dl_dlopen+:} false; then :
58508  $as_echo_n "(cached) " >&6
58509else
58510  ac_check_lib_save_LIBS=$LIBS
58511LIBS="-ldl  $LIBS"
58512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58513/* end confdefs.h.  */
58514
58515/* Override any GCC internal prototype to avoid an error.
58516   Use char because int might match the return type of a GCC
58517   builtin and then its argument prototype would still apply.  */
58518#ifdef __cplusplus
58519extern "C"
58520#endif
58521char dlopen ();
58522int
58523main ()
58524{
58525return dlopen ();
58526  ;
58527  return 0;
58528}
58529_ACEOF
58530if ac_fn_cxx_try_link "$LINENO"; then :
58531  ac_cv_lib_dl_dlopen=yes
58532else
58533  ac_cv_lib_dl_dlopen=no
58534fi
58535rm -f core conftest.err conftest.$ac_objext \
58536    conftest$ac_exeext conftest.$ac_ext
58537LIBS=$ac_check_lib_save_LIBS
58538fi
58539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58540$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58541if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58542  cat >>confdefs.h <<_ACEOF
58543#define HAVE_LIBDL 1
58544_ACEOF
58545
58546  LIBS="-ldl $LIBS"
58547
58548fi
58549
58550  LIBDL="$LIBS"
58551
58552  LIBS="$save_LIBS"
58553
58554  # Deprecated libraries, keep the flags for backwards compatibility
58555  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58556
58557
58558# Check whether --with-dxsdk was given.
58559if test "${with_dxsdk+set}" = set; then :
58560  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58561$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58562fi
58563
58564
58565
58566
58567# Check whether --with-dxsdk-lib was given.
58568if test "${with_dxsdk_lib+set}" = set; then :
58569  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58570$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58571fi
58572
58573
58574
58575
58576# Check whether --with-dxsdk-include was given.
58577if test "${with_dxsdk_include+set}" = set; then :
58578  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58579$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58580fi
58581
58582
58583  fi
58584
58585  # Control if libzip can use mmap. Available for purposes of overriding.
58586  LIBZIP_CAN_USE_MMAP=true
58587
58588
58589
58590
58591
58592
58593
58594
58595
58596
58597
58598
58599
58600
58601###############################################################################
58602#
58603# We need to do some final tweaking, when everything else is done.
58604#
58605###############################################################################
58606
58607
58608  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58609
58610
58611
58612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58613$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58614
58615  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58616    ENABLE_INTREE_EC=yes
58617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58618$as_echo "yes" >&6; }
58619  else
58620    ENABLE_INTREE_EC=no
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58622$as_echo "no" >&6; }
58623  fi
58624
58625
58626
58627
58628###############################################################################
58629#
58630# Configure parts of the build that only affect the build performance,
58631# not the result.
58632#
58633###############################################################################
58634
58635
58636  # How many cores do we have on this build system?
58637
58638# Check whether --with-num-cores was given.
58639if test "${with_num_cores+set}" = set; then :
58640  withval=$with_num_cores;
58641fi
58642
58643  if test "x$with_num_cores" = x; then
58644    # The number of cores were not specified, try to probe them.
58645
58646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58647$as_echo_n "checking for number of cores... " >&6; }
58648  NUM_CORES=1
58649  FOUND_CORES=no
58650
58651  if test -f /proc/cpuinfo; then
58652    # Looks like a Linux (or cygwin) system
58653    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58654    FOUND_CORES=yes
58655  elif test -x /usr/sbin/psrinfo; then
58656    # Looks like a Solaris system
58657    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58658    FOUND_CORES=yes
58659  elif test -x /usr/sbin/system_profiler; then
58660    # Looks like a MacOSX system
58661    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
58662    FOUND_CORES=yes
58663  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58664    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58665    FOUND_CORES=yes
58666  elif test -n "$NUMBER_OF_PROCESSORS"; then
58667    # On windows, look in the env
58668    NUM_CORES=$NUMBER_OF_PROCESSORS
58669    FOUND_CORES=yes
58670  fi
58671
58672  if test "x$FOUND_CORES" = xyes; then
58673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58674$as_echo "$NUM_CORES" >&6; }
58675  else
58676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58677$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58678    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58679$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58680  fi
58681
58682  else
58683    NUM_CORES=$with_num_cores
58684  fi
58685
58686
58687
58688  # How much memory do we have on this build system?
58689
58690# Check whether --with-memory-size was given.
58691if test "${with_memory_size+set}" = set; then :
58692  withval=$with_memory_size;
58693fi
58694
58695  if test "x$with_memory_size" = x; then
58696    # The memory size was not specified, try to probe it.
58697
58698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58699$as_echo_n "checking for memory size... " >&6; }
58700  # Default to 1024 MB
58701  MEMORY_SIZE=1024
58702  FOUND_MEM=no
58703
58704  if test -f /proc/meminfo; then
58705    # Looks like a Linux (or cygwin) system
58706    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58707    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58708    FOUND_MEM=yes
58709  elif test -x /usr/sbin/prtconf; then
58710    # Looks like a Solaris or AIX system
58711    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58712    FOUND_MEM=yes
58713  elif test -x /usr/sbin/system_profiler; then
58714    # Looks like a MacOSX system
58715    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
58716    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
58717    FOUND_MEM=yes
58718  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58719    # Windows, but without cygwin
58720    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58721    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58722    FOUND_MEM=yes
58723  fi
58724
58725  if test "x$FOUND_MEM" = xyes; then
58726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58727$as_echo "$MEMORY_SIZE MB" >&6; }
58728  else
58729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58730$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58731    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58732$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58733  fi
58734
58735  else
58736    MEMORY_SIZE=$with_memory_size
58737  fi
58738
58739
58740
58741  # Provide a decent default number of parallel jobs for make depending on
58742  # number of cores, amount of memory and machine architecture.
58743
58744# Check whether --with-jobs was given.
58745if test "${with_jobs+set}" = set; then :
58746  withval=$with_jobs;
58747fi
58748
58749  if test "x$with_jobs" = x; then
58750    # Number of jobs was not specified, calculate.
58751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58752$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58753    # Approximate memory in GB.
58754    memory_gb=`expr $MEMORY_SIZE / 1024`
58755    # Pick the lowest of memory in gb and number of cores.
58756    if test "$memory_gb" -lt "$NUM_CORES"; then
58757      JOBS="$memory_gb"
58758    else
58759      JOBS="$NUM_CORES"
58760    fi
58761    if test "$JOBS" -eq "0"; then
58762      JOBS=1
58763    fi
58764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58765$as_echo "$JOBS" >&6; }
58766  else
58767    JOBS=$with_jobs
58768  fi
58769
58770
58771
58772  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58773
58774# Check whether --with-test-jobs was given.
58775if test "${with_test_jobs+set}" = set; then :
58776  withval=$with_test_jobs;
58777fi
58778
58779  if test "x$with_test_jobs" = x; then
58780      TEST_JOBS=0
58781  else
58782      TEST_JOBS=$with_test_jobs
58783  fi
58784
58785
58786
58787# Setup arguments for the boot jdk (after cores and memory have been setup)
58788
58789  ##############################################################################
58790  #
58791  # Specify jvm options for anything that is run with the Boot JDK.
58792  # Not all JVM:s accept the same arguments on the command line.
58793  #
58794
58795# Check whether --with-boot-jdk-jvmargs was given.
58796if test "${with_boot_jdk_jvmargs+set}" = set; then :
58797  withval=$with_boot_jdk_jvmargs;
58798fi
58799
58800
58801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
58802$as_echo_n "checking flags for boot jdk java command ... " >&6; }
58803
58804  # Disable special log output when a debug build is used as Boot JDK...
58805
58806  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
58807  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
58808  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
58809  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58810  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58811  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58812    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
58813    JVM_ARG_OK=true
58814  else
58815    $ECHO "Arg failed:" >&5
58816    $ECHO "$OUTPUT" >&5
58817    JVM_ARG_OK=false
58818  fi
58819
58820
58821  # Apply user provided options.
58822
58823  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
58824  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
58825  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
58826  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58827  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58828  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58829    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
58830    JVM_ARG_OK=true
58831  else
58832    $ECHO "Arg failed:" >&5
58833    $ECHO "$OUTPUT" >&5
58834    JVM_ARG_OK=false
58835  fi
58836
58837
58838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
58839$as_echo "$boot_jdk_jvmargs" >&6; }
58840
58841  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
58842  JAVA_FLAGS=$boot_jdk_jvmargs
58843
58844
58845
58846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
58847$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
58848
58849  # Starting amount of heap memory.
58850
58851  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
58852  $ECHO "Command: $JAVA -Xms64M -version" >&5
58853  OUTPUT=`$JAVA -Xms64M -version 2>&1`
58854  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58855  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58856  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58857    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
58858    JVM_ARG_OK=true
58859  else
58860    $ECHO "Arg failed:" >&5
58861    $ECHO "$OUTPUT" >&5
58862    JVM_ARG_OK=false
58863  fi
58864
58865
58866  # Maximum amount of heap memory.
58867  # Maximum stack size.
58868  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
58869  if test "x$BOOT_JDK_BITS" = "x32"; then
58870    if test "$JVM_MAX_HEAP" -gt "1100"; then
58871      JVM_MAX_HEAP=1100
58872    elif test "$JVM_MAX_HEAP" -lt "512"; then
58873      JVM_MAX_HEAP=512
58874    fi
58875    STACK_SIZE=768
58876  else
58877    # Running a 64 bit JVM allows for and requires a bigger heap
58878    if test "$JVM_MAX_HEAP" -gt "1600"; then
58879      JVM_MAX_HEAP=1600
58880    elif test "$JVM_MAX_HEAP" -lt "512"; then
58881      JVM_MAX_HEAP=512
58882    fi
58883    STACK_SIZE=1536
58884  fi
58885
58886  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
58887  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
58888  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
58889  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58890  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58891  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58892    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
58893    JVM_ARG_OK=true
58894  else
58895    $ECHO "Arg failed:" >&5
58896    $ECHO "$OUTPUT" >&5
58897    JVM_ARG_OK=false
58898  fi
58899
58900
58901  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
58902  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
58903  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
58904  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58905  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58906  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58907    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
58908    JVM_ARG_OK=true
58909  else
58910    $ECHO "Arg failed:" >&5
58911    $ECHO "$OUTPUT" >&5
58912    JVM_ARG_OK=false
58913  fi
58914
58915
58916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
58917$as_echo "$boot_jdk_jvmargs_big" >&6; }
58918
58919  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
58920
58921
58922  # By default, the main javac compilations use big
58923  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
58924
58925
58926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
58927$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
58928
58929  # Use serial gc for small short lived tools if possible
58930
58931  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
58932  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
58933  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
58934  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58935  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58936  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58937    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
58938    JVM_ARG_OK=true
58939  else
58940    $ECHO "Arg failed:" >&5
58941    $ECHO "$OUTPUT" >&5
58942    JVM_ARG_OK=false
58943  fi
58944
58945
58946  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
58947  $ECHO "Command: $JAVA -Xms32M -version" >&5
58948  OUTPUT=`$JAVA -Xms32M -version 2>&1`
58949  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58950  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58951  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58952    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
58953    JVM_ARG_OK=true
58954  else
58955    $ECHO "Arg failed:" >&5
58956    $ECHO "$OUTPUT" >&5
58957    JVM_ARG_OK=false
58958  fi
58959
58960
58961  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
58962  $ECHO "Command: $JAVA -Xmx512M -version" >&5
58963  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
58964  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58965  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58966  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58967    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
58968    JVM_ARG_OK=true
58969  else
58970    $ECHO "Arg failed:" >&5
58971    $ECHO "$OUTPUT" >&5
58972    JVM_ARG_OK=false
58973  fi
58974
58975
58976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
58977$as_echo "$boot_jdk_jvmargs_small" >&6; }
58978
58979  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
58980
58981
58982  JAVA_TOOL_FLAGS_SMALL=""
58983  for f in $JAVA_FLAGS_SMALL; do
58984    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
58985  done
58986
58987
58988
58989# Setup smart javac (after cores and memory have been setup)
58990
58991
58992# Check whether --with-sjavac-server-java was given.
58993if test "${with_sjavac_server_java+set}" = set; then :
58994  withval=$with_sjavac_server_java;
58995fi
58996
58997
58998  if test "x$with_sjavac_server_java" != x; then
58999    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59000    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59001    if test "x$FOUND_VERSION" = x; then
59002      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59003    fi
59004  else
59005    SJAVAC_SERVER_JAVA="$JAVA"
59006  fi
59007
59008
59009  if test "$MEMORY_SIZE" -gt "3000"; then
59010
59011  $ECHO "Check if jvm arg is ok: -d64" >&5
59012  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59013  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59014  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59015  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59016  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59017    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59018    JVM_ARG_OK=true
59019  else
59020    $ECHO "Arg failed:" >&5
59021    $ECHO "$OUTPUT" >&5
59022    JVM_ARG_OK=false
59023  fi
59024
59025    if test "$JVM_ARG_OK" = true; then
59026      JVM_64BIT=true
59027      JVM_ARG_OK=false
59028    fi
59029  fi
59030
59031  MX_VALUE=`expr $MEMORY_SIZE / 2`
59032  if test "$JVM_64BIT" = true; then
59033    # Set ms lower than mx since more than one instance of the server might
59034    # get launched at the same time before they figure out which instance won.
59035    MS_VALUE=512
59036    if test "$MX_VALUE" -gt "2048"; then
59037      MX_VALUE=2048
59038    fi
59039  else
59040    MS_VALUE=256
59041    if test "$MX_VALUE" -gt "1500"; then
59042      MX_VALUE=1500
59043    fi
59044  fi
59045  if test "$MX_VALUE" -lt "512"; then
59046    MX_VALUE=512
59047  fi
59048
59049  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59050  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59051  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59052  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59053  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59054  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59055    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59056    JVM_ARG_OK=true
59057  else
59058    $ECHO "Arg failed:" >&5
59059    $ECHO "$OUTPUT" >&5
59060    JVM_ARG_OK=false
59061  fi
59062
59063
59064
59065  # Check whether --enable-sjavac was given.
59066if test "${enable_sjavac+set}" = set; then :
59067  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59068else
59069  ENABLE_SJAVAC="no"
59070fi
59071
59072  if test "x$JVM_ARG_OK" = "xfalse"; then
59073    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59074$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59075    ENABLE_SJAVAC="no"
59076  fi
59077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59078$as_echo_n "checking whether to use sjavac... " >&6; }
59079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59080$as_echo "$ENABLE_SJAVAC" >&6; }
59081
59082
59083  # Check whether --enable-javac-server was given.
59084if test "${enable_javac_server+set}" = set; then :
59085  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59086else
59087  ENABLE_JAVAC_SERVER="yes"
59088fi
59089
59090  if test "x$JVM_ARG_OK" = "xfalse"; then
59091    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59092$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59093    ENABLE_JAVAC_SERVER="no"
59094  fi
59095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59096$as_echo_n "checking whether to use javac server... " >&6; }
59097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59098$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59099
59100
59101  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59102    # When using a server javac, the small client instances do not need much
59103    # resources.
59104    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59105  fi
59106
59107
59108# Setup use of icecc if requested
59109
59110  # Check whether --enable-icecc was given.
59111if test "${enable_icecc+set}" = set; then :
59112  enableval=$enable_icecc;
59113fi
59114
59115
59116  if test "x${enable_icecc}" = "xyes"; then
59117
59118
59119
59120  # Publish this variable in the help.
59121
59122
59123  if [ -z "${ICECC_CMD+x}" ]; then
59124    # The variable is not set by user, try to locate tool using the code snippet
59125    for ac_prog in icecc
59126do
59127  # Extract the first word of "$ac_prog", so it can be a program name with args.
59128set dummy $ac_prog; ac_word=$2
59129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59130$as_echo_n "checking for $ac_word... " >&6; }
59131if ${ac_cv_path_ICECC_CMD+:} false; then :
59132  $as_echo_n "(cached) " >&6
59133else
59134  case $ICECC_CMD in
59135  [\\/]* | ?:[\\/]*)
59136  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59137  ;;
59138  *)
59139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59140for as_dir in $PATH
59141do
59142  IFS=$as_save_IFS
59143  test -z "$as_dir" && as_dir=.
59144    for ac_exec_ext in '' $ac_executable_extensions; do
59145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59146    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59148    break 2
59149  fi
59150done
59151  done
59152IFS=$as_save_IFS
59153
59154  ;;
59155esac
59156fi
59157ICECC_CMD=$ac_cv_path_ICECC_CMD
59158if test -n "$ICECC_CMD"; then
59159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59160$as_echo "$ICECC_CMD" >&6; }
59161else
59162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59163$as_echo "no" >&6; }
59164fi
59165
59166
59167  test -n "$ICECC_CMD" && break
59168done
59169
59170  else
59171    # The variable is set, but is it from the command line or the environment?
59172
59173    # Try to remove the string !ICECC_CMD! from our list.
59174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59176      # If it failed, the variable was not from the command line. Ignore it,
59177      # but warn the user (except for BASH, which is always set by the calling BASH).
59178      if test "xICECC_CMD" != xBASH; then
59179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59180$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59181      fi
59182      # Try to locate tool using the code snippet
59183      for ac_prog in icecc
59184do
59185  # Extract the first word of "$ac_prog", so it can be a program name with args.
59186set dummy $ac_prog; ac_word=$2
59187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59188$as_echo_n "checking for $ac_word... " >&6; }
59189if ${ac_cv_path_ICECC_CMD+:} false; then :
59190  $as_echo_n "(cached) " >&6
59191else
59192  case $ICECC_CMD in
59193  [\\/]* | ?:[\\/]*)
59194  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59195  ;;
59196  *)
59197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59198for as_dir in $PATH
59199do
59200  IFS=$as_save_IFS
59201  test -z "$as_dir" && as_dir=.
59202    for ac_exec_ext in '' $ac_executable_extensions; do
59203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59204    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59206    break 2
59207  fi
59208done
59209  done
59210IFS=$as_save_IFS
59211
59212  ;;
59213esac
59214fi
59215ICECC_CMD=$ac_cv_path_ICECC_CMD
59216if test -n "$ICECC_CMD"; then
59217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59218$as_echo "$ICECC_CMD" >&6; }
59219else
59220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59221$as_echo "no" >&6; }
59222fi
59223
59224
59225  test -n "$ICECC_CMD" && break
59226done
59227
59228    else
59229      # If it succeeded, then it was overridden by the user. We will use it
59230      # for the tool.
59231
59232      # First remove it from the list of overridden variables, so we can test
59233      # for unknown variables in the end.
59234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59235
59236      # Check if we try to supply an empty value
59237      if test "x$ICECC_CMD" = x; then
59238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59239$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59241$as_echo_n "checking for ICECC_CMD... " >&6; }
59242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59243$as_echo "disabled" >&6; }
59244      else
59245        # Check if the provided tool contains a complete path.
59246        tool_specified="$ICECC_CMD"
59247        tool_basename="${tool_specified##*/}"
59248        if test "x$tool_basename" = "x$tool_specified"; then
59249          # A command without a complete path is provided, search $PATH.
59250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59251$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59252          # Extract the first word of "$tool_basename", so it can be a program name with args.
59253set dummy $tool_basename; ac_word=$2
59254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59255$as_echo_n "checking for $ac_word... " >&6; }
59256if ${ac_cv_path_ICECC_CMD+:} false; then :
59257  $as_echo_n "(cached) " >&6
59258else
59259  case $ICECC_CMD in
59260  [\\/]* | ?:[\\/]*)
59261  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59262  ;;
59263  *)
59264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59265for as_dir in $PATH
59266do
59267  IFS=$as_save_IFS
59268  test -z "$as_dir" && as_dir=.
59269    for ac_exec_ext in '' $ac_executable_extensions; do
59270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59271    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59273    break 2
59274  fi
59275done
59276  done
59277IFS=$as_save_IFS
59278
59279  ;;
59280esac
59281fi
59282ICECC_CMD=$ac_cv_path_ICECC_CMD
59283if test -n "$ICECC_CMD"; then
59284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59285$as_echo "$ICECC_CMD" >&6; }
59286else
59287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59288$as_echo "no" >&6; }
59289fi
59290
59291
59292          if test "x$ICECC_CMD" = x; then
59293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59294          fi
59295        else
59296          # Otherwise we believe it is a complete path. Use it as it is.
59297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59298$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59300$as_echo_n "checking for ICECC_CMD... " >&6; }
59301          if test ! -x "$tool_specified"; then
59302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59303$as_echo "not found" >&6; }
59304            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59305          fi
59306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59307$as_echo "$tool_specified" >&6; }
59308        fi
59309      fi
59310    fi
59311
59312  fi
59313
59314
59315
59316  if test "x$ICECC_CMD" = x; then
59317    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59318  fi
59319
59320
59321    old_path="$PATH"
59322
59323    # Look for icecc-create-env in some known places
59324    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59325
59326
59327
59328  # Publish this variable in the help.
59329
59330
59331  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59332    # The variable is not set by user, try to locate tool using the code snippet
59333    for ac_prog in icecc-create-env
59334do
59335  # Extract the first word of "$ac_prog", so it can be a program name with args.
59336set dummy $ac_prog; ac_word=$2
59337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59338$as_echo_n "checking for $ac_word... " >&6; }
59339if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59340  $as_echo_n "(cached) " >&6
59341else
59342  case $ICECC_CREATE_ENV in
59343  [\\/]* | ?:[\\/]*)
59344  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59345  ;;
59346  *)
59347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59348for as_dir in $PATH
59349do
59350  IFS=$as_save_IFS
59351  test -z "$as_dir" && as_dir=.
59352    for ac_exec_ext in '' $ac_executable_extensions; do
59353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59354    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59356    break 2
59357  fi
59358done
59359  done
59360IFS=$as_save_IFS
59361
59362  ;;
59363esac
59364fi
59365ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59366if test -n "$ICECC_CREATE_ENV"; then
59367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59368$as_echo "$ICECC_CREATE_ENV" >&6; }
59369else
59370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59371$as_echo "no" >&6; }
59372fi
59373
59374
59375  test -n "$ICECC_CREATE_ENV" && break
59376done
59377
59378  else
59379    # The variable is set, but is it from the command line or the environment?
59380
59381    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59384      # If it failed, the variable was not from the command line. Ignore it,
59385      # but warn the user (except for BASH, which is always set by the calling BASH).
59386      if test "xICECC_CREATE_ENV" != xBASH; then
59387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59388$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59389      fi
59390      # Try to locate tool using the code snippet
59391      for ac_prog in icecc-create-env
59392do
59393  # Extract the first word of "$ac_prog", so it can be a program name with args.
59394set dummy $ac_prog; ac_word=$2
59395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59396$as_echo_n "checking for $ac_word... " >&6; }
59397if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59398  $as_echo_n "(cached) " >&6
59399else
59400  case $ICECC_CREATE_ENV in
59401  [\\/]* | ?:[\\/]*)
59402  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59403  ;;
59404  *)
59405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59406for as_dir in $PATH
59407do
59408  IFS=$as_save_IFS
59409  test -z "$as_dir" && as_dir=.
59410    for ac_exec_ext in '' $ac_executable_extensions; do
59411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59412    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59414    break 2
59415  fi
59416done
59417  done
59418IFS=$as_save_IFS
59419
59420  ;;
59421esac
59422fi
59423ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59424if test -n "$ICECC_CREATE_ENV"; then
59425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59426$as_echo "$ICECC_CREATE_ENV" >&6; }
59427else
59428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59429$as_echo "no" >&6; }
59430fi
59431
59432
59433  test -n "$ICECC_CREATE_ENV" && break
59434done
59435
59436    else
59437      # If it succeeded, then it was overridden by the user. We will use it
59438      # for the tool.
59439
59440      # First remove it from the list of overridden variables, so we can test
59441      # for unknown variables in the end.
59442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59443
59444      # Check if we try to supply an empty value
59445      if test "x$ICECC_CREATE_ENV" = x; then
59446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59447$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59449$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59451$as_echo "disabled" >&6; }
59452      else
59453        # Check if the provided tool contains a complete path.
59454        tool_specified="$ICECC_CREATE_ENV"
59455        tool_basename="${tool_specified##*/}"
59456        if test "x$tool_basename" = "x$tool_specified"; then
59457          # A command without a complete path is provided, search $PATH.
59458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59459$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59460          # Extract the first word of "$tool_basename", so it can be a program name with args.
59461set dummy $tool_basename; ac_word=$2
59462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59463$as_echo_n "checking for $ac_word... " >&6; }
59464if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59465  $as_echo_n "(cached) " >&6
59466else
59467  case $ICECC_CREATE_ENV in
59468  [\\/]* | ?:[\\/]*)
59469  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59470  ;;
59471  *)
59472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59473for as_dir in $PATH
59474do
59475  IFS=$as_save_IFS
59476  test -z "$as_dir" && as_dir=.
59477    for ac_exec_ext in '' $ac_executable_extensions; do
59478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59479    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59481    break 2
59482  fi
59483done
59484  done
59485IFS=$as_save_IFS
59486
59487  ;;
59488esac
59489fi
59490ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59491if test -n "$ICECC_CREATE_ENV"; then
59492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59493$as_echo "$ICECC_CREATE_ENV" >&6; }
59494else
59495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59496$as_echo "no" >&6; }
59497fi
59498
59499
59500          if test "x$ICECC_CREATE_ENV" = x; then
59501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59502          fi
59503        else
59504          # Otherwise we believe it is a complete path. Use it as it is.
59505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59506$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59508$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59509          if test ! -x "$tool_specified"; then
59510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59511$as_echo "not found" >&6; }
59512            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59513          fi
59514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59515$as_echo "$tool_specified" >&6; }
59516        fi
59517      fi
59518    fi
59519
59520  fi
59521
59522
59523
59524  if test "x$ICECC_CREATE_ENV" = x; then
59525    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59526  fi
59527
59528
59529    # Use icecc-create-env to create a minimal compilation environment that can
59530    # be sent to the other hosts in the icecream cluster.
59531    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59532    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59534$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59535    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59536      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59537          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
59538    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59539      # For clang, the icecc compilerwrapper is needed. It usually resides next
59540      # to icecc-create-env.
59541
59542
59543
59544  # Publish this variable in the help.
59545
59546
59547  if [ -z "${ICECC_WRAPPER+x}" ]; then
59548    # The variable is not set by user, try to locate tool using the code snippet
59549    for ac_prog in compilerwrapper
59550do
59551  # Extract the first word of "$ac_prog", so it can be a program name with args.
59552set dummy $ac_prog; ac_word=$2
59553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59554$as_echo_n "checking for $ac_word... " >&6; }
59555if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59556  $as_echo_n "(cached) " >&6
59557else
59558  case $ICECC_WRAPPER in
59559  [\\/]* | ?:[\\/]*)
59560  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59561  ;;
59562  *)
59563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59564for as_dir in $PATH
59565do
59566  IFS=$as_save_IFS
59567  test -z "$as_dir" && as_dir=.
59568    for ac_exec_ext in '' $ac_executable_extensions; do
59569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59570    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59572    break 2
59573  fi
59574done
59575  done
59576IFS=$as_save_IFS
59577
59578  ;;
59579esac
59580fi
59581ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59582if test -n "$ICECC_WRAPPER"; then
59583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59584$as_echo "$ICECC_WRAPPER" >&6; }
59585else
59586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59587$as_echo "no" >&6; }
59588fi
59589
59590
59591  test -n "$ICECC_WRAPPER" && break
59592done
59593
59594  else
59595    # The variable is set, but is it from the command line or the environment?
59596
59597    # Try to remove the string !ICECC_WRAPPER! from our list.
59598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59600      # If it failed, the variable was not from the command line. Ignore it,
59601      # but warn the user (except for BASH, which is always set by the calling BASH).
59602      if test "xICECC_WRAPPER" != xBASH; then
59603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59604$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59605      fi
59606      # Try to locate tool using the code snippet
59607      for ac_prog in compilerwrapper
59608do
59609  # Extract the first word of "$ac_prog", so it can be a program name with args.
59610set dummy $ac_prog; ac_word=$2
59611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59612$as_echo_n "checking for $ac_word... " >&6; }
59613if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59614  $as_echo_n "(cached) " >&6
59615else
59616  case $ICECC_WRAPPER in
59617  [\\/]* | ?:[\\/]*)
59618  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59619  ;;
59620  *)
59621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59622for as_dir in $PATH
59623do
59624  IFS=$as_save_IFS
59625  test -z "$as_dir" && as_dir=.
59626    for ac_exec_ext in '' $ac_executable_extensions; do
59627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59628    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59630    break 2
59631  fi
59632done
59633  done
59634IFS=$as_save_IFS
59635
59636  ;;
59637esac
59638fi
59639ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59640if test -n "$ICECC_WRAPPER"; then
59641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59642$as_echo "$ICECC_WRAPPER" >&6; }
59643else
59644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59645$as_echo "no" >&6; }
59646fi
59647
59648
59649  test -n "$ICECC_WRAPPER" && break
59650done
59651
59652    else
59653      # If it succeeded, then it was overridden by the user. We will use it
59654      # for the tool.
59655
59656      # First remove it from the list of overridden variables, so we can test
59657      # for unknown variables in the end.
59658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59659
59660      # Check if we try to supply an empty value
59661      if test "x$ICECC_WRAPPER" = x; then
59662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59663$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59665$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59667$as_echo "disabled" >&6; }
59668      else
59669        # Check if the provided tool contains a complete path.
59670        tool_specified="$ICECC_WRAPPER"
59671        tool_basename="${tool_specified##*/}"
59672        if test "x$tool_basename" = "x$tool_specified"; then
59673          # A command without a complete path is provided, search $PATH.
59674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59675$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59676          # Extract the first word of "$tool_basename", so it can be a program name with args.
59677set dummy $tool_basename; ac_word=$2
59678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59679$as_echo_n "checking for $ac_word... " >&6; }
59680if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59681  $as_echo_n "(cached) " >&6
59682else
59683  case $ICECC_WRAPPER in
59684  [\\/]* | ?:[\\/]*)
59685  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59686  ;;
59687  *)
59688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59689for as_dir in $PATH
59690do
59691  IFS=$as_save_IFS
59692  test -z "$as_dir" && as_dir=.
59693    for ac_exec_ext in '' $ac_executable_extensions; do
59694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59695    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59697    break 2
59698  fi
59699done
59700  done
59701IFS=$as_save_IFS
59702
59703  ;;
59704esac
59705fi
59706ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59707if test -n "$ICECC_WRAPPER"; then
59708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59709$as_echo "$ICECC_WRAPPER" >&6; }
59710else
59711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59712$as_echo "no" >&6; }
59713fi
59714
59715
59716          if test "x$ICECC_WRAPPER" = x; then
59717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59718          fi
59719        else
59720          # Otherwise we believe it is a complete path. Use it as it is.
59721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59722$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59724$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59725          if test ! -x "$tool_specified"; then
59726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59727$as_echo "not found" >&6; }
59728            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59729          fi
59730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59731$as_echo "$tool_specified" >&6; }
59732        fi
59733      fi
59734    fi
59735
59736  fi
59737
59738
59739
59740  if test "x$ICECC_WRAPPER" = x; then
59741    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59742  fi
59743
59744
59745      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59746          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
59747    else
59748      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59749    fi
59750    PATH="$old_path"
59751    # The bundle with the compiler gets a name based on checksums. Parse log file
59752    # to find it.
59753    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59754    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59756$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59757    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59758
59759    if test "x${COMPILE_TYPE}" = "xcross"; then
59760      # If cross compiling, create a separate env package for the build compiler
59761      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
59762$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
59763      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
59764      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
59765        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59766            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
59767      elif test "x${BUILD_CC##*/}" = "xclang"; then
59768        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59769            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
59770      else
59771        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
59772      fi
59773      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59774      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59776$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59777      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
59778          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
59779    else
59780      BUILD_ICECC="${ICECC}"
59781    fi
59782
59783
59784  fi
59785
59786
59787# Can the C/C++ compiler use precompiled headers?
59788
59789
59790  ###############################################################################
59791  #
59792  # Can the C/C++ compiler use precompiled headers?
59793  #
59794  # Check whether --enable-precompiled-headers was given.
59795if test "${enable_precompiled_headers+set}" = set; then :
59796  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
59797else
59798  ENABLE_PRECOMPH=yes
59799fi
59800
59801
59802  USE_PRECOMPILED_HEADER=1
59803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
59804$as_echo_n "checking If precompiled header is enabled... " >&6; }
59805  if test "x$ENABLE_PRECOMPH" = xno; then
59806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
59807$as_echo "no, forced" >&6; }
59808    USE_PRECOMPILED_HEADER=0
59809  elif test "x$ICECC" != "x"; then
59810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
59811$as_echo "no, does not work effectively with icecc" >&6; }
59812    USE_PRECOMPILED_HEADER=0
59813  else
59814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59815$as_echo "yes" >&6; }
59816  fi
59817
59818  if test "x$ENABLE_PRECOMPH" = xyes; then
59819    # Check that the compiler actually supports precomp headers.
59820    if test "x$TOOLCHAIN_TYPE" = xgcc; then
59821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
59822$as_echo_n "checking that precompiled headers work... " >&6; }
59823      echo "int alfa();" > conftest.h
59824      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
59825      if test ! -f conftest.hpp.gch; then
59826        USE_PRECOMPILED_HEADER=0
59827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59828$as_echo "no" >&6; }
59829      else
59830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59831$as_echo "yes" >&6; }
59832      fi
59833      rm -f conftest.h conftest.hpp.gch
59834    fi
59835  fi
59836
59837
59838
59839
59840# Setup use of ccache, if available
59841
59842  # Check whether --enable-ccache was given.
59843if test "${enable_ccache+set}" = set; then :
59844  enableval=$enable_ccache;
59845fi
59846
59847
59848  CCACHE=
59849  CCACHE_STATUS=
59850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
59851$as_echo_n "checking is ccache enabled... " >&6; }
59852  if test "x$enable_ccache" = xyes; then
59853    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
59854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59855$as_echo "yes" >&6; }
59856      OLD_PATH="$PATH"
59857      if test "x$TOOLCHAIN_PATH" != x; then
59858        PATH=$TOOLCHAIN_PATH:$PATH
59859      fi
59860
59861
59862
59863  # Publish this variable in the help.
59864
59865
59866  if [ -z "${CCACHE+x}" ]; then
59867    # The variable is not set by user, try to locate tool using the code snippet
59868    for ac_prog in ccache
59869do
59870  # Extract the first word of "$ac_prog", so it can be a program name with args.
59871set dummy $ac_prog; ac_word=$2
59872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59873$as_echo_n "checking for $ac_word... " >&6; }
59874if ${ac_cv_path_CCACHE+:} false; then :
59875  $as_echo_n "(cached) " >&6
59876else
59877  case $CCACHE in
59878  [\\/]* | ?:[\\/]*)
59879  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59880  ;;
59881  *)
59882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59883for as_dir in $PATH
59884do
59885  IFS=$as_save_IFS
59886  test -z "$as_dir" && as_dir=.
59887    for ac_exec_ext in '' $ac_executable_extensions; do
59888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59889    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59891    break 2
59892  fi
59893done
59894  done
59895IFS=$as_save_IFS
59896
59897  ;;
59898esac
59899fi
59900CCACHE=$ac_cv_path_CCACHE
59901if test -n "$CCACHE"; then
59902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59903$as_echo "$CCACHE" >&6; }
59904else
59905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59906$as_echo "no" >&6; }
59907fi
59908
59909
59910  test -n "$CCACHE" && break
59911done
59912
59913  else
59914    # The variable is set, but is it from the command line or the environment?
59915
59916    # Try to remove the string !CCACHE! from our list.
59917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
59918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59919      # If it failed, the variable was not from the command line. Ignore it,
59920      # but warn the user (except for BASH, which is always set by the calling BASH).
59921      if test "xCCACHE" != xBASH; then
59922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
59923$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
59924      fi
59925      # Try to locate tool using the code snippet
59926      for ac_prog in ccache
59927do
59928  # Extract the first word of "$ac_prog", so it can be a program name with args.
59929set dummy $ac_prog; ac_word=$2
59930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59931$as_echo_n "checking for $ac_word... " >&6; }
59932if ${ac_cv_path_CCACHE+:} false; then :
59933  $as_echo_n "(cached) " >&6
59934else
59935  case $CCACHE in
59936  [\\/]* | ?:[\\/]*)
59937  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
59938  ;;
59939  *)
59940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59941for as_dir in $PATH
59942do
59943  IFS=$as_save_IFS
59944  test -z "$as_dir" && as_dir=.
59945    for ac_exec_ext in '' $ac_executable_extensions; do
59946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59947    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
59948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59949    break 2
59950  fi
59951done
59952  done
59953IFS=$as_save_IFS
59954
59955  ;;
59956esac
59957fi
59958CCACHE=$ac_cv_path_CCACHE
59959if test -n "$CCACHE"; then
59960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
59961$as_echo "$CCACHE" >&6; }
59962else
59963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59964$as_echo "no" >&6; }
59965fi
59966
59967
59968  test -n "$CCACHE" && break
59969done
59970
59971    else
59972      # If it succeeded, then it was overridden by the user. We will use it
59973      # for the tool.
59974
59975      # First remove it from the list of overridden variables, so we can test
59976      # for unknown variables in the end.
59977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59978
59979      # Check if we try to supply an empty value
59980      if test "x$CCACHE" = x; then
59981        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
59982$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
59983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
59984$as_echo_n "checking for CCACHE... " >&6; }
59985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59986$as_echo "disabled" >&6; }
59987      else
59988        # Check if the provided tool contains a complete path.
59989        tool_specified="$CCACHE"
59990        tool_basename="${tool_specified##*/}"
59991        if test "x$tool_basename" = "x$tool_specified"; then
59992          # A command without a complete path is provided, search $PATH.
59993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
59994$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
59995          # Extract the first word of "$tool_basename", so it can be a program name with args.
59996set dummy $tool_basename; ac_word=$2
59997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59998$as_echo_n "checking for $ac_word... " >&6; }
59999if ${ac_cv_path_CCACHE+:} false; then :
60000  $as_echo_n "(cached) " >&6
60001else
60002  case $CCACHE in
60003  [\\/]* | ?:[\\/]*)
60004  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60005  ;;
60006  *)
60007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60008for as_dir in $PATH
60009do
60010  IFS=$as_save_IFS
60011  test -z "$as_dir" && as_dir=.
60012    for ac_exec_ext in '' $ac_executable_extensions; do
60013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60014    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60016    break 2
60017  fi
60018done
60019  done
60020IFS=$as_save_IFS
60021
60022  ;;
60023esac
60024fi
60025CCACHE=$ac_cv_path_CCACHE
60026if test -n "$CCACHE"; then
60027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60028$as_echo "$CCACHE" >&6; }
60029else
60030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60031$as_echo "no" >&6; }
60032fi
60033
60034
60035          if test "x$CCACHE" = x; then
60036            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60037          fi
60038        else
60039          # Otherwise we believe it is a complete path. Use it as it is.
60040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60041$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60042          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60043$as_echo_n "checking for CCACHE... " >&6; }
60044          if test ! -x "$tool_specified"; then
60045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60046$as_echo "not found" >&6; }
60047            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60048          fi
60049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60050$as_echo "$tool_specified" >&6; }
60051        fi
60052      fi
60053    fi
60054
60055  fi
60056
60057
60058
60059  if test "x$CCACHE" = x; then
60060    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60061  fi
60062
60063
60064      PATH="$OLD_PATH"
60065      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60066      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60067    else
60068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60069$as_echo "no" >&6; }
60070      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60071$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60072    fi
60073  elif test "x$enable_ccache" = xno; then
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60075$as_echo "no, explicitly disabled" >&6; }
60076    CCACHE_STATUS="Disabled"
60077  elif test "x$enable_ccache" = x; then
60078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60079$as_echo "no" >&6; }
60080  else
60081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60082$as_echo "unknown" >&6; }
60083    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60084  fi
60085
60086
60087
60088# Check whether --with-ccache-dir was given.
60089if test "${with_ccache_dir+set}" = set; then :
60090  withval=$with_ccache_dir;
60091fi
60092
60093
60094  if test "x$with_ccache_dir" != x; then
60095    # When using a non home ccache directory, assume the use is to share ccache files
60096    # with other users. Thus change the umask.
60097    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60098    if test "x$CCACHE" = x; then
60099      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60100$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60101    fi
60102  fi
60103
60104  if test "x$CCACHE" != x; then
60105
60106  if test "x$CCACHE" != x; then
60107    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60108      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60109          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60110      if test "x$HAS_BAD_CCACHE" != "x"; then
60111        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60112      fi
60113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60114$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60115      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60116      PUSHED_FLAGS="$CXXFLAGS"
60117      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60118      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60119/* end confdefs.h.  */
60120
60121int
60122main ()
60123{
60124
60125  ;
60126  return 0;
60127}
60128_ACEOF
60129if ac_fn_cxx_try_compile "$LINENO"; then :
60130  CC_KNOWS_CCACHE_TRICK=yes
60131else
60132  CC_KNOWS_CCACHE_TRICK=no
60133fi
60134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60135      CXXFLAGS="$PUSHED_FLAGS"
60136      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60138$as_echo "yes" >&6; }
60139        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60140
60141        CCACHE_SLOPPINESS=pch_defines,time_macros
60142      else
60143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60144$as_echo "no" >&6; }
60145        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60146      fi
60147    fi
60148
60149    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60150        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60151
60152    if test "x$SET_CCACHE_DIR" != x; then
60153      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60154      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60155    fi
60156  fi
60157
60158  fi
60159
60160
60161###############################################################################
60162#
60163# And now the finish...
60164#
60165###############################################################################
60166
60167# Check for some common pitfalls
60168
60169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60170    file_to_test="$SRC_ROOT/LICENSE"
60171    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60172      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
60173    fi
60174  fi
60175
60176
60177  # Did user specify any unknown variables?
60178
60179  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60180    # Replace the separating ! with spaces before presenting for end user.
60181    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60183$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60184  fi
60185
60186
60187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60188$as_echo_n "checking if build directory is on local disk... " >&6; }
60189
60190  # df -l lists only local disks; if the given directory is not found then
60191  # a non-zero exit code is given
60192  if test "x$DF" = x; then
60193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60194      # msys does not have df; use Windows "net use" instead.
60195      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60196      if test "x$IS_NETWORK_DISK" = x; then
60197        OUTPUT_DIR_IS_LOCAL="yes"
60198      else
60199        OUTPUT_DIR_IS_LOCAL="no"
60200      fi
60201    else
60202      # No df here, say it's local
60203      OUTPUT_DIR_IS_LOCAL="yes"
60204    fi
60205  else
60206    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60207      OUTPUT_DIR_IS_LOCAL="yes"
60208    else
60209      OUTPUT_DIR_IS_LOCAL="no"
60210    fi
60211  fi
60212
60213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60214$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60215
60216
60217
60218  # Check if the user has any old-style ALT_ variables set.
60219  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60220
60221  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60222  # Since we can't properly handle the dependencies for this, warn the user about the situation
60223  if test -e $OUTPUT_ROOT/spec.gmk; then
60224    IS_RECONFIGURE=yes
60225  else
60226    IS_RECONFIGURE=no
60227  fi
60228
60229
60230# At the end, call the custom hook. (Dummy macro if no custom sources available)
60231
60232
60233# We're messing a bit with internal autoconf variables to put the config.status
60234# in the output directory instead of the current directory.
60235CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60236
60237# Create the actual output files. Now the main work of configure is done.
60238cat >confcache <<\_ACEOF
60239# This file is a shell script that caches the results of configure
60240# tests run on this system so they can be shared between configure
60241# scripts and configure runs, see configure's option --config-cache.
60242# It is not useful on other systems.  If it contains results you don't
60243# want to keep, you may remove or edit it.
60244#
60245# config.status only pays attention to the cache file if you give it
60246# the --recheck option to rerun configure.
60247#
60248# `ac_cv_env_foo' variables (set or unset) will be overridden when
60249# loading this file, other *unset* `ac_cv_foo' will be assigned the
60250# following values.
60251
60252_ACEOF
60253
60254# The following way of writing the cache mishandles newlines in values,
60255# but we know of no workaround that is simple, portable, and efficient.
60256# So, we kill variables containing newlines.
60257# Ultrix sh set writes to stderr and can't be redirected directly,
60258# and sets the high bit in the cache file unless we assign to the vars.
60259(
60260  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60261    eval ac_val=\$$ac_var
60262    case $ac_val in #(
60263    *${as_nl}*)
60264      case $ac_var in #(
60265      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60266$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60267      esac
60268      case $ac_var in #(
60269      _ | IFS | as_nl) ;; #(
60270      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60271      *) { eval $ac_var=; unset $ac_var;} ;;
60272      esac ;;
60273    esac
60274  done
60275
60276  (set) 2>&1 |
60277    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60278    *${as_nl}ac_space=\ *)
60279      # `set' does not quote correctly, so add quotes: double-quote
60280      # substitution turns \\\\ into \\, and sed turns \\ into \.
60281      sed -n \
60282	"s/'/'\\\\''/g;
60283	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60284      ;; #(
60285    *)
60286      # `set' quotes correctly as required by POSIX, so do not add quotes.
60287      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60288      ;;
60289    esac |
60290    sort
60291) |
60292  sed '
60293     /^ac_cv_env_/b end
60294     t clear
60295     :clear
60296     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60297     t end
60298     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60299     :end' >>confcache
60300if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60301  if test -w "$cache_file"; then
60302    if test "x$cache_file" != "x/dev/null"; then
60303      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60304$as_echo "$as_me: updating cache $cache_file" >&6;}
60305      if test ! -f "$cache_file" || test -h "$cache_file"; then
60306	cat confcache >"$cache_file"
60307      else
60308        case $cache_file in #(
60309        */* | ?:*)
60310	  mv -f confcache "$cache_file"$$ &&
60311	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60312        *)
60313	  mv -f confcache "$cache_file" ;;
60314	esac
60315      fi
60316    fi
60317  else
60318    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60319$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60320  fi
60321fi
60322rm -f confcache
60323
60324test "x$prefix" = xNONE && prefix=$ac_default_prefix
60325# Let make expand exec_prefix.
60326test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60327
60328# Transform confdefs.h into DEFS.
60329# Protect against shell expansion while executing Makefile rules.
60330# Protect against Makefile macro expansion.
60331#
60332# If the first sed substitution is executed (which looks for macros that
60333# take arguments), then branch to the quote section.  Otherwise,
60334# look for a macro that doesn't take arguments.
60335ac_script='
60336:mline
60337/\\$/{
60338 N
60339 s,\\\n,,
60340 b mline
60341}
60342t clear
60343:clear
60344s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60345t quote
60346s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60347t quote
60348b any
60349:quote
60350s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60351s/\[/\\&/g
60352s/\]/\\&/g
60353s/\$/$$/g
60354H
60355:any
60356${
60357	g
60358	s/^\n//
60359	s/\n/ /g
60360	p
60361}
60362'
60363DEFS=`sed -n "$ac_script" confdefs.h`
60364
60365
60366ac_libobjs=
60367ac_ltlibobjs=
60368U=
60369for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60370  # 1. Remove the extension, and $U if already installed.
60371  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60372  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60373  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60374  #    will be set to the directory where LIBOBJS objects are built.
60375  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60376  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60377done
60378LIBOBJS=$ac_libobjs
60379
60380LTLIBOBJS=$ac_ltlibobjs
60381
60382
60383
60384: "${CONFIG_STATUS=./config.status}"
60385ac_write_fail=0
60386ac_clean_files_save=$ac_clean_files
60387ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60388{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60389$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60390as_write_fail=0
60391cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60392#! $SHELL
60393# Generated by $as_me.
60394# Run this file to recreate the current configuration.
60395# Compiler output produced by configure, useful for debugging
60396# configure, is in config.log if it exists.
60397
60398debug=false
60399ac_cs_recheck=false
60400ac_cs_silent=false
60401
60402SHELL=\${CONFIG_SHELL-$SHELL}
60403export SHELL
60404_ASEOF
60405cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60406## -------------------- ##
60407## M4sh Initialization. ##
60408## -------------------- ##
60409
60410# Be more Bourne compatible
60411DUALCASE=1; export DUALCASE # for MKS sh
60412if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60413  emulate sh
60414  NULLCMD=:
60415  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60416  # is contrary to our usage.  Disable this feature.
60417  alias -g '${1+"$@"}'='"$@"'
60418  setopt NO_GLOB_SUBST
60419else
60420  case `(set -o) 2>/dev/null` in #(
60421  *posix*) :
60422    set -o posix ;; #(
60423  *) :
60424     ;;
60425esac
60426fi
60427
60428
60429as_nl='
60430'
60431export as_nl
60432# Printing a long string crashes Solaris 7 /usr/bin/printf.
60433as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60434as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60435as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60436# Prefer a ksh shell builtin over an external printf program on Solaris,
60437# but without wasting forks for bash or zsh.
60438if test -z "$BASH_VERSION$ZSH_VERSION" \
60439    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60440  as_echo='print -r --'
60441  as_echo_n='print -rn --'
60442elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60443  as_echo='printf %s\n'
60444  as_echo_n='printf %s'
60445else
60446  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60447    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60448    as_echo_n='/usr/ucb/echo -n'
60449  else
60450    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60451    as_echo_n_body='eval
60452      arg=$1;
60453      case $arg in #(
60454      *"$as_nl"*)
60455	expr "X$arg" : "X\\(.*\\)$as_nl";
60456	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60457      esac;
60458      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60459    '
60460    export as_echo_n_body
60461    as_echo_n='sh -c $as_echo_n_body as_echo'
60462  fi
60463  export as_echo_body
60464  as_echo='sh -c $as_echo_body as_echo'
60465fi
60466
60467# The user is always right.
60468if test "${PATH_SEPARATOR+set}" != set; then
60469  PATH_SEPARATOR=:
60470  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60471    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60472      PATH_SEPARATOR=';'
60473  }
60474fi
60475
60476
60477# IFS
60478# We need space, tab and new line, in precisely that order.  Quoting is
60479# there to prevent editors from complaining about space-tab.
60480# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60481# splitting by setting IFS to empty value.)
60482IFS=" ""	$as_nl"
60483
60484# Find who we are.  Look in the path if we contain no directory separator.
60485as_myself=
60486case $0 in #((
60487  *[\\/]* ) as_myself=$0 ;;
60488  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60489for as_dir in $PATH
60490do
60491  IFS=$as_save_IFS
60492  test -z "$as_dir" && as_dir=.
60493    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60494  done
60495IFS=$as_save_IFS
60496
60497     ;;
60498esac
60499# We did not find ourselves, most probably we were run as `sh COMMAND'
60500# in which case we are not to be found in the path.
60501if test "x$as_myself" = x; then
60502  as_myself=$0
60503fi
60504if test ! -f "$as_myself"; then
60505  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60506  exit 1
60507fi
60508
60509# Unset variables that we do not need and which cause bugs (e.g. in
60510# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60511# suppresses any "Segmentation fault" message there.  '((' could
60512# trigger a bug in pdksh 5.2.14.
60513for as_var in BASH_ENV ENV MAIL MAILPATH
60514do eval test x\${$as_var+set} = xset \
60515  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60516done
60517PS1='$ '
60518PS2='> '
60519PS4='+ '
60520
60521# NLS nuisances.
60522LC_ALL=C
60523export LC_ALL
60524LANGUAGE=C
60525export LANGUAGE
60526
60527# CDPATH.
60528(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60529
60530
60531# as_fn_error STATUS ERROR [LINENO LOG_FD]
60532# ----------------------------------------
60533# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60534# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60535# script with STATUS, using 1 if that was 0.
60536as_fn_error ()
60537{
60538  as_status=$1; test $as_status -eq 0 && as_status=1
60539  if test "$4"; then
60540    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60541    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60542  fi
60543  $as_echo "$as_me: error: $2" >&2
60544  as_fn_exit $as_status
60545} # as_fn_error
60546
60547
60548# as_fn_set_status STATUS
60549# -----------------------
60550# Set $? to STATUS, without forking.
60551as_fn_set_status ()
60552{
60553  return $1
60554} # as_fn_set_status
60555
60556# as_fn_exit STATUS
60557# -----------------
60558# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60559as_fn_exit ()
60560{
60561  set +e
60562  as_fn_set_status $1
60563  exit $1
60564} # as_fn_exit
60565
60566# as_fn_unset VAR
60567# ---------------
60568# Portably unset VAR.
60569as_fn_unset ()
60570{
60571  { eval $1=; unset $1;}
60572}
60573as_unset=as_fn_unset
60574# as_fn_append VAR VALUE
60575# ----------------------
60576# Append the text in VALUE to the end of the definition contained in VAR. Take
60577# advantage of any shell optimizations that allow amortized linear growth over
60578# repeated appends, instead of the typical quadratic growth present in naive
60579# implementations.
60580if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60581  eval 'as_fn_append ()
60582  {
60583    eval $1+=\$2
60584  }'
60585else
60586  as_fn_append ()
60587  {
60588    eval $1=\$$1\$2
60589  }
60590fi # as_fn_append
60591
60592# as_fn_arith ARG...
60593# ------------------
60594# Perform arithmetic evaluation on the ARGs, and store the result in the
60595# global $as_val. Take advantage of shells that can avoid forks. The arguments
60596# must be portable across $(()) and expr.
60597if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60598  eval 'as_fn_arith ()
60599  {
60600    as_val=$(( $* ))
60601  }'
60602else
60603  as_fn_arith ()
60604  {
60605    as_val=`expr "$@" || test $? -eq 1`
60606  }
60607fi # as_fn_arith
60608
60609
60610if expr a : '\(a\)' >/dev/null 2>&1 &&
60611   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60612  as_expr=expr
60613else
60614  as_expr=false
60615fi
60616
60617if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60618  as_basename=basename
60619else
60620  as_basename=false
60621fi
60622
60623if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60624  as_dirname=dirname
60625else
60626  as_dirname=false
60627fi
60628
60629as_me=`$as_basename -- "$0" ||
60630$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60631	 X"$0" : 'X\(//\)$' \| \
60632	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60633$as_echo X/"$0" |
60634    sed '/^.*\/\([^/][^/]*\)\/*$/{
60635	    s//\1/
60636	    q
60637	  }
60638	  /^X\/\(\/\/\)$/{
60639	    s//\1/
60640	    q
60641	  }
60642	  /^X\/\(\/\).*/{
60643	    s//\1/
60644	    q
60645	  }
60646	  s/.*/./; q'`
60647
60648# Avoid depending upon Character Ranges.
60649as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60650as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60651as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60652as_cr_digits='0123456789'
60653as_cr_alnum=$as_cr_Letters$as_cr_digits
60654
60655ECHO_C= ECHO_N= ECHO_T=
60656case `echo -n x` in #(((((
60657-n*)
60658  case `echo 'xy\c'` in
60659  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60660  xy)  ECHO_C='\c';;
60661  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60662       ECHO_T='	';;
60663  esac;;
60664*)
60665  ECHO_N='-n';;
60666esac
60667
60668rm -f conf$$ conf$$.exe conf$$.file
60669if test -d conf$$.dir; then
60670  rm -f conf$$.dir/conf$$.file
60671else
60672  rm -f conf$$.dir
60673  mkdir conf$$.dir 2>/dev/null
60674fi
60675if (echo >conf$$.file) 2>/dev/null; then
60676  if ln -s conf$$.file conf$$ 2>/dev/null; then
60677    as_ln_s='ln -s'
60678    # ... but there are two gotchas:
60679    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60680    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60681    # In both cases, we have to default to `cp -pR'.
60682    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60683      as_ln_s='cp -pR'
60684  elif ln conf$$.file conf$$ 2>/dev/null; then
60685    as_ln_s=ln
60686  else
60687    as_ln_s='cp -pR'
60688  fi
60689else
60690  as_ln_s='cp -pR'
60691fi
60692rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60693rmdir conf$$.dir 2>/dev/null
60694
60695
60696# as_fn_mkdir_p
60697# -------------
60698# Create "$as_dir" as a directory, including parents if necessary.
60699as_fn_mkdir_p ()
60700{
60701
60702  case $as_dir in #(
60703  -*) as_dir=./$as_dir;;
60704  esac
60705  test -d "$as_dir" || eval $as_mkdir_p || {
60706    as_dirs=
60707    while :; do
60708      case $as_dir in #(
60709      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60710      *) as_qdir=$as_dir;;
60711      esac
60712      as_dirs="'$as_qdir' $as_dirs"
60713      as_dir=`$as_dirname -- "$as_dir" ||
60714$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60715	 X"$as_dir" : 'X\(//\)[^/]' \| \
60716	 X"$as_dir" : 'X\(//\)$' \| \
60717	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60718$as_echo X"$as_dir" |
60719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60720	    s//\1/
60721	    q
60722	  }
60723	  /^X\(\/\/\)[^/].*/{
60724	    s//\1/
60725	    q
60726	  }
60727	  /^X\(\/\/\)$/{
60728	    s//\1/
60729	    q
60730	  }
60731	  /^X\(\/\).*/{
60732	    s//\1/
60733	    q
60734	  }
60735	  s/.*/./; q'`
60736      test -d "$as_dir" && break
60737    done
60738    test -z "$as_dirs" || eval "mkdir $as_dirs"
60739  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60740
60741
60742} # as_fn_mkdir_p
60743if mkdir -p . 2>/dev/null; then
60744  as_mkdir_p='mkdir -p "$as_dir"'
60745else
60746  test -d ./-p && rmdir ./-p
60747  as_mkdir_p=false
60748fi
60749
60750
60751# as_fn_executable_p FILE
60752# -----------------------
60753# Test if FILE is an executable regular file.
60754as_fn_executable_p ()
60755{
60756  test -f "$1" && test -x "$1"
60757} # as_fn_executable_p
60758as_test_x='test -x'
60759as_executable_p=as_fn_executable_p
60760
60761# Sed expression to map a string onto a valid CPP name.
60762as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60763
60764# Sed expression to map a string onto a valid variable name.
60765as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60766
60767
60768exec 6>&1
60769## ----------------------------------- ##
60770## Main body of $CONFIG_STATUS script. ##
60771## ----------------------------------- ##
60772_ASEOF
60773test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
60774
60775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60776# Save the log message, to keep $0 and so on meaningful, and to
60777# report actual input values of CONFIG_FILES etc. instead of their
60778# values after options handling.
60779ac_log="
60780This file was extended by OpenJDK $as_me jdk9, which was
60781generated by GNU Autoconf 2.69.  Invocation command line was
60782
60783  CONFIG_FILES    = $CONFIG_FILES
60784  CONFIG_HEADERS  = $CONFIG_HEADERS
60785  CONFIG_LINKS    = $CONFIG_LINKS
60786  CONFIG_COMMANDS = $CONFIG_COMMANDS
60787  $ $0 $@
60788
60789on `(hostname || uname -n) 2>/dev/null | sed 1q`
60790"
60791
60792_ACEOF
60793
60794case $ac_config_files in *"
60795"*) set x $ac_config_files; shift; ac_config_files=$*;;
60796esac
60797
60798
60799
60800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60801# Files that config.status was made for.
60802config_files="$ac_config_files"
60803
60804_ACEOF
60805
60806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60807ac_cs_usage="\
60808\`$as_me' instantiates files and other configuration actions
60809from templates according to the current configuration.  Unless the files
60810and actions are specified as TAGs, all are instantiated by default.
60811
60812Usage: $0 [OPTION]... [TAG]...
60813
60814  -h, --help       print this help, then exit
60815  -V, --version    print version number and configuration settings, then exit
60816      --config     print configuration, then exit
60817  -q, --quiet, --silent
60818                   do not print progress messages
60819  -d, --debug      don't remove temporary files
60820      --recheck    update $as_me by reconfiguring in the same conditions
60821      --file=FILE[:TEMPLATE]
60822                   instantiate the configuration file FILE
60823
60824Configuration files:
60825$config_files
60826
60827Report bugs to <build-dev@openjdk.java.net>.
60828OpenJDK home page: <http://openjdk.java.net>."
60829
60830_ACEOF
60831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60832ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
60833ac_cs_version="\\
60834OpenJDK config.status jdk9
60835configured by $0, generated by GNU Autoconf 2.69,
60836  with options \\"\$ac_cs_config\\"
60837
60838Copyright (C) 2012 Free Software Foundation, Inc.
60839This config.status script is free software; the Free Software Foundation
60840gives unlimited permission to copy, distribute and modify it."
60841
60842ac_pwd='$ac_pwd'
60843srcdir='$srcdir'
60844AWK='$AWK'
60845test -n "\$AWK" || AWK=awk
60846_ACEOF
60847
60848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60849# The default lists apply if the user does not specify any file.
60850ac_need_defaults=:
60851while test $# != 0
60852do
60853  case $1 in
60854  --*=?*)
60855    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60856    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
60857    ac_shift=:
60858    ;;
60859  --*=)
60860    ac_option=`expr "X$1" : 'X\([^=]*\)='`
60861    ac_optarg=
60862    ac_shift=:
60863    ;;
60864  *)
60865    ac_option=$1
60866    ac_optarg=$2
60867    ac_shift=shift
60868    ;;
60869  esac
60870
60871  case $ac_option in
60872  # Handling of the options.
60873  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
60874    ac_cs_recheck=: ;;
60875  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
60876    $as_echo "$ac_cs_version"; exit ;;
60877  --config | --confi | --conf | --con | --co | --c )
60878    $as_echo "$ac_cs_config"; exit ;;
60879  --debug | --debu | --deb | --de | --d | -d )
60880    debug=: ;;
60881  --file | --fil | --fi | --f )
60882    $ac_shift
60883    case $ac_optarg in
60884    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
60885    '') as_fn_error $? "missing file argument" ;;
60886    esac
60887    as_fn_append CONFIG_FILES " '$ac_optarg'"
60888    ac_need_defaults=false;;
60889  --he | --h |  --help | --hel | -h )
60890    $as_echo "$ac_cs_usage"; exit ;;
60891  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
60892  | -silent | --silent | --silen | --sile | --sil | --si | --s)
60893    ac_cs_silent=: ;;
60894
60895  # This is an error.
60896  -*) as_fn_error $? "unrecognized option: \`$1'
60897Try \`$0 --help' for more information." ;;
60898
60899  *) as_fn_append ac_config_targets " $1"
60900     ac_need_defaults=false ;;
60901
60902  esac
60903  shift
60904done
60905
60906ac_configure_extra_args=
60907
60908if $ac_cs_silent; then
60909  exec 6>/dev/null
60910  ac_configure_extra_args="$ac_configure_extra_args --silent"
60911fi
60912
60913_ACEOF
60914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60915if \$ac_cs_recheck; then
60916  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
60917  shift
60918  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
60919  CONFIG_SHELL='$SHELL'
60920  export CONFIG_SHELL
60921  exec "\$@"
60922fi
60923
60924_ACEOF
60925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60926exec 5>>config.log
60927{
60928  echo
60929  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
60930## Running $as_me. ##
60931_ASBOX
60932  $as_echo "$ac_log"
60933} >&5
60934
60935_ACEOF
60936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
60937_ACEOF
60938
60939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
60940
60941# Handling of arguments.
60942for ac_config_target in $ac_config_targets
60943do
60944  case $ac_config_target in
60945    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
60946    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
60947    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
60948    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
60949    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
60950
60951  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
60952  esac
60953done
60954
60955
60956# If the user did not use the arguments to specify the items to instantiate,
60957# then the envvar interface is used.  Set only those that are not.
60958# We use the long form for the default assignment because of an extremely
60959# bizarre bug on SunOS 4.1.3.
60960if $ac_need_defaults; then
60961  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
60962fi
60963
60964# Have a temporary directory for convenience.  Make it in the build tree
60965# simply because there is no reason against having it here, and in addition,
60966# creating and moving files from /tmp can sometimes cause problems.
60967# Hook for its removal unless debugging.
60968# Note that there is a small window in which the directory will not be cleaned:
60969# after its creation but before its name has been assigned to `$tmp'.
60970$debug ||
60971{
60972  tmp= ac_tmp=
60973  trap 'exit_status=$?
60974  : "${ac_tmp:=$tmp}"
60975  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
60976' 0
60977  trap 'as_fn_exit 1' 1 2 13 15
60978}
60979# Create a (secure) tmp directory for tmp files.
60980
60981{
60982  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
60983  test -d "$tmp"
60984}  ||
60985{
60986  tmp=./conf$$-$RANDOM
60987  (umask 077 && mkdir "$tmp")
60988} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
60989ac_tmp=$tmp
60990
60991# Set up the scripts for CONFIG_FILES section.
60992# No need to generate them if there are no CONFIG_FILES.
60993# This happens for instance with `./config.status config.h'.
60994if test -n "$CONFIG_FILES"; then
60995
60996
60997ac_cr=`echo X | tr X '\015'`
60998# On cygwin, bash can eat \r inside `` if the user requested igncr.
60999# But we know of no other shell where ac_cr would be empty at this
61000# point, so we can use a bashism as a fallback.
61001if test "x$ac_cr" = x; then
61002  eval ac_cr=\$\'\\r\'
61003fi
61004ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61005if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61006  ac_cs_awk_cr='\\r'
61007else
61008  ac_cs_awk_cr=$ac_cr
61009fi
61010
61011echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61012_ACEOF
61013
61014
61015{
61016  echo "cat >conf$$subs.awk <<_ACEOF" &&
61017  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61018  echo "_ACEOF"
61019} >conf$$subs.sh ||
61020  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61021ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61022ac_delim='%!_!# '
61023for ac_last_try in false false false false false :; do
61024  . ./conf$$subs.sh ||
61025    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61026
61027  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61028  if test $ac_delim_n = $ac_delim_num; then
61029    break
61030  elif $ac_last_try; then
61031    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61032  else
61033    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61034  fi
61035done
61036rm -f conf$$subs.sh
61037
61038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61039cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61040_ACEOF
61041sed -n '
61042h
61043s/^/S["/; s/!.*/"]=/
61044p
61045g
61046s/^[^!]*!//
61047:repl
61048t repl
61049s/'"$ac_delim"'$//
61050t delim
61051:nl
61052h
61053s/\(.\{148\}\)..*/\1/
61054t more1
61055s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61056p
61057n
61058b repl
61059:more1
61060s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61061p
61062g
61063s/.\{148\}//
61064t nl
61065:delim
61066h
61067s/\(.\{148\}\)..*/\1/
61068t more2
61069s/["\\]/\\&/g; s/^/"/; s/$/"/
61070p
61071b
61072:more2
61073s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61074p
61075g
61076s/.\{148\}//
61077t delim
61078' <conf$$subs.awk | sed '
61079/^[^""]/{
61080  N
61081  s/\n//
61082}
61083' >>$CONFIG_STATUS || ac_write_fail=1
61084rm -f conf$$subs.awk
61085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61086_ACAWK
61087cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61088  for (key in S) S_is_set[key] = 1
61089  FS = ""
61090
61091}
61092{
61093  line = $ 0
61094  nfields = split(line, field, "@")
61095  substed = 0
61096  len = length(field[1])
61097  for (i = 2; i < nfields; i++) {
61098    key = field[i]
61099    keylen = length(key)
61100    if (S_is_set[key]) {
61101      value = S[key]
61102      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61103      len += length(value) + length(field[++i])
61104      substed = 1
61105    } else
61106      len += 1 + keylen
61107  }
61108
61109  print line
61110}
61111
61112_ACAWK
61113_ACEOF
61114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61115if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61116  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61117else
61118  cat
61119fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61120  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61121_ACEOF
61122
61123# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61124# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61125# trailing colons and then remove the whole line if VPATH becomes empty
61126# (actually we leave an empty line to preserve line numbers).
61127if test "x$srcdir" = x.; then
61128  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61129h
61130s///
61131s/^/:/
61132s/[	 ]*$/:/
61133s/:\$(srcdir):/:/g
61134s/:\${srcdir}:/:/g
61135s/:@srcdir@:/:/g
61136s/^:*//
61137s/:*$//
61138x
61139s/\(=[	 ]*\).*/\1/
61140G
61141s/\n//
61142s/^[^=]*=[	 ]*$//
61143}'
61144fi
61145
61146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61147fi # test -n "$CONFIG_FILES"
61148
61149
61150eval set X "  :F $CONFIG_FILES      "
61151shift
61152for ac_tag
61153do
61154  case $ac_tag in
61155  :[FHLC]) ac_mode=$ac_tag; continue;;
61156  esac
61157  case $ac_mode$ac_tag in
61158  :[FHL]*:*);;
61159  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61160  :[FH]-) ac_tag=-:-;;
61161  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61162  esac
61163  ac_save_IFS=$IFS
61164  IFS=:
61165  set x $ac_tag
61166  IFS=$ac_save_IFS
61167  shift
61168  ac_file=$1
61169  shift
61170
61171  case $ac_mode in
61172  :L) ac_source=$1;;
61173  :[FH])
61174    ac_file_inputs=
61175    for ac_f
61176    do
61177      case $ac_f in
61178      -) ac_f="$ac_tmp/stdin";;
61179      *) # Look for the file first in the build tree, then in the source tree
61180	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61181	 # because $ac_f cannot contain `:'.
61182	 test -f "$ac_f" ||
61183	   case $ac_f in
61184	   [\\/$]*) false;;
61185	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61186	   esac ||
61187	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61188      esac
61189      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61190      as_fn_append ac_file_inputs " '$ac_f'"
61191    done
61192
61193    # Let's still pretend it is `configure' which instantiates (i.e., don't
61194    # use $as_me), people would be surprised to read:
61195    #    /* config.h.  Generated by config.status.  */
61196    configure_input='Generated from '`
61197	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61198	`' by configure.'
61199    if test x"$ac_file" != x-; then
61200      configure_input="$ac_file.  $configure_input"
61201      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61202$as_echo "$as_me: creating $ac_file" >&6;}
61203    fi
61204    # Neutralize special characters interpreted by sed in replacement strings.
61205    case $configure_input in #(
61206    *\&* | *\|* | *\\* )
61207       ac_sed_conf_input=`$as_echo "$configure_input" |
61208       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61209    *) ac_sed_conf_input=$configure_input;;
61210    esac
61211
61212    case $ac_tag in
61213    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61214      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61215    esac
61216    ;;
61217  esac
61218
61219  ac_dir=`$as_dirname -- "$ac_file" ||
61220$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61221	 X"$ac_file" : 'X\(//\)[^/]' \| \
61222	 X"$ac_file" : 'X\(//\)$' \| \
61223	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61224$as_echo X"$ac_file" |
61225    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61226	    s//\1/
61227	    q
61228	  }
61229	  /^X\(\/\/\)[^/].*/{
61230	    s//\1/
61231	    q
61232	  }
61233	  /^X\(\/\/\)$/{
61234	    s//\1/
61235	    q
61236	  }
61237	  /^X\(\/\).*/{
61238	    s//\1/
61239	    q
61240	  }
61241	  s/.*/./; q'`
61242  as_dir="$ac_dir"; as_fn_mkdir_p
61243  ac_builddir=.
61244
61245case "$ac_dir" in
61246.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61247*)
61248  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61249  # A ".." for each directory in $ac_dir_suffix.
61250  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61251  case $ac_top_builddir_sub in
61252  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61253  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61254  esac ;;
61255esac
61256ac_abs_top_builddir=$ac_pwd
61257ac_abs_builddir=$ac_pwd$ac_dir_suffix
61258# for backward compatibility:
61259ac_top_builddir=$ac_top_build_prefix
61260
61261case $srcdir in
61262  .)  # We are building in place.
61263    ac_srcdir=.
61264    ac_top_srcdir=$ac_top_builddir_sub
61265    ac_abs_top_srcdir=$ac_pwd ;;
61266  [\\/]* | ?:[\\/]* )  # Absolute name.
61267    ac_srcdir=$srcdir$ac_dir_suffix;
61268    ac_top_srcdir=$srcdir
61269    ac_abs_top_srcdir=$srcdir ;;
61270  *) # Relative name.
61271    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61272    ac_top_srcdir=$ac_top_build_prefix$srcdir
61273    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61274esac
61275ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61276
61277
61278  case $ac_mode in
61279  :F)
61280  #
61281  # CONFIG_FILE
61282  #
61283
61284_ACEOF
61285
61286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61287# If the template does not know about datarootdir, expand it.
61288# FIXME: This hack should be removed a few years after 2.60.
61289ac_datarootdir_hack=; ac_datarootdir_seen=
61290ac_sed_dataroot='
61291/datarootdir/ {
61292  p
61293  q
61294}
61295/@datadir@/p
61296/@docdir@/p
61297/@infodir@/p
61298/@localedir@/p
61299/@mandir@/p'
61300case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61301*datarootdir*) ac_datarootdir_seen=yes;;
61302*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61303  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61304$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61305_ACEOF
61306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61307  ac_datarootdir_hack='
61308  s&@datadir@&$datadir&g
61309  s&@docdir@&$docdir&g
61310  s&@infodir@&$infodir&g
61311  s&@localedir@&$localedir&g
61312  s&@mandir@&$mandir&g
61313  s&\\\${datarootdir}&$datarootdir&g' ;;
61314esac
61315_ACEOF
61316
61317# Neutralize VPATH when `$srcdir' = `.'.
61318# Shell code in configure.ac might set extrasub.
61319# FIXME: do we really want to maintain this feature?
61320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61321ac_sed_extra="$ac_vpsub
61322$extrasub
61323_ACEOF
61324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61325:t
61326/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61327s|@configure_input@|$ac_sed_conf_input|;t t
61328s&@top_builddir@&$ac_top_builddir_sub&;t t
61329s&@top_build_prefix@&$ac_top_build_prefix&;t t
61330s&@srcdir@&$ac_srcdir&;t t
61331s&@abs_srcdir@&$ac_abs_srcdir&;t t
61332s&@top_srcdir@&$ac_top_srcdir&;t t
61333s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61334s&@builddir@&$ac_builddir&;t t
61335s&@abs_builddir@&$ac_abs_builddir&;t t
61336s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61337$ac_datarootdir_hack
61338"
61339eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61340  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61341
61342test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61343  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61344  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61345      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61346  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61347which seems to be undefined.  Please make sure it is defined" >&5
61348$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61349which seems to be undefined.  Please make sure it is defined" >&2;}
61350
61351  rm -f "$ac_tmp/stdin"
61352  case $ac_file in
61353  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61354  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61355  esac \
61356  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61357 ;;
61358
61359
61360
61361  esac
61362
61363done # for ac_tag
61364
61365
61366as_fn_exit 0
61367_ACEOF
61368ac_clean_files=$ac_clean_files_save
61369
61370test $ac_write_fail = 0 ||
61371  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61372
61373
61374# configure is writing to config.log, and then calls config.status.
61375# config.status does its own redirection, appending to config.log.
61376# Unfortunately, on DOS this fails, as config.log is still kept open
61377# by configure, so config.status won't be able to write to it; its
61378# output is simply discarded.  So we exec the FD to /dev/null,
61379# effectively closing config.log, so it can be properly (re)opened and
61380# appended to by config.status.  When coming back to configure, we
61381# need to make the FD available again.
61382if test "$no_create" != yes; then
61383  ac_cs_success=:
61384  ac_config_status_args=
61385  test "$silent" = yes &&
61386    ac_config_status_args="$ac_config_status_args --quiet"
61387  exec 5>/dev/null
61388  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61389  exec 5>>config.log
61390  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61391  # would make configure fail if this is the last instruction.
61392  $ac_cs_success || as_fn_exit 1
61393fi
61394if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61395  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61396$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61397fi
61398
61399
61400# After AC_OUTPUT, we need to do final work
61401
61402
61403  # Try to move config.log (generated by autoconf) to the configure-support directory.
61404  if test -e ./config.log; then
61405    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61406  fi
61407
61408  # Rotate our log file (configure.log)
61409  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61410    $RM -f "$OUTPUT_ROOT/configure.log.old"
61411  fi
61412  if test -e "$OUTPUT_ROOT/configure.log"; then
61413    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61414  fi
61415
61416  # Move configure.log from current directory to the build output root
61417  if test -e ./configure.log; then
61418    echo found it
61419    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61420  fi
61421
61422  # Make the compare script executable
61423  $CHMOD +x $OUTPUT_ROOT/compare.sh
61424
61425
61426# Finally output some useful information to the user
61427
61428  # Finally output some useful information to the user
61429
61430  printf "\n"
61431  printf "====================================================\n"
61432  if test "x$no_create" != "xyes"; then
61433    if test "x$IS_RECONFIGURE" != "xyes"; then
61434      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61435    else
61436      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61437    fi
61438  else
61439    if test "x$IS_RECONFIGURE" != "xyes"; then
61440      printf "A configuration has been successfully checked but not created\n"
61441    else
61442      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61443    fi
61444  fi
61445  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61446    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61447  else
61448    printf "using default settings.\n"
61449  fi
61450
61451  printf "\n"
61452  printf "Configuration summary:\n"
61453  printf "* Debug level:    $DEBUG_LEVEL\n"
61454  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61455  printf "* JDK variant:    $JDK_VARIANT\n"
61456  printf "* JVM variants:   $with_jvm_variants\n"
61457  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61458  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61459
61460  printf "\n"
61461  printf "Tools summary:\n"
61462  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61463    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61464  fi
61465  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61466  if test "x$TOOLCHAIN_VERSION" != "x"; then
61467    print_version=" $TOOLCHAIN_VERSION"
61468  fi
61469  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61470  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61471  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61472
61473  printf "\n"
61474  printf "Build performance summary:\n"
61475  printf "* Cores to use:   $JOBS\n"
61476  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61477  if test "x$CCACHE_STATUS" != "x"; then
61478    printf "* ccache status:  $CCACHE_STATUS\n"
61479  fi
61480  printf "\n"
61481
61482  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61483    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61484    printf "will result in longer build times.\n"
61485    printf "\n"
61486  fi
61487
61488  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61489    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61490    printf "These are not respected, and will be ignored. It is recommended\n"
61491    printf "that you clean your environment. The following variables are set:\n"
61492    printf "$FOUND_ALT_VARIABLES\n"
61493    printf "\n"
61494  fi
61495
61496  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61497    printf "WARNING: Your build output directory is not on a local disk.\n"
61498    printf "This will severely degrade build performance!\n"
61499    printf "It is recommended that you create an output directory on a local disk,\n"
61500    printf "and run the configure script again from that directory.\n"
61501    printf "\n"
61502  fi
61503
61504  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61505    printf "WARNING: The result of this configuration has overridden an older\n"
61506    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61507    printf "proper build. Failure to do so might result in strange build problems.\n"
61508    printf "\n"
61509  fi
61510
61511  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61512    printf "WARNING: The result of this configuration was not saved.\n"
61513    printf "You should run without '--no-create | -n' to create the configuration.\n"
61514    printf "\n"
61515  fi
61516
61517
61518
61519  # Locate config.log.
61520  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61521    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61522  elif test -e "./config.log"; then
61523    CONFIG_LOG_PATH="."
61524  fi
61525
61526  if test -e "$CONFIG_LOG_PATH/config.log"; then
61527    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61528    if test $? -eq 0; then
61529      printf "The following warnings were produced. Repeated here for convenience:\n"
61530      # We must quote sed expression (using []) to stop m4 from eating the [].
61531      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61532      printf "\n"
61533    fi
61534  fi
61535
61536