generated-configure.sh revision 1961:f900d5afd9c8
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691STRIP_POLICY
692DEBUG_BINARIES
693ZIP_EXTERNAL_DEBUG_SYMBOLS
694COPY_DEBUG_SYMBOLS
695COMPILE_WITH_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697BUILD_CC_DISABLE_WARNING_PREFIX
698DISABLE_WARNING_PREFIX
699HOTSPOT_SET_WARNINGS_AS_ERRORS
700WARNINGS_AS_ERRORS
701COMPILER_SUPPORTS_TARGET_BITS_FLAG
702ZERO_ARCHFLAG
703LDFLAGS_TESTEXE
704LDFLAGS_TESTLIB
705LDFLAGS_HASH_STYLE
706LDFLAGS_CXX_JDK
707JDKEXE_LIBS
708JDKLIB_LIBS
709OPENJDK_BUILD_LDFLAGS_JDKEXE
710OPENJDK_BUILD_LDFLAGS_JDKLIB
711LDFLAGS_JDKEXE
712LDFLAGS_JDKLIB
713CXXFLAGS_TESTEXE
714CXXFLAGS_TESTLIB
715CFLAGS_TESTEXE
716CFLAGS_TESTLIB
717OPENJDK_BUILD_CXXFLAGS_JDKEXE
718OPENJDK_BUILD_CXXFLAGS_JDKLIB
719OPENJDK_BUILD_CFLAGS_JDKEXE
720OPENJDK_BUILD_CFLAGS_JDKLIB
721CXXFLAGS_JDKEXE
722CXXFLAGS_JDKLIB
723CFLAGS_JDKEXE
724CFLAGS_JDKLIB
725MACOSX_VERSION_MIN
726CXX_O_FLAG_NONE
727CXX_O_FLAG_DEBUG
728CXX_O_FLAG_NORM
729CXX_O_FLAG_HI
730CXX_O_FLAG_HIGHEST
731C_O_FLAG_NONE
732C_O_FLAG_DEBUG
733C_O_FLAG_NORM
734C_O_FLAG_HI
735C_O_FLAG_HIGHEST
736CXXFLAGS_DEBUG_SYMBOLS
737CFLAGS_DEBUG_SYMBOLS
738CXX_FLAG_DEPS
739C_FLAG_DEPS
740SHARED_LIBRARY_FLAGS
741SET_SHARED_LIBRARY_MAPFILE
742SET_SHARED_LIBRARY_NAME
743SET_SHARED_LIBRARY_ORIGIN
744SET_EXECUTABLE_ORIGIN
745CXX_FLAG_REORDER
746C_FLAG_REORDER
747RC_FLAGS
748AR_OUT_OPTION
749LD_OUT_OPTION
750EXE_OUT_OPTION
751CC_OUT_OPTION
752STRIPFLAGS
753ARFLAGS
754COMPILER_BINDCMD_FILE_FLAG
755COMPILER_COMMAND_FILE_FLAG
756COMPILER_TARGET_BITS_FLAG
757JT_HOME
758JTREGEXE
759USING_BROKEN_SUSE_LD
760PACKAGE_PATH
761USE_CLANG
762HOTSPOT_LD
763HOTSPOT_CXX
764HOTSPOT_RC
765HOTSPOT_MT
766BUILD_AS
767BUILD_LDCXX
768BUILD_LD
769BUILD_STRIP
770BUILD_OBJCOPY
771BUILD_AR
772BUILD_NM
773BUILD_CXX
774BUILD_CC
775BUILD_SYSROOT_LDFLAGS
776BUILD_SYSROOT_CFLAGS
777ac_ct_OBJDUMP
778OBJDUMP
779ac_ct_OBJCOPY
780OBJCOPY
781ac_ct_NM
782ac_ct_STRIP
783GNM
784NM
785STRIP
786MSBUILD
787DUMPBIN
788RC
789MT
790LIPO
791ac_ct_AR
792AR
793AS
794LDCXX
795LD
796CXXCPP
797CPP
798CXX_VERSION_NUMBER
799CC_VERSION_NUMBER
800ac_ct_CXX
801CXXFLAGS
802CXX
803TOOLCHAIN_PATH_CXX
804POTENTIAL_CXX
805OBJEXT
806EXEEXT
807ac_ct_CC
808CPPFLAGS
809LDFLAGS
810CFLAGS
811CC
812TOOLCHAIN_PATH_CC
813POTENTIAL_CC
814TOOLCHAIN_VERSION
815VS_LIB
816VS_INCLUDE
817VS_PATH
818CYGWIN_LINK
819SYSROOT_LDFLAGS
820SYSROOT_CFLAGS
821LEGACY_EXTRA_LDFLAGS
822LEGACY_EXTRA_CXXFLAGS
823LEGACY_EXTRA_CFLAGS
824EXE_SUFFIX
825OBJ_SUFFIX
826STATIC_LIBRARY
827SHARED_LIBRARY
828STATIC_LIBRARY_SUFFIX
829SHARED_LIBRARY_SUFFIX
830LIBRARY_PREFIX
831TOOLCHAIN_TYPE
832STATIC_BUILD
833IMPORT_MODULES_MAKE
834IMPORT_MODULES_SRC
835IMPORT_MODULES_CONF
836IMPORT_MODULES_LIBS
837IMPORT_MODULES_CMDS
838IMPORT_MODULES_CLASSES
839BUILD_HOTSPOT
840HOTSPOT_DIST
841BUILD_OUTPUT
842JDK_TOPDIR
843NASHORN_TOPDIR
844HOTSPOT_TOPDIR
845JAXWS_TOPDIR
846JAXP_TOPDIR
847CORBA_TOPDIR
848LANGTOOLS_TOPDIR
849BUILD_JDK
850CREATE_BUILDJDK
851BOOT_JDK_BITS
852JAVAC_FLAGS
853BOOT_JDK_MODULAR
854BOOT_JDK_SOURCETARGET
855JARSIGNER
856JAR
857JAVAH
858JAVAC
859JAVA
860BOOT_JDK
861JAVA_CHECK
862JAVAC_CHECK
863VERSION_IS_GA
864VERSION_SHORT
865VERSION_STRING
866VERSION_NUMBER_FOUR_POSITIONS
867VERSION_NUMBER
868VERSION_OPT
869VERSION_BUILD
870VERSION_PRE
871VERSION_PATCH
872VERSION_SECURITY
873VERSION_MINOR
874VERSION_MAJOR
875MACOSX_BUNDLE_ID_BASE
876MACOSX_BUNDLE_NAME_BASE
877COMPANY_NAME
878JDK_RC_PLATFORM_NAME
879PRODUCT_SUFFIX
880PRODUCT_NAME
881LAUNCHER_NAME
882TEST_IN_BUILD
883JLINK_KEEP_PACKAGED_MODULES
884COPYRIGHT_YEAR
885COMPRESS_JARS
886INCLUDE_SA
887UNLIMITED_CRYPTO
888CACERTS_FILE
889BUILD_HEADLESS
890SUPPORT_HEADFUL
891SUPPORT_HEADLESS
892DEFAULT_MAKE_TARGET
893OS_VERSION_MICRO
894OS_VERSION_MINOR
895OS_VERSION_MAJOR
896PKG_CONFIG
897BASH_ARGS
898SETFILE
899CODESIGN
900XATTR
901DSYMUTIL
902IS_GNU_TIME
903PATCH
904TIME
905STAT
906HG
907READELF
908OTOOL
909LDD
910ZIP
911UNZIP
912FIND_DELETE
913OUTPUT_SYNC
914OUTPUT_SYNC_SUPPORTED
915CHECK_TOOLSDIR_MAKE
916CHECK_TOOLSDIR_GMAKE
917CHECK_MAKE
918CHECK_GMAKE
919MAKE
920PKGHANDLER
921CONFIGURESUPPORT_OUTPUTDIR
922OUTPUT_ROOT
923CONF_NAME
924SPEC
925SDKROOT
926XCODEBUILD
927BUILD_VARIANT_RELEASE
928DEBUG_CLASSFILES
929FASTDEBUG
930VARIANT
931DEBUG_LEVEL
932MACOSX_UNIVERSAL
933JVM_VARIANT_CORE
934JVM_VARIANT_ZEROSHARK
935JVM_VARIANT_ZERO
936JVM_VARIANT_MINIMAL1
937JVM_VARIANT_CLIENT
938JVM_VARIANT_SERVER
939JVM_VARIANTS
940JVM_INTERPRETER
941JDK_VARIANT
942SET_OPENJDK
943USERNAME
944CANONICAL_TOPDIR
945ORIGINAL_TOPDIR
946TOPDIR
947PATH_SEP
948ZERO_ARCHDEF
949DEFINE_CROSS_COMPILE_ARCH
950LP64
951OPENJDK_TARGET_OS_EXPORT_DIR
952OPENJDK_BUILD_CPU_JLI_CFLAGS
953OPENJDK_TARGET_CPU_JLI_CFLAGS
954OPENJDK_TARGET_CPU_OSARCH
955OPENJDK_TARGET_CPU_ISADIR
956OPENJDK_BUILD_CPU_LIBDIR
957OPENJDK_BUILD_CPU_LEGACY_LIB
958OPENJDK_BUILD_CPU_LEGACY
959OPENJDK_TARGET_CPU_LIBDIR
960OPENJDK_TARGET_CPU_LEGACY_LIB
961OPENJDK_TARGET_CPU_LEGACY
962REQUIRED_OS_VERSION
963REQUIRED_OS_NAME
964COMPILE_TYPE
965OPENJDK_TARGET_CPU_ENDIAN
966OPENJDK_TARGET_CPU_BITS
967OPENJDK_TARGET_CPU_ARCH
968OPENJDK_TARGET_CPU
969OPENJDK_TARGET_OS_ENV
970OPENJDK_TARGET_OS_TYPE
971OPENJDK_TARGET_OS
972OPENJDK_BUILD_CPU_ENDIAN
973OPENJDK_BUILD_CPU_BITS
974OPENJDK_BUILD_CPU_ARCH
975OPENJDK_BUILD_CPU
976OPENJDK_BUILD_OS_ENV
977OPENJDK_BUILD_OS_TYPE
978OPENJDK_BUILD_OS
979OPENJDK_BUILD_AUTOCONF_NAME
980OPENJDK_TARGET_AUTOCONF_NAME
981target_os
982target_vendor
983target_cpu
984target
985host_os
986host_vendor
987host_cpu
988host
989build_os
990build_vendor
991build_cpu
992build
993NICE
994CPIO
995DF
996READLINK
997CYGPATH
998SED
999FGREP
1000EGREP
1001GREP
1002AWK
1003XARGS
1004WHICH
1005WC
1006UNIQ
1007UNAME
1008TR
1009TOUCH
1010TEE
1011TAR
1012TAIL
1013SORT
1014SH
1015RMDIR
1016RM
1017PRINTF
1018NAWK
1019MV
1020MKTEMP
1021MKDIR
1022LS
1023LN
1024HEAD
1025FIND
1026FILE
1027EXPR
1028ECHO
1029DIRNAME
1030DIFF
1031DATE
1032CUT
1033CP
1034COMM
1035CMP
1036CHMOD
1037CAT
1038BASH
1039BASENAME
1040DATE_WHEN_CONFIGURED
1041ORIGINAL_PATH
1042CONFIGURE_COMMAND_LINE
1043target_alias
1044host_alias
1045build_alias
1046LIBS
1047ECHO_T
1048ECHO_N
1049ECHO_C
1050DEFS
1051mandir
1052localedir
1053libdir
1054psdir
1055pdfdir
1056dvidir
1057htmldir
1058infodir
1059docdir
1060oldincludedir
1061includedir
1062localstatedir
1063sharedstatedir
1064sysconfdir
1065datadir
1066datarootdir
1067libexecdir
1068sbindir
1069bindir
1070program_transform_name
1071prefix
1072exec_prefix
1073PACKAGE_URL
1074PACKAGE_BUGREPORT
1075PACKAGE_STRING
1076PACKAGE_VERSION
1077PACKAGE_TARNAME
1078PACKAGE_NAME
1079PATH_SEPARATOR
1080SHELL'
1081ac_subst_files=''
1082ac_user_opts='
1083enable_option_checking
1084with_target_bits
1085enable_openjdk_only
1086with_custom_make_dir
1087with_jdk_variant
1088with_jvm_interpreter
1089with_jvm_variants
1090enable_debug
1091with_debug_level
1092with_devkit
1093with_sys_root
1094with_sysroot
1095with_tools_dir
1096with_toolchain_path
1097with_extra_path
1098with_sdk_name
1099with_conf_name
1100with_output_sync
1101with_default_make_target
1102enable_headful
1103with_cacerts_file
1104enable_unlimited_crypto
1105with_copyright_year
1106enable_keep_packaged_modules
1107enable_hotspot_test_in_build
1108with_milestone
1109with_update_version
1110with_user_release_suffix
1111with_build_number
1112with_version_string
1113with_version_pre
1114with_version_opt
1115with_version_build
1116with_version_major
1117with_version_minor
1118with_version_security
1119with_version_patch
1120with_boot_jdk
1121with_build_jdk
1122with_add_source_root
1123with_override_source_root
1124with_adds_and_overrides
1125with_override_langtools
1126with_override_corba
1127with_override_jaxp
1128with_override_jaxws
1129with_override_hotspot
1130with_override_nashorn
1131with_override_jdk
1132with_import_hotspot
1133with_import_modules
1134enable_static_build
1135with_toolchain_type
1136with_extra_cflags
1137with_extra_cxxflags
1138with_extra_ldflags
1139with_toolchain_version
1140with_build_devkit
1141with_jtreg
1142enable_warnings_as_errors
1143with_native_debug_symbols
1144enable_debug_symbols
1145enable_zip_debug_info
1146enable_native_coverage
1147with_stdc__lib
1148with_msvcr_dll
1149with_msvcp_dll
1150with_x
1151with_cups
1152with_cups_include
1153with_freetype
1154with_freetype_include
1155with_freetype_lib
1156with_freetype_src
1157enable_freetype_bundling
1158with_alsa
1159with_alsa_include
1160with_alsa_lib
1161with_libffi
1162with_libffi_include
1163with_libffi_lib
1164with_libjpeg
1165with_giflib
1166with_libpng
1167with_zlib
1168with_lcms
1169with_dxsdk
1170with_dxsdk_lib
1171with_dxsdk_include
1172with_num_cores
1173with_memory_size
1174with_jobs
1175with_test_jobs
1176with_boot_jdk_jvmargs
1177with_sjavac_server_java
1178enable_sjavac
1179enable_javac_server
1180enable_icecc
1181enable_precompiled_headers
1182enable_ccache
1183with_ccache_dir
1184'
1185      ac_precious_vars='build_alias
1186host_alias
1187target_alias
1188BASENAME
1189BASH
1190CAT
1191CHMOD
1192CMP
1193COMM
1194CP
1195CUT
1196DATE
1197DIFF
1198DIRNAME
1199ECHO
1200EXPR
1201FILE
1202FIND
1203HEAD
1204LN
1205LS
1206MKDIR
1207MKTEMP
1208MV
1209NAWK
1210PRINTF
1211RM
1212RMDIR
1213SH
1214SORT
1215TAIL
1216TAR
1217TEE
1218TOUCH
1219TR
1220UNAME
1221UNIQ
1222WC
1223WHICH
1224XARGS
1225AWK
1226GREP
1227EGREP
1228FGREP
1229SED
1230CYGPATH
1231READLINK
1232DF
1233CPIO
1234NICE
1235MAKE
1236UNZIP
1237ZIP
1238LDD
1239OTOOL
1240READELF
1241HG
1242STAT
1243TIME
1244PATCH
1245DSYMUTIL
1246XATTR
1247CODESIGN
1248SETFILE
1249PKG_CONFIG
1250JAVA
1251JAVAC
1252JAVAH
1253JAR
1254JARSIGNER
1255CC
1256CFLAGS
1257LDFLAGS
1258LIBS
1259CPPFLAGS
1260CXX
1261CXXFLAGS
1262CCC
1263CPP
1264CXXCPP
1265AS
1266AR
1267LIPO
1268STRIP
1269NM
1270GNM
1271OBJCOPY
1272OBJDUMP
1273BUILD_CC
1274BUILD_CXX
1275BUILD_NM
1276BUILD_AR
1277BUILD_OBJCOPY
1278BUILD_STRIP
1279JTREGEXE
1280XMKMF
1281FREETYPE_CFLAGS
1282FREETYPE_LIBS
1283ALSA_CFLAGS
1284ALSA_LIBS
1285LIBFFI_CFLAGS
1286LIBFFI_LIBS
1287PNG_CFLAGS
1288PNG_LIBS
1289LCMS_CFLAGS
1290LCMS_LIBS
1291ICECC_CMD
1292ICECC_CREATE_ENV
1293ICECC_WRAPPER
1294CCACHE'
1295
1296
1297# Initialize some variables set by options.
1298ac_init_help=
1299ac_init_version=false
1300ac_unrecognized_opts=
1301ac_unrecognized_sep=
1302# The variables have the same names as the options, with
1303# dashes changed to underlines.
1304cache_file=/dev/null
1305exec_prefix=NONE
1306no_create=
1307no_recursion=
1308prefix=NONE
1309program_prefix=NONE
1310program_suffix=NONE
1311program_transform_name=s,x,x,
1312silent=
1313site=
1314srcdir=
1315verbose=
1316x_includes=NONE
1317x_libraries=NONE
1318
1319# Installation directory options.
1320# These are left unexpanded so users can "make install exec_prefix=/foo"
1321# and all the variables that are supposed to be based on exec_prefix
1322# by default will actually change.
1323# Use braces instead of parens because sh, perl, etc. also accept them.
1324# (The list follows the same order as the GNU Coding Standards.)
1325bindir='${exec_prefix}/bin'
1326sbindir='${exec_prefix}/sbin'
1327libexecdir='${exec_prefix}/libexec'
1328datarootdir='${prefix}/share'
1329datadir='${datarootdir}'
1330sysconfdir='${prefix}/etc'
1331sharedstatedir='${prefix}/com'
1332localstatedir='${prefix}/var'
1333includedir='${prefix}/include'
1334oldincludedir='/usr/include'
1335docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1336infodir='${datarootdir}/info'
1337htmldir='${docdir}'
1338dvidir='${docdir}'
1339pdfdir='${docdir}'
1340psdir='${docdir}'
1341libdir='${exec_prefix}/lib'
1342localedir='${datarootdir}/locale'
1343mandir='${datarootdir}/man'
1344
1345ac_prev=
1346ac_dashdash=
1347for ac_option
1348do
1349  # If the previous option needs an argument, assign it.
1350  if test -n "$ac_prev"; then
1351    eval $ac_prev=\$ac_option
1352    ac_prev=
1353    continue
1354  fi
1355
1356  case $ac_option in
1357  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1358  *=)   ac_optarg= ;;
1359  *)    ac_optarg=yes ;;
1360  esac
1361
1362  # Accept the important Cygnus configure options, so we can diagnose typos.
1363
1364  case $ac_dashdash$ac_option in
1365  --)
1366    ac_dashdash=yes ;;
1367
1368  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1369    ac_prev=bindir ;;
1370  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1371    bindir=$ac_optarg ;;
1372
1373  -build | --build | --buil | --bui | --bu)
1374    ac_prev=build_alias ;;
1375  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1376    build_alias=$ac_optarg ;;
1377
1378  -cache-file | --cache-file | --cache-fil | --cache-fi \
1379  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1380    ac_prev=cache_file ;;
1381  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1382  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1383    cache_file=$ac_optarg ;;
1384
1385  --config-cache | -C)
1386    cache_file=config.cache ;;
1387
1388  -datadir | --datadir | --datadi | --datad)
1389    ac_prev=datadir ;;
1390  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1391    datadir=$ac_optarg ;;
1392
1393  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1394  | --dataroo | --dataro | --datar)
1395    ac_prev=datarootdir ;;
1396  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1397  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1398    datarootdir=$ac_optarg ;;
1399
1400  -disable-* | --disable-*)
1401    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1402    # Reject names that are not valid shell variable names.
1403    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1404      as_fn_error $? "invalid feature name: $ac_useropt"
1405    ac_useropt_orig=$ac_useropt
1406    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1407    case $ac_user_opts in
1408      *"
1409"enable_$ac_useropt"
1410"*) ;;
1411      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1412	 ac_unrecognized_sep=', ';;
1413    esac
1414    eval enable_$ac_useropt=no ;;
1415
1416  -docdir | --docdir | --docdi | --doc | --do)
1417    ac_prev=docdir ;;
1418  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1419    docdir=$ac_optarg ;;
1420
1421  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1422    ac_prev=dvidir ;;
1423  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1424    dvidir=$ac_optarg ;;
1425
1426  -enable-* | --enable-*)
1427    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1428    # Reject names that are not valid shell variable names.
1429    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1430      as_fn_error $? "invalid feature name: $ac_useropt"
1431    ac_useropt_orig=$ac_useropt
1432    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1433    case $ac_user_opts in
1434      *"
1435"enable_$ac_useropt"
1436"*) ;;
1437      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1438	 ac_unrecognized_sep=', ';;
1439    esac
1440    eval enable_$ac_useropt=\$ac_optarg ;;
1441
1442  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1443  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1444  | --exec | --exe | --ex)
1445    ac_prev=exec_prefix ;;
1446  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1447  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1448  | --exec=* | --exe=* | --ex=*)
1449    exec_prefix=$ac_optarg ;;
1450
1451  -gas | --gas | --ga | --g)
1452    # Obsolete; use --with-gas.
1453    with_gas=yes ;;
1454
1455  -help | --help | --hel | --he | -h)
1456    ac_init_help=long ;;
1457  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1458    ac_init_help=recursive ;;
1459  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1460    ac_init_help=short ;;
1461
1462  -host | --host | --hos | --ho)
1463    ac_prev=host_alias ;;
1464  -host=* | --host=* | --hos=* | --ho=*)
1465    host_alias=$ac_optarg ;;
1466
1467  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1468    ac_prev=htmldir ;;
1469  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1470  | --ht=*)
1471    htmldir=$ac_optarg ;;
1472
1473  -includedir | --includedir | --includedi | --included | --include \
1474  | --includ | --inclu | --incl | --inc)
1475    ac_prev=includedir ;;
1476  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1477  | --includ=* | --inclu=* | --incl=* | --inc=*)
1478    includedir=$ac_optarg ;;
1479
1480  -infodir | --infodir | --infodi | --infod | --info | --inf)
1481    ac_prev=infodir ;;
1482  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1483    infodir=$ac_optarg ;;
1484
1485  -libdir | --libdir | --libdi | --libd)
1486    ac_prev=libdir ;;
1487  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1488    libdir=$ac_optarg ;;
1489
1490  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1491  | --libexe | --libex | --libe)
1492    ac_prev=libexecdir ;;
1493  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1494  | --libexe=* | --libex=* | --libe=*)
1495    libexecdir=$ac_optarg ;;
1496
1497  -localedir | --localedir | --localedi | --localed | --locale)
1498    ac_prev=localedir ;;
1499  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1500    localedir=$ac_optarg ;;
1501
1502  -localstatedir | --localstatedir | --localstatedi | --localstated \
1503  | --localstate | --localstat | --localsta | --localst | --locals)
1504    ac_prev=localstatedir ;;
1505  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1506  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1507    localstatedir=$ac_optarg ;;
1508
1509  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1510    ac_prev=mandir ;;
1511  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1512    mandir=$ac_optarg ;;
1513
1514  -nfp | --nfp | --nf)
1515    # Obsolete; use --without-fp.
1516    with_fp=no ;;
1517
1518  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1519  | --no-cr | --no-c | -n)
1520    no_create=yes ;;
1521
1522  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1523  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1524    no_recursion=yes ;;
1525
1526  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1527  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1528  | --oldin | --oldi | --old | --ol | --o)
1529    ac_prev=oldincludedir ;;
1530  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1531  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1532  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1533    oldincludedir=$ac_optarg ;;
1534
1535  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1536    ac_prev=prefix ;;
1537  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1538    prefix=$ac_optarg ;;
1539
1540  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1541  | --program-pre | --program-pr | --program-p)
1542    ac_prev=program_prefix ;;
1543  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1544  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1545    program_prefix=$ac_optarg ;;
1546
1547  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1548  | --program-suf | --program-su | --program-s)
1549    ac_prev=program_suffix ;;
1550  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1551  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1552    program_suffix=$ac_optarg ;;
1553
1554  -program-transform-name | --program-transform-name \
1555  | --program-transform-nam | --program-transform-na \
1556  | --program-transform-n | --program-transform- \
1557  | --program-transform | --program-transfor \
1558  | --program-transfo | --program-transf \
1559  | --program-trans | --program-tran \
1560  | --progr-tra | --program-tr | --program-t)
1561    ac_prev=program_transform_name ;;
1562  -program-transform-name=* | --program-transform-name=* \
1563  | --program-transform-nam=* | --program-transform-na=* \
1564  | --program-transform-n=* | --program-transform-=* \
1565  | --program-transform=* | --program-transfor=* \
1566  | --program-transfo=* | --program-transf=* \
1567  | --program-trans=* | --program-tran=* \
1568  | --progr-tra=* | --program-tr=* | --program-t=*)
1569    program_transform_name=$ac_optarg ;;
1570
1571  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1572    ac_prev=pdfdir ;;
1573  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1574    pdfdir=$ac_optarg ;;
1575
1576  -psdir | --psdir | --psdi | --psd | --ps)
1577    ac_prev=psdir ;;
1578  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1579    psdir=$ac_optarg ;;
1580
1581  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1582  | -silent | --silent | --silen | --sile | --sil)
1583    silent=yes ;;
1584
1585  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1586    ac_prev=sbindir ;;
1587  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1588  | --sbi=* | --sb=*)
1589    sbindir=$ac_optarg ;;
1590
1591  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1592  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1593  | --sharedst | --shareds | --shared | --share | --shar \
1594  | --sha | --sh)
1595    ac_prev=sharedstatedir ;;
1596  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1597  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1598  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1599  | --sha=* | --sh=*)
1600    sharedstatedir=$ac_optarg ;;
1601
1602  -site | --site | --sit)
1603    ac_prev=site ;;
1604  -site=* | --site=* | --sit=*)
1605    site=$ac_optarg ;;
1606
1607  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1608    ac_prev=srcdir ;;
1609  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1610    srcdir=$ac_optarg ;;
1611
1612  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1613  | --syscon | --sysco | --sysc | --sys | --sy)
1614    ac_prev=sysconfdir ;;
1615  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1616  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1617    sysconfdir=$ac_optarg ;;
1618
1619  -target | --target | --targe | --targ | --tar | --ta | --t)
1620    ac_prev=target_alias ;;
1621  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1622    target_alias=$ac_optarg ;;
1623
1624  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1625    verbose=yes ;;
1626
1627  -version | --version | --versio | --versi | --vers | -V)
1628    ac_init_version=: ;;
1629
1630  -with-* | --with-*)
1631    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1632    # Reject names that are not valid shell variable names.
1633    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1634      as_fn_error $? "invalid package name: $ac_useropt"
1635    ac_useropt_orig=$ac_useropt
1636    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1637    case $ac_user_opts in
1638      *"
1639"with_$ac_useropt"
1640"*) ;;
1641      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1642	 ac_unrecognized_sep=', ';;
1643    esac
1644    eval with_$ac_useropt=\$ac_optarg ;;
1645
1646  -without-* | --without-*)
1647    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1648    # Reject names that are not valid shell variable names.
1649    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1650      as_fn_error $? "invalid package name: $ac_useropt"
1651    ac_useropt_orig=$ac_useropt
1652    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1653    case $ac_user_opts in
1654      *"
1655"with_$ac_useropt"
1656"*) ;;
1657      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1658	 ac_unrecognized_sep=', ';;
1659    esac
1660    eval with_$ac_useropt=no ;;
1661
1662  --x)
1663    # Obsolete; use --with-x.
1664    with_x=yes ;;
1665
1666  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1667  | --x-incl | --x-inc | --x-in | --x-i)
1668    ac_prev=x_includes ;;
1669  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1670  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1671    x_includes=$ac_optarg ;;
1672
1673  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1674  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1675    ac_prev=x_libraries ;;
1676  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1677  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1678    x_libraries=$ac_optarg ;;
1679
1680  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1681Try \`$0 --help' for more information"
1682    ;;
1683
1684  *=*)
1685    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1686    # Reject names that are not valid shell variable names.
1687    case $ac_envvar in #(
1688      '' | [0-9]* | *[!_$as_cr_alnum]* )
1689      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1690    esac
1691    eval $ac_envvar=\$ac_optarg
1692    export $ac_envvar ;;
1693
1694  *)
1695    # FIXME: should be removed in autoconf 3.0.
1696    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1697    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1698      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1699    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1700    ;;
1701
1702  esac
1703done
1704
1705if test -n "$ac_prev"; then
1706  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1707  as_fn_error $? "missing argument to $ac_option"
1708fi
1709
1710if test -n "$ac_unrecognized_opts"; then
1711  case $enable_option_checking in
1712    no) ;;
1713    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1714    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1715  esac
1716fi
1717
1718# Check all directory arguments for consistency.
1719for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1720		datadir sysconfdir sharedstatedir localstatedir includedir \
1721		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1722		libdir localedir mandir
1723do
1724  eval ac_val=\$$ac_var
1725  # Remove trailing slashes.
1726  case $ac_val in
1727    */ )
1728      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1729      eval $ac_var=\$ac_val;;
1730  esac
1731  # Be sure to have absolute directory names.
1732  case $ac_val in
1733    [\\/$]* | ?:[\\/]* )  continue;;
1734    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1735  esac
1736  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1737done
1738
1739# There might be people who depend on the old broken behavior: `$host'
1740# used to hold the argument of --host etc.
1741# FIXME: To remove some day.
1742build=$build_alias
1743host=$host_alias
1744target=$target_alias
1745
1746# FIXME: To remove some day.
1747if test "x$host_alias" != x; then
1748  if test "x$build_alias" = x; then
1749    cross_compiling=maybe
1750  elif test "x$build_alias" != "x$host_alias"; then
1751    cross_compiling=yes
1752  fi
1753fi
1754
1755ac_tool_prefix=
1756test -n "$host_alias" && ac_tool_prefix=$host_alias-
1757
1758test "$silent" = yes && exec 6>/dev/null
1759
1760
1761ac_pwd=`pwd` && test -n "$ac_pwd" &&
1762ac_ls_di=`ls -di .` &&
1763ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1764  as_fn_error $? "working directory cannot be determined"
1765test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1766  as_fn_error $? "pwd does not report name of working directory"
1767
1768
1769# Find the source files, if location was not specified.
1770if test -z "$srcdir"; then
1771  ac_srcdir_defaulted=yes
1772  # Try the directory containing this script, then the parent directory.
1773  ac_confdir=`$as_dirname -- "$as_myself" ||
1774$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1775	 X"$as_myself" : 'X\(//\)[^/]' \| \
1776	 X"$as_myself" : 'X\(//\)$' \| \
1777	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1778$as_echo X"$as_myself" |
1779    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1780	    s//\1/
1781	    q
1782	  }
1783	  /^X\(\/\/\)[^/].*/{
1784	    s//\1/
1785	    q
1786	  }
1787	  /^X\(\/\/\)$/{
1788	    s//\1/
1789	    q
1790	  }
1791	  /^X\(\/\).*/{
1792	    s//\1/
1793	    q
1794	  }
1795	  s/.*/./; q'`
1796  srcdir=$ac_confdir
1797  if test ! -r "$srcdir/$ac_unique_file"; then
1798    srcdir=..
1799  fi
1800else
1801  ac_srcdir_defaulted=no
1802fi
1803if test ! -r "$srcdir/$ac_unique_file"; then
1804  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1805  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1806fi
1807ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1808ac_abs_confdir=`(
1809	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1810	pwd)`
1811# When building in place, set srcdir=.
1812if test "$ac_abs_confdir" = "$ac_pwd"; then
1813  srcdir=.
1814fi
1815# Remove unnecessary trailing slashes from srcdir.
1816# Double slashes in file names in object file debugging info
1817# mess up M-x gdb in Emacs.
1818case $srcdir in
1819*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1820esac
1821for ac_var in $ac_precious_vars; do
1822  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1823  eval ac_env_${ac_var}_value=\$${ac_var}
1824  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1825  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1826done
1827
1828#
1829# Report the --help message.
1830#
1831if test "$ac_init_help" = "long"; then
1832  # Omit some internal or obsolete options to make the list less imposing.
1833  # This message is too long to be a string in the A/UX 3.1 sh.
1834  cat <<_ACEOF
1835\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1836
1837Usage: $0 [OPTION]... [VAR=VALUE]...
1838
1839To assign environment variables (e.g., CC, CFLAGS...), specify them as
1840VAR=VALUE.  See below for descriptions of some of the useful variables.
1841
1842Defaults for the options are specified in brackets.
1843
1844Configuration:
1845  -h, --help              display this help and exit
1846      --help=short        display options specific to this package
1847      --help=recursive    display the short help of all the included packages
1848  -V, --version           display version information and exit
1849  -q, --quiet, --silent   do not print \`checking ...' messages
1850      --cache-file=FILE   cache test results in FILE [disabled]
1851  -C, --config-cache      alias for \`--cache-file=config.cache'
1852  -n, --no-create         do not create output files
1853      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1854
1855Installation directories:
1856  --prefix=PREFIX         install architecture-independent files in PREFIX
1857                          [$ac_default_prefix]
1858  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1859                          [PREFIX]
1860
1861By default, \`make install' will install all the files in
1862\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1863an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1864for instance \`--prefix=\$HOME'.
1865
1866For better control, use the options below.
1867
1868Fine tuning of the installation directories:
1869  --bindir=DIR            user executables [EPREFIX/bin]
1870  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1871  --libexecdir=DIR        program executables [EPREFIX/libexec]
1872  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1873  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1874  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1875  --libdir=DIR            object code libraries [EPREFIX/lib]
1876  --includedir=DIR        C header files [PREFIX/include]
1877  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1878  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1879  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1880  --infodir=DIR           info documentation [DATAROOTDIR/info]
1881  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1882  --mandir=DIR            man documentation [DATAROOTDIR/man]
1883  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1884  --htmldir=DIR           html documentation [DOCDIR]
1885  --dvidir=DIR            dvi documentation [DOCDIR]
1886  --pdfdir=DIR            pdf documentation [DOCDIR]
1887  --psdir=DIR             ps documentation [DOCDIR]
1888_ACEOF
1889
1890  cat <<\_ACEOF
1891
1892X features:
1893  --x-includes=DIR    X include files are in DIR
1894  --x-libraries=DIR   X library files are in DIR
1895
1896System types:
1897  --build=BUILD     configure for building on BUILD [guessed]
1898  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1899  --target=TARGET   configure for building compilers for TARGET [HOST]
1900_ACEOF
1901fi
1902
1903if test -n "$ac_init_help"; then
1904  case $ac_init_help in
1905     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1906   esac
1907  cat <<\_ACEOF
1908
1909Optional Features:
1910  --disable-option-checking  ignore unrecognized --enable/--with options
1911  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1912  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1913  --enable-openjdk-only   suppress building custom source even if present
1914                          [disabled]
1915  --enable-debug          set the debug level to fastdebug (shorthand for
1916                          --with-debug-level=fastdebug) [disabled]
1917  --disable-headful       disable building headful support (graphical UI
1918                          support) [enabled]
1919  --enable-unlimited-crypto
1920                          Enable unlimited crypto policy [disabled]
1921  --disable-keep-packaged-modules
1922                          Do not keep packaged modules in jdk image [enable]
1923  --enable-hotspot-test-in-build
1924                          run the Queens test after Hotspot build [disabled]
1925  --enable-static-build   enable static library build [disabled]
1926  --disable-warnings-as-errors
1927                          do not consider native warnings to be an error
1928                          [enabled]
1929  --enable-debug-symbols  Deprecated. Option is kept for backwards
1930                          compatibility and is ignored
1931  --enable-zip-debug-info Deprecated. Option is kept for backwards
1932                          compatibility and is ignored
1933  --enable-native-coverage
1934                          enable native compilation with code coverage
1935                          data[disabled]
1936  --disable-freetype-bundling
1937                          disable bundling of the freetype library with the
1938                          build result [enabled on Windows or when using
1939                          --with-freetype, disabled otherwise]
1940  --enable-sjavac         use sjavac to do fast incremental compiles
1941                          [disabled]
1942  --disable-javac-server  disable javac server [enabled]
1943  --enable-icecc          enable distribted compilation of native code using
1944                          icecc/icecream [disabled]
1945  --disable-precompiled-headers
1946                          disable using precompiled headers when compiling C++
1947                          [enabled]
1948  --enable-ccache         enable using ccache to speed up recompilations
1949                          [disabled]
1950
1951Optional Packages:
1952  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1953  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1954  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1955                          support it), e.g. --with-target-bits=32 [guessed]
1956  --with-custom-make-dir  Deprecated. Option is kept for backwards
1957                          compatibility and is ignored
1958  --with-jdk-variant      JDK variant to build (normal) [normal]
1959  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1960  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1961                          client, minimal1, zero, zeroshark, core) [server]
1962  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1963                          optimized) [release]
1964  --with-devkit           use this devkit for compilers, tools and resources
1965  --with-sys-root         alias for --with-sysroot for backwards compatability
1966  --with-sysroot          use this directory as sysroot
1967  --with-tools-dir        alias for --with-toolchain-path for backwards
1968                          compatibility
1969  --with-toolchain-path   prepend these directories when searching for
1970                          toolchain binaries (compilers etc)
1971  --with-extra-path       prepend these directories to the default path
1972  --with-sdk-name         use the platform SDK of the given name. [macosx]
1973  --with-conf-name        use this as the name of the configuration [generated
1974                          from important configuration options]
1975  --with-output-sync      set make output sync type if supported by make.
1976                          [recurse]
1977  --with-default-make-target
1978                          set the default make target [exploded-image]
1979  --with-cacerts-file     specify alternative cacerts file
1980  --with-copyright-year   Set copyright year value for build [current year]
1981  --with-milestone        Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-update-version   Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-user-release-suffix
1986                          Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-build-number     Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-version-string   Set version string [calculated]
1991  --with-version-pre      Set the base part of the version 'PRE' field
1992                          (pre-release identifier) ['internal']
1993  --with-version-opt      Set version 'OPT' field (build metadata)
1994                          [<timestamp>.<user>.<dirname>]
1995  --with-version-build    Set version 'BUILD' field (build number) [not
1996                          specified]
1997  --with-version-major    Set version 'MAJOR' field (first number) [current
1998                          source value]
1999  --with-version-minor    Set version 'MINOR' field (second number) [current
2000                          source value]
2001  --with-version-security Set version 'SECURITY' field (third number) [current
2002                          source value]
2003  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2004                          specified]
2005  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2006  --with-build-jdk        path to JDK of same version as is being built[the
2007                          newly built JDK]
2008  --with-add-source-root  Deprecated. Option is kept for backwards
2009                          compatibility and is ignored
2010  --with-override-source-root
2011                          Deprecated. Option is kept for backwards
2012                          compatibility and is ignored
2013  --with-adds-and-overrides
2014                          Deprecated. Option is kept for backwards
2015                          compatibility and is ignored
2016  --with-override-langtools
2017                          Deprecated. Option is kept for backwards
2018                          compatibility and is ignored
2019  --with-override-corba   Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-override-jaxp    Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-override-jaxws   Deprecated. Option is kept for backwards
2024                          compatibility and is ignored
2025  --with-override-hotspot Deprecated. Option is kept for backwards
2026                          compatibility and is ignored
2027  --with-override-nashorn Deprecated. Option is kept for backwards
2028                          compatibility and is ignored
2029  --with-override-jdk     Deprecated. Option is kept for backwards
2030                          compatibility and is ignored
2031  --with-import-hotspot   import hotspot binaries from this jdk image or
2032                          hotspot build dist dir instead of building from
2033                          source
2034  --with-import-modules   import a set of prebuilt modules either as a zip
2035                          file or an exploded directory
2036  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2037                          to show possible values [platform dependent]
2038  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2039  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2040  --with-extra-ldflags    extra flags to be used when linking jdk
2041  --with-toolchain-version
2042                          the version of the toolchain to look for, use
2043                          '--help' to show possible values [platform
2044                          dependent]
2045  --with-build-devkit     Devkit to use for the build platform toolchain
2046  --with-jtreg            Regression Test Harness [probed]
2047  --with-native-debug-symbols
2048                          set the native debug symbol configuration (none,
2049                          internal, external, zipped) [varying]
2050  --with-stdc++lib=<static>,<dynamic>,<default>
2051                          force linking of the C++ runtime on Linux to either
2052                          static or dynamic, default is static with dynamic as
2053                          fallback
2054  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2055                          (Windows only) [probed]
2056  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2057                          (Windows only) [probed]
2058  --with-x                use the X Window System
2059  --with-cups             specify prefix directory for the cups package
2060                          (expecting the headers under PATH/include)
2061  --with-cups-include     specify directory for the cups include files
2062  --with-freetype         specify prefix directory for the freetype package
2063                          (expecting the libraries under PATH/lib and the
2064                          headers under PATH/include)
2065  --with-freetype-include specify directory for the freetype include files
2066  --with-freetype-lib     specify directory for the freetype library
2067  --with-freetype-src     specify directory with freetype sources to
2068                          automatically build the library (experimental,
2069                          Windows-only)
2070  --with-alsa             specify prefix directory for the alsa package
2071                          (expecting the libraries under PATH/lib and the
2072                          headers under PATH/include)
2073  --with-alsa-include     specify directory for the alsa include files
2074  --with-alsa-lib         specify directory for the alsa library
2075  --with-libffi           specify prefix directory for the libffi package
2076                          (expecting the libraries under PATH/lib and the
2077                          headers under PATH/include)
2078  --with-libffi-include   specify directory for the libffi include files
2079  --with-libffi-lib       specify directory for the libffi library
2080  --with-libjpeg          use libjpeg from build system or OpenJDK source
2081                          (system, bundled) [bundled]
2082  --with-giflib           use giflib from build system or OpenJDK source
2083                          (system, bundled) [bundled]
2084  --with-libpng           use libpng from build system or OpenJDK source
2085                          (system, bundled) [bundled]
2086  --with-zlib             use zlib from build system or OpenJDK source
2087                          (system, bundled) [bundled]
2088  --with-lcms             use lcms2 from build system or OpenJDK source
2089                          (system, bundled) [bundled]
2090  --with-dxsdk            Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-dxsdk-include    Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-num-cores        number of cores in the build system, e.g.
2097                          --with-num-cores=8 [probed]
2098  --with-memory-size      memory (in MB) available in the build system, e.g.
2099                          --with-memory-size=1024 [probed]
2100  --with-jobs             number of parallel jobs to let make run [calculated
2101                          based on cores and memory]
2102  --with-test-jobs        number of parallel tests jobs to run [based on build
2103                          jobs]
2104  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2105                          invocations of boot JDK, overriding the default
2106                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2107                          -enableassertions"
2108  --with-sjavac-server-java
2109                          use this java binary for running the sjavac
2110                          background server [Boot JDK java]
2111  --with-ccache-dir       where to store ccache files [~/.ccache]
2112
2113Some influential environment variables:
2114  BASENAME    Override default value for BASENAME
2115  BASH        Override default value for BASH
2116  CAT         Override default value for CAT
2117  CHMOD       Override default value for CHMOD
2118  CMP         Override default value for CMP
2119  COMM        Override default value for COMM
2120  CP          Override default value for CP
2121  CUT         Override default value for CUT
2122  DATE        Override default value for DATE
2123  DIFF        Override default value for DIFF
2124  DIRNAME     Override default value for DIRNAME
2125  ECHO        Override default value for ECHO
2126  EXPR        Override default value for EXPR
2127  FILE        Override default value for FILE
2128  FIND        Override default value for FIND
2129  HEAD        Override default value for HEAD
2130  LN          Override default value for LN
2131  LS          Override default value for LS
2132  MKDIR       Override default value for MKDIR
2133  MKTEMP      Override default value for MKTEMP
2134  MV          Override default value for MV
2135  NAWK        Override default value for NAWK
2136  PRINTF      Override default value for PRINTF
2137  RM          Override default value for RM
2138  RMDIR       Override default value for RMDIR
2139  SH          Override default value for SH
2140  SORT        Override default value for SORT
2141  TAIL        Override default value for TAIL
2142  TAR         Override default value for TAR
2143  TEE         Override default value for TEE
2144  TOUCH       Override default value for TOUCH
2145  TR          Override default value for TR
2146  UNAME       Override default value for UNAME
2147  UNIQ        Override default value for UNIQ
2148  WC          Override default value for WC
2149  WHICH       Override default value for WHICH
2150  XARGS       Override default value for XARGS
2151  AWK         Override default value for AWK
2152  GREP        Override default value for GREP
2153  EGREP       Override default value for EGREP
2154  FGREP       Override default value for FGREP
2155  SED         Override default value for SED
2156  CYGPATH     Override default value for CYGPATH
2157  READLINK    Override default value for READLINK
2158  DF          Override default value for DF
2159  CPIO        Override default value for CPIO
2160  NICE        Override default value for NICE
2161  MAKE        Override default value for MAKE
2162  UNZIP       Override default value for UNZIP
2163  ZIP         Override default value for ZIP
2164  LDD         Override default value for LDD
2165  OTOOL       Override default value for OTOOL
2166  READELF     Override default value for READELF
2167  HG          Override default value for HG
2168  STAT        Override default value for STAT
2169  TIME        Override default value for TIME
2170  PATCH       Override default value for PATCH
2171  DSYMUTIL    Override default value for DSYMUTIL
2172  XATTR       Override default value for XATTR
2173  CODESIGN    Override default value for CODESIGN
2174  SETFILE     Override default value for SETFILE
2175  PKG_CONFIG  path to pkg-config utility
2176  JAVA        Override default value for JAVA
2177  JAVAC       Override default value for JAVAC
2178  JAVAH       Override default value for JAVAH
2179  JAR         Override default value for JAR
2180  JARSIGNER   Override default value for JARSIGNER
2181  CC          C compiler command
2182  CFLAGS      C compiler flags
2183  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2184              nonstandard directory <lib dir>
2185  LIBS        libraries to pass to the linker, e.g. -l<library>
2186  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2187              you have headers in a nonstandard directory <include dir>
2188  CXX         C++ compiler command
2189  CXXFLAGS    C++ compiler flags
2190  CPP         C preprocessor
2191  CXXCPP      C++ preprocessor
2192  AS          Override default value for AS
2193  AR          Override default value for AR
2194  LIPO        Override default value for LIPO
2195  STRIP       Override default value for STRIP
2196  NM          Override default value for NM
2197  GNM         Override default value for GNM
2198  OBJCOPY     Override default value for OBJCOPY
2199  OBJDUMP     Override default value for OBJDUMP
2200  BUILD_CC    Override default value for BUILD_CC
2201  BUILD_CXX   Override default value for BUILD_CXX
2202  BUILD_NM    Override default value for BUILD_NM
2203  BUILD_AR    Override default value for BUILD_AR
2204  BUILD_OBJCOPY
2205              Override default value for BUILD_OBJCOPY
2206  BUILD_STRIP Override default value for BUILD_STRIP
2207  JTREGEXE    Override default value for JTREGEXE
2208  XMKMF       Path to xmkmf, Makefile generator for X Window System
2209  FREETYPE_CFLAGS
2210              C compiler flags for FREETYPE, overriding pkg-config
2211  FREETYPE_LIBS
2212              linker flags for FREETYPE, overriding pkg-config
2213  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2214  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2215  LIBFFI_CFLAGS
2216              C compiler flags for LIBFFI, overriding pkg-config
2217  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2218  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2219  PNG_LIBS    linker flags for PNG, overriding pkg-config
2220  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2221  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2222  ICECC_CMD   Override default value for ICECC_CMD
2223  ICECC_CREATE_ENV
2224              Override default value for ICECC_CREATE_ENV
2225  ICECC_WRAPPER
2226              Override default value for ICECC_WRAPPER
2227  CCACHE      Override default value for CCACHE
2228
2229Use these variables to override the choices made by `configure' or to help
2230it to find libraries and programs with nonstandard names/locations.
2231
2232Report bugs to <build-dev@openjdk.java.net>.
2233OpenJDK home page: <http://openjdk.java.net>.
2234_ACEOF
2235ac_status=$?
2236fi
2237
2238if test "$ac_init_help" = "recursive"; then
2239  # If there are subdirs, report their specific --help.
2240  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2241    test -d "$ac_dir" ||
2242      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2243      continue
2244    ac_builddir=.
2245
2246case "$ac_dir" in
2247.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2248*)
2249  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2250  # A ".." for each directory in $ac_dir_suffix.
2251  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2252  case $ac_top_builddir_sub in
2253  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2254  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2255  esac ;;
2256esac
2257ac_abs_top_builddir=$ac_pwd
2258ac_abs_builddir=$ac_pwd$ac_dir_suffix
2259# for backward compatibility:
2260ac_top_builddir=$ac_top_build_prefix
2261
2262case $srcdir in
2263  .)  # We are building in place.
2264    ac_srcdir=.
2265    ac_top_srcdir=$ac_top_builddir_sub
2266    ac_abs_top_srcdir=$ac_pwd ;;
2267  [\\/]* | ?:[\\/]* )  # Absolute name.
2268    ac_srcdir=$srcdir$ac_dir_suffix;
2269    ac_top_srcdir=$srcdir
2270    ac_abs_top_srcdir=$srcdir ;;
2271  *) # Relative name.
2272    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2273    ac_top_srcdir=$ac_top_build_prefix$srcdir
2274    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2275esac
2276ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2277
2278    cd "$ac_dir" || { ac_status=$?; continue; }
2279    # Check for guested configure.
2280    if test -f "$ac_srcdir/configure.gnu"; then
2281      echo &&
2282      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2283    elif test -f "$ac_srcdir/configure"; then
2284      echo &&
2285      $SHELL "$ac_srcdir/configure" --help=recursive
2286    else
2287      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2288    fi || ac_status=$?
2289    cd "$ac_pwd" || { ac_status=$?; break; }
2290  done
2291fi
2292
2293test -n "$ac_init_help" && exit $ac_status
2294if $ac_init_version; then
2295  cat <<\_ACEOF
2296OpenJDK configure jdk9
2297generated by GNU Autoconf 2.69
2298
2299Copyright (C) 2012 Free Software Foundation, Inc.
2300This configure script is free software; the Free Software Foundation
2301gives unlimited permission to copy, distribute and modify it.
2302_ACEOF
2303  exit
2304fi
2305
2306## ------------------------ ##
2307## Autoconf initialization. ##
2308## ------------------------ ##
2309
2310# ac_fn_c_try_compile LINENO
2311# --------------------------
2312# Try to compile conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_c_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_c_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_c_try_compile
2347
2348# ac_fn_cxx_try_compile LINENO
2349# ----------------------------
2350# Try to compile conftest.$ac_ext, and return whether this succeeded.
2351ac_fn_cxx_try_compile ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  rm -f conftest.$ac_objext
2355  if { { ac_try="$ac_compile"
2356case "(($ac_try" in
2357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2358  *) ac_try_echo=$ac_try;;
2359esac
2360eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2361$as_echo "$ac_try_echo"; } >&5
2362  (eval "$ac_compile") 2>conftest.err
2363  ac_status=$?
2364  if test -s conftest.err; then
2365    grep -v '^ *+' conftest.err >conftest.er1
2366    cat conftest.er1 >&5
2367    mv -f conftest.er1 conftest.err
2368  fi
2369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2370  test $ac_status = 0; } && {
2371	 test -z "$ac_cxx_werror_flag" ||
2372	 test ! -s conftest.err
2373       } && test -s conftest.$ac_objext; then :
2374  ac_retval=0
2375else
2376  $as_echo "$as_me: failed program was:" >&5
2377sed 's/^/| /' conftest.$ac_ext >&5
2378
2379	ac_retval=1
2380fi
2381  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2382  as_fn_set_status $ac_retval
2383
2384} # ac_fn_cxx_try_compile
2385
2386# ac_fn_c_try_cpp LINENO
2387# ----------------------
2388# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2389ac_fn_c_try_cpp ()
2390{
2391  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392  if { { ac_try="$ac_cpp conftest.$ac_ext"
2393case "(($ac_try" in
2394  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2395  *) ac_try_echo=$ac_try;;
2396esac
2397eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2398$as_echo "$ac_try_echo"; } >&5
2399  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2400  ac_status=$?
2401  if test -s conftest.err; then
2402    grep -v '^ *+' conftest.err >conftest.er1
2403    cat conftest.er1 >&5
2404    mv -f conftest.er1 conftest.err
2405  fi
2406  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2407  test $ac_status = 0; } > conftest.i && {
2408	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2409	 test ! -s conftest.err
2410       }; then :
2411  ac_retval=0
2412else
2413  $as_echo "$as_me: failed program was:" >&5
2414sed 's/^/| /' conftest.$ac_ext >&5
2415
2416    ac_retval=1
2417fi
2418  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419  as_fn_set_status $ac_retval
2420
2421} # ac_fn_c_try_cpp
2422
2423# ac_fn_cxx_try_cpp LINENO
2424# ------------------------
2425# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2426ac_fn_cxx_try_cpp ()
2427{
2428  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429  if { { ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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; } > conftest.i && {
2445	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2446	 test ! -s conftest.err
2447       }; then :
2448  ac_retval=0
2449else
2450  $as_echo "$as_me: failed program was:" >&5
2451sed 's/^/| /' conftest.$ac_ext >&5
2452
2453    ac_retval=1
2454fi
2455  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456  as_fn_set_status $ac_retval
2457
2458} # ac_fn_cxx_try_cpp
2459
2460# ac_fn_c_try_link LINENO
2461# -----------------------
2462# Try to link conftest.$ac_ext, and return whether this succeeded.
2463ac_fn_c_try_link ()
2464{
2465  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2466  rm -f conftest.$ac_objext conftest$ac_exeext
2467  if { { ac_try="$ac_link"
2468case "(($ac_try" in
2469  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2470  *) ac_try_echo=$ac_try;;
2471esac
2472eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2473$as_echo "$ac_try_echo"; } >&5
2474  (eval "$ac_link") 2>conftest.err
2475  ac_status=$?
2476  if test -s conftest.err; then
2477    grep -v '^ *+' conftest.err >conftest.er1
2478    cat conftest.er1 >&5
2479    mv -f conftest.er1 conftest.err
2480  fi
2481  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2482  test $ac_status = 0; } && {
2483	 test -z "$ac_c_werror_flag" ||
2484	 test ! -s conftest.err
2485       } && test -s conftest$ac_exeext && {
2486	 test "$cross_compiling" = yes ||
2487	 test -x conftest$ac_exeext
2488       }; then :
2489  ac_retval=0
2490else
2491  $as_echo "$as_me: failed program was:" >&5
2492sed 's/^/| /' conftest.$ac_ext >&5
2493
2494	ac_retval=1
2495fi
2496  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2497  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2498  # interfere with the next link command; also delete a directory that is
2499  # left behind by Apple's compiler.  We do this before executing the actions.
2500  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502  as_fn_set_status $ac_retval
2503
2504} # ac_fn_c_try_link
2505
2506# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2507# ---------------------------------------------------------
2508# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2509# the include files in INCLUDES and setting the cache variable VAR
2510# accordingly.
2511ac_fn_cxx_check_header_mongrel ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  if eval \${$3+:} false; then :
2515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2516$as_echo_n "checking for $2... " >&6; }
2517if eval \${$3+:} false; then :
2518  $as_echo_n "(cached) " >&6
2519fi
2520eval ac_res=\$$3
2521	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2522$as_echo "$ac_res" >&6; }
2523else
2524  # Is the header compilable?
2525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2526$as_echo_n "checking $2 usability... " >&6; }
2527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2528/* end confdefs.h.  */
2529$4
2530#include <$2>
2531_ACEOF
2532if ac_fn_cxx_try_compile "$LINENO"; then :
2533  ac_header_compiler=yes
2534else
2535  ac_header_compiler=no
2536fi
2537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2539$as_echo "$ac_header_compiler" >&6; }
2540
2541# Is the header present?
2542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2543$as_echo_n "checking $2 presence... " >&6; }
2544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2545/* end confdefs.h.  */
2546#include <$2>
2547_ACEOF
2548if ac_fn_cxx_try_cpp "$LINENO"; then :
2549  ac_header_preproc=yes
2550else
2551  ac_header_preproc=no
2552fi
2553rm -f conftest.err conftest.i conftest.$ac_ext
2554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2555$as_echo "$ac_header_preproc" >&6; }
2556
2557# So?  What about this header?
2558case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2559  yes:no: )
2560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2561$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2562    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2563$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2564    ;;
2565  no:yes:* )
2566    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2567$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2568    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2569$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2570    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2571$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2572    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2573$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2574    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2575$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2576( $as_echo "## ----------------------------------------- ##
2577## Report this to build-dev@openjdk.java.net ##
2578## ----------------------------------------- ##"
2579     ) | sed "s/^/$as_me: WARNING:     /" >&2
2580    ;;
2581esac
2582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2583$as_echo_n "checking for $2... " >&6; }
2584if eval \${$3+:} false; then :
2585  $as_echo_n "(cached) " >&6
2586else
2587  eval "$3=\$ac_header_compiler"
2588fi
2589eval ac_res=\$$3
2590	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2591$as_echo "$ac_res" >&6; }
2592fi
2593  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594
2595} # ac_fn_cxx_check_header_mongrel
2596
2597# ac_fn_cxx_try_run LINENO
2598# ------------------------
2599# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2600# that executables *can* be run.
2601ac_fn_cxx_try_run ()
2602{
2603  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2604  if { { ac_try="$ac_link"
2605case "(($ac_try" in
2606  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2607  *) ac_try_echo=$ac_try;;
2608esac
2609eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2610$as_echo "$ac_try_echo"; } >&5
2611  (eval "$ac_link") 2>&5
2612  ac_status=$?
2613  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2614  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2615  { { case "(($ac_try" in
2616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2617  *) ac_try_echo=$ac_try;;
2618esac
2619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2620$as_echo "$ac_try_echo"; } >&5
2621  (eval "$ac_try") 2>&5
2622  ac_status=$?
2623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2624  test $ac_status = 0; }; }; then :
2625  ac_retval=0
2626else
2627  $as_echo "$as_me: program exited with status $ac_status" >&5
2628       $as_echo "$as_me: failed program was:" >&5
2629sed 's/^/| /' conftest.$ac_ext >&5
2630
2631       ac_retval=$ac_status
2632fi
2633  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2634  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2635  as_fn_set_status $ac_retval
2636
2637} # ac_fn_cxx_try_run
2638
2639# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2640# ---------------------------------------------------------
2641# Tests whether HEADER exists and can be compiled using the include files in
2642# INCLUDES, setting the cache variable VAR accordingly.
2643ac_fn_cxx_check_header_compile ()
2644{
2645  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2647$as_echo_n "checking for $2... " >&6; }
2648if eval \${$3+:} false; then :
2649  $as_echo_n "(cached) " >&6
2650else
2651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2652/* end confdefs.h.  */
2653$4
2654#include <$2>
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  eval "$3=yes"
2658else
2659  eval "$3=no"
2660fi
2661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662fi
2663eval ac_res=\$$3
2664	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2665$as_echo "$ac_res" >&6; }
2666  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2667
2668} # ac_fn_cxx_check_header_compile
2669
2670# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2671# ----------------------------------------------
2672# Tries to find the compile-time value of EXPR in a program that includes
2673# INCLUDES, setting VAR accordingly. Returns whether the value could be
2674# computed
2675ac_fn_cxx_compute_int ()
2676{
2677  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2678  if test "$cross_compiling" = yes; then
2679    # Depending upon the size, compute the lo and hi bounds.
2680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2681/* end confdefs.h.  */
2682$4
2683int
2684main ()
2685{
2686static int test_array [1 - 2 * !(($2) >= 0)];
2687test_array [0] = 0;
2688return test_array [0];
2689
2690  ;
2691  return 0;
2692}
2693_ACEOF
2694if ac_fn_cxx_try_compile "$LINENO"; then :
2695  ac_lo=0 ac_mid=0
2696  while :; do
2697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2698/* end confdefs.h.  */
2699$4
2700int
2701main ()
2702{
2703static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2704test_array [0] = 0;
2705return test_array [0];
2706
2707  ;
2708  return 0;
2709}
2710_ACEOF
2711if ac_fn_cxx_try_compile "$LINENO"; then :
2712  ac_hi=$ac_mid; break
2713else
2714  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2715			if test $ac_lo -le $ac_mid; then
2716			  ac_lo= ac_hi=
2717			  break
2718			fi
2719			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2720fi
2721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2722  done
2723else
2724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2725/* end confdefs.h.  */
2726$4
2727int
2728main ()
2729{
2730static int test_array [1 - 2 * !(($2) < 0)];
2731test_array [0] = 0;
2732return test_array [0];
2733
2734  ;
2735  return 0;
2736}
2737_ACEOF
2738if ac_fn_cxx_try_compile "$LINENO"; then :
2739  ac_hi=-1 ac_mid=-1
2740  while :; do
2741    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2742/* end confdefs.h.  */
2743$4
2744int
2745main ()
2746{
2747static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2748test_array [0] = 0;
2749return test_array [0];
2750
2751  ;
2752  return 0;
2753}
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  ac_lo=$ac_mid; break
2757else
2758  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2759			if test $ac_mid -le $ac_hi; then
2760			  ac_lo= ac_hi=
2761			  break
2762			fi
2763			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2764fi
2765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2766  done
2767else
2768  ac_lo= ac_hi=
2769fi
2770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2771fi
2772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2773# Binary search between lo and hi bounds.
2774while test "x$ac_lo" != "x$ac_hi"; do
2775  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2777/* end confdefs.h.  */
2778$4
2779int
2780main ()
2781{
2782static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2783test_array [0] = 0;
2784return test_array [0];
2785
2786  ;
2787  return 0;
2788}
2789_ACEOF
2790if ac_fn_cxx_try_compile "$LINENO"; then :
2791  ac_hi=$ac_mid
2792else
2793  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2794fi
2795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2796done
2797case $ac_lo in #((
2798?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2799'') ac_retval=1 ;;
2800esac
2801  else
2802    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2803/* end confdefs.h.  */
2804$4
2805static long int longval () { return $2; }
2806static unsigned long int ulongval () { return $2; }
2807#include <stdio.h>
2808#include <stdlib.h>
2809int
2810main ()
2811{
2812
2813  FILE *f = fopen ("conftest.val", "w");
2814  if (! f)
2815    return 1;
2816  if (($2) < 0)
2817    {
2818      long int i = longval ();
2819      if (i != ($2))
2820	return 1;
2821      fprintf (f, "%ld", i);
2822    }
2823  else
2824    {
2825      unsigned long int i = ulongval ();
2826      if (i != ($2))
2827	return 1;
2828      fprintf (f, "%lu", i);
2829    }
2830  /* Do not output a trailing newline, as this causes \r\n confusion
2831     on some platforms.  */
2832  return ferror (f) || fclose (f) != 0;
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_run "$LINENO"; then :
2839  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2840else
2841  ac_retval=1
2842fi
2843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2844  conftest.$ac_objext conftest.beam conftest.$ac_ext
2845rm -f conftest.val
2846
2847  fi
2848  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2849  as_fn_set_status $ac_retval
2850
2851} # ac_fn_cxx_compute_int
2852
2853# ac_fn_cxx_try_link LINENO
2854# -------------------------
2855# Try to link conftest.$ac_ext, and return whether this succeeded.
2856ac_fn_cxx_try_link ()
2857{
2858  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2859  rm -f conftest.$ac_objext conftest$ac_exeext
2860  if { { ac_try="$ac_link"
2861case "(($ac_try" in
2862  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2863  *) ac_try_echo=$ac_try;;
2864esac
2865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2866$as_echo "$ac_try_echo"; } >&5
2867  (eval "$ac_link") 2>conftest.err
2868  ac_status=$?
2869  if test -s conftest.err; then
2870    grep -v '^ *+' conftest.err >conftest.er1
2871    cat conftest.er1 >&5
2872    mv -f conftest.er1 conftest.err
2873  fi
2874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2875  test $ac_status = 0; } && {
2876	 test -z "$ac_cxx_werror_flag" ||
2877	 test ! -s conftest.err
2878       } && test -s conftest$ac_exeext && {
2879	 test "$cross_compiling" = yes ||
2880	 test -x conftest$ac_exeext
2881       }; then :
2882  ac_retval=0
2883else
2884  $as_echo "$as_me: failed program was:" >&5
2885sed 's/^/| /' conftest.$ac_ext >&5
2886
2887	ac_retval=1
2888fi
2889  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2890  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2891  # interfere with the next link command; also delete a directory that is
2892  # left behind by Apple's compiler.  We do this before executing the actions.
2893  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2894  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2895  as_fn_set_status $ac_retval
2896
2897} # ac_fn_cxx_try_link
2898
2899# ac_fn_cxx_check_func LINENO FUNC VAR
2900# ------------------------------------
2901# Tests whether FUNC exists, setting the cache variable VAR accordingly
2902ac_fn_cxx_check_func ()
2903{
2904  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2906$as_echo_n "checking for $2... " >&6; }
2907if eval \${$3+:} false; then :
2908  $as_echo_n "(cached) " >&6
2909else
2910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2911/* end confdefs.h.  */
2912/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2913   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2914#define $2 innocuous_$2
2915
2916/* System header to define __stub macros and hopefully few prototypes,
2917    which can conflict with char $2 (); below.
2918    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2919    <limits.h> exists even on freestanding compilers.  */
2920
2921#ifdef __STDC__
2922# include <limits.h>
2923#else
2924# include <assert.h>
2925#endif
2926
2927#undef $2
2928
2929/* Override any GCC internal prototype to avoid an error.
2930   Use char because int might match the return type of a GCC
2931   builtin and then its argument prototype would still apply.  */
2932#ifdef __cplusplus
2933extern "C"
2934#endif
2935char $2 ();
2936/* The GNU C library defines this for functions which it implements
2937    to always fail with ENOSYS.  Some functions are actually named
2938    something starting with __ and the normal name is an alias.  */
2939#if defined __stub_$2 || defined __stub___$2
2940choke me
2941#endif
2942
2943int
2944main ()
2945{
2946return $2 ();
2947  ;
2948  return 0;
2949}
2950_ACEOF
2951if ac_fn_cxx_try_link "$LINENO"; then :
2952  eval "$3=yes"
2953else
2954  eval "$3=no"
2955fi
2956rm -f core conftest.err conftest.$ac_objext \
2957    conftest$ac_exeext conftest.$ac_ext
2958fi
2959eval ac_res=\$$3
2960	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2961$as_echo "$ac_res" >&6; }
2962  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2963
2964} # ac_fn_cxx_check_func
2965
2966# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2967# -------------------------------------------------------
2968# Tests whether HEADER exists and can be compiled using the include files in
2969# INCLUDES, setting the cache variable VAR accordingly.
2970ac_fn_c_check_header_compile ()
2971{
2972  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2974$as_echo_n "checking for $2... " >&6; }
2975if eval \${$3+:} false; then :
2976  $as_echo_n "(cached) " >&6
2977else
2978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2979/* end confdefs.h.  */
2980$4
2981#include <$2>
2982_ACEOF
2983if ac_fn_c_try_compile "$LINENO"; then :
2984  eval "$3=yes"
2985else
2986  eval "$3=no"
2987fi
2988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2989fi
2990eval ac_res=\$$3
2991	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2992$as_echo "$ac_res" >&6; }
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994
2995} # ac_fn_c_check_header_compile
2996cat >config.log <<_ACEOF
2997This file contains any messages produced by compilers while
2998running configure, to aid debugging if configure makes a mistake.
2999
3000It was created by OpenJDK $as_me jdk9, which was
3001generated by GNU Autoconf 2.69.  Invocation command line was
3002
3003  $ $0 $@
3004
3005_ACEOF
3006exec 5>>config.log
3007{
3008cat <<_ASUNAME
3009## --------- ##
3010## Platform. ##
3011## --------- ##
3012
3013hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3014uname -m = `(uname -m) 2>/dev/null || echo unknown`
3015uname -r = `(uname -r) 2>/dev/null || echo unknown`
3016uname -s = `(uname -s) 2>/dev/null || echo unknown`
3017uname -v = `(uname -v) 2>/dev/null || echo unknown`
3018
3019/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3020/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3021
3022/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3023/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3024/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3025/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3026/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3027/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3028/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3029
3030_ASUNAME
3031
3032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3033for as_dir in $PATH
3034do
3035  IFS=$as_save_IFS
3036  test -z "$as_dir" && as_dir=.
3037    $as_echo "PATH: $as_dir"
3038  done
3039IFS=$as_save_IFS
3040
3041} >&5
3042
3043cat >&5 <<_ACEOF
3044
3045
3046## ----------- ##
3047## Core tests. ##
3048## ----------- ##
3049
3050_ACEOF
3051
3052
3053# Keep a trace of the command line.
3054# Strip out --no-create and --no-recursion so they do not pile up.
3055# Strip out --silent because we don't want to record it for future runs.
3056# Also quote any args containing shell meta-characters.
3057# Make two passes to allow for proper duplicate-argument suppression.
3058ac_configure_args=
3059ac_configure_args0=
3060ac_configure_args1=
3061ac_must_keep_next=false
3062for ac_pass in 1 2
3063do
3064  for ac_arg
3065  do
3066    case $ac_arg in
3067    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3068    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3069    | -silent | --silent | --silen | --sile | --sil)
3070      continue ;;
3071    *\'*)
3072      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3073    esac
3074    case $ac_pass in
3075    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3076    2)
3077      as_fn_append ac_configure_args1 " '$ac_arg'"
3078      if test $ac_must_keep_next = true; then
3079	ac_must_keep_next=false # Got value, back to normal.
3080      else
3081	case $ac_arg in
3082	  *=* | --config-cache | -C | -disable-* | --disable-* \
3083	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3084	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3085	  | -with-* | --with-* | -without-* | --without-* | --x)
3086	    case "$ac_configure_args0 " in
3087	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3088	    esac
3089	    ;;
3090	  -* ) ac_must_keep_next=true ;;
3091	esac
3092      fi
3093      as_fn_append ac_configure_args " '$ac_arg'"
3094      ;;
3095    esac
3096  done
3097done
3098{ ac_configure_args0=; unset ac_configure_args0;}
3099{ ac_configure_args1=; unset ac_configure_args1;}
3100
3101# When interrupted or exit'd, cleanup temporary files, and complete
3102# config.log.  We remove comments because anyway the quotes in there
3103# would cause problems or look ugly.
3104# WARNING: Use '\'' to represent an apostrophe within the trap.
3105# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3106trap 'exit_status=$?
3107  # Save into config.log some information that might help in debugging.
3108  {
3109    echo
3110
3111    $as_echo "## ---------------- ##
3112## Cache variables. ##
3113## ---------------- ##"
3114    echo
3115    # The following way of writing the cache mishandles newlines in values,
3116(
3117  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3118    eval ac_val=\$$ac_var
3119    case $ac_val in #(
3120    *${as_nl}*)
3121      case $ac_var in #(
3122      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3123$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3124      esac
3125      case $ac_var in #(
3126      _ | IFS | as_nl) ;; #(
3127      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3128      *) { eval $ac_var=; unset $ac_var;} ;;
3129      esac ;;
3130    esac
3131  done
3132  (set) 2>&1 |
3133    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3134    *${as_nl}ac_space=\ *)
3135      sed -n \
3136	"s/'\''/'\''\\\\'\'''\''/g;
3137	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3138      ;; #(
3139    *)
3140      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3141      ;;
3142    esac |
3143    sort
3144)
3145    echo
3146
3147    $as_echo "## ----------------- ##
3148## Output variables. ##
3149## ----------------- ##"
3150    echo
3151    for ac_var in $ac_subst_vars
3152    do
3153      eval ac_val=\$$ac_var
3154      case $ac_val in
3155      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3156      esac
3157      $as_echo "$ac_var='\''$ac_val'\''"
3158    done | sort
3159    echo
3160
3161    if test -n "$ac_subst_files"; then
3162      $as_echo "## ------------------- ##
3163## File substitutions. ##
3164## ------------------- ##"
3165      echo
3166      for ac_var in $ac_subst_files
3167      do
3168	eval ac_val=\$$ac_var
3169	case $ac_val in
3170	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3171	esac
3172	$as_echo "$ac_var='\''$ac_val'\''"
3173      done | sort
3174      echo
3175    fi
3176
3177    if test -s confdefs.h; then
3178      $as_echo "## ----------- ##
3179## confdefs.h. ##
3180## ----------- ##"
3181      echo
3182      cat confdefs.h
3183      echo
3184    fi
3185    test "$ac_signal" != 0 &&
3186      $as_echo "$as_me: caught signal $ac_signal"
3187    $as_echo "$as_me: exit $exit_status"
3188  } >&5
3189  rm -f core *.core core.conftest.* &&
3190    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3191    exit $exit_status
3192' 0
3193for ac_signal in 1 2 13 15; do
3194  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3195done
3196ac_signal=0
3197
3198# confdefs.h avoids OS command line length limits that DEFS can exceed.
3199rm -f -r conftest* confdefs.h
3200
3201$as_echo "/* confdefs.h */" > confdefs.h
3202
3203# Predefined preprocessor variables.
3204
3205cat >>confdefs.h <<_ACEOF
3206#define PACKAGE_NAME "$PACKAGE_NAME"
3207_ACEOF
3208
3209cat >>confdefs.h <<_ACEOF
3210#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3211_ACEOF
3212
3213cat >>confdefs.h <<_ACEOF
3214#define PACKAGE_VERSION "$PACKAGE_VERSION"
3215_ACEOF
3216
3217cat >>confdefs.h <<_ACEOF
3218#define PACKAGE_STRING "$PACKAGE_STRING"
3219_ACEOF
3220
3221cat >>confdefs.h <<_ACEOF
3222#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3223_ACEOF
3224
3225cat >>confdefs.h <<_ACEOF
3226#define PACKAGE_URL "$PACKAGE_URL"
3227_ACEOF
3228
3229
3230# Let the site file select an alternate cache file if it wants to.
3231# Prefer an explicitly selected file to automatically selected ones.
3232ac_site_file1=NONE
3233ac_site_file2=NONE
3234if test -n "$CONFIG_SITE"; then
3235  # We do not want a PATH search for config.site.
3236  case $CONFIG_SITE in #((
3237    -*)  ac_site_file1=./$CONFIG_SITE;;
3238    */*) ac_site_file1=$CONFIG_SITE;;
3239    *)   ac_site_file1=./$CONFIG_SITE;;
3240  esac
3241elif test "x$prefix" != xNONE; then
3242  ac_site_file1=$prefix/share/config.site
3243  ac_site_file2=$prefix/etc/config.site
3244else
3245  ac_site_file1=$ac_default_prefix/share/config.site
3246  ac_site_file2=$ac_default_prefix/etc/config.site
3247fi
3248for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3249do
3250  test "x$ac_site_file" = xNONE && continue
3251  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3252    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3253$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3254    sed 's/^/| /' "$ac_site_file" >&5
3255    . "$ac_site_file" \
3256      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3258as_fn_error $? "failed to load site script $ac_site_file
3259See \`config.log' for more details" "$LINENO" 5; }
3260  fi
3261done
3262
3263if test -r "$cache_file"; then
3264  # Some versions of bash will fail to source /dev/null (special files
3265  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3266  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3267    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3268$as_echo "$as_me: loading cache $cache_file" >&6;}
3269    case $cache_file in
3270      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3271      *)                      . "./$cache_file";;
3272    esac
3273  fi
3274else
3275  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3276$as_echo "$as_me: creating cache $cache_file" >&6;}
3277  >$cache_file
3278fi
3279
3280# Check that the precious variables saved in the cache have kept the same
3281# value.
3282ac_cache_corrupted=false
3283for ac_var in $ac_precious_vars; do
3284  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3285  eval ac_new_set=\$ac_env_${ac_var}_set
3286  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3287  eval ac_new_val=\$ac_env_${ac_var}_value
3288  case $ac_old_set,$ac_new_set in
3289    set,)
3290      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3291$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3292      ac_cache_corrupted=: ;;
3293    ,set)
3294      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3295$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3296      ac_cache_corrupted=: ;;
3297    ,);;
3298    *)
3299      if test "x$ac_old_val" != "x$ac_new_val"; then
3300	# differences in whitespace do not lead to failure.
3301	ac_old_val_w=`echo x $ac_old_val`
3302	ac_new_val_w=`echo x $ac_new_val`
3303	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3304	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3305$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3306	  ac_cache_corrupted=:
3307	else
3308	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3309$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3310	  eval $ac_var=\$ac_old_val
3311	fi
3312	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3313$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3314	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3315$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3316      fi;;
3317  esac
3318  # Pass precious variables to config.status.
3319  if test "$ac_new_set" = set; then
3320    case $ac_new_val in
3321    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3322    *) ac_arg=$ac_var=$ac_new_val ;;
3323    esac
3324    case " $ac_configure_args " in
3325      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3326      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3327    esac
3328  fi
3329done
3330if $ac_cache_corrupted; then
3331  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3334$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3335  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3336fi
3337## -------------------- ##
3338## Main body of script. ##
3339## -------------------- ##
3340
3341ac_ext=c
3342ac_cpp='$CPP $CPPFLAGS'
3343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3345ac_compiler_gnu=$ac_cv_c_compiler_gnu
3346
3347
3348
3349ac_aux_dir=
3350for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3351  if test -f "$ac_dir/install-sh"; then
3352    ac_aux_dir=$ac_dir
3353    ac_install_sh="$ac_aux_dir/install-sh -c"
3354    break
3355  elif test -f "$ac_dir/install.sh"; then
3356    ac_aux_dir=$ac_dir
3357    ac_install_sh="$ac_aux_dir/install.sh -c"
3358    break
3359  elif test -f "$ac_dir/shtool"; then
3360    ac_aux_dir=$ac_dir
3361    ac_install_sh="$ac_aux_dir/shtool install -c"
3362    break
3363  fi
3364done
3365if test -z "$ac_aux_dir"; then
3366  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
3367fi
3368
3369# These three variables are undocumented and unsupported,
3370# and are intended to be withdrawn in a future Autoconf release.
3371# They can cause serious problems if a builder's source tree is in a directory
3372# whose full name contains unusual characters.
3373ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3374ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3375ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3376
3377
3378# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3379
3380#
3381# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3383#
3384# This code is free software; you can redistribute it and/or modify it
3385# under the terms of the GNU General Public License version 2 only, as
3386# published by the Free Software Foundation.  Oracle designates this
3387# particular file as subject to the "Classpath" exception as provided
3388# by Oracle in the LICENSE file that accompanied this code.
3389#
3390# This code is distributed in the hope that it will be useful, but WITHOUT
3391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3393# version 2 for more details (a copy is included in the LICENSE file that
3394# accompanied this code).
3395#
3396# You should have received a copy of the GNU General Public License version
3397# 2 along with this work; if not, write to the Free Software Foundation,
3398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3399#
3400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3401# or visit www.oracle.com if you need additional information or have any
3402# questions.
3403#
3404
3405#
3406# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3407#
3408# This program is free software; you can redistribute it and/or modify
3409# it under the terms of the GNU General Public License as published by
3410# the Free Software Foundation; either version 2 of the License, or
3411# (at your option) any later version.
3412#
3413# This program is distributed in the hope that it will be useful, but
3414# WITHOUT ANY WARRANTY; without even the implied warranty of
3415# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3416# General Public License for more details.
3417#
3418# You should have received a copy of the GNU General Public License
3419# along with this program; if not, write to the Free Software
3420# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3421#
3422# As a special exception to the GNU General Public License, if you
3423# distribute this file as part of a program that contains a
3424# configuration script generated by Autoconf, you may include it under
3425# the same distribution terms that you use for the rest of that program.
3426
3427# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3428# ----------------------------------
3429# PKG_PROG_PKG_CONFIG
3430
3431# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3432#
3433# Check to see whether a particular set of modules exists.  Similar
3434# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3435#
3436#
3437# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3438# this or PKG_CHECK_MODULES is called, or make sure to call
3439# PKG_CHECK_EXISTS manually
3440# --------------------------------------------------------------
3441
3442
3443
3444# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3445# ---------------------------------------------
3446# _PKG_CONFIG
3447
3448# _PKG_SHORT_ERRORS_SUPPORTED
3449# -----------------------------
3450# _PKG_SHORT_ERRORS_SUPPORTED
3451
3452
3453# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3454# [ACTION-IF-NOT-FOUND])
3455#
3456#
3457# Note that if there is a possibility the first call to
3458# PKG_CHECK_MODULES might not happen, you should be sure to include an
3459# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3460#
3461#
3462# --------------------------------------------------------------
3463# PKG_CHECK_MODULES
3464
3465
3466# Include these first...
3467#
3468# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3469# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3470#
3471# This code is free software; you can redistribute it and/or modify it
3472# under the terms of the GNU General Public License version 2 only, as
3473# published by the Free Software Foundation.  Oracle designates this
3474# particular file as subject to the "Classpath" exception as provided
3475# by Oracle in the LICENSE file that accompanied this code.
3476#
3477# This code is distributed in the hope that it will be useful, but WITHOUT
3478# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3479# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3480# version 2 for more details (a copy is included in the LICENSE file that
3481# accompanied this code).
3482#
3483# You should have received a copy of the GNU General Public License version
3484# 2 along with this work; if not, write to the Free Software Foundation,
3485# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3486#
3487# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3488# or visit www.oracle.com if you need additional information or have any
3489# questions.
3490#
3491
3492# Create a function/macro that takes a series of named arguments. The call is
3493# similar to AC_DEFUN, but the setup of the function looks like this:
3494# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3495# ... do something
3496#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3497# ])
3498# A star (*) in front of a named argument means that it is required and it's
3499# presence will be verified. To pass e.g. the first value as a normal indexed
3500# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3501# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3502# "ARG_FOO".
3503#
3504# The generated function can be called like this:
3505# MYFUNC(FOO: [foo-val],
3506#     BAR: [
3507#         $ECHO hello world
3508#     ])
3509# Note that the argument value must start on the same line as the argument name.
3510#
3511# Argument 1: Name of the function to define
3512# Argument 2: List of legal named arguments, with a * prefix for required arguments
3513# Argument 3: Argument array to treat as named, typically $@
3514# Argument 4: The main function body
3515
3516
3517# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3518# If so, then append $1 to $2 \
3519# Also set JVM_ARG_OK to true/false depending on outcome.
3520
3521
3522# Appends a string to a path variable, only adding the : when needed.
3523
3524
3525# Prepends a string to a path variable, only adding the : when needed.
3526
3527
3528# This will make sure the given variable points to a full and proper
3529# path. This means:
3530# 1) There will be no spaces in the path. On unix platforms,
3531#    spaces in the path will result in an error. On Windows,
3532#    the path will be rewritten using short-style to be space-free.
3533# 2) The path will be absolute, and it will be in unix-style (on
3534#     cygwin).
3535# $1: The name of the variable to fix
3536
3537
3538# This will make sure the given variable points to a executable
3539# with a full and proper path. This means:
3540# 1) There will be no spaces in the path. On unix platforms,
3541#    spaces in the path will result in an error. On Windows,
3542#    the path will be rewritten using short-style to be space-free.
3543# 2) The path will be absolute, and it will be in unix-style (on
3544#     cygwin).
3545# Any arguments given to the executable is preserved.
3546# If the input variable does not have a directory specification, then
3547# it need to be in the PATH.
3548# $1: The name of the variable to fix
3549
3550
3551
3552
3553# Register a --with argument but mark it as deprecated
3554# $1: The name of the with argument to deprecate, not including --with-
3555
3556
3557# Register a --enable argument but mark it as deprecated
3558# $1: The name of the with argument to deprecate, not including --enable-
3559# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3560# $3: Messages to user.
3561
3562
3563
3564
3565# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3566# $1: variable to check
3567
3568
3569# Check that there are no unprocessed overridden variables left.
3570# If so, they are an incorrect argument and we will exit with an error.
3571
3572
3573# Setup a tool for the given variable. If correctly specified by the user,
3574# use that value, otherwise search for the tool using the supplied code snippet.
3575# $1: variable to set
3576# $2: code snippet to call to look for the tool
3577# $3: code snippet to call if variable was used to find tool
3578
3579
3580# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3581# $1: variable to set
3582# $2: executable name (or list of names) to look for
3583
3584
3585# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3586# $1: variable to set
3587# $2: executable name (or list of names) to look for
3588
3589
3590# Like BASIC_PATH_PROGS but fails if no tool was found.
3591# $1: variable to set
3592# $2: executable name (or list of names) to look for
3593
3594
3595# Like BASIC_SETUP_TOOL but fails if no tool was found.
3596# $1: variable to set
3597# $2: autoconf macro to call to look for the special tool
3598
3599
3600# Setup the most fundamental tools that relies on not much else to set up,
3601# but is used by much of the early bootstrap code.
3602
3603
3604# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3605
3606
3607# Evaluates platform specific overrides for devkit variables.
3608# $1: Name of variable
3609
3610
3611
3612
3613
3614
3615#%%% Simple tools %%%
3616
3617# Check if we have found a usable version of make
3618# $1: the path to a potential make binary (or empty)
3619# $2: the description on how we found this
3620
3621
3622
3623
3624# Goes looking for a usable version of GNU make.
3625
3626
3627
3628
3629
3630
3631# Check if build directory is on local disk. If not possible to determine,
3632# we prefer to claim it's local.
3633# Argument 1: directory to test
3634# Argument 2: what to do if it is on local disk
3635# Argument 3: what to do otherwise (remote disk or failure)
3636
3637
3638# Check that source files have basic read permissions set. This might
3639# not be the case in cygwin in certain conditions.
3640
3641
3642
3643
3644# Check for support for specific options in bash
3645
3646
3647################################################################################
3648#
3649# Default make target
3650#
3651
3652
3653# Code to run after AC_OUTPUT
3654
3655
3656#
3657# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3659#
3660# This code is free software; you can redistribute it and/or modify it
3661# under the terms of the GNU General Public License version 2 only, as
3662# published by the Free Software Foundation.  Oracle designates this
3663# particular file as subject to the "Classpath" exception as provided
3664# by Oracle in the LICENSE file that accompanied this code.
3665#
3666# This code is distributed in the hope that it will be useful, but WITHOUT
3667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3669# version 2 for more details (a copy is included in the LICENSE file that
3670# accompanied this code).
3671#
3672# You should have received a copy of the GNU General Public License version
3673# 2 along with this work; if not, write to the Free Software Foundation,
3674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3675#
3676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3677# or visit www.oracle.com if you need additional information or have any
3678# questions.
3679#
3680
3681
3682
3683
3684
3685# Helper function which possibly converts a path using DOS-style short mode.
3686# If so, the updated path is stored in $new_path.
3687# $1: The path to check
3688
3689
3690# Helper function which possibly converts a path using DOS-style short mode.
3691# If so, the updated path is stored in $new_path.
3692# $1: The path to check
3693
3694
3695# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3696# and could probably be heavily simplified. However, all changes in this
3697# area tend to need lot of testing in different scenarios, and in lack of
3698# proper unit testing, cleaning this up has not been deemed worth the effort
3699# at the moment.
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3710
3711
3712
3713
3714# ... then the rest
3715#
3716# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3717# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3718#
3719# This code is free software; you can redistribute it and/or modify it
3720# under the terms of the GNU General Public License version 2 only, as
3721# published by the Free Software Foundation.  Oracle designates this
3722# particular file as subject to the "Classpath" exception as provided
3723# by Oracle in the LICENSE file that accompanied this code.
3724#
3725# This code is distributed in the hope that it will be useful, but WITHOUT
3726# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3727# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3728# version 2 for more details (a copy is included in the LICENSE file that
3729# accompanied this code).
3730#
3731# You should have received a copy of the GNU General Public License version
3732# 2 along with this work; if not, write to the Free Software Foundation,
3733# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3734#
3735# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3736# or visit www.oracle.com if you need additional information or have any
3737# questions.
3738#
3739
3740########################################################################
3741# This file handles detection of the Boot JDK. The Boot JDK detection
3742# process has been developed as a response to solve a complex real-world
3743# problem. Initially, it was simple, but it has grown as platform after
3744# platform, idiosyncracy after idiosyncracy has been supported.
3745#
3746# The basic idea is this:
3747# 1) You need an acceptable *) JDK to use as a Boot JDK
3748# 2) There are several ways to locate a JDK, that are mostly platform
3749#    dependent **)
3750# 3) You can have multiple JDKs installed
3751# 4) If possible, configure should try to dig out an acceptable JDK
3752#    automatically, without having to resort to command-line options
3753#
3754# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3755#     javac) and not a JRE, etc.
3756#
3757# **) On Windows we typically use a well-known path.
3758#     On MacOSX we typically use the tool java_home.
3759#     On Linux we typically find javac in the $PATH, and then follow a
3760#     chain of symlinks that often ends up in a real JDK.
3761#
3762# This leads to the code where we check in different ways to locate a
3763# JDK, and if one is found, check if it is acceptable. If not, we print
3764# our reasons for rejecting it (useful when debugging non-working
3765# configure situations) and continue checking the next one.
3766########################################################################
3767
3768# Execute the check given as argument, and verify the result
3769# If the Boot JDK was previously found, do nothing
3770# $1 A command line (typically autoconf macro) to execute
3771
3772
3773# Test: Is bootjdk explicitely set by command line arguments?
3774
3775
3776# Test: Is $JAVA_HOME set?
3777
3778
3779# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3780
3781
3782# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3783# $1: Argument to the java_home binary (optional)
3784
3785
3786# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3787
3788
3789# Look for a jdk in the given path. If there are multiple, try to select the newest.
3790# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3791# $1 = Path to directory containing jdk installations.
3792# $2 = String to append to the found JDK directory to get the proper JDK home
3793
3794
3795# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3796# environmental variable as base for where to look.
3797# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3798
3799
3800# Test: Is there a JDK installed in default, well-known locations?
3801
3802
3803# Check that a command-line tool in the Boot JDK is correct
3804# $1 = name of variable to assign
3805# $2 = name of binary
3806
3807
3808###############################################################################
3809#
3810# We need a Boot JDK to bootstrap the build.
3811#
3812
3813
3814
3815
3816
3817# BUILD_JDK: the location of the latest JDK that can run
3818#   on the host system and supports the target class file version
3819#   generated in this JDK build.  This variable should only be
3820#   used after the launchers are built.
3821#
3822
3823# Execute the check given as argument, and verify the result.
3824# If the JDK was previously found, do nothing.
3825# $1 A command line (typically autoconf macro) to execute
3826
3827
3828# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3829# is different than the host system doing the build (e.g. cross-compilation),
3830# a special BUILD_JDK is built as part of the build process.  An external
3831# prebuilt BUILD_JDK can also be supplied.
3832
3833
3834#
3835# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3836# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3837#
3838# This code is free software; you can redistribute it and/or modify it
3839# under the terms of the GNU General Public License version 2 only, as
3840# published by the Free Software Foundation.  Oracle designates this
3841# particular file as subject to the "Classpath" exception as provided
3842# by Oracle in the LICENSE file that accompanied this code.
3843#
3844# This code is distributed in the hope that it will be useful, but WITHOUT
3845# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3846# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3847# version 2 for more details (a copy is included in the LICENSE file that
3848# accompanied this code).
3849#
3850# You should have received a copy of the GNU General Public License version
3851# 2 along with this work; if not, write to the Free Software Foundation,
3852# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3853#
3854# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3855# or visit www.oracle.com if you need additional information or have any
3856# questions.
3857#
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875################################################################################
3876#
3877# Runs icecc-create-env once and prints the error if it fails
3878#
3879# $1: arguments to icecc-create-env
3880# $2: log file
3881#
3882
3883
3884################################################################################
3885#
3886# Optionally enable distributed compilation of native code using icecc/icecream
3887#
3888
3889
3890
3891
3892
3893
3894
3895#
3896# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3897# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3898#
3899# This code is free software; you can redistribute it and/or modify it
3900# under the terms of the GNU General Public License version 2 only, as
3901# published by the Free Software Foundation.  Oracle designates this
3902# particular file as subject to the "Classpath" exception as provided
3903# by Oracle in the LICENSE file that accompanied this code.
3904#
3905# This code is distributed in the hope that it will be useful, but WITHOUT
3906# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3907# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3908# version 2 for more details (a copy is included in the LICENSE file that
3909# accompanied this code).
3910#
3911# You should have received a copy of the GNU General Public License version
3912# 2 along with this work; if not, write to the Free Software Foundation,
3913# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3914#
3915# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3916# or visit www.oracle.com if you need additional information or have any
3917# questions.
3918#
3919
3920# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3921# corresponding configure arguments instead
3922
3923
3924# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3925# that configure can use them while detecting compilers.
3926# TOOLCHAIN_TYPE is available here.
3927# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3928
3929
3930
3931
3932
3933
3934# Documentation on common flags used for solstudio in HIGHEST.
3935#
3936# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3937#          done with care, there are some assumptions below that need to
3938#          be understood about the use of pointers, and IEEE behavior.
3939#
3940# -fns: Use non-standard floating point mode (not IEEE 754)
3941# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3942# -fsingle: Use single precision floating point with 'float'
3943# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3944#   (Source with excessing pointer casting and data access with mixed
3945#    pointer types are not recommended)
3946# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3947#   (If you expect perfect errno behavior, do not use this)
3948# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3949# -xrestrict: Pointer parameters to functions do not overlap
3950#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3951#    If you pass in multiple pointers to the same data, do not use this)
3952# -xlibmil: Inline some library routines
3953#   (If you expect perfect errno behavior, do not use this)
3954# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3955#   (If you expect perfect errno behavior, do not use this)
3956#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3957
3958    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3959    # Bug?
3960    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3961    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3962    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3963    #fi
3964
3965
3966
3967
3968
3969# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3970#                                   IF_FALSE: [RUN-IF-FALSE])
3971# ------------------------------------------------------------
3972# Check that the c and c++ compilers support an argument
3973
3974
3975
3976
3977# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3978#                                   IF_FALSE: [RUN-IF-FALSE])
3979# ------------------------------------------------------------
3980# Check that the linker support an argument
3981
3982
3983
3984
3985
3986
3987#
3988# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012
4013
4014
4015
4016cygwin_help() {
4017  case $1 in
4018    unzip)
4019      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4020      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4021      ;;
4022    zip)
4023      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4024      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4025      ;;
4026    make)
4027      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4028      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4029      ;;
4030    freetype)
4031      HELP_MSG="
4032The freetype library can now be build during the configure process.
4033Download the freetype sources and unpack them into an arbitrary directory:
4034
4035wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4036tar -xzf freetype-2.5.3.tar.gz
4037
4038Then run configure with '--with-freetype-src=<freetype_src>'. This will
4039automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4040builds or into '<freetype_src>/lib32' for 32-bit builds.
4041Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4042and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4043
4044Alternatively you can unpack the sources like this to use the default directory:
4045
4046tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4047      ;;
4048  esac
4049}
4050
4051msys_help() {
4052  PKGHANDLER_COMMAND=""
4053}
4054
4055apt_help() {
4056  case $1 in
4057    reduced)
4058      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4059    devkit)
4060      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4061    openjdk)
4062      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4063    alsa)
4064      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4065    cups)
4066      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4067    freetype)
4068      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4069    ffi)
4070      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4071    x11)
4072      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4073    ccache)
4074      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4075  esac
4076}
4077
4078yum_help() {
4079  case $1 in
4080    devkit)
4081      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4082    openjdk)
4083      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4084    alsa)
4085      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4086    cups)
4087      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4088    freetype)
4089      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4090    x11)
4091      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4092    ccache)
4093      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4094  esac
4095}
4096
4097port_help() {
4098  PKGHANDLER_COMMAND=""
4099}
4100
4101pkgutil_help() {
4102  PKGHANDLER_COMMAND=""
4103}
4104
4105pkgadd_help() {
4106  PKGHANDLER_COMMAND=""
4107}
4108
4109# This function will check if we're called from the "configure" wrapper while
4110# printing --help. If so, we will print out additional information that can
4111# only be extracted within the autoconf script, and then exit. This must be
4112# called at the very beginning in configure.ac.
4113
4114
4115
4116
4117
4118
4119#
4120# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4121# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122#
4123# This code is free software; you can redistribute it and/or modify it
4124# under the terms of the GNU General Public License version 2 only, as
4125# published by the Free Software Foundation.  Oracle designates this
4126# particular file as subject to the "Classpath" exception as provided
4127# by Oracle in the LICENSE file that accompanied this code.
4128#
4129# This code is distributed in the hope that it will be useful, but WITHOUT
4130# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132# version 2 for more details (a copy is included in the LICENSE file that
4133# accompanied this code).
4134#
4135# You should have received a copy of the GNU General Public License version
4136# 2 along with this work; if not, write to the Free Software Foundation,
4137# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138#
4139# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140# or visit www.oracle.com if you need additional information or have any
4141# questions.
4142#
4143
4144###############################################################################
4145# Check which interpreter of the JVM we want to build.
4146# Currently we have:
4147#    template: Template interpreter (the default)
4148#    cpp     : C++ interpreter
4149
4150
4151###############################################################################
4152# Check which variants of the JVM that we want to build.
4153# Currently we have:
4154#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4155#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4156#    minimal1: reduced form of client with optional VM services and features stripped out
4157#    zero: no machine code interpreter, no compiler
4158#    zeroshark: zero interpreter and shark/llvm compiler backend
4159#    core: interpreter only, no compiler (only works on some platforms)
4160
4161
4162
4163###############################################################################
4164# Setup legacy vars/targets and new vars to deal with different debug levels.
4165#
4166#    release: no debug information, all optimizations, no asserts.
4167#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4168#    fastdebug: debug information (-g), all optimizations, all asserts
4169#    slowdebug: debug information (-g), no optimizations, all asserts
4170#
4171
4172
4173
4174
4175
4176
4177#
4178# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4179# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4180#
4181# This code is free software; you can redistribute it and/or modify it
4182# under the terms of the GNU General Public License version 2 only, as
4183# published by the Free Software Foundation.  Oracle designates this
4184# particular file as subject to the "Classpath" exception as provided
4185# by Oracle in the LICENSE file that accompanied this code.
4186#
4187# This code is distributed in the hope that it will be useful, but WITHOUT
4188# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4189# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4190# version 2 for more details (a copy is included in the LICENSE file that
4191# accompanied this code).
4192#
4193# You should have received a copy of the GNU General Public License version
4194# 2 along with this work; if not, write to the Free Software Foundation,
4195# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4196#
4197# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4198# or visit www.oracle.com if you need additional information or have any
4199# questions.
4200#
4201
4202###############################################################################
4203# Check which variant of the JDK that we want to build.
4204# Currently we have:
4205#    normal:   standard edition
4206# but the custom make system may add other variants
4207#
4208# Effectively the JDK variant gives a name to a specific set of
4209# modules to compile into the JDK.
4210
4211
4212###############################################################################
4213# Set the debug level
4214#    release: no debug information, all optimizations, no asserts.
4215#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4216#    fastdebug: debug information (-g), all optimizations, all asserts
4217#    slowdebug: debug information (-g), no optimizations, all asserts
4218
4219
4220###############################################################################
4221#
4222# Should we build only OpenJDK even if closed sources are present?
4223#
4224
4225
4226
4227
4228###############################################################################
4229#
4230# Enable or disable the elliptic curve crypto implementation
4231#
4232
4233
4234
4235
4236################################################################################
4237#
4238# Gcov coverage data for hotspot
4239#
4240
4241
4242################################################################################
4243#
4244# Static build support.  When enabled will generate static
4245# libraries instead of shared libraries for all JDK libs.
4246#
4247
4248
4249################################################################################
4250#
4251# jlink options.
4252# We always keep packaged modules in JDK image.
4253#
4254
4255
4256#
4257# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4258# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4259#
4260# This code is free software; you can redistribute it and/or modify it
4261# under the terms of the GNU General Public License version 2 only, as
4262# published by the Free Software Foundation.  Oracle designates this
4263# particular file as subject to the "Classpath" exception as provided
4264# by Oracle in the LICENSE file that accompanied this code.
4265#
4266# This code is distributed in the hope that it will be useful, but WITHOUT
4267# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4268# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4269# version 2 for more details (a copy is included in the LICENSE file that
4270# accompanied this code).
4271#
4272# You should have received a copy of the GNU General Public License version
4273# 2 along with this work; if not, write to the Free Software Foundation,
4274# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4275#
4276# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4277# or visit www.oracle.com if you need additional information or have any
4278# questions.
4279#
4280
4281###############################################################################
4282#
4283# Setup version numbers
4284#
4285
4286# Verify that a given string represents a valid version number, and assign it
4287# to a variable.
4288
4289# Argument 1: the variable to assign to
4290# Argument 2: the value given by the user
4291
4292
4293
4294
4295#
4296# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4298#
4299# This code is free software; you can redistribute it and/or modify it
4300# under the terms of the GNU General Public License version 2 only, as
4301# published by the Free Software Foundation.  Oracle designates this
4302# particular file as subject to the "Classpath" exception as provided
4303# by Oracle in the LICENSE file that accompanied this code.
4304#
4305# This code is distributed in the hope that it will be useful, but WITHOUT
4306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4308# version 2 for more details (a copy is included in the LICENSE file that
4309# accompanied this code).
4310#
4311# You should have received a copy of the GNU General Public License version
4312# 2 along with this work; if not, write to the Free Software Foundation,
4313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4314#
4315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4316# or visit www.oracle.com if you need additional information or have any
4317# questions.
4318#
4319
4320# Major library component reside in separate files.
4321#
4322# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4323# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4324#
4325# This code is free software; you can redistribute it and/or modify it
4326# under the terms of the GNU General Public License version 2 only, as
4327# published by the Free Software Foundation.  Oracle designates this
4328# particular file as subject to the "Classpath" exception as provided
4329# by Oracle in the LICENSE file that accompanied this code.
4330#
4331# This code is distributed in the hope that it will be useful, but WITHOUT
4332# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4333# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4334# version 2 for more details (a copy is included in the LICENSE file that
4335# accompanied this code).
4336#
4337# You should have received a copy of the GNU General Public License version
4338# 2 along with this work; if not, write to the Free Software Foundation,
4339# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4340#
4341# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4342# or visit www.oracle.com if you need additional information or have any
4343# questions.
4344#
4345
4346################################################################################
4347# Setup alsa (Advanced Linux Sound Architecture)
4348################################################################################
4349
4350
4351#
4352# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4353# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4354#
4355# This code is free software; you can redistribute it and/or modify it
4356# under the terms of the GNU General Public License version 2 only, as
4357# published by the Free Software Foundation.  Oracle designates this
4358# particular file as subject to the "Classpath" exception as provided
4359# by Oracle in the LICENSE file that accompanied this code.
4360#
4361# This code is distributed in the hope that it will be useful, but WITHOUT
4362# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4363# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4364# version 2 for more details (a copy is included in the LICENSE file that
4365# accompanied this code).
4366#
4367# You should have received a copy of the GNU General Public License version
4368# 2 along with this work; if not, write to the Free Software Foundation,
4369# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4370#
4371# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4372# or visit www.oracle.com if you need additional information or have any
4373# questions.
4374#
4375
4376################################################################################
4377# Setup bundled libraries.
4378#
4379# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4380# OpenJDK repository. Default is to use these libraries as bundled, but they
4381# might be replaced by en external version by the user.
4382################################################################################
4383
4384
4385################################################################################
4386# Setup libjpeg
4387################################################################################
4388
4389
4390################################################################################
4391# Setup giflib
4392################################################################################
4393
4394
4395################################################################################
4396# Setup libpng
4397################################################################################
4398
4399
4400################################################################################
4401# Setup zlib
4402################################################################################
4403
4404
4405################################################################################
4406# Setup lcms (Little CMS)
4407################################################################################
4408
4409
4410#
4411# Copyright (c) 2011, 2016, 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 cups (Common Unix Printing System)
4437################################################################################
4438
4439
4440#
4441# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4442# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4443#
4444# This code is free software; you can redistribute it and/or modify it
4445# under the terms of the GNU General Public License version 2 only, as
4446# published by the Free Software Foundation.  Oracle designates this
4447# particular file as subject to the "Classpath" exception as provided
4448# by Oracle in the LICENSE file that accompanied this code.
4449#
4450# This code is distributed in the hope that it will be useful, but WITHOUT
4451# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4452# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4453# version 2 for more details (a copy is included in the LICENSE file that
4454# accompanied this code).
4455#
4456# You should have received a copy of the GNU General Public License version
4457# 2 along with this work; if not, write to the Free Software Foundation,
4458# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4459#
4460# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4461# or visit www.oracle.com if you need additional information or have any
4462# questions.
4463#
4464
4465################################################################################
4466# Setup libffi (Foreign Function Interface)
4467################################################################################
4468
4469
4470#
4471# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4472# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4473#
4474# This code is free software; you can redistribute it and/or modify it
4475# under the terms of the GNU General Public License version 2 only, as
4476# published by the Free Software Foundation.  Oracle designates this
4477# particular file as subject to the "Classpath" exception as provided
4478# by Oracle in the LICENSE file that accompanied this code.
4479#
4480# This code is distributed in the hope that it will be useful, but WITHOUT
4481# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4482# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4483# version 2 for more details (a copy is included in the LICENSE file that
4484# accompanied this code).
4485#
4486# You should have received a copy of the GNU General Public License version
4487# 2 along with this work; if not, write to the Free Software Foundation,
4488# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4489#
4490# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4491# or visit www.oracle.com if you need additional information or have any
4492# questions.
4493#
4494
4495################################################################################
4496# Build the freetype lib from source
4497################################################################################
4498
4499
4500################################################################################
4501# Check if a potential freeype library match is correct and usable
4502################################################################################
4503
4504
4505################################################################################
4506# Setup freetype (The FreeType2 font rendering library)
4507################################################################################
4508
4509
4510#
4511# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4512# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4513#
4514# This code is free software; you can redistribute it and/or modify it
4515# under the terms of the GNU General Public License version 2 only, as
4516# published by the Free Software Foundation.  Oracle designates this
4517# particular file as subject to the "Classpath" exception as provided
4518# by Oracle in the LICENSE file that accompanied this code.
4519#
4520# This code is distributed in the hope that it will be useful, but WITHOUT
4521# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4522# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4523# version 2 for more details (a copy is included in the LICENSE file that
4524# accompanied this code).
4525#
4526# You should have received a copy of the GNU General Public License version
4527# 2 along with this work; if not, write to the Free Software Foundation,
4528# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4529#
4530# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4531# or visit www.oracle.com if you need additional information or have any
4532# questions.
4533#
4534
4535################################################################################
4536# Setup the standard C/C++ runtime libraries.
4537#
4538# Most importantly, determine if stdc++ should be linked statically or
4539# dynamically.
4540################################################################################
4541
4542
4543#
4544# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4546#
4547# This code is free software; you can redistribute it and/or modify it
4548# under the terms of the GNU General Public License version 2 only, as
4549# published by the Free Software Foundation.  Oracle designates this
4550# particular file as subject to the "Classpath" exception as provided
4551# by Oracle in the LICENSE file that accompanied this code.
4552#
4553# This code is distributed in the hope that it will be useful, but WITHOUT
4554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4556# version 2 for more details (a copy is included in the LICENSE file that
4557# accompanied this code).
4558#
4559# You should have received a copy of the GNU General Public License version
4560# 2 along with this work; if not, write to the Free Software Foundation,
4561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4562#
4563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4564# or visit www.oracle.com if you need additional information or have any
4565# questions.
4566#
4567
4568################################################################################
4569# Setup X11 Windows system
4570################################################################################
4571
4572
4573
4574################################################################################
4575# Determine which libraries are needed for this configuration
4576################################################################################
4577
4578
4579################################################################################
4580# Parse library options, and setup needed libraries
4581################################################################################
4582
4583
4584################################################################################
4585# Setup llvm (Low-Level VM)
4586################################################################################
4587
4588
4589################################################################################
4590# Setup various libraries, typically small system libraries
4591################################################################################
4592
4593
4594#
4595# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4596# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4597#
4598# This code is free software; you can redistribute it and/or modify it
4599# under the terms of the GNU General Public License version 2 only, as
4600# published by the Free Software Foundation.  Oracle designates this
4601# particular file as subject to the "Classpath" exception as provided
4602# by Oracle in the LICENSE file that accompanied this code.
4603#
4604# This code is distributed in the hope that it will be useful, but WITHOUT
4605# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4606# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4607# version 2 for more details (a copy is included in the LICENSE file that
4608# accompanied this code).
4609#
4610# You should have received a copy of the GNU General Public License version
4611# 2 along with this work; if not, write to the Free Software Foundation,
4612# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4613#
4614# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4615# or visit www.oracle.com if you need additional information or have any
4616# questions.
4617#
4618
4619# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4620# Converts autoconf style CPU name to OpenJDK style, into
4621# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4622
4623
4624# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4625# Converts autoconf style OS name to OpenJDK style, into
4626# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4627
4628
4629# Expects $host_os $host_cpu $build_os and $build_cpu
4630# and $with_target_bits to have been setup!
4631#
4632# Translate the standard triplet(quadruplet) definition
4633# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4634# OPENJDK_BUILD_OS, etc.
4635
4636
4637# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4638# accordingly. Must be done after setting up build and target system, but before
4639# doing anything else with these values.
4640
4641
4642# Setup the legacy variables, for controlling the old makefiles.
4643#
4644
4645
4646
4647
4648#%%% Build and target systems %%%
4649
4650
4651
4652
4653# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4654# Add -mX to various FLAGS variables.
4655
4656
4657
4658
4659
4660
4661#
4662# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664#
4665# This code is free software; you can redistribute it and/or modify it
4666# under the terms of the GNU General Public License version 2 only, as
4667# published by the Free Software Foundation.  Oracle designates this
4668# particular file as subject to the "Classpath" exception as provided
4669# by Oracle in the LICENSE file that accompanied this code.
4670#
4671# This code is distributed in the hope that it will be useful, but WITHOUT
4672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674# version 2 for more details (a copy is included in the LICENSE file that
4675# accompanied this code).
4676#
4677# You should have received a copy of the GNU General Public License version
4678# 2 along with this work; if not, write to the Free Software Foundation,
4679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680#
4681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682# or visit www.oracle.com if you need additional information or have any
4683# questions.
4684#
4685
4686
4687
4688
4689
4690
4691
4692################################################################################
4693# Define a mechanism for importing extra prebuilt modules
4694#
4695
4696
4697
4698#
4699# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4700# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4701#
4702# This code is free software; you can redistribute it and/or modify it
4703# under the terms of the GNU General Public License version 2 only, as
4704# published by the Free Software Foundation.  Oracle designates this
4705# particular file as subject to the "Classpath" exception as provided
4706# by Oracle in the LICENSE file that accompanied this code.
4707#
4708# This code is distributed in the hope that it will be useful, but WITHOUT
4709# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4710# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4711# version 2 for more details (a copy is included in the LICENSE file that
4712# accompanied this code).
4713#
4714# You should have received a copy of the GNU General Public License version
4715# 2 along with this work; if not, write to the Free Software Foundation,
4716# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4717#
4718# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4719# or visit www.oracle.com if you need additional information or have any
4720# questions.
4721#
4722
4723########################################################################
4724# This file is responsible for detecting, verifying and setting up the
4725# toolchain, i.e. the compiler, linker and related utilities. It will setup
4726# proper paths to the binaries, but it will not setup any flags.
4727#
4728# The binaries used is determined by the toolchain type, which is the family of
4729# compilers and related tools that are used.
4730########################################################################
4731
4732
4733# All valid toolchains, regardless of platform (used by help.m4)
4734VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4735
4736# These toolchains are valid on different platforms
4737VALID_TOOLCHAINS_linux="gcc clang"
4738VALID_TOOLCHAINS_solaris="solstudio"
4739VALID_TOOLCHAINS_macosx="gcc clang"
4740VALID_TOOLCHAINS_aix="xlc"
4741VALID_TOOLCHAINS_windows="microsoft"
4742
4743# Toolchain descriptions
4744TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4745TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4746TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4747TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4748TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4749
4750# Minimum supported versions, empty means unspecified
4751TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4752TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4753TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4754TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4755TOOLCHAIN_MINIMUM_VERSION_xlc=""
4756
4757# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4758# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4759
4760
4761# Check if the configured compiler (C and C++) is of a specific version or
4762# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4763#
4764# Arguments:
4765#   VERSION:   The version string to check against the found version
4766#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4767#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4768
4769
4770
4771
4772# Setup a number of variables describing how native output files are
4773# named on this platform/toolchain.
4774
4775
4776# Determine which toolchain type to use, and make sure it is valid for this
4777# platform. Setup various information about the selected toolchain.
4778
4779
4780# Before we start detecting the toolchain executables, we might need some
4781# special setup, e.g. additional paths etc.
4782
4783
4784# Restore path, etc
4785
4786
4787# Check if a compiler is of the toolchain type we expect, and save the version
4788# information from it. If the compiler does not match the expected type,
4789# this function will abort using AC_MSG_ERROR. If it matches, the version will
4790# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4791# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4792#
4793# $1 = compiler to test (CC or CXX)
4794# $2 = human readable name of compiler (C or C++)
4795
4796
4797# Try to locate the given C or C++ compiler in the path, or otherwise.
4798#
4799# $1 = compiler to test (CC or CXX)
4800# $2 = human readable name of compiler (C or C++)
4801# $3 = list of compiler names to search for
4802
4803
4804# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4805# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4806# archiver (AR). Verify that the compilers are correct according to the
4807# toolchain type.
4808
4809
4810# Setup additional tools that is considered a part of the toolchain, but not the
4811# core part. Many of these are highly platform-specific and do not exist,
4812# and/or are not needed on all platforms.
4813
4814
4815# Setup the build tools (i.e, the compiler and linker used to build programs
4816# that should be run on the build platform, not the target platform, as a build
4817# helper). Since the non-cross-compile case uses the normal, target compilers
4818# for this, we can only do this after these have been setup.
4819
4820
4821# Setup legacy variables that are still needed as alternative ways to refer to
4822# parts of the toolchain.
4823
4824
4825# Do some additional checks on the detected tools.
4826
4827
4828# Setup the JTReg Regression Test Harness.
4829
4830
4831#
4832# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4833# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4834#
4835# This code is free software; you can redistribute it and/or modify it
4836# under the terms of the GNU General Public License version 2 only, as
4837# published by the Free Software Foundation.  Oracle designates this
4838# particular file as subject to the "Classpath" exception as provided
4839# by Oracle in the LICENSE file that accompanied this code.
4840#
4841# This code is distributed in the hope that it will be useful, but WITHOUT
4842# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4843# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4844# version 2 for more details (a copy is included in the LICENSE file that
4845# accompanied this code).
4846#
4847# You should have received a copy of the GNU General Public License version
4848# 2 along with this work; if not, write to the Free Software Foundation,
4849# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4850#
4851# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4852# or visit www.oracle.com if you need additional information or have any
4853# questions.
4854#
4855
4856################################################################################
4857# The order of these defines the priority by which we try to find them.
4858VALID_VS_VERSIONS="2013 2012 2010"
4859
4860VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4861VS_VERSION_INTERNAL_2010=100
4862VS_MSVCR_2010=msvcr100.dll
4863# We don't use msvcp on Visual Studio 2010
4864#VS_MSVCP_2010=msvcp100.dll
4865VS_ENVVAR_2010="VS100COMNTOOLS"
4866VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4867VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4868VS_VS_PLATFORM_NAME_2010="v100"
4869VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4870
4871VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4872VS_VERSION_INTERNAL_2012=110
4873VS_MSVCR_2012=msvcr110.dll
4874VS_MSVCP_2012=msvcp110.dll
4875VS_ENVVAR_2012="VS110COMNTOOLS"
4876VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4877VS_SDK_INSTALLDIR_2012=
4878VS_VS_PLATFORM_NAME_2012="v110"
4879VS_SDK_PLATFORM_NAME_2012=
4880
4881VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4882VS_VERSION_INTERNAL_2013=120
4883VS_MSVCR_2013=msvcr120.dll
4884VS_MSVCP_2013=msvcp120.dll
4885VS_ENVVAR_2013="VS120COMNTOOLS"
4886VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4887VS_SDK_INSTALLDIR_2013=
4888VS_VS_PLATFORM_NAME_2013="v120"
4889VS_SDK_PLATFORM_NAME_2013=
4890
4891################################################################################
4892
4893
4894
4895################################################################################
4896
4897
4898
4899################################################################################
4900# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4901# build environment and assigns it to VS_ENV_CMD
4902
4903
4904################################################################################
4905
4906
4907
4908################################################################################
4909# Check if the VS env variables were setup prior to running configure.
4910# If not, then find vcvarsall.bat and run it automatically, and integrate
4911# the set env variables into the spec file.
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926# This line needs to be here, verbatim, after all includes and the dummy hook
4927# definitions. It is replaced with custom functionality when building
4928# custom sources.
4929#CUSTOM_AUTOCONF_INCLUDE
4930
4931# Do not change or remove the following line, it is needed for consistency checks:
4932DATE_WHEN_GENERATED=1458008154
4933
4934###############################################################################
4935#
4936# Initialization / Boot-strapping
4937#
4938# The bootstrapping process needs to solve the "chicken or the egg" problem,
4939# thus it jumps back and forth, each time gaining something needed later on.
4940#
4941###############################################################################
4942
4943# If we are requested to print additional help, do that and then exit.
4944# This must be the very first call.
4945
4946  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
4947
4948    # Print available toolchains
4949    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4950    $PRINTF "Which are valid to use depends on the build platform.\n"
4951    for toolchain in $VALID_TOOLCHAINS_all; do
4952      # Use indirect variable referencing
4953      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4954      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4955      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4956    done
4957
4958    # And now exit directly
4959    exit 0
4960  fi
4961
4962
4963# Basic initialization that must happen first of all in the normal process.
4964
4965  # Save the original command line. This is passed to us by the wrapper configure script.
4966
4967  # Save the path variable before it gets changed
4968  ORIGINAL_PATH="$PATH"
4969
4970  DATE_WHEN_CONFIGURED=`LANG=C date`
4971
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4973$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4974  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4975$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4976
4977
4978  # Start with tools that do not need have cross compilation support
4979  # and can be expected to be found in the default PATH. These tools are
4980  # used by configure.
4981
4982  # First are all the simple required tools.
4983
4984
4985
4986  # Publish this variable in the help.
4987
4988
4989  if [ -z "${BASENAME+x}" ]; then
4990    # The variable is not set by user, try to locate tool using the code snippet
4991    for ac_prog in basename
4992do
4993  # Extract the first word of "$ac_prog", so it can be a program name with args.
4994set dummy $ac_prog; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_BASENAME+:} false; then :
4998  $as_echo_n "(cached) " >&6
4999else
5000  case $BASENAME in
5001  [\\/]* | ?:[\\/]*)
5002  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5003  ;;
5004  *)
5005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in $PATH
5007do
5008  IFS=$as_save_IFS
5009  test -z "$as_dir" && as_dir=.
5010    for ac_exec_ext in '' $ac_executable_extensions; do
5011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014    break 2
5015  fi
5016done
5017  done
5018IFS=$as_save_IFS
5019
5020  ;;
5021esac
5022fi
5023BASENAME=$ac_cv_path_BASENAME
5024if test -n "$BASENAME"; then
5025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5026$as_echo "$BASENAME" >&6; }
5027else
5028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030fi
5031
5032
5033  test -n "$BASENAME" && break
5034done
5035
5036  else
5037    # The variable is set, but is it from the command line or the environment?
5038
5039    # Try to remove the string !BASENAME! from our list.
5040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5042      # If it failed, the variable was not from the command line. Ignore it,
5043      # but warn the user (except for BASH, which is always set by the calling BASH).
5044      if test "xBASENAME" != xBASH; then
5045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5046$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5047      fi
5048      # Try to locate tool using the code snippet
5049      for ac_prog in basename
5050do
5051  # Extract the first word of "$ac_prog", so it can be a program name with args.
5052set dummy $ac_prog; ac_word=$2
5053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5054$as_echo_n "checking for $ac_word... " >&6; }
5055if ${ac_cv_path_BASENAME+:} false; then :
5056  $as_echo_n "(cached) " >&6
5057else
5058  case $BASENAME in
5059  [\\/]* | ?:[\\/]*)
5060  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5061  ;;
5062  *)
5063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066  IFS=$as_save_IFS
5067  test -z "$as_dir" && as_dir=.
5068    for ac_exec_ext in '' $ac_executable_extensions; do
5069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5070    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5072    break 2
5073  fi
5074done
5075  done
5076IFS=$as_save_IFS
5077
5078  ;;
5079esac
5080fi
5081BASENAME=$ac_cv_path_BASENAME
5082if test -n "$BASENAME"; then
5083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5084$as_echo "$BASENAME" >&6; }
5085else
5086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087$as_echo "no" >&6; }
5088fi
5089
5090
5091  test -n "$BASENAME" && break
5092done
5093
5094    else
5095      # If it succeeded, then it was overridden by the user. We will use it
5096      # for the tool.
5097
5098      # First remove it from the list of overridden variables, so we can test
5099      # for unknown variables in the end.
5100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5101
5102      # Check if we try to supply an empty value
5103      if test "x$BASENAME" = x; then
5104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5105$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5107$as_echo_n "checking for BASENAME... " >&6; }
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5109$as_echo "disabled" >&6; }
5110      else
5111        # Check if the provided tool contains a complete path.
5112        tool_specified="$BASENAME"
5113        tool_basename="${tool_specified##*/}"
5114        if test "x$tool_basename" = "x$tool_specified"; then
5115          # A command without a complete path is provided, search $PATH.
5116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5117$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5118          # Extract the first word of "$tool_basename", so it can be a program name with args.
5119set dummy $tool_basename; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if ${ac_cv_path_BASENAME+:} false; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $BASENAME in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5137    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148BASENAME=$ac_cv_path_BASENAME
5149if test -n "$BASENAME"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5151$as_echo "$BASENAME" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158          if test "x$BASENAME" = x; then
5159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5160          fi
5161        else
5162          # Otherwise we believe it is a complete path. Use it as it is.
5163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5164$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5166$as_echo_n "checking for BASENAME... " >&6; }
5167          if test ! -x "$tool_specified"; then
5168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5169$as_echo "not found" >&6; }
5170            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5171          fi
5172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5173$as_echo "$tool_specified" >&6; }
5174        fi
5175      fi
5176    fi
5177
5178  fi
5179
5180
5181
5182  if test "x$BASENAME" = x; then
5183    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5184  fi
5185
5186
5187
5188
5189
5190  # Publish this variable in the help.
5191
5192
5193  if [ -z "${BASH+x}" ]; then
5194    # The variable is not set by user, try to locate tool using the code snippet
5195    for ac_prog in bash
5196do
5197  # Extract the first word of "$ac_prog", so it can be a program name with args.
5198set dummy $ac_prog; ac_word=$2
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200$as_echo_n "checking for $ac_word... " >&6; }
5201if ${ac_cv_path_BASH+:} false; then :
5202  $as_echo_n "(cached) " >&6
5203else
5204  case $BASH in
5205  [\\/]* | ?:[\\/]*)
5206  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5207  ;;
5208  *)
5209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212  IFS=$as_save_IFS
5213  test -z "$as_dir" && as_dir=.
5214    for ac_exec_ext in '' $ac_executable_extensions; do
5215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5216    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218    break 2
5219  fi
5220done
5221  done
5222IFS=$as_save_IFS
5223
5224  ;;
5225esac
5226fi
5227BASH=$ac_cv_path_BASH
5228if test -n "$BASH"; then
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5230$as_echo "$BASH" >&6; }
5231else
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }
5234fi
5235
5236
5237  test -n "$BASH" && break
5238done
5239
5240  else
5241    # The variable is set, but is it from the command line or the environment?
5242
5243    # Try to remove the string !BASH! from our list.
5244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5246      # If it failed, the variable was not from the command line. Ignore it,
5247      # but warn the user (except for BASH, which is always set by the calling BASH).
5248      if test "xBASH" != xBASH; then
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5250$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5251      fi
5252      # Try to locate tool using the code snippet
5253      for ac_prog in bash
5254do
5255  # Extract the first word of "$ac_prog", so it can be a program name with args.
5256set dummy $ac_prog; ac_word=$2
5257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5258$as_echo_n "checking for $ac_word... " >&6; }
5259if ${ac_cv_path_BASH+:} false; then :
5260  $as_echo_n "(cached) " >&6
5261else
5262  case $BASH in
5263  [\\/]* | ?:[\\/]*)
5264  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5265  ;;
5266  *)
5267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5268for as_dir in $PATH
5269do
5270  IFS=$as_save_IFS
5271  test -z "$as_dir" && as_dir=.
5272    for ac_exec_ext in '' $ac_executable_extensions; do
5273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5274    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5276    break 2
5277  fi
5278done
5279  done
5280IFS=$as_save_IFS
5281
5282  ;;
5283esac
5284fi
5285BASH=$ac_cv_path_BASH
5286if test -n "$BASH"; then
5287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5288$as_echo "$BASH" >&6; }
5289else
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5291$as_echo "no" >&6; }
5292fi
5293
5294
5295  test -n "$BASH" && break
5296done
5297
5298    else
5299      # If it succeeded, then it was overridden by the user. We will use it
5300      # for the tool.
5301
5302      # First remove it from the list of overridden variables, so we can test
5303      # for unknown variables in the end.
5304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5305
5306      # Check if we try to supply an empty value
5307      if test "x$BASH" = x; then
5308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5309$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5311$as_echo_n "checking for BASH... " >&6; }
5312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5313$as_echo "disabled" >&6; }
5314      else
5315        # Check if the provided tool contains a complete path.
5316        tool_specified="$BASH"
5317        tool_basename="${tool_specified##*/}"
5318        if test "x$tool_basename" = "x$tool_specified"; then
5319          # A command without a complete path is provided, search $PATH.
5320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5321$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5322          # Extract the first word of "$tool_basename", so it can be a program name with args.
5323set dummy $tool_basename; ac_word=$2
5324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5325$as_echo_n "checking for $ac_word... " >&6; }
5326if ${ac_cv_path_BASH+:} false; then :
5327  $as_echo_n "(cached) " >&6
5328else
5329  case $BASH in
5330  [\\/]* | ?:[\\/]*)
5331  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5332  ;;
5333  *)
5334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335for as_dir in $PATH
5336do
5337  IFS=$as_save_IFS
5338  test -z "$as_dir" && as_dir=.
5339    for ac_exec_ext in '' $ac_executable_extensions; do
5340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5341    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5343    break 2
5344  fi
5345done
5346  done
5347IFS=$as_save_IFS
5348
5349  ;;
5350esac
5351fi
5352BASH=$ac_cv_path_BASH
5353if test -n "$BASH"; then
5354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5355$as_echo "$BASH" >&6; }
5356else
5357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358$as_echo "no" >&6; }
5359fi
5360
5361
5362          if test "x$BASH" = x; then
5363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5364          fi
5365        else
5366          # Otherwise we believe it is a complete path. Use it as it is.
5367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5368$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5370$as_echo_n "checking for BASH... " >&6; }
5371          if test ! -x "$tool_specified"; then
5372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5373$as_echo "not found" >&6; }
5374            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5375          fi
5376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5377$as_echo "$tool_specified" >&6; }
5378        fi
5379      fi
5380    fi
5381
5382  fi
5383
5384
5385
5386  if test "x$BASH" = x; then
5387    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5388  fi
5389
5390
5391
5392
5393
5394  # Publish this variable in the help.
5395
5396
5397  if [ -z "${CAT+x}" ]; then
5398    # The variable is not set by user, try to locate tool using the code snippet
5399    for ac_prog in cat
5400do
5401  # Extract the first word of "$ac_prog", so it can be a program name with args.
5402set dummy $ac_prog; ac_word=$2
5403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5404$as_echo_n "checking for $ac_word... " >&6; }
5405if ${ac_cv_path_CAT+:} false; then :
5406  $as_echo_n "(cached) " >&6
5407else
5408  case $CAT in
5409  [\\/]* | ?:[\\/]*)
5410  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5411  ;;
5412  *)
5413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5414for as_dir in $PATH
5415do
5416  IFS=$as_save_IFS
5417  test -z "$as_dir" && as_dir=.
5418    for ac_exec_ext in '' $ac_executable_extensions; do
5419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5420    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5422    break 2
5423  fi
5424done
5425  done
5426IFS=$as_save_IFS
5427
5428  ;;
5429esac
5430fi
5431CAT=$ac_cv_path_CAT
5432if test -n "$CAT"; then
5433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5434$as_echo "$CAT" >&6; }
5435else
5436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5437$as_echo "no" >&6; }
5438fi
5439
5440
5441  test -n "$CAT" && break
5442done
5443
5444  else
5445    # The variable is set, but is it from the command line or the environment?
5446
5447    # Try to remove the string !CAT! from our list.
5448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5450      # If it failed, the variable was not from the command line. Ignore it,
5451      # but warn the user (except for BASH, which is always set by the calling BASH).
5452      if test "xCAT" != xBASH; then
5453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5454$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5455      fi
5456      # Try to locate tool using the code snippet
5457      for ac_prog in cat
5458do
5459  # Extract the first word of "$ac_prog", so it can be a program name with args.
5460set dummy $ac_prog; ac_word=$2
5461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5462$as_echo_n "checking for $ac_word... " >&6; }
5463if ${ac_cv_path_CAT+:} false; then :
5464  $as_echo_n "(cached) " >&6
5465else
5466  case $CAT in
5467  [\\/]* | ?:[\\/]*)
5468  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5469  ;;
5470  *)
5471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5472for as_dir in $PATH
5473do
5474  IFS=$as_save_IFS
5475  test -z "$as_dir" && as_dir=.
5476    for ac_exec_ext in '' $ac_executable_extensions; do
5477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5478    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5480    break 2
5481  fi
5482done
5483  done
5484IFS=$as_save_IFS
5485
5486  ;;
5487esac
5488fi
5489CAT=$ac_cv_path_CAT
5490if test -n "$CAT"; then
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5492$as_echo "$CAT" >&6; }
5493else
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5495$as_echo "no" >&6; }
5496fi
5497
5498
5499  test -n "$CAT" && break
5500done
5501
5502    else
5503      # If it succeeded, then it was overridden by the user. We will use it
5504      # for the tool.
5505
5506      # First remove it from the list of overridden variables, so we can test
5507      # for unknown variables in the end.
5508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5509
5510      # Check if we try to supply an empty value
5511      if test "x$CAT" = x; then
5512        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5513$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5515$as_echo_n "checking for CAT... " >&6; }
5516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5517$as_echo "disabled" >&6; }
5518      else
5519        # Check if the provided tool contains a complete path.
5520        tool_specified="$CAT"
5521        tool_basename="${tool_specified##*/}"
5522        if test "x$tool_basename" = "x$tool_specified"; then
5523          # A command without a complete path is provided, search $PATH.
5524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5525$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5526          # Extract the first word of "$tool_basename", so it can be a program name with args.
5527set dummy $tool_basename; ac_word=$2
5528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5529$as_echo_n "checking for $ac_word... " >&6; }
5530if ${ac_cv_path_CAT+:} false; then :
5531  $as_echo_n "(cached) " >&6
5532else
5533  case $CAT in
5534  [\\/]* | ?:[\\/]*)
5535  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5536  ;;
5537  *)
5538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539for as_dir in $PATH
5540do
5541  IFS=$as_save_IFS
5542  test -z "$as_dir" && as_dir=.
5543    for ac_exec_ext in '' $ac_executable_extensions; do
5544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5545    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5547    break 2
5548  fi
5549done
5550  done
5551IFS=$as_save_IFS
5552
5553  ;;
5554esac
5555fi
5556CAT=$ac_cv_path_CAT
5557if test -n "$CAT"; then
5558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5559$as_echo "$CAT" >&6; }
5560else
5561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562$as_echo "no" >&6; }
5563fi
5564
5565
5566          if test "x$CAT" = x; then
5567            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5568          fi
5569        else
5570          # Otherwise we believe it is a complete path. Use it as it is.
5571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5572$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5573          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5574$as_echo_n "checking for CAT... " >&6; }
5575          if test ! -x "$tool_specified"; then
5576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5577$as_echo "not found" >&6; }
5578            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5579          fi
5580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5581$as_echo "$tool_specified" >&6; }
5582        fi
5583      fi
5584    fi
5585
5586  fi
5587
5588
5589
5590  if test "x$CAT" = x; then
5591    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5592  fi
5593
5594
5595
5596
5597
5598  # Publish this variable in the help.
5599
5600
5601  if [ -z "${CHMOD+x}" ]; then
5602    # The variable is not set by user, try to locate tool using the code snippet
5603    for ac_prog in chmod
5604do
5605  # Extract the first word of "$ac_prog", so it can be a program name with args.
5606set dummy $ac_prog; ac_word=$2
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5608$as_echo_n "checking for $ac_word... " >&6; }
5609if ${ac_cv_path_CHMOD+:} false; then :
5610  $as_echo_n "(cached) " >&6
5611else
5612  case $CHMOD in
5613  [\\/]* | ?:[\\/]*)
5614  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5615  ;;
5616  *)
5617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5618for as_dir in $PATH
5619do
5620  IFS=$as_save_IFS
5621  test -z "$as_dir" && as_dir=.
5622    for ac_exec_ext in '' $ac_executable_extensions; do
5623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5624    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5626    break 2
5627  fi
5628done
5629  done
5630IFS=$as_save_IFS
5631
5632  ;;
5633esac
5634fi
5635CHMOD=$ac_cv_path_CHMOD
5636if test -n "$CHMOD"; then
5637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5638$as_echo "$CHMOD" >&6; }
5639else
5640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5641$as_echo "no" >&6; }
5642fi
5643
5644
5645  test -n "$CHMOD" && break
5646done
5647
5648  else
5649    # The variable is set, but is it from the command line or the environment?
5650
5651    # Try to remove the string !CHMOD! from our list.
5652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5654      # If it failed, the variable was not from the command line. Ignore it,
5655      # but warn the user (except for BASH, which is always set by the calling BASH).
5656      if test "xCHMOD" != xBASH; then
5657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5658$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5659      fi
5660      # Try to locate tool using the code snippet
5661      for ac_prog in chmod
5662do
5663  # Extract the first word of "$ac_prog", so it can be a program name with args.
5664set dummy $ac_prog; ac_word=$2
5665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5666$as_echo_n "checking for $ac_word... " >&6; }
5667if ${ac_cv_path_CHMOD+:} false; then :
5668  $as_echo_n "(cached) " >&6
5669else
5670  case $CHMOD in
5671  [\\/]* | ?:[\\/]*)
5672  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5673  ;;
5674  *)
5675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676for as_dir in $PATH
5677do
5678  IFS=$as_save_IFS
5679  test -z "$as_dir" && as_dir=.
5680    for ac_exec_ext in '' $ac_executable_extensions; do
5681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5682    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5684    break 2
5685  fi
5686done
5687  done
5688IFS=$as_save_IFS
5689
5690  ;;
5691esac
5692fi
5693CHMOD=$ac_cv_path_CHMOD
5694if test -n "$CHMOD"; then
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5696$as_echo "$CHMOD" >&6; }
5697else
5698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
5700fi
5701
5702
5703  test -n "$CHMOD" && break
5704done
5705
5706    else
5707      # If it succeeded, then it was overridden by the user. We will use it
5708      # for the tool.
5709
5710      # First remove it from the list of overridden variables, so we can test
5711      # for unknown variables in the end.
5712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5713
5714      # Check if we try to supply an empty value
5715      if test "x$CHMOD" = x; then
5716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5717$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5719$as_echo_n "checking for CHMOD... " >&6; }
5720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5721$as_echo "disabled" >&6; }
5722      else
5723        # Check if the provided tool contains a complete path.
5724        tool_specified="$CHMOD"
5725        tool_basename="${tool_specified##*/}"
5726        if test "x$tool_basename" = "x$tool_specified"; then
5727          # A command without a complete path is provided, search $PATH.
5728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5729$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5730          # Extract the first word of "$tool_basename", so it can be a program name with args.
5731set dummy $tool_basename; ac_word=$2
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5733$as_echo_n "checking for $ac_word... " >&6; }
5734if ${ac_cv_path_CHMOD+:} false; then :
5735  $as_echo_n "(cached) " >&6
5736else
5737  case $CHMOD in
5738  [\\/]* | ?:[\\/]*)
5739  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5740  ;;
5741  *)
5742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745  IFS=$as_save_IFS
5746  test -z "$as_dir" && as_dir=.
5747    for ac_exec_ext in '' $ac_executable_extensions; do
5748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751    break 2
5752  fi
5753done
5754  done
5755IFS=$as_save_IFS
5756
5757  ;;
5758esac
5759fi
5760CHMOD=$ac_cv_path_CHMOD
5761if test -n "$CHMOD"; then
5762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5763$as_echo "$CHMOD" >&6; }
5764else
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766$as_echo "no" >&6; }
5767fi
5768
5769
5770          if test "x$CHMOD" = x; then
5771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5772          fi
5773        else
5774          # Otherwise we believe it is a complete path. Use it as it is.
5775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5776$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5778$as_echo_n "checking for CHMOD... " >&6; }
5779          if test ! -x "$tool_specified"; then
5780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5781$as_echo "not found" >&6; }
5782            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5783          fi
5784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5785$as_echo "$tool_specified" >&6; }
5786        fi
5787      fi
5788    fi
5789
5790  fi
5791
5792
5793
5794  if test "x$CHMOD" = x; then
5795    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5796  fi
5797
5798
5799
5800
5801
5802  # Publish this variable in the help.
5803
5804
5805  if [ -z "${CMP+x}" ]; then
5806    # The variable is not set by user, try to locate tool using the code snippet
5807    for ac_prog in cmp
5808do
5809  # Extract the first word of "$ac_prog", so it can be a program name with args.
5810set dummy $ac_prog; ac_word=$2
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5812$as_echo_n "checking for $ac_word... " >&6; }
5813if ${ac_cv_path_CMP+:} false; then :
5814  $as_echo_n "(cached) " >&6
5815else
5816  case $CMP in
5817  [\\/]* | ?:[\\/]*)
5818  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5819  ;;
5820  *)
5821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5822for as_dir in $PATH
5823do
5824  IFS=$as_save_IFS
5825  test -z "$as_dir" && as_dir=.
5826    for ac_exec_ext in '' $ac_executable_extensions; do
5827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5828    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5830    break 2
5831  fi
5832done
5833  done
5834IFS=$as_save_IFS
5835
5836  ;;
5837esac
5838fi
5839CMP=$ac_cv_path_CMP
5840if test -n "$CMP"; then
5841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5842$as_echo "$CMP" >&6; }
5843else
5844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845$as_echo "no" >&6; }
5846fi
5847
5848
5849  test -n "$CMP" && break
5850done
5851
5852  else
5853    # The variable is set, but is it from the command line or the environment?
5854
5855    # Try to remove the string !CMP! from our list.
5856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5858      # If it failed, the variable was not from the command line. Ignore it,
5859      # but warn the user (except for BASH, which is always set by the calling BASH).
5860      if test "xCMP" != xBASH; then
5861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5862$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5863      fi
5864      # Try to locate tool using the code snippet
5865      for ac_prog in cmp
5866do
5867  # Extract the first word of "$ac_prog", so it can be a program name with args.
5868set dummy $ac_prog; ac_word=$2
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5870$as_echo_n "checking for $ac_word... " >&6; }
5871if ${ac_cv_path_CMP+:} false; then :
5872  $as_echo_n "(cached) " >&6
5873else
5874  case $CMP in
5875  [\\/]* | ?:[\\/]*)
5876  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5877  ;;
5878  *)
5879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5880for as_dir in $PATH
5881do
5882  IFS=$as_save_IFS
5883  test -z "$as_dir" && as_dir=.
5884    for ac_exec_ext in '' $ac_executable_extensions; do
5885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5886    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5888    break 2
5889  fi
5890done
5891  done
5892IFS=$as_save_IFS
5893
5894  ;;
5895esac
5896fi
5897CMP=$ac_cv_path_CMP
5898if test -n "$CMP"; then
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5900$as_echo "$CMP" >&6; }
5901else
5902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903$as_echo "no" >&6; }
5904fi
5905
5906
5907  test -n "$CMP" && break
5908done
5909
5910    else
5911      # If it succeeded, then it was overridden by the user. We will use it
5912      # for the tool.
5913
5914      # First remove it from the list of overridden variables, so we can test
5915      # for unknown variables in the end.
5916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5917
5918      # Check if we try to supply an empty value
5919      if test "x$CMP" = x; then
5920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5921$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5923$as_echo_n "checking for CMP... " >&6; }
5924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5925$as_echo "disabled" >&6; }
5926      else
5927        # Check if the provided tool contains a complete path.
5928        tool_specified="$CMP"
5929        tool_basename="${tool_specified##*/}"
5930        if test "x$tool_basename" = "x$tool_specified"; then
5931          # A command without a complete path is provided, search $PATH.
5932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5933$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5934          # Extract the first word of "$tool_basename", so it can be a program name with args.
5935set dummy $tool_basename; ac_word=$2
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937$as_echo_n "checking for $ac_word... " >&6; }
5938if ${ac_cv_path_CMP+:} false; then :
5939  $as_echo_n "(cached) " >&6
5940else
5941  case $CMP in
5942  [\\/]* | ?:[\\/]*)
5943  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5944  ;;
5945  *)
5946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949  IFS=$as_save_IFS
5950  test -z "$as_dir" && as_dir=.
5951    for ac_exec_ext in '' $ac_executable_extensions; do
5952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955    break 2
5956  fi
5957done
5958  done
5959IFS=$as_save_IFS
5960
5961  ;;
5962esac
5963fi
5964CMP=$ac_cv_path_CMP
5965if test -n "$CMP"; then
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5967$as_echo "$CMP" >&6; }
5968else
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
5971fi
5972
5973
5974          if test "x$CMP" = x; then
5975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5976          fi
5977        else
5978          # Otherwise we believe it is a complete path. Use it as it is.
5979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5980$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5982$as_echo_n "checking for CMP... " >&6; }
5983          if test ! -x "$tool_specified"; then
5984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5985$as_echo "not found" >&6; }
5986            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5987          fi
5988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5989$as_echo "$tool_specified" >&6; }
5990        fi
5991      fi
5992    fi
5993
5994  fi
5995
5996
5997
5998  if test "x$CMP" = x; then
5999    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6000  fi
6001
6002
6003
6004
6005
6006  # Publish this variable in the help.
6007
6008
6009  if [ -z "${COMM+x}" ]; then
6010    # The variable is not set by user, try to locate tool using the code snippet
6011    for ac_prog in comm
6012do
6013  # Extract the first word of "$ac_prog", so it can be a program name with args.
6014set dummy $ac_prog; ac_word=$2
6015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6016$as_echo_n "checking for $ac_word... " >&6; }
6017if ${ac_cv_path_COMM+:} false; then :
6018  $as_echo_n "(cached) " >&6
6019else
6020  case $COMM in
6021  [\\/]* | ?:[\\/]*)
6022  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6023  ;;
6024  *)
6025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6026for as_dir in $PATH
6027do
6028  IFS=$as_save_IFS
6029  test -z "$as_dir" && as_dir=.
6030    for ac_exec_ext in '' $ac_executable_extensions; do
6031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6032    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6034    break 2
6035  fi
6036done
6037  done
6038IFS=$as_save_IFS
6039
6040  ;;
6041esac
6042fi
6043COMM=$ac_cv_path_COMM
6044if test -n "$COMM"; then
6045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6046$as_echo "$COMM" >&6; }
6047else
6048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6049$as_echo "no" >&6; }
6050fi
6051
6052
6053  test -n "$COMM" && break
6054done
6055
6056  else
6057    # The variable is set, but is it from the command line or the environment?
6058
6059    # Try to remove the string !COMM! from our list.
6060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6062      # If it failed, the variable was not from the command line. Ignore it,
6063      # but warn the user (except for BASH, which is always set by the calling BASH).
6064      if test "xCOMM" != xBASH; then
6065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6066$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6067      fi
6068      # Try to locate tool using the code snippet
6069      for ac_prog in comm
6070do
6071  # Extract the first word of "$ac_prog", so it can be a program name with args.
6072set dummy $ac_prog; ac_word=$2
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
6075if ${ac_cv_path_COMM+:} false; then :
6076  $as_echo_n "(cached) " >&6
6077else
6078  case $COMM in
6079  [\\/]* | ?:[\\/]*)
6080  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6081  ;;
6082  *)
6083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH
6085do
6086  IFS=$as_save_IFS
6087  test -z "$as_dir" && as_dir=.
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6090    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6092    break 2
6093  fi
6094done
6095  done
6096IFS=$as_save_IFS
6097
6098  ;;
6099esac
6100fi
6101COMM=$ac_cv_path_COMM
6102if test -n "$COMM"; then
6103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6104$as_echo "$COMM" >&6; }
6105else
6106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
6108fi
6109
6110
6111  test -n "$COMM" && break
6112done
6113
6114    else
6115      # If it succeeded, then it was overridden by the user. We will use it
6116      # for the tool.
6117
6118      # First remove it from the list of overridden variables, so we can test
6119      # for unknown variables in the end.
6120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6121
6122      # Check if we try to supply an empty value
6123      if test "x$COMM" = x; then
6124        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6125$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6127$as_echo_n "checking for COMM... " >&6; }
6128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6129$as_echo "disabled" >&6; }
6130      else
6131        # Check if the provided tool contains a complete path.
6132        tool_specified="$COMM"
6133        tool_basename="${tool_specified##*/}"
6134        if test "x$tool_basename" = "x$tool_specified"; then
6135          # A command without a complete path is provided, search $PATH.
6136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6137$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6138          # Extract the first word of "$tool_basename", so it can be a program name with args.
6139set dummy $tool_basename; ac_word=$2
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6141$as_echo_n "checking for $ac_word... " >&6; }
6142if ${ac_cv_path_COMM+:} false; then :
6143  $as_echo_n "(cached) " >&6
6144else
6145  case $COMM in
6146  [\\/]* | ?:[\\/]*)
6147  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6148  ;;
6149  *)
6150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6151for as_dir in $PATH
6152do
6153  IFS=$as_save_IFS
6154  test -z "$as_dir" && as_dir=.
6155    for ac_exec_ext in '' $ac_executable_extensions; do
6156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6157    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6159    break 2
6160  fi
6161done
6162  done
6163IFS=$as_save_IFS
6164
6165  ;;
6166esac
6167fi
6168COMM=$ac_cv_path_COMM
6169if test -n "$COMM"; then
6170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6171$as_echo "$COMM" >&6; }
6172else
6173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6174$as_echo "no" >&6; }
6175fi
6176
6177
6178          if test "x$COMM" = x; then
6179            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6180          fi
6181        else
6182          # Otherwise we believe it is a complete path. Use it as it is.
6183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6184$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6186$as_echo_n "checking for COMM... " >&6; }
6187          if test ! -x "$tool_specified"; then
6188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6189$as_echo "not found" >&6; }
6190            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6191          fi
6192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6193$as_echo "$tool_specified" >&6; }
6194        fi
6195      fi
6196    fi
6197
6198  fi
6199
6200
6201
6202  if test "x$COMM" = x; then
6203    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6204  fi
6205
6206
6207
6208
6209
6210  # Publish this variable in the help.
6211
6212
6213  if [ -z "${CP+x}" ]; then
6214    # The variable is not set by user, try to locate tool using the code snippet
6215    for ac_prog in cp
6216do
6217  # Extract the first word of "$ac_prog", so it can be a program name with args.
6218set dummy $ac_prog; ac_word=$2
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6220$as_echo_n "checking for $ac_word... " >&6; }
6221if ${ac_cv_path_CP+:} false; then :
6222  $as_echo_n "(cached) " >&6
6223else
6224  case $CP in
6225  [\\/]* | ?:[\\/]*)
6226  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6227  ;;
6228  *)
6229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6230for as_dir in $PATH
6231do
6232  IFS=$as_save_IFS
6233  test -z "$as_dir" && as_dir=.
6234    for ac_exec_ext in '' $ac_executable_extensions; do
6235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6236    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6238    break 2
6239  fi
6240done
6241  done
6242IFS=$as_save_IFS
6243
6244  ;;
6245esac
6246fi
6247CP=$ac_cv_path_CP
6248if test -n "$CP"; then
6249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6250$as_echo "$CP" >&6; }
6251else
6252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6253$as_echo "no" >&6; }
6254fi
6255
6256
6257  test -n "$CP" && break
6258done
6259
6260  else
6261    # The variable is set, but is it from the command line or the environment?
6262
6263    # Try to remove the string !CP! from our list.
6264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6266      # If it failed, the variable was not from the command line. Ignore it,
6267      # but warn the user (except for BASH, which is always set by the calling BASH).
6268      if test "xCP" != xBASH; then
6269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6270$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6271      fi
6272      # Try to locate tool using the code snippet
6273      for ac_prog in cp
6274do
6275  # Extract the first word of "$ac_prog", so it can be a program name with args.
6276set dummy $ac_prog; ac_word=$2
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6278$as_echo_n "checking for $ac_word... " >&6; }
6279if ${ac_cv_path_CP+:} false; then :
6280  $as_echo_n "(cached) " >&6
6281else
6282  case $CP in
6283  [\\/]* | ?:[\\/]*)
6284  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6285  ;;
6286  *)
6287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288for as_dir in $PATH
6289do
6290  IFS=$as_save_IFS
6291  test -z "$as_dir" && as_dir=.
6292    for ac_exec_ext in '' $ac_executable_extensions; do
6293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6294    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6296    break 2
6297  fi
6298done
6299  done
6300IFS=$as_save_IFS
6301
6302  ;;
6303esac
6304fi
6305CP=$ac_cv_path_CP
6306if test -n "$CP"; then
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6308$as_echo "$CP" >&6; }
6309else
6310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
6312fi
6313
6314
6315  test -n "$CP" && break
6316done
6317
6318    else
6319      # If it succeeded, then it was overridden by the user. We will use it
6320      # for the tool.
6321
6322      # First remove it from the list of overridden variables, so we can test
6323      # for unknown variables in the end.
6324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6325
6326      # Check if we try to supply an empty value
6327      if test "x$CP" = x; then
6328        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6329$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6331$as_echo_n "checking for CP... " >&6; }
6332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6333$as_echo "disabled" >&6; }
6334      else
6335        # Check if the provided tool contains a complete path.
6336        tool_specified="$CP"
6337        tool_basename="${tool_specified##*/}"
6338        if test "x$tool_basename" = "x$tool_specified"; then
6339          # A command without a complete path is provided, search $PATH.
6340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6341$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6342          # Extract the first word of "$tool_basename", so it can be a program name with args.
6343set dummy $tool_basename; ac_word=$2
6344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6345$as_echo_n "checking for $ac_word... " >&6; }
6346if ${ac_cv_path_CP+:} false; then :
6347  $as_echo_n "(cached) " >&6
6348else
6349  case $CP in
6350  [\\/]* | ?:[\\/]*)
6351  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6352  ;;
6353  *)
6354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355for as_dir in $PATH
6356do
6357  IFS=$as_save_IFS
6358  test -z "$as_dir" && as_dir=.
6359    for ac_exec_ext in '' $ac_executable_extensions; do
6360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6361    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6363    break 2
6364  fi
6365done
6366  done
6367IFS=$as_save_IFS
6368
6369  ;;
6370esac
6371fi
6372CP=$ac_cv_path_CP
6373if test -n "$CP"; then
6374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6375$as_echo "$CP" >&6; }
6376else
6377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
6379fi
6380
6381
6382          if test "x$CP" = x; then
6383            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6384          fi
6385        else
6386          # Otherwise we believe it is a complete path. Use it as it is.
6387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6388$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6390$as_echo_n "checking for CP... " >&6; }
6391          if test ! -x "$tool_specified"; then
6392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6393$as_echo "not found" >&6; }
6394            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6395          fi
6396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6397$as_echo "$tool_specified" >&6; }
6398        fi
6399      fi
6400    fi
6401
6402  fi
6403
6404
6405
6406  if test "x$CP" = x; then
6407    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6408  fi
6409
6410
6411
6412
6413
6414  # Publish this variable in the help.
6415
6416
6417  if [ -z "${CUT+x}" ]; then
6418    # The variable is not set by user, try to locate tool using the code snippet
6419    for ac_prog in cut
6420do
6421  # Extract the first word of "$ac_prog", so it can be a program name with args.
6422set dummy $ac_prog; ac_word=$2
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6424$as_echo_n "checking for $ac_word... " >&6; }
6425if ${ac_cv_path_CUT+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  case $CUT in
6429  [\\/]* | ?:[\\/]*)
6430  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6431  ;;
6432  *)
6433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436  IFS=$as_save_IFS
6437  test -z "$as_dir" && as_dir=.
6438    for ac_exec_ext in '' $ac_executable_extensions; do
6439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6440    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442    break 2
6443  fi
6444done
6445  done
6446IFS=$as_save_IFS
6447
6448  ;;
6449esac
6450fi
6451CUT=$ac_cv_path_CUT
6452if test -n "$CUT"; then
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6454$as_echo "$CUT" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461  test -n "$CUT" && break
6462done
6463
6464  else
6465    # The variable is set, but is it from the command line or the environment?
6466
6467    # Try to remove the string !CUT! from our list.
6468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6470      # If it failed, the variable was not from the command line. Ignore it,
6471      # but warn the user (except for BASH, which is always set by the calling BASH).
6472      if test "xCUT" != xBASH; then
6473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6474$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6475      fi
6476      # Try to locate tool using the code snippet
6477      for ac_prog in cut
6478do
6479  # Extract the first word of "$ac_prog", so it can be a program name with args.
6480set dummy $ac_prog; ac_word=$2
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if ${ac_cv_path_CUT+:} false; then :
6484  $as_echo_n "(cached) " >&6
6485else
6486  case $CUT in
6487  [\\/]* | ?:[\\/]*)
6488  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6489  ;;
6490  *)
6491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494  IFS=$as_save_IFS
6495  test -z "$as_dir" && as_dir=.
6496    for ac_exec_ext in '' $ac_executable_extensions; do
6497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6498    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500    break 2
6501  fi
6502done
6503  done
6504IFS=$as_save_IFS
6505
6506  ;;
6507esac
6508fi
6509CUT=$ac_cv_path_CUT
6510if test -n "$CUT"; then
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6512$as_echo "$CUT" >&6; }
6513else
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
6516fi
6517
6518
6519  test -n "$CUT" && break
6520done
6521
6522    else
6523      # If it succeeded, then it was overridden by the user. We will use it
6524      # for the tool.
6525
6526      # First remove it from the list of overridden variables, so we can test
6527      # for unknown variables in the end.
6528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6529
6530      # Check if we try to supply an empty value
6531      if test "x$CUT" = x; then
6532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6533$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6535$as_echo_n "checking for CUT... " >&6; }
6536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6537$as_echo "disabled" >&6; }
6538      else
6539        # Check if the provided tool contains a complete path.
6540        tool_specified="$CUT"
6541        tool_basename="${tool_specified##*/}"
6542        if test "x$tool_basename" = "x$tool_specified"; then
6543          # A command without a complete path is provided, search $PATH.
6544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6545$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6546          # Extract the first word of "$tool_basename", so it can be a program name with args.
6547set dummy $tool_basename; ac_word=$2
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6549$as_echo_n "checking for $ac_word... " >&6; }
6550if ${ac_cv_path_CUT+:} false; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  case $CUT in
6554  [\\/]* | ?:[\\/]*)
6555  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6556  ;;
6557  *)
6558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559for as_dir in $PATH
6560do
6561  IFS=$as_save_IFS
6562  test -z "$as_dir" && as_dir=.
6563    for ac_exec_ext in '' $ac_executable_extensions; do
6564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567    break 2
6568  fi
6569done
6570  done
6571IFS=$as_save_IFS
6572
6573  ;;
6574esac
6575fi
6576CUT=$ac_cv_path_CUT
6577if test -n "$CUT"; then
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6579$as_echo "$CUT" >&6; }
6580else
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585
6586          if test "x$CUT" = x; then
6587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6588          fi
6589        else
6590          # Otherwise we believe it is a complete path. Use it as it is.
6591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6592$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6594$as_echo_n "checking for CUT... " >&6; }
6595          if test ! -x "$tool_specified"; then
6596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6597$as_echo "not found" >&6; }
6598            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6599          fi
6600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6601$as_echo "$tool_specified" >&6; }
6602        fi
6603      fi
6604    fi
6605
6606  fi
6607
6608
6609
6610  if test "x$CUT" = x; then
6611    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6612  fi
6613
6614
6615
6616
6617
6618  # Publish this variable in the help.
6619
6620
6621  if [ -z "${DATE+x}" ]; then
6622    # The variable is not set by user, try to locate tool using the code snippet
6623    for ac_prog in date
6624do
6625  # Extract the first word of "$ac_prog", so it can be a program name with args.
6626set dummy $ac_prog; ac_word=$2
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628$as_echo_n "checking for $ac_word... " >&6; }
6629if ${ac_cv_path_DATE+:} false; then :
6630  $as_echo_n "(cached) " >&6
6631else
6632  case $DATE in
6633  [\\/]* | ?:[\\/]*)
6634  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6635  ;;
6636  *)
6637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638for as_dir in $PATH
6639do
6640  IFS=$as_save_IFS
6641  test -z "$as_dir" && as_dir=.
6642    for ac_exec_ext in '' $ac_executable_extensions; do
6643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6644    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6646    break 2
6647  fi
6648done
6649  done
6650IFS=$as_save_IFS
6651
6652  ;;
6653esac
6654fi
6655DATE=$ac_cv_path_DATE
6656if test -n "$DATE"; then
6657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6658$as_echo "$DATE" >&6; }
6659else
6660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661$as_echo "no" >&6; }
6662fi
6663
6664
6665  test -n "$DATE" && break
6666done
6667
6668  else
6669    # The variable is set, but is it from the command line or the environment?
6670
6671    # Try to remove the string !DATE! from our list.
6672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6674      # If it failed, the variable was not from the command line. Ignore it,
6675      # but warn the user (except for BASH, which is always set by the calling BASH).
6676      if test "xDATE" != xBASH; then
6677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6678$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6679      fi
6680      # Try to locate tool using the code snippet
6681      for ac_prog in date
6682do
6683  # Extract the first word of "$ac_prog", so it can be a program name with args.
6684set dummy $ac_prog; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_DATE+:} false; then :
6688  $as_echo_n "(cached) " >&6
6689else
6690  case $DATE in
6691  [\\/]* | ?:[\\/]*)
6692  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6693  ;;
6694  *)
6695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in $PATH
6697do
6698  IFS=$as_save_IFS
6699  test -z "$as_dir" && as_dir=.
6700    for ac_exec_ext in '' $ac_executable_extensions; do
6701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704    break 2
6705  fi
6706done
6707  done
6708IFS=$as_save_IFS
6709
6710  ;;
6711esac
6712fi
6713DATE=$ac_cv_path_DATE
6714if test -n "$DATE"; then
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6716$as_echo "$DATE" >&6; }
6717else
6718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
6723  test -n "$DATE" && break
6724done
6725
6726    else
6727      # If it succeeded, then it was overridden by the user. We will use it
6728      # for the tool.
6729
6730      # First remove it from the list of overridden variables, so we can test
6731      # for unknown variables in the end.
6732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6733
6734      # Check if we try to supply an empty value
6735      if test "x$DATE" = x; then
6736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6737$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6739$as_echo_n "checking for DATE... " >&6; }
6740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6741$as_echo "disabled" >&6; }
6742      else
6743        # Check if the provided tool contains a complete path.
6744        tool_specified="$DATE"
6745        tool_basename="${tool_specified##*/}"
6746        if test "x$tool_basename" = "x$tool_specified"; then
6747          # A command without a complete path is provided, search $PATH.
6748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6749$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6750          # Extract the first word of "$tool_basename", so it can be a program name with args.
6751set dummy $tool_basename; ac_word=$2
6752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6753$as_echo_n "checking for $ac_word... " >&6; }
6754if ${ac_cv_path_DATE+:} false; then :
6755  $as_echo_n "(cached) " >&6
6756else
6757  case $DATE in
6758  [\\/]* | ?:[\\/]*)
6759  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6760  ;;
6761  *)
6762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6763for as_dir in $PATH
6764do
6765  IFS=$as_save_IFS
6766  test -z "$as_dir" && as_dir=.
6767    for ac_exec_ext in '' $ac_executable_extensions; do
6768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6769    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6771    break 2
6772  fi
6773done
6774  done
6775IFS=$as_save_IFS
6776
6777  ;;
6778esac
6779fi
6780DATE=$ac_cv_path_DATE
6781if test -n "$DATE"; then
6782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6783$as_echo "$DATE" >&6; }
6784else
6785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6786$as_echo "no" >&6; }
6787fi
6788
6789
6790          if test "x$DATE" = x; then
6791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6792          fi
6793        else
6794          # Otherwise we believe it is a complete path. Use it as it is.
6795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6796$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6798$as_echo_n "checking for DATE... " >&6; }
6799          if test ! -x "$tool_specified"; then
6800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6801$as_echo "not found" >&6; }
6802            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6803          fi
6804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6805$as_echo "$tool_specified" >&6; }
6806        fi
6807      fi
6808    fi
6809
6810  fi
6811
6812
6813
6814  if test "x$DATE" = x; then
6815    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6816  fi
6817
6818
6819
6820
6821
6822  # Publish this variable in the help.
6823
6824
6825  if [ -z "${DIFF+x}" ]; then
6826    # The variable is not set by user, try to locate tool using the code snippet
6827    for ac_prog in gdiff diff
6828do
6829  # Extract the first word of "$ac_prog", so it can be a program name with args.
6830set dummy $ac_prog; ac_word=$2
6831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6832$as_echo_n "checking for $ac_word... " >&6; }
6833if ${ac_cv_path_DIFF+:} false; then :
6834  $as_echo_n "(cached) " >&6
6835else
6836  case $DIFF in
6837  [\\/]* | ?:[\\/]*)
6838  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6839  ;;
6840  *)
6841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6842for as_dir in $PATH
6843do
6844  IFS=$as_save_IFS
6845  test -z "$as_dir" && as_dir=.
6846    for ac_exec_ext in '' $ac_executable_extensions; do
6847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6848    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6850    break 2
6851  fi
6852done
6853  done
6854IFS=$as_save_IFS
6855
6856  ;;
6857esac
6858fi
6859DIFF=$ac_cv_path_DIFF
6860if test -n "$DIFF"; then
6861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6862$as_echo "$DIFF" >&6; }
6863else
6864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6865$as_echo "no" >&6; }
6866fi
6867
6868
6869  test -n "$DIFF" && break
6870done
6871
6872  else
6873    # The variable is set, but is it from the command line or the environment?
6874
6875    # Try to remove the string !DIFF! from our list.
6876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6878      # If it failed, the variable was not from the command line. Ignore it,
6879      # but warn the user (except for BASH, which is always set by the calling BASH).
6880      if test "xDIFF" != xBASH; then
6881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6882$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6883      fi
6884      # Try to locate tool using the code snippet
6885      for ac_prog in gdiff diff
6886do
6887  # Extract the first word of "$ac_prog", so it can be a program name with args.
6888set dummy $ac_prog; ac_word=$2
6889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6890$as_echo_n "checking for $ac_word... " >&6; }
6891if ${ac_cv_path_DIFF+:} false; then :
6892  $as_echo_n "(cached) " >&6
6893else
6894  case $DIFF in
6895  [\\/]* | ?:[\\/]*)
6896  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6897  ;;
6898  *)
6899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6900for as_dir in $PATH
6901do
6902  IFS=$as_save_IFS
6903  test -z "$as_dir" && as_dir=.
6904    for ac_exec_ext in '' $ac_executable_extensions; do
6905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6906    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6908    break 2
6909  fi
6910done
6911  done
6912IFS=$as_save_IFS
6913
6914  ;;
6915esac
6916fi
6917DIFF=$ac_cv_path_DIFF
6918if test -n "$DIFF"; then
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6920$as_echo "$DIFF" >&6; }
6921else
6922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6923$as_echo "no" >&6; }
6924fi
6925
6926
6927  test -n "$DIFF" && break
6928done
6929
6930    else
6931      # If it succeeded, then it was overridden by the user. We will use it
6932      # for the tool.
6933
6934      # First remove it from the list of overridden variables, so we can test
6935      # for unknown variables in the end.
6936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6937
6938      # Check if we try to supply an empty value
6939      if test "x$DIFF" = x; then
6940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6941$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6943$as_echo_n "checking for DIFF... " >&6; }
6944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6945$as_echo "disabled" >&6; }
6946      else
6947        # Check if the provided tool contains a complete path.
6948        tool_specified="$DIFF"
6949        tool_basename="${tool_specified##*/}"
6950        if test "x$tool_basename" = "x$tool_specified"; then
6951          # A command without a complete path is provided, search $PATH.
6952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6953$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6954          # Extract the first word of "$tool_basename", so it can be a program name with args.
6955set dummy $tool_basename; ac_word=$2
6956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6957$as_echo_n "checking for $ac_word... " >&6; }
6958if ${ac_cv_path_DIFF+:} false; then :
6959  $as_echo_n "(cached) " >&6
6960else
6961  case $DIFF in
6962  [\\/]* | ?:[\\/]*)
6963  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6964  ;;
6965  *)
6966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6967for as_dir in $PATH
6968do
6969  IFS=$as_save_IFS
6970  test -z "$as_dir" && as_dir=.
6971    for ac_exec_ext in '' $ac_executable_extensions; do
6972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6973    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6975    break 2
6976  fi
6977done
6978  done
6979IFS=$as_save_IFS
6980
6981  ;;
6982esac
6983fi
6984DIFF=$ac_cv_path_DIFF
6985if test -n "$DIFF"; then
6986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6987$as_echo "$DIFF" >&6; }
6988else
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6990$as_echo "no" >&6; }
6991fi
6992
6993
6994          if test "x$DIFF" = x; then
6995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6996          fi
6997        else
6998          # Otherwise we believe it is a complete path. Use it as it is.
6999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7000$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7002$as_echo_n "checking for DIFF... " >&6; }
7003          if test ! -x "$tool_specified"; then
7004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7005$as_echo "not found" >&6; }
7006            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7007          fi
7008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7009$as_echo "$tool_specified" >&6; }
7010        fi
7011      fi
7012    fi
7013
7014  fi
7015
7016
7017
7018  if test "x$DIFF" = x; then
7019    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7020  fi
7021
7022
7023
7024
7025
7026  # Publish this variable in the help.
7027
7028
7029  if [ -z "${DIRNAME+x}" ]; then
7030    # The variable is not set by user, try to locate tool using the code snippet
7031    for ac_prog in dirname
7032do
7033  # Extract the first word of "$ac_prog", so it can be a program name with args.
7034set dummy $ac_prog; ac_word=$2
7035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7036$as_echo_n "checking for $ac_word... " >&6; }
7037if ${ac_cv_path_DIRNAME+:} false; then :
7038  $as_echo_n "(cached) " >&6
7039else
7040  case $DIRNAME in
7041  [\\/]* | ?:[\\/]*)
7042  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7043  ;;
7044  *)
7045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7046for as_dir in $PATH
7047do
7048  IFS=$as_save_IFS
7049  test -z "$as_dir" && as_dir=.
7050    for ac_exec_ext in '' $ac_executable_extensions; do
7051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7052    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7054    break 2
7055  fi
7056done
7057  done
7058IFS=$as_save_IFS
7059
7060  ;;
7061esac
7062fi
7063DIRNAME=$ac_cv_path_DIRNAME
7064if test -n "$DIRNAME"; then
7065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7066$as_echo "$DIRNAME" >&6; }
7067else
7068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7069$as_echo "no" >&6; }
7070fi
7071
7072
7073  test -n "$DIRNAME" && break
7074done
7075
7076  else
7077    # The variable is set, but is it from the command line or the environment?
7078
7079    # Try to remove the string !DIRNAME! from our list.
7080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7082      # If it failed, the variable was not from the command line. Ignore it,
7083      # but warn the user (except for BASH, which is always set by the calling BASH).
7084      if test "xDIRNAME" != xBASH; then
7085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7086$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7087      fi
7088      # Try to locate tool using the code snippet
7089      for ac_prog in dirname
7090do
7091  # Extract the first word of "$ac_prog", so it can be a program name with args.
7092set dummy $ac_prog; ac_word=$2
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7094$as_echo_n "checking for $ac_word... " >&6; }
7095if ${ac_cv_path_DIRNAME+:} false; then :
7096  $as_echo_n "(cached) " >&6
7097else
7098  case $DIRNAME in
7099  [\\/]* | ?:[\\/]*)
7100  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7101  ;;
7102  *)
7103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7104for as_dir in $PATH
7105do
7106  IFS=$as_save_IFS
7107  test -z "$as_dir" && as_dir=.
7108    for ac_exec_ext in '' $ac_executable_extensions; do
7109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7110    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7112    break 2
7113  fi
7114done
7115  done
7116IFS=$as_save_IFS
7117
7118  ;;
7119esac
7120fi
7121DIRNAME=$ac_cv_path_DIRNAME
7122if test -n "$DIRNAME"; then
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7124$as_echo "$DIRNAME" >&6; }
7125else
7126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7127$as_echo "no" >&6; }
7128fi
7129
7130
7131  test -n "$DIRNAME" && break
7132done
7133
7134    else
7135      # If it succeeded, then it was overridden by the user. We will use it
7136      # for the tool.
7137
7138      # First remove it from the list of overridden variables, so we can test
7139      # for unknown variables in the end.
7140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7141
7142      # Check if we try to supply an empty value
7143      if test "x$DIRNAME" = x; then
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7145$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7147$as_echo_n "checking for DIRNAME... " >&6; }
7148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7149$as_echo "disabled" >&6; }
7150      else
7151        # Check if the provided tool contains a complete path.
7152        tool_specified="$DIRNAME"
7153        tool_basename="${tool_specified##*/}"
7154        if test "x$tool_basename" = "x$tool_specified"; then
7155          # A command without a complete path is provided, search $PATH.
7156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7157$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7158          # Extract the first word of "$tool_basename", so it can be a program name with args.
7159set dummy $tool_basename; ac_word=$2
7160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161$as_echo_n "checking for $ac_word... " >&6; }
7162if ${ac_cv_path_DIRNAME+:} false; then :
7163  $as_echo_n "(cached) " >&6
7164else
7165  case $DIRNAME in
7166  [\\/]* | ?:[\\/]*)
7167  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7168  ;;
7169  *)
7170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7171for as_dir in $PATH
7172do
7173  IFS=$as_save_IFS
7174  test -z "$as_dir" && as_dir=.
7175    for ac_exec_ext in '' $ac_executable_extensions; do
7176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7177    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7179    break 2
7180  fi
7181done
7182  done
7183IFS=$as_save_IFS
7184
7185  ;;
7186esac
7187fi
7188DIRNAME=$ac_cv_path_DIRNAME
7189if test -n "$DIRNAME"; then
7190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7191$as_echo "$DIRNAME" >&6; }
7192else
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194$as_echo "no" >&6; }
7195fi
7196
7197
7198          if test "x$DIRNAME" = x; then
7199            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7200          fi
7201        else
7202          # Otherwise we believe it is a complete path. Use it as it is.
7203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7204$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7205          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7206$as_echo_n "checking for DIRNAME... " >&6; }
7207          if test ! -x "$tool_specified"; then
7208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7209$as_echo "not found" >&6; }
7210            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7211          fi
7212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7213$as_echo "$tool_specified" >&6; }
7214        fi
7215      fi
7216    fi
7217
7218  fi
7219
7220
7221
7222  if test "x$DIRNAME" = x; then
7223    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7224  fi
7225
7226
7227
7228
7229
7230  # Publish this variable in the help.
7231
7232
7233  if [ -z "${ECHO+x}" ]; then
7234    # The variable is not set by user, try to locate tool using the code snippet
7235    for ac_prog in echo
7236do
7237  # Extract the first word of "$ac_prog", so it can be a program name with args.
7238set dummy $ac_prog; ac_word=$2
7239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7240$as_echo_n "checking for $ac_word... " >&6; }
7241if ${ac_cv_path_ECHO+:} false; then :
7242  $as_echo_n "(cached) " >&6
7243else
7244  case $ECHO in
7245  [\\/]* | ?:[\\/]*)
7246  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7247  ;;
7248  *)
7249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7250for as_dir in $PATH
7251do
7252  IFS=$as_save_IFS
7253  test -z "$as_dir" && as_dir=.
7254    for ac_exec_ext in '' $ac_executable_extensions; do
7255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7256    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7258    break 2
7259  fi
7260done
7261  done
7262IFS=$as_save_IFS
7263
7264  ;;
7265esac
7266fi
7267ECHO=$ac_cv_path_ECHO
7268if test -n "$ECHO"; then
7269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7270$as_echo "$ECHO" >&6; }
7271else
7272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7273$as_echo "no" >&6; }
7274fi
7275
7276
7277  test -n "$ECHO" && break
7278done
7279
7280  else
7281    # The variable is set, but is it from the command line or the environment?
7282
7283    # Try to remove the string !ECHO! from our list.
7284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7286      # If it failed, the variable was not from the command line. Ignore it,
7287      # but warn the user (except for BASH, which is always set by the calling BASH).
7288      if test "xECHO" != xBASH; then
7289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7290$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7291      fi
7292      # Try to locate tool using the code snippet
7293      for ac_prog in echo
7294do
7295  # Extract the first word of "$ac_prog", so it can be a program name with args.
7296set dummy $ac_prog; ac_word=$2
7297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7298$as_echo_n "checking for $ac_word... " >&6; }
7299if ${ac_cv_path_ECHO+:} false; then :
7300  $as_echo_n "(cached) " >&6
7301else
7302  case $ECHO in
7303  [\\/]* | ?:[\\/]*)
7304  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7305  ;;
7306  *)
7307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308for as_dir in $PATH
7309do
7310  IFS=$as_save_IFS
7311  test -z "$as_dir" && as_dir=.
7312    for ac_exec_ext in '' $ac_executable_extensions; do
7313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7314    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7316    break 2
7317  fi
7318done
7319  done
7320IFS=$as_save_IFS
7321
7322  ;;
7323esac
7324fi
7325ECHO=$ac_cv_path_ECHO
7326if test -n "$ECHO"; then
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7328$as_echo "$ECHO" >&6; }
7329else
7330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7331$as_echo "no" >&6; }
7332fi
7333
7334
7335  test -n "$ECHO" && break
7336done
7337
7338    else
7339      # If it succeeded, then it was overridden by the user. We will use it
7340      # for the tool.
7341
7342      # First remove it from the list of overridden variables, so we can test
7343      # for unknown variables in the end.
7344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7345
7346      # Check if we try to supply an empty value
7347      if test "x$ECHO" = x; then
7348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7349$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7351$as_echo_n "checking for ECHO... " >&6; }
7352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7353$as_echo "disabled" >&6; }
7354      else
7355        # Check if the provided tool contains a complete path.
7356        tool_specified="$ECHO"
7357        tool_basename="${tool_specified##*/}"
7358        if test "x$tool_basename" = "x$tool_specified"; then
7359          # A command without a complete path is provided, search $PATH.
7360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7361$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7362          # Extract the first word of "$tool_basename", so it can be a program name with args.
7363set dummy $tool_basename; ac_word=$2
7364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365$as_echo_n "checking for $ac_word... " >&6; }
7366if ${ac_cv_path_ECHO+:} false; then :
7367  $as_echo_n "(cached) " >&6
7368else
7369  case $ECHO in
7370  [\\/]* | ?:[\\/]*)
7371  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7372  ;;
7373  *)
7374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375for as_dir in $PATH
7376do
7377  IFS=$as_save_IFS
7378  test -z "$as_dir" && as_dir=.
7379    for ac_exec_ext in '' $ac_executable_extensions; do
7380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7383    break 2
7384  fi
7385done
7386  done
7387IFS=$as_save_IFS
7388
7389  ;;
7390esac
7391fi
7392ECHO=$ac_cv_path_ECHO
7393if test -n "$ECHO"; then
7394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7395$as_echo "$ECHO" >&6; }
7396else
7397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398$as_echo "no" >&6; }
7399fi
7400
7401
7402          if test "x$ECHO" = x; then
7403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7404          fi
7405        else
7406          # Otherwise we believe it is a complete path. Use it as it is.
7407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7408$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7410$as_echo_n "checking for ECHO... " >&6; }
7411          if test ! -x "$tool_specified"; then
7412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7413$as_echo "not found" >&6; }
7414            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7415          fi
7416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7417$as_echo "$tool_specified" >&6; }
7418        fi
7419      fi
7420    fi
7421
7422  fi
7423
7424
7425
7426  if test "x$ECHO" = x; then
7427    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7428  fi
7429
7430
7431
7432
7433
7434  # Publish this variable in the help.
7435
7436
7437  if [ -z "${EXPR+x}" ]; then
7438    # The variable is not set by user, try to locate tool using the code snippet
7439    for ac_prog in expr
7440do
7441  # Extract the first word of "$ac_prog", so it can be a program name with args.
7442set dummy $ac_prog; ac_word=$2
7443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7444$as_echo_n "checking for $ac_word... " >&6; }
7445if ${ac_cv_path_EXPR+:} false; then :
7446  $as_echo_n "(cached) " >&6
7447else
7448  case $EXPR in
7449  [\\/]* | ?:[\\/]*)
7450  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7451  ;;
7452  *)
7453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7454for as_dir in $PATH
7455do
7456  IFS=$as_save_IFS
7457  test -z "$as_dir" && as_dir=.
7458    for ac_exec_ext in '' $ac_executable_extensions; do
7459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7460    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7462    break 2
7463  fi
7464done
7465  done
7466IFS=$as_save_IFS
7467
7468  ;;
7469esac
7470fi
7471EXPR=$ac_cv_path_EXPR
7472if test -n "$EXPR"; then
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7474$as_echo "$EXPR" >&6; }
7475else
7476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7477$as_echo "no" >&6; }
7478fi
7479
7480
7481  test -n "$EXPR" && break
7482done
7483
7484  else
7485    # The variable is set, but is it from the command line or the environment?
7486
7487    # Try to remove the string !EXPR! from our list.
7488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7490      # If it failed, the variable was not from the command line. Ignore it,
7491      # but warn the user (except for BASH, which is always set by the calling BASH).
7492      if test "xEXPR" != xBASH; then
7493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7494$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7495      fi
7496      # Try to locate tool using the code snippet
7497      for ac_prog in expr
7498do
7499  # Extract the first word of "$ac_prog", so it can be a program name with args.
7500set dummy $ac_prog; ac_word=$2
7501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7502$as_echo_n "checking for $ac_word... " >&6; }
7503if ${ac_cv_path_EXPR+:} false; then :
7504  $as_echo_n "(cached) " >&6
7505else
7506  case $EXPR in
7507  [\\/]* | ?:[\\/]*)
7508  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7509  ;;
7510  *)
7511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7512for as_dir in $PATH
7513do
7514  IFS=$as_save_IFS
7515  test -z "$as_dir" && as_dir=.
7516    for ac_exec_ext in '' $ac_executable_extensions; do
7517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7518    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7520    break 2
7521  fi
7522done
7523  done
7524IFS=$as_save_IFS
7525
7526  ;;
7527esac
7528fi
7529EXPR=$ac_cv_path_EXPR
7530if test -n "$EXPR"; then
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7532$as_echo "$EXPR" >&6; }
7533else
7534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7535$as_echo "no" >&6; }
7536fi
7537
7538
7539  test -n "$EXPR" && break
7540done
7541
7542    else
7543      # If it succeeded, then it was overridden by the user. We will use it
7544      # for the tool.
7545
7546      # First remove it from the list of overridden variables, so we can test
7547      # for unknown variables in the end.
7548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7549
7550      # Check if we try to supply an empty value
7551      if test "x$EXPR" = x; then
7552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7553$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7555$as_echo_n "checking for EXPR... " >&6; }
7556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7557$as_echo "disabled" >&6; }
7558      else
7559        # Check if the provided tool contains a complete path.
7560        tool_specified="$EXPR"
7561        tool_basename="${tool_specified##*/}"
7562        if test "x$tool_basename" = "x$tool_specified"; then
7563          # A command without a complete path is provided, search $PATH.
7564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7565$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7566          # Extract the first word of "$tool_basename", so it can be a program name with args.
7567set dummy $tool_basename; ac_word=$2
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7569$as_echo_n "checking for $ac_word... " >&6; }
7570if ${ac_cv_path_EXPR+:} false; then :
7571  $as_echo_n "(cached) " >&6
7572else
7573  case $EXPR in
7574  [\\/]* | ?:[\\/]*)
7575  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7576  ;;
7577  *)
7578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579for as_dir in $PATH
7580do
7581  IFS=$as_save_IFS
7582  test -z "$as_dir" && as_dir=.
7583    for ac_exec_ext in '' $ac_executable_extensions; do
7584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7585    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7587    break 2
7588  fi
7589done
7590  done
7591IFS=$as_save_IFS
7592
7593  ;;
7594esac
7595fi
7596EXPR=$ac_cv_path_EXPR
7597if test -n "$EXPR"; then
7598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7599$as_echo "$EXPR" >&6; }
7600else
7601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7602$as_echo "no" >&6; }
7603fi
7604
7605
7606          if test "x$EXPR" = x; then
7607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7608          fi
7609        else
7610          # Otherwise we believe it is a complete path. Use it as it is.
7611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7612$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7614$as_echo_n "checking for EXPR... " >&6; }
7615          if test ! -x "$tool_specified"; then
7616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7617$as_echo "not found" >&6; }
7618            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7619          fi
7620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7621$as_echo "$tool_specified" >&6; }
7622        fi
7623      fi
7624    fi
7625
7626  fi
7627
7628
7629
7630  if test "x$EXPR" = x; then
7631    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7632  fi
7633
7634
7635
7636
7637
7638  # Publish this variable in the help.
7639
7640
7641  if [ -z "${FILE+x}" ]; then
7642    # The variable is not set by user, try to locate tool using the code snippet
7643    for ac_prog in file
7644do
7645  # Extract the first word of "$ac_prog", so it can be a program name with args.
7646set dummy $ac_prog; ac_word=$2
7647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7648$as_echo_n "checking for $ac_word... " >&6; }
7649if ${ac_cv_path_FILE+:} false; then :
7650  $as_echo_n "(cached) " >&6
7651else
7652  case $FILE in
7653  [\\/]* | ?:[\\/]*)
7654  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7655  ;;
7656  *)
7657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7658for as_dir in $PATH
7659do
7660  IFS=$as_save_IFS
7661  test -z "$as_dir" && as_dir=.
7662    for ac_exec_ext in '' $ac_executable_extensions; do
7663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7664    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7666    break 2
7667  fi
7668done
7669  done
7670IFS=$as_save_IFS
7671
7672  ;;
7673esac
7674fi
7675FILE=$ac_cv_path_FILE
7676if test -n "$FILE"; then
7677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7678$as_echo "$FILE" >&6; }
7679else
7680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7681$as_echo "no" >&6; }
7682fi
7683
7684
7685  test -n "$FILE" && break
7686done
7687
7688  else
7689    # The variable is set, but is it from the command line or the environment?
7690
7691    # Try to remove the string !FILE! from our list.
7692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7694      # If it failed, the variable was not from the command line. Ignore it,
7695      # but warn the user (except for BASH, which is always set by the calling BASH).
7696      if test "xFILE" != xBASH; then
7697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7698$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7699      fi
7700      # Try to locate tool using the code snippet
7701      for ac_prog in file
7702do
7703  # Extract the first word of "$ac_prog", so it can be a program name with args.
7704set dummy $ac_prog; ac_word=$2
7705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7706$as_echo_n "checking for $ac_word... " >&6; }
7707if ${ac_cv_path_FILE+:} false; then :
7708  $as_echo_n "(cached) " >&6
7709else
7710  case $FILE in
7711  [\\/]* | ?:[\\/]*)
7712  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7713  ;;
7714  *)
7715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7716for as_dir in $PATH
7717do
7718  IFS=$as_save_IFS
7719  test -z "$as_dir" && as_dir=.
7720    for ac_exec_ext in '' $ac_executable_extensions; do
7721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7722    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7724    break 2
7725  fi
7726done
7727  done
7728IFS=$as_save_IFS
7729
7730  ;;
7731esac
7732fi
7733FILE=$ac_cv_path_FILE
7734if test -n "$FILE"; then
7735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7736$as_echo "$FILE" >&6; }
7737else
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7739$as_echo "no" >&6; }
7740fi
7741
7742
7743  test -n "$FILE" && break
7744done
7745
7746    else
7747      # If it succeeded, then it was overridden by the user. We will use it
7748      # for the tool.
7749
7750      # First remove it from the list of overridden variables, so we can test
7751      # for unknown variables in the end.
7752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7753
7754      # Check if we try to supply an empty value
7755      if test "x$FILE" = x; then
7756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7757$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7759$as_echo_n "checking for FILE... " >&6; }
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7761$as_echo "disabled" >&6; }
7762      else
7763        # Check if the provided tool contains a complete path.
7764        tool_specified="$FILE"
7765        tool_basename="${tool_specified##*/}"
7766        if test "x$tool_basename" = "x$tool_specified"; then
7767          # A command without a complete path is provided, search $PATH.
7768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7769$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7770          # Extract the first word of "$tool_basename", so it can be a program name with args.
7771set dummy $tool_basename; ac_word=$2
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7773$as_echo_n "checking for $ac_word... " >&6; }
7774if ${ac_cv_path_FILE+:} false; then :
7775  $as_echo_n "(cached) " >&6
7776else
7777  case $FILE in
7778  [\\/]* | ?:[\\/]*)
7779  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7780  ;;
7781  *)
7782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7783for as_dir in $PATH
7784do
7785  IFS=$as_save_IFS
7786  test -z "$as_dir" && as_dir=.
7787    for ac_exec_ext in '' $ac_executable_extensions; do
7788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7789    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7791    break 2
7792  fi
7793done
7794  done
7795IFS=$as_save_IFS
7796
7797  ;;
7798esac
7799fi
7800FILE=$ac_cv_path_FILE
7801if test -n "$FILE"; then
7802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7803$as_echo "$FILE" >&6; }
7804else
7805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7806$as_echo "no" >&6; }
7807fi
7808
7809
7810          if test "x$FILE" = x; then
7811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7812          fi
7813        else
7814          # Otherwise we believe it is a complete path. Use it as it is.
7815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7816$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7818$as_echo_n "checking for FILE... " >&6; }
7819          if test ! -x "$tool_specified"; then
7820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7821$as_echo "not found" >&6; }
7822            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7823          fi
7824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7825$as_echo "$tool_specified" >&6; }
7826        fi
7827      fi
7828    fi
7829
7830  fi
7831
7832
7833
7834  if test "x$FILE" = x; then
7835    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7836  fi
7837
7838
7839
7840
7841
7842  # Publish this variable in the help.
7843
7844
7845  if [ -z "${FIND+x}" ]; then
7846    # The variable is not set by user, try to locate tool using the code snippet
7847    for ac_prog in find
7848do
7849  # Extract the first word of "$ac_prog", so it can be a program name with args.
7850set dummy $ac_prog; ac_word=$2
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7852$as_echo_n "checking for $ac_word... " >&6; }
7853if ${ac_cv_path_FIND+:} false; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  case $FIND in
7857  [\\/]* | ?:[\\/]*)
7858  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7859  ;;
7860  *)
7861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7862for as_dir in $PATH
7863do
7864  IFS=$as_save_IFS
7865  test -z "$as_dir" && as_dir=.
7866    for ac_exec_ext in '' $ac_executable_extensions; do
7867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7868    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7870    break 2
7871  fi
7872done
7873  done
7874IFS=$as_save_IFS
7875
7876  ;;
7877esac
7878fi
7879FIND=$ac_cv_path_FIND
7880if test -n "$FIND"; then
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7882$as_echo "$FIND" >&6; }
7883else
7884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7885$as_echo "no" >&6; }
7886fi
7887
7888
7889  test -n "$FIND" && break
7890done
7891
7892  else
7893    # The variable is set, but is it from the command line or the environment?
7894
7895    # Try to remove the string !FIND! from our list.
7896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7898      # If it failed, the variable was not from the command line. Ignore it,
7899      # but warn the user (except for BASH, which is always set by the calling BASH).
7900      if test "xFIND" != xBASH; then
7901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7902$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7903      fi
7904      # Try to locate tool using the code snippet
7905      for ac_prog in find
7906do
7907  # Extract the first word of "$ac_prog", so it can be a program name with args.
7908set dummy $ac_prog; ac_word=$2
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7910$as_echo_n "checking for $ac_word... " >&6; }
7911if ${ac_cv_path_FIND+:} false; then :
7912  $as_echo_n "(cached) " >&6
7913else
7914  case $FIND in
7915  [\\/]* | ?:[\\/]*)
7916  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7917  ;;
7918  *)
7919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7920for as_dir in $PATH
7921do
7922  IFS=$as_save_IFS
7923  test -z "$as_dir" && as_dir=.
7924    for ac_exec_ext in '' $ac_executable_extensions; do
7925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7926    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7928    break 2
7929  fi
7930done
7931  done
7932IFS=$as_save_IFS
7933
7934  ;;
7935esac
7936fi
7937FIND=$ac_cv_path_FIND
7938if test -n "$FIND"; then
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7940$as_echo "$FIND" >&6; }
7941else
7942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7943$as_echo "no" >&6; }
7944fi
7945
7946
7947  test -n "$FIND" && break
7948done
7949
7950    else
7951      # If it succeeded, then it was overridden by the user. We will use it
7952      # for the tool.
7953
7954      # First remove it from the list of overridden variables, so we can test
7955      # for unknown variables in the end.
7956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7957
7958      # Check if we try to supply an empty value
7959      if test "x$FIND" = x; then
7960        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7961$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7963$as_echo_n "checking for FIND... " >&6; }
7964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7965$as_echo "disabled" >&6; }
7966      else
7967        # Check if the provided tool contains a complete path.
7968        tool_specified="$FIND"
7969        tool_basename="${tool_specified##*/}"
7970        if test "x$tool_basename" = "x$tool_specified"; then
7971          # A command without a complete path is provided, search $PATH.
7972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7973$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7974          # Extract the first word of "$tool_basename", so it can be a program name with args.
7975set dummy $tool_basename; ac_word=$2
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7977$as_echo_n "checking for $ac_word... " >&6; }
7978if ${ac_cv_path_FIND+:} false; then :
7979  $as_echo_n "(cached) " >&6
7980else
7981  case $FIND in
7982  [\\/]* | ?:[\\/]*)
7983  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7984  ;;
7985  *)
7986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7987for as_dir in $PATH
7988do
7989  IFS=$as_save_IFS
7990  test -z "$as_dir" && as_dir=.
7991    for ac_exec_ext in '' $ac_executable_extensions; do
7992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7993    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7995    break 2
7996  fi
7997done
7998  done
7999IFS=$as_save_IFS
8000
8001  ;;
8002esac
8003fi
8004FIND=$ac_cv_path_FIND
8005if test -n "$FIND"; then
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8007$as_echo "$FIND" >&6; }
8008else
8009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8010$as_echo "no" >&6; }
8011fi
8012
8013
8014          if test "x$FIND" = x; then
8015            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8016          fi
8017        else
8018          # Otherwise we believe it is a complete path. Use it as it is.
8019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8020$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8021          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8022$as_echo_n "checking for FIND... " >&6; }
8023          if test ! -x "$tool_specified"; then
8024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8025$as_echo "not found" >&6; }
8026            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8027          fi
8028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8029$as_echo "$tool_specified" >&6; }
8030        fi
8031      fi
8032    fi
8033
8034  fi
8035
8036
8037
8038  if test "x$FIND" = x; then
8039    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8040  fi
8041
8042
8043
8044
8045
8046  # Publish this variable in the help.
8047
8048
8049  if [ -z "${HEAD+x}" ]; then
8050    # The variable is not set by user, try to locate tool using the code snippet
8051    for ac_prog in head
8052do
8053  # Extract the first word of "$ac_prog", so it can be a program name with args.
8054set dummy $ac_prog; ac_word=$2
8055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8056$as_echo_n "checking for $ac_word... " >&6; }
8057if ${ac_cv_path_HEAD+:} false; then :
8058  $as_echo_n "(cached) " >&6
8059else
8060  case $HEAD in
8061  [\\/]* | ?:[\\/]*)
8062  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8063  ;;
8064  *)
8065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8066for as_dir in $PATH
8067do
8068  IFS=$as_save_IFS
8069  test -z "$as_dir" && as_dir=.
8070    for ac_exec_ext in '' $ac_executable_extensions; do
8071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8072    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8074    break 2
8075  fi
8076done
8077  done
8078IFS=$as_save_IFS
8079
8080  ;;
8081esac
8082fi
8083HEAD=$ac_cv_path_HEAD
8084if test -n "$HEAD"; then
8085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8086$as_echo "$HEAD" >&6; }
8087else
8088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8089$as_echo "no" >&6; }
8090fi
8091
8092
8093  test -n "$HEAD" && break
8094done
8095
8096  else
8097    # The variable is set, but is it from the command line or the environment?
8098
8099    # Try to remove the string !HEAD! from our list.
8100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8102      # If it failed, the variable was not from the command line. Ignore it,
8103      # but warn the user (except for BASH, which is always set by the calling BASH).
8104      if test "xHEAD" != xBASH; then
8105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8106$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8107      fi
8108      # Try to locate tool using the code snippet
8109      for ac_prog in head
8110do
8111  # Extract the first word of "$ac_prog", so it can be a program name with args.
8112set dummy $ac_prog; ac_word=$2
8113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8114$as_echo_n "checking for $ac_word... " >&6; }
8115if ${ac_cv_path_HEAD+:} false; then :
8116  $as_echo_n "(cached) " >&6
8117else
8118  case $HEAD in
8119  [\\/]* | ?:[\\/]*)
8120  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8121  ;;
8122  *)
8123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8124for as_dir in $PATH
8125do
8126  IFS=$as_save_IFS
8127  test -z "$as_dir" && as_dir=.
8128    for ac_exec_ext in '' $ac_executable_extensions; do
8129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8130    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8132    break 2
8133  fi
8134done
8135  done
8136IFS=$as_save_IFS
8137
8138  ;;
8139esac
8140fi
8141HEAD=$ac_cv_path_HEAD
8142if test -n "$HEAD"; then
8143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8144$as_echo "$HEAD" >&6; }
8145else
8146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
8148fi
8149
8150
8151  test -n "$HEAD" && break
8152done
8153
8154    else
8155      # If it succeeded, then it was overridden by the user. We will use it
8156      # for the tool.
8157
8158      # First remove it from the list of overridden variables, so we can test
8159      # for unknown variables in the end.
8160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8161
8162      # Check if we try to supply an empty value
8163      if test "x$HEAD" = x; then
8164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8165$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8167$as_echo_n "checking for HEAD... " >&6; }
8168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8169$as_echo "disabled" >&6; }
8170      else
8171        # Check if the provided tool contains a complete path.
8172        tool_specified="$HEAD"
8173        tool_basename="${tool_specified##*/}"
8174        if test "x$tool_basename" = "x$tool_specified"; then
8175          # A command without a complete path is provided, search $PATH.
8176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8177$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8178          # Extract the first word of "$tool_basename", so it can be a program name with args.
8179set dummy $tool_basename; ac_word=$2
8180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8181$as_echo_n "checking for $ac_word... " >&6; }
8182if ${ac_cv_path_HEAD+:} false; then :
8183  $as_echo_n "(cached) " >&6
8184else
8185  case $HEAD in
8186  [\\/]* | ?:[\\/]*)
8187  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8188  ;;
8189  *)
8190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8191for as_dir in $PATH
8192do
8193  IFS=$as_save_IFS
8194  test -z "$as_dir" && as_dir=.
8195    for ac_exec_ext in '' $ac_executable_extensions; do
8196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8197    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8199    break 2
8200  fi
8201done
8202  done
8203IFS=$as_save_IFS
8204
8205  ;;
8206esac
8207fi
8208HEAD=$ac_cv_path_HEAD
8209if test -n "$HEAD"; then
8210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8211$as_echo "$HEAD" >&6; }
8212else
8213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214$as_echo "no" >&6; }
8215fi
8216
8217
8218          if test "x$HEAD" = x; then
8219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8220          fi
8221        else
8222          # Otherwise we believe it is a complete path. Use it as it is.
8223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8224$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8226$as_echo_n "checking for HEAD... " >&6; }
8227          if test ! -x "$tool_specified"; then
8228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8229$as_echo "not found" >&6; }
8230            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8231          fi
8232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8233$as_echo "$tool_specified" >&6; }
8234        fi
8235      fi
8236    fi
8237
8238  fi
8239
8240
8241
8242  if test "x$HEAD" = x; then
8243    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8244  fi
8245
8246
8247
8248
8249
8250  # Publish this variable in the help.
8251
8252
8253  if [ -z "${LN+x}" ]; then
8254    # The variable is not set by user, try to locate tool using the code snippet
8255    for ac_prog in ln
8256do
8257  # Extract the first word of "$ac_prog", so it can be a program name with args.
8258set dummy $ac_prog; ac_word=$2
8259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8260$as_echo_n "checking for $ac_word... " >&6; }
8261if ${ac_cv_path_LN+:} false; then :
8262  $as_echo_n "(cached) " >&6
8263else
8264  case $LN in
8265  [\\/]* | ?:[\\/]*)
8266  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8267  ;;
8268  *)
8269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8270for as_dir in $PATH
8271do
8272  IFS=$as_save_IFS
8273  test -z "$as_dir" && as_dir=.
8274    for ac_exec_ext in '' $ac_executable_extensions; do
8275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8276    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8278    break 2
8279  fi
8280done
8281  done
8282IFS=$as_save_IFS
8283
8284  ;;
8285esac
8286fi
8287LN=$ac_cv_path_LN
8288if test -n "$LN"; then
8289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8290$as_echo "$LN" >&6; }
8291else
8292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8293$as_echo "no" >&6; }
8294fi
8295
8296
8297  test -n "$LN" && break
8298done
8299
8300  else
8301    # The variable is set, but is it from the command line or the environment?
8302
8303    # Try to remove the string !LN! from our list.
8304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8306      # If it failed, the variable was not from the command line. Ignore it,
8307      # but warn the user (except for BASH, which is always set by the calling BASH).
8308      if test "xLN" != xBASH; then
8309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8310$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8311      fi
8312      # Try to locate tool using the code snippet
8313      for ac_prog in ln
8314do
8315  # Extract the first word of "$ac_prog", so it can be a program name with args.
8316set dummy $ac_prog; ac_word=$2
8317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8318$as_echo_n "checking for $ac_word... " >&6; }
8319if ${ac_cv_path_LN+:} false; then :
8320  $as_echo_n "(cached) " >&6
8321else
8322  case $LN in
8323  [\\/]* | ?:[\\/]*)
8324  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8325  ;;
8326  *)
8327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330  IFS=$as_save_IFS
8331  test -z "$as_dir" && as_dir=.
8332    for ac_exec_ext in '' $ac_executable_extensions; do
8333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8334    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8336    break 2
8337  fi
8338done
8339  done
8340IFS=$as_save_IFS
8341
8342  ;;
8343esac
8344fi
8345LN=$ac_cv_path_LN
8346if test -n "$LN"; then
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8348$as_echo "$LN" >&6; }
8349else
8350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8351$as_echo "no" >&6; }
8352fi
8353
8354
8355  test -n "$LN" && break
8356done
8357
8358    else
8359      # If it succeeded, then it was overridden by the user. We will use it
8360      # for the tool.
8361
8362      # First remove it from the list of overridden variables, so we can test
8363      # for unknown variables in the end.
8364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8365
8366      # Check if we try to supply an empty value
8367      if test "x$LN" = x; then
8368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8369$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8371$as_echo_n "checking for LN... " >&6; }
8372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8373$as_echo "disabled" >&6; }
8374      else
8375        # Check if the provided tool contains a complete path.
8376        tool_specified="$LN"
8377        tool_basename="${tool_specified##*/}"
8378        if test "x$tool_basename" = "x$tool_specified"; then
8379          # A command without a complete path is provided, search $PATH.
8380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8381$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8382          # Extract the first word of "$tool_basename", so it can be a program name with args.
8383set dummy $tool_basename; ac_word=$2
8384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8385$as_echo_n "checking for $ac_word... " >&6; }
8386if ${ac_cv_path_LN+:} false; then :
8387  $as_echo_n "(cached) " >&6
8388else
8389  case $LN in
8390  [\\/]* | ?:[\\/]*)
8391  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8392  ;;
8393  *)
8394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8395for as_dir in $PATH
8396do
8397  IFS=$as_save_IFS
8398  test -z "$as_dir" && as_dir=.
8399    for ac_exec_ext in '' $ac_executable_extensions; do
8400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8401    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8403    break 2
8404  fi
8405done
8406  done
8407IFS=$as_save_IFS
8408
8409  ;;
8410esac
8411fi
8412LN=$ac_cv_path_LN
8413if test -n "$LN"; then
8414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8415$as_echo "$LN" >&6; }
8416else
8417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8418$as_echo "no" >&6; }
8419fi
8420
8421
8422          if test "x$LN" = x; then
8423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8424          fi
8425        else
8426          # Otherwise we believe it is a complete path. Use it as it is.
8427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8428$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8430$as_echo_n "checking for LN... " >&6; }
8431          if test ! -x "$tool_specified"; then
8432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8433$as_echo "not found" >&6; }
8434            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8435          fi
8436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8437$as_echo "$tool_specified" >&6; }
8438        fi
8439      fi
8440    fi
8441
8442  fi
8443
8444
8445
8446  if test "x$LN" = x; then
8447    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8448  fi
8449
8450
8451
8452
8453
8454  # Publish this variable in the help.
8455
8456
8457  if [ -z "${LS+x}" ]; then
8458    # The variable is not set by user, try to locate tool using the code snippet
8459    for ac_prog in ls
8460do
8461  # Extract the first word of "$ac_prog", so it can be a program name with args.
8462set dummy $ac_prog; ac_word=$2
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8464$as_echo_n "checking for $ac_word... " >&6; }
8465if ${ac_cv_path_LS+:} false; then :
8466  $as_echo_n "(cached) " >&6
8467else
8468  case $LS in
8469  [\\/]* | ?:[\\/]*)
8470  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8471  ;;
8472  *)
8473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8474for as_dir in $PATH
8475do
8476  IFS=$as_save_IFS
8477  test -z "$as_dir" && as_dir=.
8478    for ac_exec_ext in '' $ac_executable_extensions; do
8479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8480    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8482    break 2
8483  fi
8484done
8485  done
8486IFS=$as_save_IFS
8487
8488  ;;
8489esac
8490fi
8491LS=$ac_cv_path_LS
8492if test -n "$LS"; then
8493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8494$as_echo "$LS" >&6; }
8495else
8496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497$as_echo "no" >&6; }
8498fi
8499
8500
8501  test -n "$LS" && break
8502done
8503
8504  else
8505    # The variable is set, but is it from the command line or the environment?
8506
8507    # Try to remove the string !LS! from our list.
8508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8510      # If it failed, the variable was not from the command line. Ignore it,
8511      # but warn the user (except for BASH, which is always set by the calling BASH).
8512      if test "xLS" != xBASH; then
8513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8514$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8515      fi
8516      # Try to locate tool using the code snippet
8517      for ac_prog in ls
8518do
8519  # Extract the first word of "$ac_prog", so it can be a program name with args.
8520set dummy $ac_prog; ac_word=$2
8521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8522$as_echo_n "checking for $ac_word... " >&6; }
8523if ${ac_cv_path_LS+:} false; then :
8524  $as_echo_n "(cached) " >&6
8525else
8526  case $LS in
8527  [\\/]* | ?:[\\/]*)
8528  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8529  ;;
8530  *)
8531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8532for as_dir in $PATH
8533do
8534  IFS=$as_save_IFS
8535  test -z "$as_dir" && as_dir=.
8536    for ac_exec_ext in '' $ac_executable_extensions; do
8537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8538    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8540    break 2
8541  fi
8542done
8543  done
8544IFS=$as_save_IFS
8545
8546  ;;
8547esac
8548fi
8549LS=$ac_cv_path_LS
8550if test -n "$LS"; then
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8552$as_echo "$LS" >&6; }
8553else
8554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8555$as_echo "no" >&6; }
8556fi
8557
8558
8559  test -n "$LS" && break
8560done
8561
8562    else
8563      # If it succeeded, then it was overridden by the user. We will use it
8564      # for the tool.
8565
8566      # First remove it from the list of overridden variables, so we can test
8567      # for unknown variables in the end.
8568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8569
8570      # Check if we try to supply an empty value
8571      if test "x$LS" = x; then
8572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8573$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8575$as_echo_n "checking for LS... " >&6; }
8576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8577$as_echo "disabled" >&6; }
8578      else
8579        # Check if the provided tool contains a complete path.
8580        tool_specified="$LS"
8581        tool_basename="${tool_specified##*/}"
8582        if test "x$tool_basename" = "x$tool_specified"; then
8583          # A command without a complete path is provided, search $PATH.
8584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8585$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8586          # Extract the first word of "$tool_basename", so it can be a program name with args.
8587set dummy $tool_basename; ac_word=$2
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8589$as_echo_n "checking for $ac_word... " >&6; }
8590if ${ac_cv_path_LS+:} false; then :
8591  $as_echo_n "(cached) " >&6
8592else
8593  case $LS in
8594  [\\/]* | ?:[\\/]*)
8595  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8596  ;;
8597  *)
8598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8599for as_dir in $PATH
8600do
8601  IFS=$as_save_IFS
8602  test -z "$as_dir" && as_dir=.
8603    for ac_exec_ext in '' $ac_executable_extensions; do
8604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8605    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8607    break 2
8608  fi
8609done
8610  done
8611IFS=$as_save_IFS
8612
8613  ;;
8614esac
8615fi
8616LS=$ac_cv_path_LS
8617if test -n "$LS"; then
8618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8619$as_echo "$LS" >&6; }
8620else
8621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8622$as_echo "no" >&6; }
8623fi
8624
8625
8626          if test "x$LS" = x; then
8627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8628          fi
8629        else
8630          # Otherwise we believe it is a complete path. Use it as it is.
8631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8632$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8634$as_echo_n "checking for LS... " >&6; }
8635          if test ! -x "$tool_specified"; then
8636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8637$as_echo "not found" >&6; }
8638            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8639          fi
8640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8641$as_echo "$tool_specified" >&6; }
8642        fi
8643      fi
8644    fi
8645
8646  fi
8647
8648
8649
8650  if test "x$LS" = x; then
8651    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8652  fi
8653
8654
8655
8656
8657
8658  # Publish this variable in the help.
8659
8660
8661  if [ -z "${MKDIR+x}" ]; then
8662    # The variable is not set by user, try to locate tool using the code snippet
8663    for ac_prog in mkdir
8664do
8665  # Extract the first word of "$ac_prog", so it can be a program name with args.
8666set dummy $ac_prog; ac_word=$2
8667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8668$as_echo_n "checking for $ac_word... " >&6; }
8669if ${ac_cv_path_MKDIR+:} false; then :
8670  $as_echo_n "(cached) " >&6
8671else
8672  case $MKDIR in
8673  [\\/]* | ?:[\\/]*)
8674  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8675  ;;
8676  *)
8677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8678for as_dir in $PATH
8679do
8680  IFS=$as_save_IFS
8681  test -z "$as_dir" && as_dir=.
8682    for ac_exec_ext in '' $ac_executable_extensions; do
8683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8684    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8686    break 2
8687  fi
8688done
8689  done
8690IFS=$as_save_IFS
8691
8692  ;;
8693esac
8694fi
8695MKDIR=$ac_cv_path_MKDIR
8696if test -n "$MKDIR"; then
8697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8698$as_echo "$MKDIR" >&6; }
8699else
8700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8701$as_echo "no" >&6; }
8702fi
8703
8704
8705  test -n "$MKDIR" && break
8706done
8707
8708  else
8709    # The variable is set, but is it from the command line or the environment?
8710
8711    # Try to remove the string !MKDIR! from our list.
8712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8714      # If it failed, the variable was not from the command line. Ignore it,
8715      # but warn the user (except for BASH, which is always set by the calling BASH).
8716      if test "xMKDIR" != xBASH; then
8717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8718$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8719      fi
8720      # Try to locate tool using the code snippet
8721      for ac_prog in mkdir
8722do
8723  # Extract the first word of "$ac_prog", so it can be a program name with args.
8724set dummy $ac_prog; ac_word=$2
8725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8726$as_echo_n "checking for $ac_word... " >&6; }
8727if ${ac_cv_path_MKDIR+:} false; then :
8728  $as_echo_n "(cached) " >&6
8729else
8730  case $MKDIR in
8731  [\\/]* | ?:[\\/]*)
8732  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8733  ;;
8734  *)
8735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8736for as_dir in $PATH
8737do
8738  IFS=$as_save_IFS
8739  test -z "$as_dir" && as_dir=.
8740    for ac_exec_ext in '' $ac_executable_extensions; do
8741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8742    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8744    break 2
8745  fi
8746done
8747  done
8748IFS=$as_save_IFS
8749
8750  ;;
8751esac
8752fi
8753MKDIR=$ac_cv_path_MKDIR
8754if test -n "$MKDIR"; then
8755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8756$as_echo "$MKDIR" >&6; }
8757else
8758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8759$as_echo "no" >&6; }
8760fi
8761
8762
8763  test -n "$MKDIR" && break
8764done
8765
8766    else
8767      # If it succeeded, then it was overridden by the user. We will use it
8768      # for the tool.
8769
8770      # First remove it from the list of overridden variables, so we can test
8771      # for unknown variables in the end.
8772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8773
8774      # Check if we try to supply an empty value
8775      if test "x$MKDIR" = x; then
8776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8777$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8779$as_echo_n "checking for MKDIR... " >&6; }
8780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8781$as_echo "disabled" >&6; }
8782      else
8783        # Check if the provided tool contains a complete path.
8784        tool_specified="$MKDIR"
8785        tool_basename="${tool_specified##*/}"
8786        if test "x$tool_basename" = "x$tool_specified"; then
8787          # A command without a complete path is provided, search $PATH.
8788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8789$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8790          # Extract the first word of "$tool_basename", so it can be a program name with args.
8791set dummy $tool_basename; ac_word=$2
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793$as_echo_n "checking for $ac_word... " >&6; }
8794if ${ac_cv_path_MKDIR+:} false; then :
8795  $as_echo_n "(cached) " >&6
8796else
8797  case $MKDIR in
8798  [\\/]* | ?:[\\/]*)
8799  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8800  ;;
8801  *)
8802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803for as_dir in $PATH
8804do
8805  IFS=$as_save_IFS
8806  test -z "$as_dir" && as_dir=.
8807    for ac_exec_ext in '' $ac_executable_extensions; do
8808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8809    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811    break 2
8812  fi
8813done
8814  done
8815IFS=$as_save_IFS
8816
8817  ;;
8818esac
8819fi
8820MKDIR=$ac_cv_path_MKDIR
8821if test -n "$MKDIR"; then
8822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8823$as_echo "$MKDIR" >&6; }
8824else
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
8827fi
8828
8829
8830          if test "x$MKDIR" = x; then
8831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8832          fi
8833        else
8834          # Otherwise we believe it is a complete path. Use it as it is.
8835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8836$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8838$as_echo_n "checking for MKDIR... " >&6; }
8839          if test ! -x "$tool_specified"; then
8840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8841$as_echo "not found" >&6; }
8842            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8843          fi
8844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8845$as_echo "$tool_specified" >&6; }
8846        fi
8847      fi
8848    fi
8849
8850  fi
8851
8852
8853
8854  if test "x$MKDIR" = x; then
8855    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8856  fi
8857
8858
8859
8860
8861
8862  # Publish this variable in the help.
8863
8864
8865  if [ -z "${MKTEMP+x}" ]; then
8866    # The variable is not set by user, try to locate tool using the code snippet
8867    for ac_prog in mktemp
8868do
8869  # Extract the first word of "$ac_prog", so it can be a program name with args.
8870set dummy $ac_prog; ac_word=$2
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8872$as_echo_n "checking for $ac_word... " >&6; }
8873if ${ac_cv_path_MKTEMP+:} false; then :
8874  $as_echo_n "(cached) " >&6
8875else
8876  case $MKTEMP in
8877  [\\/]* | ?:[\\/]*)
8878  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8879  ;;
8880  *)
8881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8882for as_dir in $PATH
8883do
8884  IFS=$as_save_IFS
8885  test -z "$as_dir" && as_dir=.
8886    for ac_exec_ext in '' $ac_executable_extensions; do
8887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8888    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8890    break 2
8891  fi
8892done
8893  done
8894IFS=$as_save_IFS
8895
8896  ;;
8897esac
8898fi
8899MKTEMP=$ac_cv_path_MKTEMP
8900if test -n "$MKTEMP"; then
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8902$as_echo "$MKTEMP" >&6; }
8903else
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905$as_echo "no" >&6; }
8906fi
8907
8908
8909  test -n "$MKTEMP" && break
8910done
8911
8912  else
8913    # The variable is set, but is it from the command line or the environment?
8914
8915    # Try to remove the string !MKTEMP! from our list.
8916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8918      # If it failed, the variable was not from the command line. Ignore it,
8919      # but warn the user (except for BASH, which is always set by the calling BASH).
8920      if test "xMKTEMP" != xBASH; then
8921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8922$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8923      fi
8924      # Try to locate tool using the code snippet
8925      for ac_prog in mktemp
8926do
8927  # Extract the first word of "$ac_prog", so it can be a program name with args.
8928set dummy $ac_prog; ac_word=$2
8929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8930$as_echo_n "checking for $ac_word... " >&6; }
8931if ${ac_cv_path_MKTEMP+:} false; then :
8932  $as_echo_n "(cached) " >&6
8933else
8934  case $MKTEMP in
8935  [\\/]* | ?:[\\/]*)
8936  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8937  ;;
8938  *)
8939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8940for as_dir in $PATH
8941do
8942  IFS=$as_save_IFS
8943  test -z "$as_dir" && as_dir=.
8944    for ac_exec_ext in '' $ac_executable_extensions; do
8945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8946    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8948    break 2
8949  fi
8950done
8951  done
8952IFS=$as_save_IFS
8953
8954  ;;
8955esac
8956fi
8957MKTEMP=$ac_cv_path_MKTEMP
8958if test -n "$MKTEMP"; then
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8960$as_echo "$MKTEMP" >&6; }
8961else
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963$as_echo "no" >&6; }
8964fi
8965
8966
8967  test -n "$MKTEMP" && break
8968done
8969
8970    else
8971      # If it succeeded, then it was overridden by the user. We will use it
8972      # for the tool.
8973
8974      # First remove it from the list of overridden variables, so we can test
8975      # for unknown variables in the end.
8976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8977
8978      # Check if we try to supply an empty value
8979      if test "x$MKTEMP" = x; then
8980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8981$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8983$as_echo_n "checking for MKTEMP... " >&6; }
8984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8985$as_echo "disabled" >&6; }
8986      else
8987        # Check if the provided tool contains a complete path.
8988        tool_specified="$MKTEMP"
8989        tool_basename="${tool_specified##*/}"
8990        if test "x$tool_basename" = "x$tool_specified"; then
8991          # A command without a complete path is provided, search $PATH.
8992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8993$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8994          # Extract the first word of "$tool_basename", so it can be a program name with args.
8995set dummy $tool_basename; ac_word=$2
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997$as_echo_n "checking for $ac_word... " >&6; }
8998if ${ac_cv_path_MKTEMP+:} false; then :
8999  $as_echo_n "(cached) " >&6
9000else
9001  case $MKTEMP in
9002  [\\/]* | ?:[\\/]*)
9003  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9004  ;;
9005  *)
9006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007for as_dir in $PATH
9008do
9009  IFS=$as_save_IFS
9010  test -z "$as_dir" && as_dir=.
9011    for ac_exec_ext in '' $ac_executable_extensions; do
9012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015    break 2
9016  fi
9017done
9018  done
9019IFS=$as_save_IFS
9020
9021  ;;
9022esac
9023fi
9024MKTEMP=$ac_cv_path_MKTEMP
9025if test -n "$MKTEMP"; then
9026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9027$as_echo "$MKTEMP" >&6; }
9028else
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030$as_echo "no" >&6; }
9031fi
9032
9033
9034          if test "x$MKTEMP" = x; then
9035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9036          fi
9037        else
9038          # Otherwise we believe it is a complete path. Use it as it is.
9039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9040$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9042$as_echo_n "checking for MKTEMP... " >&6; }
9043          if test ! -x "$tool_specified"; then
9044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9045$as_echo "not found" >&6; }
9046            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9047          fi
9048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9049$as_echo "$tool_specified" >&6; }
9050        fi
9051      fi
9052    fi
9053
9054  fi
9055
9056
9057
9058  if test "x$MKTEMP" = x; then
9059    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9060  fi
9061
9062
9063
9064
9065
9066  # Publish this variable in the help.
9067
9068
9069  if [ -z "${MV+x}" ]; then
9070    # The variable is not set by user, try to locate tool using the code snippet
9071    for ac_prog in mv
9072do
9073  # Extract the first word of "$ac_prog", so it can be a program name with args.
9074set dummy $ac_prog; ac_word=$2
9075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9076$as_echo_n "checking for $ac_word... " >&6; }
9077if ${ac_cv_path_MV+:} false; then :
9078  $as_echo_n "(cached) " >&6
9079else
9080  case $MV in
9081  [\\/]* | ?:[\\/]*)
9082  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9083  ;;
9084  *)
9085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9086for as_dir in $PATH
9087do
9088  IFS=$as_save_IFS
9089  test -z "$as_dir" && as_dir=.
9090    for ac_exec_ext in '' $ac_executable_extensions; do
9091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9092    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9094    break 2
9095  fi
9096done
9097  done
9098IFS=$as_save_IFS
9099
9100  ;;
9101esac
9102fi
9103MV=$ac_cv_path_MV
9104if test -n "$MV"; then
9105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9106$as_echo "$MV" >&6; }
9107else
9108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9109$as_echo "no" >&6; }
9110fi
9111
9112
9113  test -n "$MV" && break
9114done
9115
9116  else
9117    # The variable is set, but is it from the command line or the environment?
9118
9119    # Try to remove the string !MV! from our list.
9120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9122      # If it failed, the variable was not from the command line. Ignore it,
9123      # but warn the user (except for BASH, which is always set by the calling BASH).
9124      if test "xMV" != xBASH; then
9125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9126$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9127      fi
9128      # Try to locate tool using the code snippet
9129      for ac_prog in mv
9130do
9131  # Extract the first word of "$ac_prog", so it can be a program name with args.
9132set dummy $ac_prog; ac_word=$2
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9134$as_echo_n "checking for $ac_word... " >&6; }
9135if ${ac_cv_path_MV+:} false; then :
9136  $as_echo_n "(cached) " >&6
9137else
9138  case $MV in
9139  [\\/]* | ?:[\\/]*)
9140  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9141  ;;
9142  *)
9143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9144for as_dir in $PATH
9145do
9146  IFS=$as_save_IFS
9147  test -z "$as_dir" && as_dir=.
9148    for ac_exec_ext in '' $ac_executable_extensions; do
9149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9150    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9152    break 2
9153  fi
9154done
9155  done
9156IFS=$as_save_IFS
9157
9158  ;;
9159esac
9160fi
9161MV=$ac_cv_path_MV
9162if test -n "$MV"; then
9163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9164$as_echo "$MV" >&6; }
9165else
9166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167$as_echo "no" >&6; }
9168fi
9169
9170
9171  test -n "$MV" && break
9172done
9173
9174    else
9175      # If it succeeded, then it was overridden by the user. We will use it
9176      # for the tool.
9177
9178      # First remove it from the list of overridden variables, so we can test
9179      # for unknown variables in the end.
9180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9181
9182      # Check if we try to supply an empty value
9183      if test "x$MV" = x; then
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9185$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9187$as_echo_n "checking for MV... " >&6; }
9188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9189$as_echo "disabled" >&6; }
9190      else
9191        # Check if the provided tool contains a complete path.
9192        tool_specified="$MV"
9193        tool_basename="${tool_specified##*/}"
9194        if test "x$tool_basename" = "x$tool_specified"; then
9195          # A command without a complete path is provided, search $PATH.
9196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9197$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9198          # Extract the first word of "$tool_basename", so it can be a program name with args.
9199set dummy $tool_basename; ac_word=$2
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9201$as_echo_n "checking for $ac_word... " >&6; }
9202if ${ac_cv_path_MV+:} false; then :
9203  $as_echo_n "(cached) " >&6
9204else
9205  case $MV in
9206  [\\/]* | ?:[\\/]*)
9207  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9208  ;;
9209  *)
9210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9211for as_dir in $PATH
9212do
9213  IFS=$as_save_IFS
9214  test -z "$as_dir" && as_dir=.
9215    for ac_exec_ext in '' $ac_executable_extensions; do
9216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9217    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9219    break 2
9220  fi
9221done
9222  done
9223IFS=$as_save_IFS
9224
9225  ;;
9226esac
9227fi
9228MV=$ac_cv_path_MV
9229if test -n "$MV"; then
9230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9231$as_echo "$MV" >&6; }
9232else
9233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234$as_echo "no" >&6; }
9235fi
9236
9237
9238          if test "x$MV" = x; then
9239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9240          fi
9241        else
9242          # Otherwise we believe it is a complete path. Use it as it is.
9243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9244$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9246$as_echo_n "checking for MV... " >&6; }
9247          if test ! -x "$tool_specified"; then
9248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9249$as_echo "not found" >&6; }
9250            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9251          fi
9252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9253$as_echo "$tool_specified" >&6; }
9254        fi
9255      fi
9256    fi
9257
9258  fi
9259
9260
9261
9262  if test "x$MV" = x; then
9263    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9264  fi
9265
9266
9267
9268
9269
9270  # Publish this variable in the help.
9271
9272
9273  if [ -z "${NAWK+x}" ]; then
9274    # The variable is not set by user, try to locate tool using the code snippet
9275    for ac_prog in nawk gawk awk
9276do
9277  # Extract the first word of "$ac_prog", so it can be a program name with args.
9278set dummy $ac_prog; ac_word=$2
9279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9280$as_echo_n "checking for $ac_word... " >&6; }
9281if ${ac_cv_path_NAWK+:} false; then :
9282  $as_echo_n "(cached) " >&6
9283else
9284  case $NAWK in
9285  [\\/]* | ?:[\\/]*)
9286  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9287  ;;
9288  *)
9289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9290for as_dir in $PATH
9291do
9292  IFS=$as_save_IFS
9293  test -z "$as_dir" && as_dir=.
9294    for ac_exec_ext in '' $ac_executable_extensions; do
9295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9296    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9298    break 2
9299  fi
9300done
9301  done
9302IFS=$as_save_IFS
9303
9304  ;;
9305esac
9306fi
9307NAWK=$ac_cv_path_NAWK
9308if test -n "$NAWK"; then
9309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9310$as_echo "$NAWK" >&6; }
9311else
9312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313$as_echo "no" >&6; }
9314fi
9315
9316
9317  test -n "$NAWK" && break
9318done
9319
9320  else
9321    # The variable is set, but is it from the command line or the environment?
9322
9323    # Try to remove the string !NAWK! from our list.
9324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9326      # If it failed, the variable was not from the command line. Ignore it,
9327      # but warn the user (except for BASH, which is always set by the calling BASH).
9328      if test "xNAWK" != xBASH; then
9329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9330$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9331      fi
9332      # Try to locate tool using the code snippet
9333      for ac_prog in nawk gawk awk
9334do
9335  # Extract the first word of "$ac_prog", so it can be a program name with args.
9336set dummy $ac_prog; ac_word=$2
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9338$as_echo_n "checking for $ac_word... " >&6; }
9339if ${ac_cv_path_NAWK+:} false; then :
9340  $as_echo_n "(cached) " >&6
9341else
9342  case $NAWK in
9343  [\\/]* | ?:[\\/]*)
9344  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9345  ;;
9346  *)
9347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9348for as_dir in $PATH
9349do
9350  IFS=$as_save_IFS
9351  test -z "$as_dir" && as_dir=.
9352    for ac_exec_ext in '' $ac_executable_extensions; do
9353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9354    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9356    break 2
9357  fi
9358done
9359  done
9360IFS=$as_save_IFS
9361
9362  ;;
9363esac
9364fi
9365NAWK=$ac_cv_path_NAWK
9366if test -n "$NAWK"; then
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9368$as_echo "$NAWK" >&6; }
9369else
9370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
9372fi
9373
9374
9375  test -n "$NAWK" && break
9376done
9377
9378    else
9379      # If it succeeded, then it was overridden by the user. We will use it
9380      # for the tool.
9381
9382      # First remove it from the list of overridden variables, so we can test
9383      # for unknown variables in the end.
9384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9385
9386      # Check if we try to supply an empty value
9387      if test "x$NAWK" = x; then
9388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9389$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9391$as_echo_n "checking for NAWK... " >&6; }
9392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9393$as_echo "disabled" >&6; }
9394      else
9395        # Check if the provided tool contains a complete path.
9396        tool_specified="$NAWK"
9397        tool_basename="${tool_specified##*/}"
9398        if test "x$tool_basename" = "x$tool_specified"; then
9399          # A command without a complete path is provided, search $PATH.
9400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9401$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9402          # Extract the first word of "$tool_basename", so it can be a program name with args.
9403set dummy $tool_basename; ac_word=$2
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9405$as_echo_n "checking for $ac_word... " >&6; }
9406if ${ac_cv_path_NAWK+:} false; then :
9407  $as_echo_n "(cached) " >&6
9408else
9409  case $NAWK in
9410  [\\/]* | ?:[\\/]*)
9411  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9412  ;;
9413  *)
9414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9415for as_dir in $PATH
9416do
9417  IFS=$as_save_IFS
9418  test -z "$as_dir" && as_dir=.
9419    for ac_exec_ext in '' $ac_executable_extensions; do
9420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9421    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9423    break 2
9424  fi
9425done
9426  done
9427IFS=$as_save_IFS
9428
9429  ;;
9430esac
9431fi
9432NAWK=$ac_cv_path_NAWK
9433if test -n "$NAWK"; then
9434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9435$as_echo "$NAWK" >&6; }
9436else
9437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438$as_echo "no" >&6; }
9439fi
9440
9441
9442          if test "x$NAWK" = x; then
9443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9444          fi
9445        else
9446          # Otherwise we believe it is a complete path. Use it as it is.
9447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9448$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9450$as_echo_n "checking for NAWK... " >&6; }
9451          if test ! -x "$tool_specified"; then
9452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9453$as_echo "not found" >&6; }
9454            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9455          fi
9456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9457$as_echo "$tool_specified" >&6; }
9458        fi
9459      fi
9460    fi
9461
9462  fi
9463
9464
9465
9466  if test "x$NAWK" = x; then
9467    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9468  fi
9469
9470
9471
9472
9473
9474  # Publish this variable in the help.
9475
9476
9477  if [ -z "${PRINTF+x}" ]; then
9478    # The variable is not set by user, try to locate tool using the code snippet
9479    for ac_prog in printf
9480do
9481  # Extract the first word of "$ac_prog", so it can be a program name with args.
9482set dummy $ac_prog; ac_word=$2
9483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9484$as_echo_n "checking for $ac_word... " >&6; }
9485if ${ac_cv_path_PRINTF+:} false; then :
9486  $as_echo_n "(cached) " >&6
9487else
9488  case $PRINTF in
9489  [\\/]* | ?:[\\/]*)
9490  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9491  ;;
9492  *)
9493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9494for as_dir in $PATH
9495do
9496  IFS=$as_save_IFS
9497  test -z "$as_dir" && as_dir=.
9498    for ac_exec_ext in '' $ac_executable_extensions; do
9499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9500    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9502    break 2
9503  fi
9504done
9505  done
9506IFS=$as_save_IFS
9507
9508  ;;
9509esac
9510fi
9511PRINTF=$ac_cv_path_PRINTF
9512if test -n "$PRINTF"; then
9513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9514$as_echo "$PRINTF" >&6; }
9515else
9516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9517$as_echo "no" >&6; }
9518fi
9519
9520
9521  test -n "$PRINTF" && break
9522done
9523
9524  else
9525    # The variable is set, but is it from the command line or the environment?
9526
9527    # Try to remove the string !PRINTF! from our list.
9528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9530      # If it failed, the variable was not from the command line. Ignore it,
9531      # but warn the user (except for BASH, which is always set by the calling BASH).
9532      if test "xPRINTF" != xBASH; then
9533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9534$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9535      fi
9536      # Try to locate tool using the code snippet
9537      for ac_prog in printf
9538do
9539  # Extract the first word of "$ac_prog", so it can be a program name with args.
9540set dummy $ac_prog; ac_word=$2
9541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9542$as_echo_n "checking for $ac_word... " >&6; }
9543if ${ac_cv_path_PRINTF+:} false; then :
9544  $as_echo_n "(cached) " >&6
9545else
9546  case $PRINTF in
9547  [\\/]* | ?:[\\/]*)
9548  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9549  ;;
9550  *)
9551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9552for as_dir in $PATH
9553do
9554  IFS=$as_save_IFS
9555  test -z "$as_dir" && as_dir=.
9556    for ac_exec_ext in '' $ac_executable_extensions; do
9557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9558    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9560    break 2
9561  fi
9562done
9563  done
9564IFS=$as_save_IFS
9565
9566  ;;
9567esac
9568fi
9569PRINTF=$ac_cv_path_PRINTF
9570if test -n "$PRINTF"; then
9571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9572$as_echo "$PRINTF" >&6; }
9573else
9574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575$as_echo "no" >&6; }
9576fi
9577
9578
9579  test -n "$PRINTF" && break
9580done
9581
9582    else
9583      # If it succeeded, then it was overridden by the user. We will use it
9584      # for the tool.
9585
9586      # First remove it from the list of overridden variables, so we can test
9587      # for unknown variables in the end.
9588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9589
9590      # Check if we try to supply an empty value
9591      if test "x$PRINTF" = x; then
9592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9593$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9595$as_echo_n "checking for PRINTF... " >&6; }
9596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9597$as_echo "disabled" >&6; }
9598      else
9599        # Check if the provided tool contains a complete path.
9600        tool_specified="$PRINTF"
9601        tool_basename="${tool_specified##*/}"
9602        if test "x$tool_basename" = "x$tool_specified"; then
9603          # A command without a complete path is provided, search $PATH.
9604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9605$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9606          # Extract the first word of "$tool_basename", so it can be a program name with args.
9607set dummy $tool_basename; ac_word=$2
9608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9609$as_echo_n "checking for $ac_word... " >&6; }
9610if ${ac_cv_path_PRINTF+:} false; then :
9611  $as_echo_n "(cached) " >&6
9612else
9613  case $PRINTF in
9614  [\\/]* | ?:[\\/]*)
9615  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9616  ;;
9617  *)
9618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619for as_dir in $PATH
9620do
9621  IFS=$as_save_IFS
9622  test -z "$as_dir" && as_dir=.
9623    for ac_exec_ext in '' $ac_executable_extensions; do
9624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9625    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9627    break 2
9628  fi
9629done
9630  done
9631IFS=$as_save_IFS
9632
9633  ;;
9634esac
9635fi
9636PRINTF=$ac_cv_path_PRINTF
9637if test -n "$PRINTF"; then
9638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9639$as_echo "$PRINTF" >&6; }
9640else
9641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9642$as_echo "no" >&6; }
9643fi
9644
9645
9646          if test "x$PRINTF" = x; then
9647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9648          fi
9649        else
9650          # Otherwise we believe it is a complete path. Use it as it is.
9651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9652$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9654$as_echo_n "checking for PRINTF... " >&6; }
9655          if test ! -x "$tool_specified"; then
9656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9657$as_echo "not found" >&6; }
9658            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9659          fi
9660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9661$as_echo "$tool_specified" >&6; }
9662        fi
9663      fi
9664    fi
9665
9666  fi
9667
9668
9669
9670  if test "x$PRINTF" = x; then
9671    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9672  fi
9673
9674
9675
9676
9677
9678  # Publish this variable in the help.
9679
9680
9681  if [ -z "${RM+x}" ]; then
9682    # The variable is not set by user, try to locate tool using the code snippet
9683    for ac_prog in rm
9684do
9685  # Extract the first word of "$ac_prog", so it can be a program name with args.
9686set dummy $ac_prog; ac_word=$2
9687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9688$as_echo_n "checking for $ac_word... " >&6; }
9689if ${ac_cv_path_RM+:} false; then :
9690  $as_echo_n "(cached) " >&6
9691else
9692  case $RM in
9693  [\\/]* | ?:[\\/]*)
9694  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9695  ;;
9696  *)
9697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9698for as_dir in $PATH
9699do
9700  IFS=$as_save_IFS
9701  test -z "$as_dir" && as_dir=.
9702    for ac_exec_ext in '' $ac_executable_extensions; do
9703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9704    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9706    break 2
9707  fi
9708done
9709  done
9710IFS=$as_save_IFS
9711
9712  ;;
9713esac
9714fi
9715RM=$ac_cv_path_RM
9716if test -n "$RM"; then
9717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9718$as_echo "$RM" >&6; }
9719else
9720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9721$as_echo "no" >&6; }
9722fi
9723
9724
9725  test -n "$RM" && break
9726done
9727
9728  else
9729    # The variable is set, but is it from the command line or the environment?
9730
9731    # Try to remove the string !RM! from our list.
9732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9734      # If it failed, the variable was not from the command line. Ignore it,
9735      # but warn the user (except for BASH, which is always set by the calling BASH).
9736      if test "xRM" != xBASH; then
9737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9738$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9739      fi
9740      # Try to locate tool using the code snippet
9741      for ac_prog in rm
9742do
9743  # Extract the first word of "$ac_prog", so it can be a program name with args.
9744set dummy $ac_prog; ac_word=$2
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9746$as_echo_n "checking for $ac_word... " >&6; }
9747if ${ac_cv_path_RM+:} false; then :
9748  $as_echo_n "(cached) " >&6
9749else
9750  case $RM in
9751  [\\/]* | ?:[\\/]*)
9752  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9753  ;;
9754  *)
9755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9756for as_dir in $PATH
9757do
9758  IFS=$as_save_IFS
9759  test -z "$as_dir" && as_dir=.
9760    for ac_exec_ext in '' $ac_executable_extensions; do
9761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9762    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9764    break 2
9765  fi
9766done
9767  done
9768IFS=$as_save_IFS
9769
9770  ;;
9771esac
9772fi
9773RM=$ac_cv_path_RM
9774if test -n "$RM"; then
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9776$as_echo "$RM" >&6; }
9777else
9778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
9780fi
9781
9782
9783  test -n "$RM" && break
9784done
9785
9786    else
9787      # If it succeeded, then it was overridden by the user. We will use it
9788      # for the tool.
9789
9790      # First remove it from the list of overridden variables, so we can test
9791      # for unknown variables in the end.
9792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9793
9794      # Check if we try to supply an empty value
9795      if test "x$RM" = x; then
9796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9797$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9799$as_echo_n "checking for RM... " >&6; }
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9801$as_echo "disabled" >&6; }
9802      else
9803        # Check if the provided tool contains a complete path.
9804        tool_specified="$RM"
9805        tool_basename="${tool_specified##*/}"
9806        if test "x$tool_basename" = "x$tool_specified"; then
9807          # A command without a complete path is provided, search $PATH.
9808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9809$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9810          # Extract the first word of "$tool_basename", so it can be a program name with args.
9811set dummy $tool_basename; ac_word=$2
9812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9813$as_echo_n "checking for $ac_word... " >&6; }
9814if ${ac_cv_path_RM+:} false; then :
9815  $as_echo_n "(cached) " >&6
9816else
9817  case $RM in
9818  [\\/]* | ?:[\\/]*)
9819  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9820  ;;
9821  *)
9822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9823for as_dir in $PATH
9824do
9825  IFS=$as_save_IFS
9826  test -z "$as_dir" && as_dir=.
9827    for ac_exec_ext in '' $ac_executable_extensions; do
9828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9829    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9831    break 2
9832  fi
9833done
9834  done
9835IFS=$as_save_IFS
9836
9837  ;;
9838esac
9839fi
9840RM=$ac_cv_path_RM
9841if test -n "$RM"; then
9842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9843$as_echo "$RM" >&6; }
9844else
9845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846$as_echo "no" >&6; }
9847fi
9848
9849
9850          if test "x$RM" = x; then
9851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9852          fi
9853        else
9854          # Otherwise we believe it is a complete path. Use it as it is.
9855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9856$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9858$as_echo_n "checking for RM... " >&6; }
9859          if test ! -x "$tool_specified"; then
9860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9861$as_echo "not found" >&6; }
9862            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9863          fi
9864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9865$as_echo "$tool_specified" >&6; }
9866        fi
9867      fi
9868    fi
9869
9870  fi
9871
9872
9873
9874  if test "x$RM" = x; then
9875    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9876  fi
9877
9878
9879
9880
9881
9882  # Publish this variable in the help.
9883
9884
9885  if [ -z "${RMDIR+x}" ]; then
9886    # The variable is not set by user, try to locate tool using the code snippet
9887    for ac_prog in rmdir
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_RMDIR+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $RMDIR in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919RMDIR=$ac_cv_path_RMDIR
9920if test -n "$RMDIR"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9922$as_echo "$RMDIR" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$RMDIR" && break
9930done
9931
9932  else
9933    # The variable is set, but is it from the command line or the environment?
9934
9935    # Try to remove the string !RMDIR! from our list.
9936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9938      # If it failed, the variable was not from the command line. Ignore it,
9939      # but warn the user (except for BASH, which is always set by the calling BASH).
9940      if test "xRMDIR" != xBASH; then
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9942$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9943      fi
9944      # Try to locate tool using the code snippet
9945      for ac_prog in rmdir
9946do
9947  # Extract the first word of "$ac_prog", so it can be a program name with args.
9948set dummy $ac_prog; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if ${ac_cv_path_RMDIR+:} false; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $RMDIR in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9966    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977RMDIR=$ac_cv_path_RMDIR
9978if test -n "$RMDIR"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9980$as_echo "$RMDIR" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987  test -n "$RMDIR" && break
9988done
9989
9990    else
9991      # If it succeeded, then it was overridden by the user. We will use it
9992      # for the tool.
9993
9994      # First remove it from the list of overridden variables, so we can test
9995      # for unknown variables in the end.
9996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9997
9998      # Check if we try to supply an empty value
9999      if test "x$RMDIR" = x; then
10000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10001$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10003$as_echo_n "checking for RMDIR... " >&6; }
10004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10005$as_echo "disabled" >&6; }
10006      else
10007        # Check if the provided tool contains a complete path.
10008        tool_specified="$RMDIR"
10009        tool_basename="${tool_specified##*/}"
10010        if test "x$tool_basename" = "x$tool_specified"; then
10011          # A command without a complete path is provided, search $PATH.
10012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10013$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10014          # Extract the first word of "$tool_basename", so it can be a program name with args.
10015set dummy $tool_basename; ac_word=$2
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10017$as_echo_n "checking for $ac_word... " >&6; }
10018if ${ac_cv_path_RMDIR+:} false; then :
10019  $as_echo_n "(cached) " >&6
10020else
10021  case $RMDIR in
10022  [\\/]* | ?:[\\/]*)
10023  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10024  ;;
10025  *)
10026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10027for as_dir in $PATH
10028do
10029  IFS=$as_save_IFS
10030  test -z "$as_dir" && as_dir=.
10031    for ac_exec_ext in '' $ac_executable_extensions; do
10032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10033    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10035    break 2
10036  fi
10037done
10038  done
10039IFS=$as_save_IFS
10040
10041  ;;
10042esac
10043fi
10044RMDIR=$ac_cv_path_RMDIR
10045if test -n "$RMDIR"; then
10046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10047$as_echo "$RMDIR" >&6; }
10048else
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
10051fi
10052
10053
10054          if test "x$RMDIR" = x; then
10055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10056          fi
10057        else
10058          # Otherwise we believe it is a complete path. Use it as it is.
10059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10060$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10062$as_echo_n "checking for RMDIR... " >&6; }
10063          if test ! -x "$tool_specified"; then
10064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10065$as_echo "not found" >&6; }
10066            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10067          fi
10068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10069$as_echo "$tool_specified" >&6; }
10070        fi
10071      fi
10072    fi
10073
10074  fi
10075
10076
10077
10078  if test "x$RMDIR" = x; then
10079    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10080  fi
10081
10082
10083
10084
10085
10086  # Publish this variable in the help.
10087
10088
10089  if [ -z "${SH+x}" ]; then
10090    # The variable is not set by user, try to locate tool using the code snippet
10091    for ac_prog in sh
10092do
10093  # Extract the first word of "$ac_prog", so it can be a program name with args.
10094set dummy $ac_prog; ac_word=$2
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10096$as_echo_n "checking for $ac_word... " >&6; }
10097if ${ac_cv_path_SH+:} false; then :
10098  $as_echo_n "(cached) " >&6
10099else
10100  case $SH in
10101  [\\/]* | ?:[\\/]*)
10102  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10103  ;;
10104  *)
10105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10106for as_dir in $PATH
10107do
10108  IFS=$as_save_IFS
10109  test -z "$as_dir" && as_dir=.
10110    for ac_exec_ext in '' $ac_executable_extensions; do
10111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10112    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10114    break 2
10115  fi
10116done
10117  done
10118IFS=$as_save_IFS
10119
10120  ;;
10121esac
10122fi
10123SH=$ac_cv_path_SH
10124if test -n "$SH"; then
10125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10126$as_echo "$SH" >&6; }
10127else
10128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
10130fi
10131
10132
10133  test -n "$SH" && break
10134done
10135
10136  else
10137    # The variable is set, but is it from the command line or the environment?
10138
10139    # Try to remove the string !SH! from our list.
10140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10142      # If it failed, the variable was not from the command line. Ignore it,
10143      # but warn the user (except for BASH, which is always set by the calling BASH).
10144      if test "xSH" != xBASH; then
10145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10146$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10147      fi
10148      # Try to locate tool using the code snippet
10149      for ac_prog in sh
10150do
10151  # Extract the first word of "$ac_prog", so it can be a program name with args.
10152set dummy $ac_prog; ac_word=$2
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10154$as_echo_n "checking for $ac_word... " >&6; }
10155if ${ac_cv_path_SH+:} false; then :
10156  $as_echo_n "(cached) " >&6
10157else
10158  case $SH in
10159  [\\/]* | ?:[\\/]*)
10160  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10161  ;;
10162  *)
10163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10164for as_dir in $PATH
10165do
10166  IFS=$as_save_IFS
10167  test -z "$as_dir" && as_dir=.
10168    for ac_exec_ext in '' $ac_executable_extensions; do
10169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10170    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10172    break 2
10173  fi
10174done
10175  done
10176IFS=$as_save_IFS
10177
10178  ;;
10179esac
10180fi
10181SH=$ac_cv_path_SH
10182if test -n "$SH"; then
10183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10184$as_echo "$SH" >&6; }
10185else
10186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187$as_echo "no" >&6; }
10188fi
10189
10190
10191  test -n "$SH" && break
10192done
10193
10194    else
10195      # If it succeeded, then it was overridden by the user. We will use it
10196      # for the tool.
10197
10198      # First remove it from the list of overridden variables, so we can test
10199      # for unknown variables in the end.
10200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10201
10202      # Check if we try to supply an empty value
10203      if test "x$SH" = x; then
10204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10205$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10207$as_echo_n "checking for SH... " >&6; }
10208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10209$as_echo "disabled" >&6; }
10210      else
10211        # Check if the provided tool contains a complete path.
10212        tool_specified="$SH"
10213        tool_basename="${tool_specified##*/}"
10214        if test "x$tool_basename" = "x$tool_specified"; then
10215          # A command without a complete path is provided, search $PATH.
10216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10217$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10218          # Extract the first word of "$tool_basename", so it can be a program name with args.
10219set dummy $tool_basename; ac_word=$2
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10221$as_echo_n "checking for $ac_word... " >&6; }
10222if ${ac_cv_path_SH+:} false; then :
10223  $as_echo_n "(cached) " >&6
10224else
10225  case $SH in
10226  [\\/]* | ?:[\\/]*)
10227  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10228  ;;
10229  *)
10230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10231for as_dir in $PATH
10232do
10233  IFS=$as_save_IFS
10234  test -z "$as_dir" && as_dir=.
10235    for ac_exec_ext in '' $ac_executable_extensions; do
10236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10237    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10239    break 2
10240  fi
10241done
10242  done
10243IFS=$as_save_IFS
10244
10245  ;;
10246esac
10247fi
10248SH=$ac_cv_path_SH
10249if test -n "$SH"; then
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10251$as_echo "$SH" >&6; }
10252else
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255fi
10256
10257
10258          if test "x$SH" = x; then
10259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10260          fi
10261        else
10262          # Otherwise we believe it is a complete path. Use it as it is.
10263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10264$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10266$as_echo_n "checking for SH... " >&6; }
10267          if test ! -x "$tool_specified"; then
10268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10269$as_echo "not found" >&6; }
10270            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10271          fi
10272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10273$as_echo "$tool_specified" >&6; }
10274        fi
10275      fi
10276    fi
10277
10278  fi
10279
10280
10281
10282  if test "x$SH" = x; then
10283    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10284  fi
10285
10286
10287
10288
10289
10290  # Publish this variable in the help.
10291
10292
10293  if [ -z "${SORT+x}" ]; then
10294    # The variable is not set by user, try to locate tool using the code snippet
10295    for ac_prog in sort
10296do
10297  # Extract the first word of "$ac_prog", so it can be a program name with args.
10298set dummy $ac_prog; ac_word=$2
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10300$as_echo_n "checking for $ac_word... " >&6; }
10301if ${ac_cv_path_SORT+:} false; then :
10302  $as_echo_n "(cached) " >&6
10303else
10304  case $SORT in
10305  [\\/]* | ?:[\\/]*)
10306  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10307  ;;
10308  *)
10309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10310for as_dir in $PATH
10311do
10312  IFS=$as_save_IFS
10313  test -z "$as_dir" && as_dir=.
10314    for ac_exec_ext in '' $ac_executable_extensions; do
10315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10316    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10318    break 2
10319  fi
10320done
10321  done
10322IFS=$as_save_IFS
10323
10324  ;;
10325esac
10326fi
10327SORT=$ac_cv_path_SORT
10328if test -n "$SORT"; then
10329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10330$as_echo "$SORT" >&6; }
10331else
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334fi
10335
10336
10337  test -n "$SORT" && break
10338done
10339
10340  else
10341    # The variable is set, but is it from the command line or the environment?
10342
10343    # Try to remove the string !SORT! from our list.
10344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10346      # If it failed, the variable was not from the command line. Ignore it,
10347      # but warn the user (except for BASH, which is always set by the calling BASH).
10348      if test "xSORT" != xBASH; then
10349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10350$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10351      fi
10352      # Try to locate tool using the code snippet
10353      for ac_prog in sort
10354do
10355  # Extract the first word of "$ac_prog", so it can be a program name with args.
10356set dummy $ac_prog; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if ${ac_cv_path_SORT+:} false; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $SORT in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10374    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385SORT=$ac_cv_path_SORT
10386if test -n "$SORT"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10388$as_echo "$SORT" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395  test -n "$SORT" && break
10396done
10397
10398    else
10399      # If it succeeded, then it was overridden by the user. We will use it
10400      # for the tool.
10401
10402      # First remove it from the list of overridden variables, so we can test
10403      # for unknown variables in the end.
10404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10405
10406      # Check if we try to supply an empty value
10407      if test "x$SORT" = x; then
10408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10409$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10411$as_echo_n "checking for SORT... " >&6; }
10412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10413$as_echo "disabled" >&6; }
10414      else
10415        # Check if the provided tool contains a complete path.
10416        tool_specified="$SORT"
10417        tool_basename="${tool_specified##*/}"
10418        if test "x$tool_basename" = "x$tool_specified"; then
10419          # A command without a complete path is provided, search $PATH.
10420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10421$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10422          # Extract the first word of "$tool_basename", so it can be a program name with args.
10423set dummy $tool_basename; ac_word=$2
10424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425$as_echo_n "checking for $ac_word... " >&6; }
10426if ${ac_cv_path_SORT+:} false; then :
10427  $as_echo_n "(cached) " >&6
10428else
10429  case $SORT in
10430  [\\/]* | ?:[\\/]*)
10431  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10432  ;;
10433  *)
10434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437  IFS=$as_save_IFS
10438  test -z "$as_dir" && as_dir=.
10439    for ac_exec_ext in '' $ac_executable_extensions; do
10440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443    break 2
10444  fi
10445done
10446  done
10447IFS=$as_save_IFS
10448
10449  ;;
10450esac
10451fi
10452SORT=$ac_cv_path_SORT
10453if test -n "$SORT"; then
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10455$as_echo "$SORT" >&6; }
10456else
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
10459fi
10460
10461
10462          if test "x$SORT" = x; then
10463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10464          fi
10465        else
10466          # Otherwise we believe it is a complete path. Use it as it is.
10467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10468$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10470$as_echo_n "checking for SORT... " >&6; }
10471          if test ! -x "$tool_specified"; then
10472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10473$as_echo "not found" >&6; }
10474            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10475          fi
10476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10477$as_echo "$tool_specified" >&6; }
10478        fi
10479      fi
10480    fi
10481
10482  fi
10483
10484
10485
10486  if test "x$SORT" = x; then
10487    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10488  fi
10489
10490
10491
10492
10493
10494  # Publish this variable in the help.
10495
10496
10497  if [ -z "${TAIL+x}" ]; then
10498    # The variable is not set by user, try to locate tool using the code snippet
10499    for ac_prog in tail
10500do
10501  # Extract the first word of "$ac_prog", so it can be a program name with args.
10502set dummy $ac_prog; ac_word=$2
10503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10504$as_echo_n "checking for $ac_word... " >&6; }
10505if ${ac_cv_path_TAIL+:} false; then :
10506  $as_echo_n "(cached) " >&6
10507else
10508  case $TAIL in
10509  [\\/]* | ?:[\\/]*)
10510  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10511  ;;
10512  *)
10513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10514for as_dir in $PATH
10515do
10516  IFS=$as_save_IFS
10517  test -z "$as_dir" && as_dir=.
10518    for ac_exec_ext in '' $ac_executable_extensions; do
10519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10520    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10522    break 2
10523  fi
10524done
10525  done
10526IFS=$as_save_IFS
10527
10528  ;;
10529esac
10530fi
10531TAIL=$ac_cv_path_TAIL
10532if test -n "$TAIL"; then
10533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10534$as_echo "$TAIL" >&6; }
10535else
10536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10537$as_echo "no" >&6; }
10538fi
10539
10540
10541  test -n "$TAIL" && break
10542done
10543
10544  else
10545    # The variable is set, but is it from the command line or the environment?
10546
10547    # Try to remove the string !TAIL! from our list.
10548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10550      # If it failed, the variable was not from the command line. Ignore it,
10551      # but warn the user (except for BASH, which is always set by the calling BASH).
10552      if test "xTAIL" != xBASH; then
10553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10554$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10555      fi
10556      # Try to locate tool using the code snippet
10557      for ac_prog in tail
10558do
10559  # Extract the first word of "$ac_prog", so it can be a program name with args.
10560set dummy $ac_prog; ac_word=$2
10561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10562$as_echo_n "checking for $ac_word... " >&6; }
10563if ${ac_cv_path_TAIL+:} false; then :
10564  $as_echo_n "(cached) " >&6
10565else
10566  case $TAIL in
10567  [\\/]* | ?:[\\/]*)
10568  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10569  ;;
10570  *)
10571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10572for as_dir in $PATH
10573do
10574  IFS=$as_save_IFS
10575  test -z "$as_dir" && as_dir=.
10576    for ac_exec_ext in '' $ac_executable_extensions; do
10577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10578    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10580    break 2
10581  fi
10582done
10583  done
10584IFS=$as_save_IFS
10585
10586  ;;
10587esac
10588fi
10589TAIL=$ac_cv_path_TAIL
10590if test -n "$TAIL"; then
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10592$as_echo "$TAIL" >&6; }
10593else
10594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595$as_echo "no" >&6; }
10596fi
10597
10598
10599  test -n "$TAIL" && break
10600done
10601
10602    else
10603      # If it succeeded, then it was overridden by the user. We will use it
10604      # for the tool.
10605
10606      # First remove it from the list of overridden variables, so we can test
10607      # for unknown variables in the end.
10608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10609
10610      # Check if we try to supply an empty value
10611      if test "x$TAIL" = x; then
10612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10613$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10615$as_echo_n "checking for TAIL... " >&6; }
10616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10617$as_echo "disabled" >&6; }
10618      else
10619        # Check if the provided tool contains a complete path.
10620        tool_specified="$TAIL"
10621        tool_basename="${tool_specified##*/}"
10622        if test "x$tool_basename" = "x$tool_specified"; then
10623          # A command without a complete path is provided, search $PATH.
10624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10625$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10626          # Extract the first word of "$tool_basename", so it can be a program name with args.
10627set dummy $tool_basename; ac_word=$2
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629$as_echo_n "checking for $ac_word... " >&6; }
10630if ${ac_cv_path_TAIL+:} false; then :
10631  $as_echo_n "(cached) " >&6
10632else
10633  case $TAIL in
10634  [\\/]* | ?:[\\/]*)
10635  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10636  ;;
10637  *)
10638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639for as_dir in $PATH
10640do
10641  IFS=$as_save_IFS
10642  test -z "$as_dir" && as_dir=.
10643    for ac_exec_ext in '' $ac_executable_extensions; do
10644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10645    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647    break 2
10648  fi
10649done
10650  done
10651IFS=$as_save_IFS
10652
10653  ;;
10654esac
10655fi
10656TAIL=$ac_cv_path_TAIL
10657if test -n "$TAIL"; then
10658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10659$as_echo "$TAIL" >&6; }
10660else
10661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
10663fi
10664
10665
10666          if test "x$TAIL" = x; then
10667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10668          fi
10669        else
10670          # Otherwise we believe it is a complete path. Use it as it is.
10671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10672$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10674$as_echo_n "checking for TAIL... " >&6; }
10675          if test ! -x "$tool_specified"; then
10676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10677$as_echo "not found" >&6; }
10678            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10679          fi
10680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10681$as_echo "$tool_specified" >&6; }
10682        fi
10683      fi
10684    fi
10685
10686  fi
10687
10688
10689
10690  if test "x$TAIL" = x; then
10691    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10692  fi
10693
10694
10695
10696
10697
10698  # Publish this variable in the help.
10699
10700
10701  if [ -z "${TAR+x}" ]; then
10702    # The variable is not set by user, try to locate tool using the code snippet
10703    for ac_prog in tar
10704do
10705  # Extract the first word of "$ac_prog", so it can be a program name with args.
10706set dummy $ac_prog; ac_word=$2
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10708$as_echo_n "checking for $ac_word... " >&6; }
10709if ${ac_cv_path_TAR+:} false; then :
10710  $as_echo_n "(cached) " >&6
10711else
10712  case $TAR in
10713  [\\/]* | ?:[\\/]*)
10714  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10715  ;;
10716  *)
10717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10718for as_dir in $PATH
10719do
10720  IFS=$as_save_IFS
10721  test -z "$as_dir" && as_dir=.
10722    for ac_exec_ext in '' $ac_executable_extensions; do
10723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10724    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10726    break 2
10727  fi
10728done
10729  done
10730IFS=$as_save_IFS
10731
10732  ;;
10733esac
10734fi
10735TAR=$ac_cv_path_TAR
10736if test -n "$TAR"; then
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10738$as_echo "$TAR" >&6; }
10739else
10740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10741$as_echo "no" >&6; }
10742fi
10743
10744
10745  test -n "$TAR" && break
10746done
10747
10748  else
10749    # The variable is set, but is it from the command line or the environment?
10750
10751    # Try to remove the string !TAR! from our list.
10752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10754      # If it failed, the variable was not from the command line. Ignore it,
10755      # but warn the user (except for BASH, which is always set by the calling BASH).
10756      if test "xTAR" != xBASH; then
10757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10758$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10759      fi
10760      # Try to locate tool using the code snippet
10761      for ac_prog in tar
10762do
10763  # Extract the first word of "$ac_prog", so it can be a program name with args.
10764set dummy $ac_prog; ac_word=$2
10765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10766$as_echo_n "checking for $ac_word... " >&6; }
10767if ${ac_cv_path_TAR+:} false; then :
10768  $as_echo_n "(cached) " >&6
10769else
10770  case $TAR in
10771  [\\/]* | ?:[\\/]*)
10772  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10773  ;;
10774  *)
10775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10776for as_dir in $PATH
10777do
10778  IFS=$as_save_IFS
10779  test -z "$as_dir" && as_dir=.
10780    for ac_exec_ext in '' $ac_executable_extensions; do
10781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10782    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10784    break 2
10785  fi
10786done
10787  done
10788IFS=$as_save_IFS
10789
10790  ;;
10791esac
10792fi
10793TAR=$ac_cv_path_TAR
10794if test -n "$TAR"; then
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10796$as_echo "$TAR" >&6; }
10797else
10798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10799$as_echo "no" >&6; }
10800fi
10801
10802
10803  test -n "$TAR" && break
10804done
10805
10806    else
10807      # If it succeeded, then it was overridden by the user. We will use it
10808      # for the tool.
10809
10810      # First remove it from the list of overridden variables, so we can test
10811      # for unknown variables in the end.
10812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10813
10814      # Check if we try to supply an empty value
10815      if test "x$TAR" = x; then
10816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10817$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10819$as_echo_n "checking for TAR... " >&6; }
10820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10821$as_echo "disabled" >&6; }
10822      else
10823        # Check if the provided tool contains a complete path.
10824        tool_specified="$TAR"
10825        tool_basename="${tool_specified##*/}"
10826        if test "x$tool_basename" = "x$tool_specified"; then
10827          # A command without a complete path is provided, search $PATH.
10828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10829$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10830          # Extract the first word of "$tool_basename", so it can be a program name with args.
10831set dummy $tool_basename; ac_word=$2
10832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10833$as_echo_n "checking for $ac_word... " >&6; }
10834if ${ac_cv_path_TAR+:} false; then :
10835  $as_echo_n "(cached) " >&6
10836else
10837  case $TAR in
10838  [\\/]* | ?:[\\/]*)
10839  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10840  ;;
10841  *)
10842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10843for as_dir in $PATH
10844do
10845  IFS=$as_save_IFS
10846  test -z "$as_dir" && as_dir=.
10847    for ac_exec_ext in '' $ac_executable_extensions; do
10848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10849    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10851    break 2
10852  fi
10853done
10854  done
10855IFS=$as_save_IFS
10856
10857  ;;
10858esac
10859fi
10860TAR=$ac_cv_path_TAR
10861if test -n "$TAR"; then
10862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10863$as_echo "$TAR" >&6; }
10864else
10865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10866$as_echo "no" >&6; }
10867fi
10868
10869
10870          if test "x$TAR" = x; then
10871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10872          fi
10873        else
10874          # Otherwise we believe it is a complete path. Use it as it is.
10875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10876$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10878$as_echo_n "checking for TAR... " >&6; }
10879          if test ! -x "$tool_specified"; then
10880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10881$as_echo "not found" >&6; }
10882            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10883          fi
10884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10885$as_echo "$tool_specified" >&6; }
10886        fi
10887      fi
10888    fi
10889
10890  fi
10891
10892
10893
10894  if test "x$TAR" = x; then
10895    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10896  fi
10897
10898
10899
10900
10901
10902  # Publish this variable in the help.
10903
10904
10905  if [ -z "${TEE+x}" ]; then
10906    # The variable is not set by user, try to locate tool using the code snippet
10907    for ac_prog in tee
10908do
10909  # Extract the first word of "$ac_prog", so it can be a program name with args.
10910set dummy $ac_prog; ac_word=$2
10911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10912$as_echo_n "checking for $ac_word... " >&6; }
10913if ${ac_cv_path_TEE+:} false; then :
10914  $as_echo_n "(cached) " >&6
10915else
10916  case $TEE in
10917  [\\/]* | ?:[\\/]*)
10918  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10919  ;;
10920  *)
10921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10922for as_dir in $PATH
10923do
10924  IFS=$as_save_IFS
10925  test -z "$as_dir" && as_dir=.
10926    for ac_exec_ext in '' $ac_executable_extensions; do
10927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10928    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10930    break 2
10931  fi
10932done
10933  done
10934IFS=$as_save_IFS
10935
10936  ;;
10937esac
10938fi
10939TEE=$ac_cv_path_TEE
10940if test -n "$TEE"; then
10941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10942$as_echo "$TEE" >&6; }
10943else
10944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10945$as_echo "no" >&6; }
10946fi
10947
10948
10949  test -n "$TEE" && break
10950done
10951
10952  else
10953    # The variable is set, but is it from the command line or the environment?
10954
10955    # Try to remove the string !TEE! from our list.
10956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10958      # If it failed, the variable was not from the command line. Ignore it,
10959      # but warn the user (except for BASH, which is always set by the calling BASH).
10960      if test "xTEE" != xBASH; then
10961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10962$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10963      fi
10964      # Try to locate tool using the code snippet
10965      for ac_prog in tee
10966do
10967  # Extract the first word of "$ac_prog", so it can be a program name with args.
10968set dummy $ac_prog; ac_word=$2
10969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10970$as_echo_n "checking for $ac_word... " >&6; }
10971if ${ac_cv_path_TEE+:} false; then :
10972  $as_echo_n "(cached) " >&6
10973else
10974  case $TEE in
10975  [\\/]* | ?:[\\/]*)
10976  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10977  ;;
10978  *)
10979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10980for as_dir in $PATH
10981do
10982  IFS=$as_save_IFS
10983  test -z "$as_dir" && as_dir=.
10984    for ac_exec_ext in '' $ac_executable_extensions; do
10985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10986    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10988    break 2
10989  fi
10990done
10991  done
10992IFS=$as_save_IFS
10993
10994  ;;
10995esac
10996fi
10997TEE=$ac_cv_path_TEE
10998if test -n "$TEE"; then
10999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11000$as_echo "$TEE" >&6; }
11001else
11002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11003$as_echo "no" >&6; }
11004fi
11005
11006
11007  test -n "$TEE" && break
11008done
11009
11010    else
11011      # If it succeeded, then it was overridden by the user. We will use it
11012      # for the tool.
11013
11014      # First remove it from the list of overridden variables, so we can test
11015      # for unknown variables in the end.
11016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11017
11018      # Check if we try to supply an empty value
11019      if test "x$TEE" = x; then
11020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11021$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11023$as_echo_n "checking for TEE... " >&6; }
11024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11025$as_echo "disabled" >&6; }
11026      else
11027        # Check if the provided tool contains a complete path.
11028        tool_specified="$TEE"
11029        tool_basename="${tool_specified##*/}"
11030        if test "x$tool_basename" = "x$tool_specified"; then
11031          # A command without a complete path is provided, search $PATH.
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11033$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11034          # Extract the first word of "$tool_basename", so it can be a program name with args.
11035set dummy $tool_basename; ac_word=$2
11036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11037$as_echo_n "checking for $ac_word... " >&6; }
11038if ${ac_cv_path_TEE+:} false; then :
11039  $as_echo_n "(cached) " >&6
11040else
11041  case $TEE in
11042  [\\/]* | ?:[\\/]*)
11043  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11044  ;;
11045  *)
11046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11047for as_dir in $PATH
11048do
11049  IFS=$as_save_IFS
11050  test -z "$as_dir" && as_dir=.
11051    for ac_exec_ext in '' $ac_executable_extensions; do
11052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11053    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11055    break 2
11056  fi
11057done
11058  done
11059IFS=$as_save_IFS
11060
11061  ;;
11062esac
11063fi
11064TEE=$ac_cv_path_TEE
11065if test -n "$TEE"; then
11066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11067$as_echo "$TEE" >&6; }
11068else
11069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11070$as_echo "no" >&6; }
11071fi
11072
11073
11074          if test "x$TEE" = x; then
11075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11076          fi
11077        else
11078          # Otherwise we believe it is a complete path. Use it as it is.
11079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11080$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11082$as_echo_n "checking for TEE... " >&6; }
11083          if test ! -x "$tool_specified"; then
11084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11085$as_echo "not found" >&6; }
11086            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11087          fi
11088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11089$as_echo "$tool_specified" >&6; }
11090        fi
11091      fi
11092    fi
11093
11094  fi
11095
11096
11097
11098  if test "x$TEE" = x; then
11099    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11100  fi
11101
11102
11103
11104
11105
11106  # Publish this variable in the help.
11107
11108
11109  if [ -z "${TOUCH+x}" ]; then
11110    # The variable is not set by user, try to locate tool using the code snippet
11111    for ac_prog in touch
11112do
11113  # Extract the first word of "$ac_prog", so it can be a program name with args.
11114set dummy $ac_prog; ac_word=$2
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11116$as_echo_n "checking for $ac_word... " >&6; }
11117if ${ac_cv_path_TOUCH+:} false; then :
11118  $as_echo_n "(cached) " >&6
11119else
11120  case $TOUCH in
11121  [\\/]* | ?:[\\/]*)
11122  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11123  ;;
11124  *)
11125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11126for as_dir in $PATH
11127do
11128  IFS=$as_save_IFS
11129  test -z "$as_dir" && as_dir=.
11130    for ac_exec_ext in '' $ac_executable_extensions; do
11131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11132    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11134    break 2
11135  fi
11136done
11137  done
11138IFS=$as_save_IFS
11139
11140  ;;
11141esac
11142fi
11143TOUCH=$ac_cv_path_TOUCH
11144if test -n "$TOUCH"; then
11145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11146$as_echo "$TOUCH" >&6; }
11147else
11148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
11150fi
11151
11152
11153  test -n "$TOUCH" && break
11154done
11155
11156  else
11157    # The variable is set, but is it from the command line or the environment?
11158
11159    # Try to remove the string !TOUCH! from our list.
11160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11162      # If it failed, the variable was not from the command line. Ignore it,
11163      # but warn the user (except for BASH, which is always set by the calling BASH).
11164      if test "xTOUCH" != xBASH; then
11165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11166$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11167      fi
11168      # Try to locate tool using the code snippet
11169      for ac_prog in touch
11170do
11171  # Extract the first word of "$ac_prog", so it can be a program name with args.
11172set dummy $ac_prog; ac_word=$2
11173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11174$as_echo_n "checking for $ac_word... " >&6; }
11175if ${ac_cv_path_TOUCH+:} false; then :
11176  $as_echo_n "(cached) " >&6
11177else
11178  case $TOUCH in
11179  [\\/]* | ?:[\\/]*)
11180  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11181  ;;
11182  *)
11183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11184for as_dir in $PATH
11185do
11186  IFS=$as_save_IFS
11187  test -z "$as_dir" && as_dir=.
11188    for ac_exec_ext in '' $ac_executable_extensions; do
11189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11190    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11192    break 2
11193  fi
11194done
11195  done
11196IFS=$as_save_IFS
11197
11198  ;;
11199esac
11200fi
11201TOUCH=$ac_cv_path_TOUCH
11202if test -n "$TOUCH"; then
11203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11204$as_echo "$TOUCH" >&6; }
11205else
11206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11207$as_echo "no" >&6; }
11208fi
11209
11210
11211  test -n "$TOUCH" && break
11212done
11213
11214    else
11215      # If it succeeded, then it was overridden by the user. We will use it
11216      # for the tool.
11217
11218      # First remove it from the list of overridden variables, so we can test
11219      # for unknown variables in the end.
11220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11221
11222      # Check if we try to supply an empty value
11223      if test "x$TOUCH" = x; then
11224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11225$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11227$as_echo_n "checking for TOUCH... " >&6; }
11228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11229$as_echo "disabled" >&6; }
11230      else
11231        # Check if the provided tool contains a complete path.
11232        tool_specified="$TOUCH"
11233        tool_basename="${tool_specified##*/}"
11234        if test "x$tool_basename" = "x$tool_specified"; then
11235          # A command without a complete path is provided, search $PATH.
11236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11237$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11238          # Extract the first word of "$tool_basename", so it can be a program name with args.
11239set dummy $tool_basename; ac_word=$2
11240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11241$as_echo_n "checking for $ac_word... " >&6; }
11242if ${ac_cv_path_TOUCH+:} false; then :
11243  $as_echo_n "(cached) " >&6
11244else
11245  case $TOUCH in
11246  [\\/]* | ?:[\\/]*)
11247  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11248  ;;
11249  *)
11250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11251for as_dir in $PATH
11252do
11253  IFS=$as_save_IFS
11254  test -z "$as_dir" && as_dir=.
11255    for ac_exec_ext in '' $ac_executable_extensions; do
11256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11257    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11259    break 2
11260  fi
11261done
11262  done
11263IFS=$as_save_IFS
11264
11265  ;;
11266esac
11267fi
11268TOUCH=$ac_cv_path_TOUCH
11269if test -n "$TOUCH"; then
11270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11271$as_echo "$TOUCH" >&6; }
11272else
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11274$as_echo "no" >&6; }
11275fi
11276
11277
11278          if test "x$TOUCH" = x; then
11279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11280          fi
11281        else
11282          # Otherwise we believe it is a complete path. Use it as it is.
11283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11284$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11286$as_echo_n "checking for TOUCH... " >&6; }
11287          if test ! -x "$tool_specified"; then
11288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11289$as_echo "not found" >&6; }
11290            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11291          fi
11292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11293$as_echo "$tool_specified" >&6; }
11294        fi
11295      fi
11296    fi
11297
11298  fi
11299
11300
11301
11302  if test "x$TOUCH" = x; then
11303    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11304  fi
11305
11306
11307
11308
11309
11310  # Publish this variable in the help.
11311
11312
11313  if [ -z "${TR+x}" ]; then
11314    # The variable is not set by user, try to locate tool using the code snippet
11315    for ac_prog in tr
11316do
11317  # Extract the first word of "$ac_prog", so it can be a program name with args.
11318set dummy $ac_prog; ac_word=$2
11319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11320$as_echo_n "checking for $ac_word... " >&6; }
11321if ${ac_cv_path_TR+:} false; then :
11322  $as_echo_n "(cached) " >&6
11323else
11324  case $TR in
11325  [\\/]* | ?:[\\/]*)
11326  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11327  ;;
11328  *)
11329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11330for as_dir in $PATH
11331do
11332  IFS=$as_save_IFS
11333  test -z "$as_dir" && as_dir=.
11334    for ac_exec_ext in '' $ac_executable_extensions; do
11335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11336    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11338    break 2
11339  fi
11340done
11341  done
11342IFS=$as_save_IFS
11343
11344  ;;
11345esac
11346fi
11347TR=$ac_cv_path_TR
11348if test -n "$TR"; then
11349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11350$as_echo "$TR" >&6; }
11351else
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
11354fi
11355
11356
11357  test -n "$TR" && break
11358done
11359
11360  else
11361    # The variable is set, but is it from the command line or the environment?
11362
11363    # Try to remove the string !TR! from our list.
11364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11366      # If it failed, the variable was not from the command line. Ignore it,
11367      # but warn the user (except for BASH, which is always set by the calling BASH).
11368      if test "xTR" != xBASH; then
11369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11370$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11371      fi
11372      # Try to locate tool using the code snippet
11373      for ac_prog in tr
11374do
11375  # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_path_TR+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  case $TR in
11383  [\\/]* | ?:[\\/]*)
11384  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11385  ;;
11386  *)
11387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402  ;;
11403esac
11404fi
11405TR=$ac_cv_path_TR
11406if test -n "$TR"; then
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11408$as_echo "$TR" >&6; }
11409else
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
11412fi
11413
11414
11415  test -n "$TR" && break
11416done
11417
11418    else
11419      # If it succeeded, then it was overridden by the user. We will use it
11420      # for the tool.
11421
11422      # First remove it from the list of overridden variables, so we can test
11423      # for unknown variables in the end.
11424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11425
11426      # Check if we try to supply an empty value
11427      if test "x$TR" = x; then
11428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11429$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11431$as_echo_n "checking for TR... " >&6; }
11432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11433$as_echo "disabled" >&6; }
11434      else
11435        # Check if the provided tool contains a complete path.
11436        tool_specified="$TR"
11437        tool_basename="${tool_specified##*/}"
11438        if test "x$tool_basename" = "x$tool_specified"; then
11439          # A command without a complete path is provided, search $PATH.
11440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11441$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11442          # Extract the first word of "$tool_basename", so it can be a program name with args.
11443set dummy $tool_basename; ac_word=$2
11444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11445$as_echo_n "checking for $ac_word... " >&6; }
11446if ${ac_cv_path_TR+:} false; then :
11447  $as_echo_n "(cached) " >&6
11448else
11449  case $TR in
11450  [\\/]* | ?:[\\/]*)
11451  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11452  ;;
11453  *)
11454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11455for as_dir in $PATH
11456do
11457  IFS=$as_save_IFS
11458  test -z "$as_dir" && as_dir=.
11459    for ac_exec_ext in '' $ac_executable_extensions; do
11460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11461    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11463    break 2
11464  fi
11465done
11466  done
11467IFS=$as_save_IFS
11468
11469  ;;
11470esac
11471fi
11472TR=$ac_cv_path_TR
11473if test -n "$TR"; then
11474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11475$as_echo "$TR" >&6; }
11476else
11477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11478$as_echo "no" >&6; }
11479fi
11480
11481
11482          if test "x$TR" = x; then
11483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11484          fi
11485        else
11486          # Otherwise we believe it is a complete path. Use it as it is.
11487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11488$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11490$as_echo_n "checking for TR... " >&6; }
11491          if test ! -x "$tool_specified"; then
11492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11493$as_echo "not found" >&6; }
11494            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11495          fi
11496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11497$as_echo "$tool_specified" >&6; }
11498        fi
11499      fi
11500    fi
11501
11502  fi
11503
11504
11505
11506  if test "x$TR" = x; then
11507    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11508  fi
11509
11510
11511
11512
11513
11514  # Publish this variable in the help.
11515
11516
11517  if [ -z "${UNAME+x}" ]; then
11518    # The variable is not set by user, try to locate tool using the code snippet
11519    for ac_prog in uname
11520do
11521  # Extract the first word of "$ac_prog", so it can be a program name with args.
11522set dummy $ac_prog; ac_word=$2
11523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11524$as_echo_n "checking for $ac_word... " >&6; }
11525if ${ac_cv_path_UNAME+:} false; then :
11526  $as_echo_n "(cached) " >&6
11527else
11528  case $UNAME in
11529  [\\/]* | ?:[\\/]*)
11530  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11531  ;;
11532  *)
11533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11534for as_dir in $PATH
11535do
11536  IFS=$as_save_IFS
11537  test -z "$as_dir" && as_dir=.
11538    for ac_exec_ext in '' $ac_executable_extensions; do
11539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11540    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11542    break 2
11543  fi
11544done
11545  done
11546IFS=$as_save_IFS
11547
11548  ;;
11549esac
11550fi
11551UNAME=$ac_cv_path_UNAME
11552if test -n "$UNAME"; then
11553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11554$as_echo "$UNAME" >&6; }
11555else
11556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
11558fi
11559
11560
11561  test -n "$UNAME" && break
11562done
11563
11564  else
11565    # The variable is set, but is it from the command line or the environment?
11566
11567    # Try to remove the string !UNAME! from our list.
11568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11570      # If it failed, the variable was not from the command line. Ignore it,
11571      # but warn the user (except for BASH, which is always set by the calling BASH).
11572      if test "xUNAME" != xBASH; then
11573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11574$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11575      fi
11576      # Try to locate tool using the code snippet
11577      for ac_prog in uname
11578do
11579  # Extract the first word of "$ac_prog", so it can be a program name with args.
11580set dummy $ac_prog; ac_word=$2
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11582$as_echo_n "checking for $ac_word... " >&6; }
11583if ${ac_cv_path_UNAME+:} false; then :
11584  $as_echo_n "(cached) " >&6
11585else
11586  case $UNAME in
11587  [\\/]* | ?:[\\/]*)
11588  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11589  ;;
11590  *)
11591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11592for as_dir in $PATH
11593do
11594  IFS=$as_save_IFS
11595  test -z "$as_dir" && as_dir=.
11596    for ac_exec_ext in '' $ac_executable_extensions; do
11597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11598    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11600    break 2
11601  fi
11602done
11603  done
11604IFS=$as_save_IFS
11605
11606  ;;
11607esac
11608fi
11609UNAME=$ac_cv_path_UNAME
11610if test -n "$UNAME"; then
11611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11612$as_echo "$UNAME" >&6; }
11613else
11614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615$as_echo "no" >&6; }
11616fi
11617
11618
11619  test -n "$UNAME" && break
11620done
11621
11622    else
11623      # If it succeeded, then it was overridden by the user. We will use it
11624      # for the tool.
11625
11626      # First remove it from the list of overridden variables, so we can test
11627      # for unknown variables in the end.
11628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11629
11630      # Check if we try to supply an empty value
11631      if test "x$UNAME" = x; then
11632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11633$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11635$as_echo_n "checking for UNAME... " >&6; }
11636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11637$as_echo "disabled" >&6; }
11638      else
11639        # Check if the provided tool contains a complete path.
11640        tool_specified="$UNAME"
11641        tool_basename="${tool_specified##*/}"
11642        if test "x$tool_basename" = "x$tool_specified"; then
11643          # A command without a complete path is provided, search $PATH.
11644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11645$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11646          # Extract the first word of "$tool_basename", so it can be a program name with args.
11647set dummy $tool_basename; ac_word=$2
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11649$as_echo_n "checking for $ac_word... " >&6; }
11650if ${ac_cv_path_UNAME+:} false; then :
11651  $as_echo_n "(cached) " >&6
11652else
11653  case $UNAME in
11654  [\\/]* | ?:[\\/]*)
11655  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11656  ;;
11657  *)
11658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11659for as_dir in $PATH
11660do
11661  IFS=$as_save_IFS
11662  test -z "$as_dir" && as_dir=.
11663    for ac_exec_ext in '' $ac_executable_extensions; do
11664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11665    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11667    break 2
11668  fi
11669done
11670  done
11671IFS=$as_save_IFS
11672
11673  ;;
11674esac
11675fi
11676UNAME=$ac_cv_path_UNAME
11677if test -n "$UNAME"; then
11678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11679$as_echo "$UNAME" >&6; }
11680else
11681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
11683fi
11684
11685
11686          if test "x$UNAME" = x; then
11687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11688          fi
11689        else
11690          # Otherwise we believe it is a complete path. Use it as it is.
11691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11692$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11694$as_echo_n "checking for UNAME... " >&6; }
11695          if test ! -x "$tool_specified"; then
11696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11697$as_echo "not found" >&6; }
11698            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11699          fi
11700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11701$as_echo "$tool_specified" >&6; }
11702        fi
11703      fi
11704    fi
11705
11706  fi
11707
11708
11709
11710  if test "x$UNAME" = x; then
11711    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11712  fi
11713
11714
11715
11716
11717
11718  # Publish this variable in the help.
11719
11720
11721  if [ -z "${UNIQ+x}" ]; then
11722    # The variable is not set by user, try to locate tool using the code snippet
11723    for ac_prog in uniq
11724do
11725  # Extract the first word of "$ac_prog", so it can be a program name with args.
11726set dummy $ac_prog; ac_word=$2
11727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11728$as_echo_n "checking for $ac_word... " >&6; }
11729if ${ac_cv_path_UNIQ+:} false; then :
11730  $as_echo_n "(cached) " >&6
11731else
11732  case $UNIQ in
11733  [\\/]* | ?:[\\/]*)
11734  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11735  ;;
11736  *)
11737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11738for as_dir in $PATH
11739do
11740  IFS=$as_save_IFS
11741  test -z "$as_dir" && as_dir=.
11742    for ac_exec_ext in '' $ac_executable_extensions; do
11743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11744    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11746    break 2
11747  fi
11748done
11749  done
11750IFS=$as_save_IFS
11751
11752  ;;
11753esac
11754fi
11755UNIQ=$ac_cv_path_UNIQ
11756if test -n "$UNIQ"; then
11757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11758$as_echo "$UNIQ" >&6; }
11759else
11760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
11762fi
11763
11764
11765  test -n "$UNIQ" && break
11766done
11767
11768  else
11769    # The variable is set, but is it from the command line or the environment?
11770
11771    # Try to remove the string !UNIQ! from our list.
11772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11774      # If it failed, the variable was not from the command line. Ignore it,
11775      # but warn the user (except for BASH, which is always set by the calling BASH).
11776      if test "xUNIQ" != xBASH; then
11777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11778$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11779      fi
11780      # Try to locate tool using the code snippet
11781      for ac_prog in uniq
11782do
11783  # Extract the first word of "$ac_prog", so it can be a program name with args.
11784set dummy $ac_prog; ac_word=$2
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11786$as_echo_n "checking for $ac_word... " >&6; }
11787if ${ac_cv_path_UNIQ+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  case $UNIQ in
11791  [\\/]* | ?:[\\/]*)
11792  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11793  ;;
11794  *)
11795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796for as_dir in $PATH
11797do
11798  IFS=$as_save_IFS
11799  test -z "$as_dir" && as_dir=.
11800    for ac_exec_ext in '' $ac_executable_extensions; do
11801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11802    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11804    break 2
11805  fi
11806done
11807  done
11808IFS=$as_save_IFS
11809
11810  ;;
11811esac
11812fi
11813UNIQ=$ac_cv_path_UNIQ
11814if test -n "$UNIQ"; then
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11816$as_echo "$UNIQ" >&6; }
11817else
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
11820fi
11821
11822
11823  test -n "$UNIQ" && break
11824done
11825
11826    else
11827      # If it succeeded, then it was overridden by the user. We will use it
11828      # for the tool.
11829
11830      # First remove it from the list of overridden variables, so we can test
11831      # for unknown variables in the end.
11832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11833
11834      # Check if we try to supply an empty value
11835      if test "x$UNIQ" = x; then
11836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11837$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11839$as_echo_n "checking for UNIQ... " >&6; }
11840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11841$as_echo "disabled" >&6; }
11842      else
11843        # Check if the provided tool contains a complete path.
11844        tool_specified="$UNIQ"
11845        tool_basename="${tool_specified##*/}"
11846        if test "x$tool_basename" = "x$tool_specified"; then
11847          # A command without a complete path is provided, search $PATH.
11848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11849$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11850          # Extract the first word of "$tool_basename", so it can be a program name with args.
11851set dummy $tool_basename; ac_word=$2
11852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11853$as_echo_n "checking for $ac_word... " >&6; }
11854if ${ac_cv_path_UNIQ+:} false; then :
11855  $as_echo_n "(cached) " >&6
11856else
11857  case $UNIQ in
11858  [\\/]* | ?:[\\/]*)
11859  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11860  ;;
11861  *)
11862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11863for as_dir in $PATH
11864do
11865  IFS=$as_save_IFS
11866  test -z "$as_dir" && as_dir=.
11867    for ac_exec_ext in '' $ac_executable_extensions; do
11868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11869    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11871    break 2
11872  fi
11873done
11874  done
11875IFS=$as_save_IFS
11876
11877  ;;
11878esac
11879fi
11880UNIQ=$ac_cv_path_UNIQ
11881if test -n "$UNIQ"; then
11882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11883$as_echo "$UNIQ" >&6; }
11884else
11885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11886$as_echo "no" >&6; }
11887fi
11888
11889
11890          if test "x$UNIQ" = x; then
11891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11892          fi
11893        else
11894          # Otherwise we believe it is a complete path. Use it as it is.
11895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11896$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11898$as_echo_n "checking for UNIQ... " >&6; }
11899          if test ! -x "$tool_specified"; then
11900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11901$as_echo "not found" >&6; }
11902            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11903          fi
11904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11905$as_echo "$tool_specified" >&6; }
11906        fi
11907      fi
11908    fi
11909
11910  fi
11911
11912
11913
11914  if test "x$UNIQ" = x; then
11915    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11916  fi
11917
11918
11919
11920
11921
11922  # Publish this variable in the help.
11923
11924
11925  if [ -z "${WC+x}" ]; then
11926    # The variable is not set by user, try to locate tool using the code snippet
11927    for ac_prog in wc
11928do
11929  # Extract the first word of "$ac_prog", so it can be a program name with args.
11930set dummy $ac_prog; ac_word=$2
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11932$as_echo_n "checking for $ac_word... " >&6; }
11933if ${ac_cv_path_WC+:} false; then :
11934  $as_echo_n "(cached) " >&6
11935else
11936  case $WC in
11937  [\\/]* | ?:[\\/]*)
11938  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11939  ;;
11940  *)
11941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11942for as_dir in $PATH
11943do
11944  IFS=$as_save_IFS
11945  test -z "$as_dir" && as_dir=.
11946    for ac_exec_ext in '' $ac_executable_extensions; do
11947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11948    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11950    break 2
11951  fi
11952done
11953  done
11954IFS=$as_save_IFS
11955
11956  ;;
11957esac
11958fi
11959WC=$ac_cv_path_WC
11960if test -n "$WC"; then
11961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11962$as_echo "$WC" >&6; }
11963else
11964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11965$as_echo "no" >&6; }
11966fi
11967
11968
11969  test -n "$WC" && break
11970done
11971
11972  else
11973    # The variable is set, but is it from the command line or the environment?
11974
11975    # Try to remove the string !WC! from our list.
11976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11978      # If it failed, the variable was not from the command line. Ignore it,
11979      # but warn the user (except for BASH, which is always set by the calling BASH).
11980      if test "xWC" != xBASH; then
11981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11982$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11983      fi
11984      # Try to locate tool using the code snippet
11985      for ac_prog in wc
11986do
11987  # Extract the first word of "$ac_prog", so it can be a program name with args.
11988set dummy $ac_prog; ac_word=$2
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11990$as_echo_n "checking for $ac_word... " >&6; }
11991if ${ac_cv_path_WC+:} false; then :
11992  $as_echo_n "(cached) " >&6
11993else
11994  case $WC in
11995  [\\/]* | ?:[\\/]*)
11996  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11997  ;;
11998  *)
11999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12000for as_dir in $PATH
12001do
12002  IFS=$as_save_IFS
12003  test -z "$as_dir" && as_dir=.
12004    for ac_exec_ext in '' $ac_executable_extensions; do
12005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12006    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12008    break 2
12009  fi
12010done
12011  done
12012IFS=$as_save_IFS
12013
12014  ;;
12015esac
12016fi
12017WC=$ac_cv_path_WC
12018if test -n "$WC"; then
12019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12020$as_echo "$WC" >&6; }
12021else
12022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12023$as_echo "no" >&6; }
12024fi
12025
12026
12027  test -n "$WC" && break
12028done
12029
12030    else
12031      # If it succeeded, then it was overridden by the user. We will use it
12032      # for the tool.
12033
12034      # First remove it from the list of overridden variables, so we can test
12035      # for unknown variables in the end.
12036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12037
12038      # Check if we try to supply an empty value
12039      if test "x$WC" = x; then
12040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12041$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12043$as_echo_n "checking for WC... " >&6; }
12044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12045$as_echo "disabled" >&6; }
12046      else
12047        # Check if the provided tool contains a complete path.
12048        tool_specified="$WC"
12049        tool_basename="${tool_specified##*/}"
12050        if test "x$tool_basename" = "x$tool_specified"; then
12051          # A command without a complete path is provided, search $PATH.
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12053$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12054          # Extract the first word of "$tool_basename", so it can be a program name with args.
12055set dummy $tool_basename; ac_word=$2
12056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12057$as_echo_n "checking for $ac_word... " >&6; }
12058if ${ac_cv_path_WC+:} false; then :
12059  $as_echo_n "(cached) " >&6
12060else
12061  case $WC in
12062  [\\/]* | ?:[\\/]*)
12063  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12064  ;;
12065  *)
12066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12067for as_dir in $PATH
12068do
12069  IFS=$as_save_IFS
12070  test -z "$as_dir" && as_dir=.
12071    for ac_exec_ext in '' $ac_executable_extensions; do
12072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12073    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12075    break 2
12076  fi
12077done
12078  done
12079IFS=$as_save_IFS
12080
12081  ;;
12082esac
12083fi
12084WC=$ac_cv_path_WC
12085if test -n "$WC"; then
12086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12087$as_echo "$WC" >&6; }
12088else
12089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090$as_echo "no" >&6; }
12091fi
12092
12093
12094          if test "x$WC" = x; then
12095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12096          fi
12097        else
12098          # Otherwise we believe it is a complete path. Use it as it is.
12099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12100$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12102$as_echo_n "checking for WC... " >&6; }
12103          if test ! -x "$tool_specified"; then
12104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12105$as_echo "not found" >&6; }
12106            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12107          fi
12108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12109$as_echo "$tool_specified" >&6; }
12110        fi
12111      fi
12112    fi
12113
12114  fi
12115
12116
12117
12118  if test "x$WC" = x; then
12119    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12120  fi
12121
12122
12123
12124
12125
12126  # Publish this variable in the help.
12127
12128
12129  if [ -z "${WHICH+x}" ]; then
12130    # The variable is not set by user, try to locate tool using the code snippet
12131    for ac_prog in which
12132do
12133  # Extract the first word of "$ac_prog", so it can be a program name with args.
12134set dummy $ac_prog; ac_word=$2
12135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12136$as_echo_n "checking for $ac_word... " >&6; }
12137if ${ac_cv_path_WHICH+:} false; then :
12138  $as_echo_n "(cached) " >&6
12139else
12140  case $WHICH in
12141  [\\/]* | ?:[\\/]*)
12142  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12143  ;;
12144  *)
12145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12146for as_dir in $PATH
12147do
12148  IFS=$as_save_IFS
12149  test -z "$as_dir" && as_dir=.
12150    for ac_exec_ext in '' $ac_executable_extensions; do
12151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12152    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12154    break 2
12155  fi
12156done
12157  done
12158IFS=$as_save_IFS
12159
12160  ;;
12161esac
12162fi
12163WHICH=$ac_cv_path_WHICH
12164if test -n "$WHICH"; then
12165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12166$as_echo "$WHICH" >&6; }
12167else
12168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12169$as_echo "no" >&6; }
12170fi
12171
12172
12173  test -n "$WHICH" && break
12174done
12175
12176  else
12177    # The variable is set, but is it from the command line or the environment?
12178
12179    # Try to remove the string !WHICH! from our list.
12180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12182      # If it failed, the variable was not from the command line. Ignore it,
12183      # but warn the user (except for BASH, which is always set by the calling BASH).
12184      if test "xWHICH" != xBASH; then
12185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12186$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12187      fi
12188      # Try to locate tool using the code snippet
12189      for ac_prog in which
12190do
12191  # Extract the first word of "$ac_prog", so it can be a program name with args.
12192set dummy $ac_prog; ac_word=$2
12193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12194$as_echo_n "checking for $ac_word... " >&6; }
12195if ${ac_cv_path_WHICH+:} false; then :
12196  $as_echo_n "(cached) " >&6
12197else
12198  case $WHICH in
12199  [\\/]* | ?:[\\/]*)
12200  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12201  ;;
12202  *)
12203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12204for as_dir in $PATH
12205do
12206  IFS=$as_save_IFS
12207  test -z "$as_dir" && as_dir=.
12208    for ac_exec_ext in '' $ac_executable_extensions; do
12209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12210    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12212    break 2
12213  fi
12214done
12215  done
12216IFS=$as_save_IFS
12217
12218  ;;
12219esac
12220fi
12221WHICH=$ac_cv_path_WHICH
12222if test -n "$WHICH"; then
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12224$as_echo "$WHICH" >&6; }
12225else
12226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12227$as_echo "no" >&6; }
12228fi
12229
12230
12231  test -n "$WHICH" && break
12232done
12233
12234    else
12235      # If it succeeded, then it was overridden by the user. We will use it
12236      # for the tool.
12237
12238      # First remove it from the list of overridden variables, so we can test
12239      # for unknown variables in the end.
12240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12241
12242      # Check if we try to supply an empty value
12243      if test "x$WHICH" = x; then
12244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12245$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12247$as_echo_n "checking for WHICH... " >&6; }
12248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12249$as_echo "disabled" >&6; }
12250      else
12251        # Check if the provided tool contains a complete path.
12252        tool_specified="$WHICH"
12253        tool_basename="${tool_specified##*/}"
12254        if test "x$tool_basename" = "x$tool_specified"; then
12255          # A command without a complete path is provided, search $PATH.
12256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12257$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12258          # Extract the first word of "$tool_basename", so it can be a program name with args.
12259set dummy $tool_basename; ac_word=$2
12260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12261$as_echo_n "checking for $ac_word... " >&6; }
12262if ${ac_cv_path_WHICH+:} false; then :
12263  $as_echo_n "(cached) " >&6
12264else
12265  case $WHICH in
12266  [\\/]* | ?:[\\/]*)
12267  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12268  ;;
12269  *)
12270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271for as_dir in $PATH
12272do
12273  IFS=$as_save_IFS
12274  test -z "$as_dir" && as_dir=.
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12277    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12279    break 2
12280  fi
12281done
12282  done
12283IFS=$as_save_IFS
12284
12285  ;;
12286esac
12287fi
12288WHICH=$ac_cv_path_WHICH
12289if test -n "$WHICH"; then
12290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12291$as_echo "$WHICH" >&6; }
12292else
12293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12294$as_echo "no" >&6; }
12295fi
12296
12297
12298          if test "x$WHICH" = x; then
12299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12300          fi
12301        else
12302          # Otherwise we believe it is a complete path. Use it as it is.
12303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12304$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12306$as_echo_n "checking for WHICH... " >&6; }
12307          if test ! -x "$tool_specified"; then
12308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12309$as_echo "not found" >&6; }
12310            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12311          fi
12312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12313$as_echo "$tool_specified" >&6; }
12314        fi
12315      fi
12316    fi
12317
12318  fi
12319
12320
12321
12322  if test "x$WHICH" = x; then
12323    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12324  fi
12325
12326
12327
12328
12329
12330  # Publish this variable in the help.
12331
12332
12333  if [ -z "${XARGS+x}" ]; then
12334    # The variable is not set by user, try to locate tool using the code snippet
12335    for ac_prog in xargs
12336do
12337  # Extract the first word of "$ac_prog", so it can be a program name with args.
12338set dummy $ac_prog; ac_word=$2
12339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12340$as_echo_n "checking for $ac_word... " >&6; }
12341if ${ac_cv_path_XARGS+:} false; then :
12342  $as_echo_n "(cached) " >&6
12343else
12344  case $XARGS in
12345  [\\/]* | ?:[\\/]*)
12346  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12347  ;;
12348  *)
12349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12350for as_dir in $PATH
12351do
12352  IFS=$as_save_IFS
12353  test -z "$as_dir" && as_dir=.
12354    for ac_exec_ext in '' $ac_executable_extensions; do
12355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12356    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12358    break 2
12359  fi
12360done
12361  done
12362IFS=$as_save_IFS
12363
12364  ;;
12365esac
12366fi
12367XARGS=$ac_cv_path_XARGS
12368if test -n "$XARGS"; then
12369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12370$as_echo "$XARGS" >&6; }
12371else
12372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12373$as_echo "no" >&6; }
12374fi
12375
12376
12377  test -n "$XARGS" && break
12378done
12379
12380  else
12381    # The variable is set, but is it from the command line or the environment?
12382
12383    # Try to remove the string !XARGS! from our list.
12384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12386      # If it failed, the variable was not from the command line. Ignore it,
12387      # but warn the user (except for BASH, which is always set by the calling BASH).
12388      if test "xXARGS" != xBASH; then
12389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12390$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12391      fi
12392      # Try to locate tool using the code snippet
12393      for ac_prog in xargs
12394do
12395  # Extract the first word of "$ac_prog", so it can be a program name with args.
12396set dummy $ac_prog; ac_word=$2
12397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12398$as_echo_n "checking for $ac_word... " >&6; }
12399if ${ac_cv_path_XARGS+:} false; then :
12400  $as_echo_n "(cached) " >&6
12401else
12402  case $XARGS in
12403  [\\/]* | ?:[\\/]*)
12404  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12405  ;;
12406  *)
12407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12408for as_dir in $PATH
12409do
12410  IFS=$as_save_IFS
12411  test -z "$as_dir" && as_dir=.
12412    for ac_exec_ext in '' $ac_executable_extensions; do
12413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12414    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12416    break 2
12417  fi
12418done
12419  done
12420IFS=$as_save_IFS
12421
12422  ;;
12423esac
12424fi
12425XARGS=$ac_cv_path_XARGS
12426if test -n "$XARGS"; then
12427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12428$as_echo "$XARGS" >&6; }
12429else
12430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12431$as_echo "no" >&6; }
12432fi
12433
12434
12435  test -n "$XARGS" && break
12436done
12437
12438    else
12439      # If it succeeded, then it was overridden by the user. We will use it
12440      # for the tool.
12441
12442      # First remove it from the list of overridden variables, so we can test
12443      # for unknown variables in the end.
12444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12445
12446      # Check if we try to supply an empty value
12447      if test "x$XARGS" = x; then
12448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12449$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12451$as_echo_n "checking for XARGS... " >&6; }
12452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12453$as_echo "disabled" >&6; }
12454      else
12455        # Check if the provided tool contains a complete path.
12456        tool_specified="$XARGS"
12457        tool_basename="${tool_specified##*/}"
12458        if test "x$tool_basename" = "x$tool_specified"; then
12459          # A command without a complete path is provided, search $PATH.
12460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12461$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12462          # Extract the first word of "$tool_basename", so it can be a program name with args.
12463set dummy $tool_basename; ac_word=$2
12464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12465$as_echo_n "checking for $ac_word... " >&6; }
12466if ${ac_cv_path_XARGS+:} false; then :
12467  $as_echo_n "(cached) " >&6
12468else
12469  case $XARGS in
12470  [\\/]* | ?:[\\/]*)
12471  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12472  ;;
12473  *)
12474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12475for as_dir in $PATH
12476do
12477  IFS=$as_save_IFS
12478  test -z "$as_dir" && as_dir=.
12479    for ac_exec_ext in '' $ac_executable_extensions; do
12480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12481    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12483    break 2
12484  fi
12485done
12486  done
12487IFS=$as_save_IFS
12488
12489  ;;
12490esac
12491fi
12492XARGS=$ac_cv_path_XARGS
12493if test -n "$XARGS"; then
12494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12495$as_echo "$XARGS" >&6; }
12496else
12497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12498$as_echo "no" >&6; }
12499fi
12500
12501
12502          if test "x$XARGS" = x; then
12503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12504          fi
12505        else
12506          # Otherwise we believe it is a complete path. Use it as it is.
12507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12508$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12510$as_echo_n "checking for XARGS... " >&6; }
12511          if test ! -x "$tool_specified"; then
12512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12513$as_echo "not found" >&6; }
12514            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12515          fi
12516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12517$as_echo "$tool_specified" >&6; }
12518        fi
12519      fi
12520    fi
12521
12522  fi
12523
12524
12525
12526  if test "x$XARGS" = x; then
12527    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12528  fi
12529
12530
12531
12532  # Then required tools that require some special treatment.
12533
12534
12535  # Publish this variable in the help.
12536
12537
12538  if [ -z "${AWK+x}" ]; then
12539    # The variable is not set by user, try to locate tool using the code snippet
12540    for ac_prog in gawk mawk nawk awk
12541do
12542  # Extract the first word of "$ac_prog", so it can be a program name with args.
12543set dummy $ac_prog; ac_word=$2
12544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12545$as_echo_n "checking for $ac_word... " >&6; }
12546if ${ac_cv_prog_AWK+:} false; then :
12547  $as_echo_n "(cached) " >&6
12548else
12549  if test -n "$AWK"; then
12550  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12551else
12552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12553for as_dir in $PATH
12554do
12555  IFS=$as_save_IFS
12556  test -z "$as_dir" && as_dir=.
12557    for ac_exec_ext in '' $ac_executable_extensions; do
12558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12559    ac_cv_prog_AWK="$ac_prog"
12560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12561    break 2
12562  fi
12563done
12564  done
12565IFS=$as_save_IFS
12566
12567fi
12568fi
12569AWK=$ac_cv_prog_AWK
12570if test -n "$AWK"; then
12571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12572$as_echo "$AWK" >&6; }
12573else
12574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12575$as_echo "no" >&6; }
12576fi
12577
12578
12579  test -n "$AWK" && break
12580done
12581
12582  else
12583    # The variable is set, but is it from the command line or the environment?
12584
12585    # Try to remove the string !AWK! from our list.
12586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12588      # If it failed, the variable was not from the command line. Ignore it,
12589      # but warn the user (except for BASH, which is always set by the calling BASH).
12590      if test "xAWK" != xBASH; then
12591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12592$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12593      fi
12594      # Try to locate tool using the code snippet
12595      for ac_prog in gawk mawk nawk awk
12596do
12597  # Extract the first word of "$ac_prog", so it can be a program name with args.
12598set dummy $ac_prog; ac_word=$2
12599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12600$as_echo_n "checking for $ac_word... " >&6; }
12601if ${ac_cv_prog_AWK+:} false; then :
12602  $as_echo_n "(cached) " >&6
12603else
12604  if test -n "$AWK"; then
12605  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12606else
12607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608for as_dir in $PATH
12609do
12610  IFS=$as_save_IFS
12611  test -z "$as_dir" && as_dir=.
12612    for ac_exec_ext in '' $ac_executable_extensions; do
12613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12614    ac_cv_prog_AWK="$ac_prog"
12615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12616    break 2
12617  fi
12618done
12619  done
12620IFS=$as_save_IFS
12621
12622fi
12623fi
12624AWK=$ac_cv_prog_AWK
12625if test -n "$AWK"; then
12626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12627$as_echo "$AWK" >&6; }
12628else
12629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630$as_echo "no" >&6; }
12631fi
12632
12633
12634  test -n "$AWK" && break
12635done
12636
12637    else
12638      # If it succeeded, then it was overridden by the user. We will use it
12639      # for the tool.
12640
12641      # First remove it from the list of overridden variables, so we can test
12642      # for unknown variables in the end.
12643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12644
12645      # Check if we try to supply an empty value
12646      if test "x$AWK" = x; then
12647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12648$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12650$as_echo_n "checking for AWK... " >&6; }
12651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12652$as_echo "disabled" >&6; }
12653      else
12654        # Check if the provided tool contains a complete path.
12655        tool_specified="$AWK"
12656        tool_basename="${tool_specified##*/}"
12657        if test "x$tool_basename" = "x$tool_specified"; then
12658          # A command without a complete path is provided, search $PATH.
12659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12660$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12661          # Extract the first word of "$tool_basename", so it can be a program name with args.
12662set dummy $tool_basename; ac_word=$2
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12664$as_echo_n "checking for $ac_word... " >&6; }
12665if ${ac_cv_path_AWK+:} false; then :
12666  $as_echo_n "(cached) " >&6
12667else
12668  case $AWK in
12669  [\\/]* | ?:[\\/]*)
12670  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12671  ;;
12672  *)
12673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12674for as_dir in $PATH
12675do
12676  IFS=$as_save_IFS
12677  test -z "$as_dir" && as_dir=.
12678    for ac_exec_ext in '' $ac_executable_extensions; do
12679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12680    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12682    break 2
12683  fi
12684done
12685  done
12686IFS=$as_save_IFS
12687
12688  ;;
12689esac
12690fi
12691AWK=$ac_cv_path_AWK
12692if test -n "$AWK"; then
12693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12694$as_echo "$AWK" >&6; }
12695else
12696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12697$as_echo "no" >&6; }
12698fi
12699
12700
12701          if test "x$AWK" = x; then
12702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12703          fi
12704        else
12705          # Otherwise we believe it is a complete path. Use it as it is.
12706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12707$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12709$as_echo_n "checking for AWK... " >&6; }
12710          if test ! -x "$tool_specified"; then
12711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12712$as_echo "not found" >&6; }
12713            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12714          fi
12715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12716$as_echo "$tool_specified" >&6; }
12717        fi
12718      fi
12719    fi
12720
12721  fi
12722
12723
12724  if test "x$AWK" = x; then
12725    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12726  fi
12727
12728
12729
12730
12731  # Publish this variable in the help.
12732
12733
12734  if [ -z "${GREP+x}" ]; then
12735    # The variable is not set by user, try to locate tool using the code snippet
12736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12737$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12738if ${ac_cv_path_GREP+:} false; then :
12739  $as_echo_n "(cached) " >&6
12740else
12741  if test -z "$GREP"; then
12742  ac_path_GREP_found=false
12743  # Loop through the user's path and test for each of PROGNAME-LIST
12744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12745for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12746do
12747  IFS=$as_save_IFS
12748  test -z "$as_dir" && as_dir=.
12749    for ac_prog in grep ggrep; do
12750    for ac_exec_ext in '' $ac_executable_extensions; do
12751      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12752      as_fn_executable_p "$ac_path_GREP" || continue
12753# Check for GNU ac_path_GREP and select it if it is found.
12754  # Check for GNU $ac_path_GREP
12755case `"$ac_path_GREP" --version 2>&1` in
12756*GNU*)
12757  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12758*)
12759  ac_count=0
12760  $as_echo_n 0123456789 >"conftest.in"
12761  while :
12762  do
12763    cat "conftest.in" "conftest.in" >"conftest.tmp"
12764    mv "conftest.tmp" "conftest.in"
12765    cp "conftest.in" "conftest.nl"
12766    $as_echo 'GREP' >> "conftest.nl"
12767    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12768    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12769    as_fn_arith $ac_count + 1 && ac_count=$as_val
12770    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12771      # Best one so far, save it but keep looking for a better one
12772      ac_cv_path_GREP="$ac_path_GREP"
12773      ac_path_GREP_max=$ac_count
12774    fi
12775    # 10*(2^10) chars as input seems more than enough
12776    test $ac_count -gt 10 && break
12777  done
12778  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12779esac
12780
12781      $ac_path_GREP_found && break 3
12782    done
12783  done
12784  done
12785IFS=$as_save_IFS
12786  if test -z "$ac_cv_path_GREP"; then
12787    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12788  fi
12789else
12790  ac_cv_path_GREP=$GREP
12791fi
12792
12793fi
12794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12795$as_echo "$ac_cv_path_GREP" >&6; }
12796 GREP="$ac_cv_path_GREP"
12797
12798
12799  else
12800    # The variable is set, but is it from the command line or the environment?
12801
12802    # Try to remove the string !GREP! from our list.
12803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12805      # If it failed, the variable was not from the command line. Ignore it,
12806      # but warn the user (except for BASH, which is always set by the calling BASH).
12807      if test "xGREP" != xBASH; then
12808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12809$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12810      fi
12811      # Try to locate tool using the code snippet
12812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12813$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12814if ${ac_cv_path_GREP+:} false; then :
12815  $as_echo_n "(cached) " >&6
12816else
12817  if test -z "$GREP"; then
12818  ac_path_GREP_found=false
12819  # Loop through the user's path and test for each of PROGNAME-LIST
12820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12821for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12822do
12823  IFS=$as_save_IFS
12824  test -z "$as_dir" && as_dir=.
12825    for ac_prog in grep ggrep; do
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12828      as_fn_executable_p "$ac_path_GREP" || continue
12829# Check for GNU ac_path_GREP and select it if it is found.
12830  # Check for GNU $ac_path_GREP
12831case `"$ac_path_GREP" --version 2>&1` in
12832*GNU*)
12833  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12834*)
12835  ac_count=0
12836  $as_echo_n 0123456789 >"conftest.in"
12837  while :
12838  do
12839    cat "conftest.in" "conftest.in" >"conftest.tmp"
12840    mv "conftest.tmp" "conftest.in"
12841    cp "conftest.in" "conftest.nl"
12842    $as_echo 'GREP' >> "conftest.nl"
12843    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12844    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12845    as_fn_arith $ac_count + 1 && ac_count=$as_val
12846    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12847      # Best one so far, save it but keep looking for a better one
12848      ac_cv_path_GREP="$ac_path_GREP"
12849      ac_path_GREP_max=$ac_count
12850    fi
12851    # 10*(2^10) chars as input seems more than enough
12852    test $ac_count -gt 10 && break
12853  done
12854  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12855esac
12856
12857      $ac_path_GREP_found && break 3
12858    done
12859  done
12860  done
12861IFS=$as_save_IFS
12862  if test -z "$ac_cv_path_GREP"; then
12863    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12864  fi
12865else
12866  ac_cv_path_GREP=$GREP
12867fi
12868
12869fi
12870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12871$as_echo "$ac_cv_path_GREP" >&6; }
12872 GREP="$ac_cv_path_GREP"
12873
12874
12875    else
12876      # If it succeeded, then it was overridden by the user. We will use it
12877      # for the tool.
12878
12879      # First remove it from the list of overridden variables, so we can test
12880      # for unknown variables in the end.
12881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12882
12883      # Check if we try to supply an empty value
12884      if test "x$GREP" = x; then
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12886$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12888$as_echo_n "checking for GREP... " >&6; }
12889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12890$as_echo "disabled" >&6; }
12891      else
12892        # Check if the provided tool contains a complete path.
12893        tool_specified="$GREP"
12894        tool_basename="${tool_specified##*/}"
12895        if test "x$tool_basename" = "x$tool_specified"; then
12896          # A command without a complete path is provided, search $PATH.
12897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12898$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12899          # Extract the first word of "$tool_basename", so it can be a program name with args.
12900set dummy $tool_basename; ac_word=$2
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902$as_echo_n "checking for $ac_word... " >&6; }
12903if ${ac_cv_path_GREP+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  case $GREP in
12907  [\\/]* | ?:[\\/]*)
12908  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12909  ;;
12910  *)
12911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912for as_dir in $PATH
12913do
12914  IFS=$as_save_IFS
12915  test -z "$as_dir" && as_dir=.
12916    for ac_exec_ext in '' $ac_executable_extensions; do
12917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920    break 2
12921  fi
12922done
12923  done
12924IFS=$as_save_IFS
12925
12926  ;;
12927esac
12928fi
12929GREP=$ac_cv_path_GREP
12930if test -n "$GREP"; then
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12932$as_echo "$GREP" >&6; }
12933else
12934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935$as_echo "no" >&6; }
12936fi
12937
12938
12939          if test "x$GREP" = x; then
12940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12941          fi
12942        else
12943          # Otherwise we believe it is a complete path. Use it as it is.
12944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12945$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12947$as_echo_n "checking for GREP... " >&6; }
12948          if test ! -x "$tool_specified"; then
12949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12950$as_echo "not found" >&6; }
12951            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12952          fi
12953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12954$as_echo "$tool_specified" >&6; }
12955        fi
12956      fi
12957    fi
12958
12959  fi
12960
12961
12962  if test "x$GREP" = x; then
12963    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12964  fi
12965
12966
12967
12968
12969  # Publish this variable in the help.
12970
12971
12972  if [ -z "${EGREP+x}" ]; then
12973    # The variable is not set by user, try to locate tool using the code snippet
12974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12975$as_echo_n "checking for egrep... " >&6; }
12976if ${ac_cv_path_EGREP+:} false; then :
12977  $as_echo_n "(cached) " >&6
12978else
12979  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12980   then ac_cv_path_EGREP="$GREP -E"
12981   else
12982     if test -z "$EGREP"; then
12983  ac_path_EGREP_found=false
12984  # Loop through the user's path and test for each of PROGNAME-LIST
12985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12986for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12987do
12988  IFS=$as_save_IFS
12989  test -z "$as_dir" && as_dir=.
12990    for ac_prog in egrep; do
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12993      as_fn_executable_p "$ac_path_EGREP" || continue
12994# Check for GNU ac_path_EGREP and select it if it is found.
12995  # Check for GNU $ac_path_EGREP
12996case `"$ac_path_EGREP" --version 2>&1` in
12997*GNU*)
12998  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12999*)
13000  ac_count=0
13001  $as_echo_n 0123456789 >"conftest.in"
13002  while :
13003  do
13004    cat "conftest.in" "conftest.in" >"conftest.tmp"
13005    mv "conftest.tmp" "conftest.in"
13006    cp "conftest.in" "conftest.nl"
13007    $as_echo 'EGREP' >> "conftest.nl"
13008    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13009    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13010    as_fn_arith $ac_count + 1 && ac_count=$as_val
13011    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13012      # Best one so far, save it but keep looking for a better one
13013      ac_cv_path_EGREP="$ac_path_EGREP"
13014      ac_path_EGREP_max=$ac_count
13015    fi
13016    # 10*(2^10) chars as input seems more than enough
13017    test $ac_count -gt 10 && break
13018  done
13019  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13020esac
13021
13022      $ac_path_EGREP_found && break 3
13023    done
13024  done
13025  done
13026IFS=$as_save_IFS
13027  if test -z "$ac_cv_path_EGREP"; then
13028    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13029  fi
13030else
13031  ac_cv_path_EGREP=$EGREP
13032fi
13033
13034   fi
13035fi
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13037$as_echo "$ac_cv_path_EGREP" >&6; }
13038 EGREP="$ac_cv_path_EGREP"
13039
13040
13041  else
13042    # The variable is set, but is it from the command line or the environment?
13043
13044    # Try to remove the string !EGREP! from our list.
13045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13047      # If it failed, the variable was not from the command line. Ignore it,
13048      # but warn the user (except for BASH, which is always set by the calling BASH).
13049      if test "xEGREP" != xBASH; then
13050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13051$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13052      fi
13053      # Try to locate tool using the code snippet
13054      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13055$as_echo_n "checking for egrep... " >&6; }
13056if ${ac_cv_path_EGREP+:} false; then :
13057  $as_echo_n "(cached) " >&6
13058else
13059  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13060   then ac_cv_path_EGREP="$GREP -E"
13061   else
13062     if test -z "$EGREP"; then
13063  ac_path_EGREP_found=false
13064  # Loop through the user's path and test for each of PROGNAME-LIST
13065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13066for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13067do
13068  IFS=$as_save_IFS
13069  test -z "$as_dir" && as_dir=.
13070    for ac_prog in egrep; do
13071    for ac_exec_ext in '' $ac_executable_extensions; do
13072      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13073      as_fn_executable_p "$ac_path_EGREP" || continue
13074# Check for GNU ac_path_EGREP and select it if it is found.
13075  # Check for GNU $ac_path_EGREP
13076case `"$ac_path_EGREP" --version 2>&1` in
13077*GNU*)
13078  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13079*)
13080  ac_count=0
13081  $as_echo_n 0123456789 >"conftest.in"
13082  while :
13083  do
13084    cat "conftest.in" "conftest.in" >"conftest.tmp"
13085    mv "conftest.tmp" "conftest.in"
13086    cp "conftest.in" "conftest.nl"
13087    $as_echo 'EGREP' >> "conftest.nl"
13088    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13089    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13090    as_fn_arith $ac_count + 1 && ac_count=$as_val
13091    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13092      # Best one so far, save it but keep looking for a better one
13093      ac_cv_path_EGREP="$ac_path_EGREP"
13094      ac_path_EGREP_max=$ac_count
13095    fi
13096    # 10*(2^10) chars as input seems more than enough
13097    test $ac_count -gt 10 && break
13098  done
13099  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13100esac
13101
13102      $ac_path_EGREP_found && break 3
13103    done
13104  done
13105  done
13106IFS=$as_save_IFS
13107  if test -z "$ac_cv_path_EGREP"; then
13108    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13109  fi
13110else
13111  ac_cv_path_EGREP=$EGREP
13112fi
13113
13114   fi
13115fi
13116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13117$as_echo "$ac_cv_path_EGREP" >&6; }
13118 EGREP="$ac_cv_path_EGREP"
13119
13120
13121    else
13122      # If it succeeded, then it was overridden by the user. We will use it
13123      # for the tool.
13124
13125      # First remove it from the list of overridden variables, so we can test
13126      # for unknown variables in the end.
13127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13128
13129      # Check if we try to supply an empty value
13130      if test "x$EGREP" = x; then
13131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13132$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13134$as_echo_n "checking for EGREP... " >&6; }
13135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13136$as_echo "disabled" >&6; }
13137      else
13138        # Check if the provided tool contains a complete path.
13139        tool_specified="$EGREP"
13140        tool_basename="${tool_specified##*/}"
13141        if test "x$tool_basename" = "x$tool_specified"; then
13142          # A command without a complete path is provided, search $PATH.
13143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13144$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13145          # Extract the first word of "$tool_basename", so it can be a program name with args.
13146set dummy $tool_basename; ac_word=$2
13147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13148$as_echo_n "checking for $ac_word... " >&6; }
13149if ${ac_cv_path_EGREP+:} false; then :
13150  $as_echo_n "(cached) " >&6
13151else
13152  case $EGREP in
13153  [\\/]* | ?:[\\/]*)
13154  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13155  ;;
13156  *)
13157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13158for as_dir in $PATH
13159do
13160  IFS=$as_save_IFS
13161  test -z "$as_dir" && as_dir=.
13162    for ac_exec_ext in '' $ac_executable_extensions; do
13163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13164    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13166    break 2
13167  fi
13168done
13169  done
13170IFS=$as_save_IFS
13171
13172  ;;
13173esac
13174fi
13175EGREP=$ac_cv_path_EGREP
13176if test -n "$EGREP"; then
13177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13178$as_echo "$EGREP" >&6; }
13179else
13180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13181$as_echo "no" >&6; }
13182fi
13183
13184
13185          if test "x$EGREP" = x; then
13186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13187          fi
13188        else
13189          # Otherwise we believe it is a complete path. Use it as it is.
13190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13191$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13193$as_echo_n "checking for EGREP... " >&6; }
13194          if test ! -x "$tool_specified"; then
13195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13196$as_echo "not found" >&6; }
13197            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13198          fi
13199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13200$as_echo "$tool_specified" >&6; }
13201        fi
13202      fi
13203    fi
13204
13205  fi
13206
13207
13208  if test "x$EGREP" = x; then
13209    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13210  fi
13211
13212
13213
13214
13215  # Publish this variable in the help.
13216
13217
13218  if [ -z "${FGREP+x}" ]; then
13219    # The variable is not set by user, try to locate tool using the code snippet
13220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13221$as_echo_n "checking for fgrep... " >&6; }
13222if ${ac_cv_path_FGREP+:} false; then :
13223  $as_echo_n "(cached) " >&6
13224else
13225  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13226   then ac_cv_path_FGREP="$GREP -F"
13227   else
13228     if test -z "$FGREP"; then
13229  ac_path_FGREP_found=false
13230  # Loop through the user's path and test for each of PROGNAME-LIST
13231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13232for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13233do
13234  IFS=$as_save_IFS
13235  test -z "$as_dir" && as_dir=.
13236    for ac_prog in fgrep; do
13237    for ac_exec_ext in '' $ac_executable_extensions; do
13238      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13239      as_fn_executable_p "$ac_path_FGREP" || continue
13240# Check for GNU ac_path_FGREP and select it if it is found.
13241  # Check for GNU $ac_path_FGREP
13242case `"$ac_path_FGREP" --version 2>&1` in
13243*GNU*)
13244  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13245*)
13246  ac_count=0
13247  $as_echo_n 0123456789 >"conftest.in"
13248  while :
13249  do
13250    cat "conftest.in" "conftest.in" >"conftest.tmp"
13251    mv "conftest.tmp" "conftest.in"
13252    cp "conftest.in" "conftest.nl"
13253    $as_echo 'FGREP' >> "conftest.nl"
13254    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13255    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13256    as_fn_arith $ac_count + 1 && ac_count=$as_val
13257    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13258      # Best one so far, save it but keep looking for a better one
13259      ac_cv_path_FGREP="$ac_path_FGREP"
13260      ac_path_FGREP_max=$ac_count
13261    fi
13262    # 10*(2^10) chars as input seems more than enough
13263    test $ac_count -gt 10 && break
13264  done
13265  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13266esac
13267
13268      $ac_path_FGREP_found && break 3
13269    done
13270  done
13271  done
13272IFS=$as_save_IFS
13273  if test -z "$ac_cv_path_FGREP"; then
13274    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13275  fi
13276else
13277  ac_cv_path_FGREP=$FGREP
13278fi
13279
13280   fi
13281fi
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13283$as_echo "$ac_cv_path_FGREP" >&6; }
13284 FGREP="$ac_cv_path_FGREP"
13285
13286
13287  else
13288    # The variable is set, but is it from the command line or the environment?
13289
13290    # Try to remove the string !FGREP! from our list.
13291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13293      # If it failed, the variable was not from the command line. Ignore it,
13294      # but warn the user (except for BASH, which is always set by the calling BASH).
13295      if test "xFGREP" != xBASH; then
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13297$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13298      fi
13299      # Try to locate tool using the code snippet
13300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13301$as_echo_n "checking for fgrep... " >&6; }
13302if ${ac_cv_path_FGREP+:} false; then :
13303  $as_echo_n "(cached) " >&6
13304else
13305  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13306   then ac_cv_path_FGREP="$GREP -F"
13307   else
13308     if test -z "$FGREP"; then
13309  ac_path_FGREP_found=false
13310  # Loop through the user's path and test for each of PROGNAME-LIST
13311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13312for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13313do
13314  IFS=$as_save_IFS
13315  test -z "$as_dir" && as_dir=.
13316    for ac_prog in fgrep; do
13317    for ac_exec_ext in '' $ac_executable_extensions; do
13318      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13319      as_fn_executable_p "$ac_path_FGREP" || continue
13320# Check for GNU ac_path_FGREP and select it if it is found.
13321  # Check for GNU $ac_path_FGREP
13322case `"$ac_path_FGREP" --version 2>&1` in
13323*GNU*)
13324  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13325*)
13326  ac_count=0
13327  $as_echo_n 0123456789 >"conftest.in"
13328  while :
13329  do
13330    cat "conftest.in" "conftest.in" >"conftest.tmp"
13331    mv "conftest.tmp" "conftest.in"
13332    cp "conftest.in" "conftest.nl"
13333    $as_echo 'FGREP' >> "conftest.nl"
13334    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13335    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13336    as_fn_arith $ac_count + 1 && ac_count=$as_val
13337    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13338      # Best one so far, save it but keep looking for a better one
13339      ac_cv_path_FGREP="$ac_path_FGREP"
13340      ac_path_FGREP_max=$ac_count
13341    fi
13342    # 10*(2^10) chars as input seems more than enough
13343    test $ac_count -gt 10 && break
13344  done
13345  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13346esac
13347
13348      $ac_path_FGREP_found && break 3
13349    done
13350  done
13351  done
13352IFS=$as_save_IFS
13353  if test -z "$ac_cv_path_FGREP"; then
13354    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13355  fi
13356else
13357  ac_cv_path_FGREP=$FGREP
13358fi
13359
13360   fi
13361fi
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13363$as_echo "$ac_cv_path_FGREP" >&6; }
13364 FGREP="$ac_cv_path_FGREP"
13365
13366
13367    else
13368      # If it succeeded, then it was overridden by the user. We will use it
13369      # for the tool.
13370
13371      # First remove it from the list of overridden variables, so we can test
13372      # for unknown variables in the end.
13373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13374
13375      # Check if we try to supply an empty value
13376      if test "x$FGREP" = x; then
13377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13378$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13380$as_echo_n "checking for FGREP... " >&6; }
13381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13382$as_echo "disabled" >&6; }
13383      else
13384        # Check if the provided tool contains a complete path.
13385        tool_specified="$FGREP"
13386        tool_basename="${tool_specified##*/}"
13387        if test "x$tool_basename" = "x$tool_specified"; then
13388          # A command without a complete path is provided, search $PATH.
13389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13390$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13391          # Extract the first word of "$tool_basename", so it can be a program name with args.
13392set dummy $tool_basename; ac_word=$2
13393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13394$as_echo_n "checking for $ac_word... " >&6; }
13395if ${ac_cv_path_FGREP+:} false; then :
13396  $as_echo_n "(cached) " >&6
13397else
13398  case $FGREP in
13399  [\\/]* | ?:[\\/]*)
13400  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13401  ;;
13402  *)
13403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13404for as_dir in $PATH
13405do
13406  IFS=$as_save_IFS
13407  test -z "$as_dir" && as_dir=.
13408    for ac_exec_ext in '' $ac_executable_extensions; do
13409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13410    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13412    break 2
13413  fi
13414done
13415  done
13416IFS=$as_save_IFS
13417
13418  ;;
13419esac
13420fi
13421FGREP=$ac_cv_path_FGREP
13422if test -n "$FGREP"; then
13423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13424$as_echo "$FGREP" >&6; }
13425else
13426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13427$as_echo "no" >&6; }
13428fi
13429
13430
13431          if test "x$FGREP" = x; then
13432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13433          fi
13434        else
13435          # Otherwise we believe it is a complete path. Use it as it is.
13436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13437$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13439$as_echo_n "checking for FGREP... " >&6; }
13440          if test ! -x "$tool_specified"; then
13441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13442$as_echo "not found" >&6; }
13443            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13444          fi
13445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13446$as_echo "$tool_specified" >&6; }
13447        fi
13448      fi
13449    fi
13450
13451  fi
13452
13453
13454  if test "x$FGREP" = x; then
13455    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13456  fi
13457
13458
13459
13460
13461  # Publish this variable in the help.
13462
13463
13464  if [ -z "${SED+x}" ]; then
13465    # The variable is not set by user, try to locate tool using the code snippet
13466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13467$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13468if ${ac_cv_path_SED+:} false; then :
13469  $as_echo_n "(cached) " >&6
13470else
13471            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13472     for ac_i in 1 2 3 4 5 6 7; do
13473       ac_script="$ac_script$as_nl$ac_script"
13474     done
13475     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13476     { ac_script=; unset ac_script;}
13477     if test -z "$SED"; then
13478  ac_path_SED_found=false
13479  # Loop through the user's path and test for each of PROGNAME-LIST
13480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13481for as_dir in $PATH
13482do
13483  IFS=$as_save_IFS
13484  test -z "$as_dir" && as_dir=.
13485    for ac_prog in sed gsed; do
13486    for ac_exec_ext in '' $ac_executable_extensions; do
13487      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13488      as_fn_executable_p "$ac_path_SED" || continue
13489# Check for GNU ac_path_SED and select it if it is found.
13490  # Check for GNU $ac_path_SED
13491case `"$ac_path_SED" --version 2>&1` in
13492*GNU*)
13493  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13494*)
13495  ac_count=0
13496  $as_echo_n 0123456789 >"conftest.in"
13497  while :
13498  do
13499    cat "conftest.in" "conftest.in" >"conftest.tmp"
13500    mv "conftest.tmp" "conftest.in"
13501    cp "conftest.in" "conftest.nl"
13502    $as_echo '' >> "conftest.nl"
13503    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13504    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13505    as_fn_arith $ac_count + 1 && ac_count=$as_val
13506    if test $ac_count -gt ${ac_path_SED_max-0}; then
13507      # Best one so far, save it but keep looking for a better one
13508      ac_cv_path_SED="$ac_path_SED"
13509      ac_path_SED_max=$ac_count
13510    fi
13511    # 10*(2^10) chars as input seems more than enough
13512    test $ac_count -gt 10 && break
13513  done
13514  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13515esac
13516
13517      $ac_path_SED_found && break 3
13518    done
13519  done
13520  done
13521IFS=$as_save_IFS
13522  if test -z "$ac_cv_path_SED"; then
13523    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13524  fi
13525else
13526  ac_cv_path_SED=$SED
13527fi
13528
13529fi
13530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13531$as_echo "$ac_cv_path_SED" >&6; }
13532 SED="$ac_cv_path_SED"
13533  rm -f conftest.sed
13534
13535  else
13536    # The variable is set, but is it from the command line or the environment?
13537
13538    # Try to remove the string !SED! from our list.
13539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13541      # If it failed, the variable was not from the command line. Ignore it,
13542      # but warn the user (except for BASH, which is always set by the calling BASH).
13543      if test "xSED" != xBASH; then
13544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13545$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13546      fi
13547      # Try to locate tool using the code snippet
13548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13549$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13550if ${ac_cv_path_SED+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13554     for ac_i in 1 2 3 4 5 6 7; do
13555       ac_script="$ac_script$as_nl$ac_script"
13556     done
13557     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13558     { ac_script=; unset ac_script;}
13559     if test -z "$SED"; then
13560  ac_path_SED_found=false
13561  # Loop through the user's path and test for each of PROGNAME-LIST
13562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13563for as_dir in $PATH
13564do
13565  IFS=$as_save_IFS
13566  test -z "$as_dir" && as_dir=.
13567    for ac_prog in sed gsed; do
13568    for ac_exec_ext in '' $ac_executable_extensions; do
13569      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13570      as_fn_executable_p "$ac_path_SED" || continue
13571# Check for GNU ac_path_SED and select it if it is found.
13572  # Check for GNU $ac_path_SED
13573case `"$ac_path_SED" --version 2>&1` in
13574*GNU*)
13575  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13576*)
13577  ac_count=0
13578  $as_echo_n 0123456789 >"conftest.in"
13579  while :
13580  do
13581    cat "conftest.in" "conftest.in" >"conftest.tmp"
13582    mv "conftest.tmp" "conftest.in"
13583    cp "conftest.in" "conftest.nl"
13584    $as_echo '' >> "conftest.nl"
13585    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13586    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13587    as_fn_arith $ac_count + 1 && ac_count=$as_val
13588    if test $ac_count -gt ${ac_path_SED_max-0}; then
13589      # Best one so far, save it but keep looking for a better one
13590      ac_cv_path_SED="$ac_path_SED"
13591      ac_path_SED_max=$ac_count
13592    fi
13593    # 10*(2^10) chars as input seems more than enough
13594    test $ac_count -gt 10 && break
13595  done
13596  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13597esac
13598
13599      $ac_path_SED_found && break 3
13600    done
13601  done
13602  done
13603IFS=$as_save_IFS
13604  if test -z "$ac_cv_path_SED"; then
13605    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13606  fi
13607else
13608  ac_cv_path_SED=$SED
13609fi
13610
13611fi
13612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13613$as_echo "$ac_cv_path_SED" >&6; }
13614 SED="$ac_cv_path_SED"
13615  rm -f conftest.sed
13616
13617    else
13618      # If it succeeded, then it was overridden by the user. We will use it
13619      # for the tool.
13620
13621      # First remove it from the list of overridden variables, so we can test
13622      # for unknown variables in the end.
13623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13624
13625      # Check if we try to supply an empty value
13626      if test "x$SED" = x; then
13627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13628$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13630$as_echo_n "checking for SED... " >&6; }
13631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13632$as_echo "disabled" >&6; }
13633      else
13634        # Check if the provided tool contains a complete path.
13635        tool_specified="$SED"
13636        tool_basename="${tool_specified##*/}"
13637        if test "x$tool_basename" = "x$tool_specified"; then
13638          # A command without a complete path is provided, search $PATH.
13639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13640$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13641          # Extract the first word of "$tool_basename", so it can be a program name with args.
13642set dummy $tool_basename; ac_word=$2
13643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13644$as_echo_n "checking for $ac_word... " >&6; }
13645if ${ac_cv_path_SED+:} false; then :
13646  $as_echo_n "(cached) " >&6
13647else
13648  case $SED in
13649  [\\/]* | ?:[\\/]*)
13650  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13651  ;;
13652  *)
13653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13654for as_dir in $PATH
13655do
13656  IFS=$as_save_IFS
13657  test -z "$as_dir" && as_dir=.
13658    for ac_exec_ext in '' $ac_executable_extensions; do
13659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13660    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13662    break 2
13663  fi
13664done
13665  done
13666IFS=$as_save_IFS
13667
13668  ;;
13669esac
13670fi
13671SED=$ac_cv_path_SED
13672if test -n "$SED"; then
13673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13674$as_echo "$SED" >&6; }
13675else
13676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13677$as_echo "no" >&6; }
13678fi
13679
13680
13681          if test "x$SED" = x; then
13682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13683          fi
13684        else
13685          # Otherwise we believe it is a complete path. Use it as it is.
13686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13687$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13689$as_echo_n "checking for SED... " >&6; }
13690          if test ! -x "$tool_specified"; then
13691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13692$as_echo "not found" >&6; }
13693            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13694          fi
13695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13696$as_echo "$tool_specified" >&6; }
13697        fi
13698      fi
13699    fi
13700
13701  fi
13702
13703
13704  if test "x$SED" = x; then
13705    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13706  fi
13707
13708
13709
13710  # Always force rm.
13711  RM="$RM -f"
13712
13713  # pwd behaves differently on various platforms and some don't support the -L flag.
13714  # Always use the bash builtin pwd to get uniform behavior.
13715  THEPWDCMD=pwd
13716
13717  # These are not required on all platforms
13718
13719
13720  # Publish this variable in the help.
13721
13722
13723  if [ -z "${CYGPATH+x}" ]; then
13724    # The variable is not set by user, try to locate tool using the code snippet
13725    for ac_prog in cygpath
13726do
13727  # Extract the first word of "$ac_prog", so it can be a program name with args.
13728set dummy $ac_prog; ac_word=$2
13729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13730$as_echo_n "checking for $ac_word... " >&6; }
13731if ${ac_cv_path_CYGPATH+:} false; then :
13732  $as_echo_n "(cached) " >&6
13733else
13734  case $CYGPATH in
13735  [\\/]* | ?:[\\/]*)
13736  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13737  ;;
13738  *)
13739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13740for as_dir in $PATH
13741do
13742  IFS=$as_save_IFS
13743  test -z "$as_dir" && as_dir=.
13744    for ac_exec_ext in '' $ac_executable_extensions; do
13745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13746    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13748    break 2
13749  fi
13750done
13751  done
13752IFS=$as_save_IFS
13753
13754  ;;
13755esac
13756fi
13757CYGPATH=$ac_cv_path_CYGPATH
13758if test -n "$CYGPATH"; then
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13760$as_echo "$CYGPATH" >&6; }
13761else
13762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13763$as_echo "no" >&6; }
13764fi
13765
13766
13767  test -n "$CYGPATH" && break
13768done
13769
13770  else
13771    # The variable is set, but is it from the command line or the environment?
13772
13773    # Try to remove the string !CYGPATH! from our list.
13774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13776      # If it failed, the variable was not from the command line. Ignore it,
13777      # but warn the user (except for BASH, which is always set by the calling BASH).
13778      if test "xCYGPATH" != xBASH; then
13779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13780$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13781      fi
13782      # Try to locate tool using the code snippet
13783      for ac_prog in cygpath
13784do
13785  # Extract the first word of "$ac_prog", so it can be a program name with args.
13786set dummy $ac_prog; ac_word=$2
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13788$as_echo_n "checking for $ac_word... " >&6; }
13789if ${ac_cv_path_CYGPATH+:} false; then :
13790  $as_echo_n "(cached) " >&6
13791else
13792  case $CYGPATH in
13793  [\\/]* | ?:[\\/]*)
13794  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13795  ;;
13796  *)
13797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13798for as_dir in $PATH
13799do
13800  IFS=$as_save_IFS
13801  test -z "$as_dir" && as_dir=.
13802    for ac_exec_ext in '' $ac_executable_extensions; do
13803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13804    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13806    break 2
13807  fi
13808done
13809  done
13810IFS=$as_save_IFS
13811
13812  ;;
13813esac
13814fi
13815CYGPATH=$ac_cv_path_CYGPATH
13816if test -n "$CYGPATH"; then
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13818$as_echo "$CYGPATH" >&6; }
13819else
13820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13821$as_echo "no" >&6; }
13822fi
13823
13824
13825  test -n "$CYGPATH" && break
13826done
13827
13828    else
13829      # If it succeeded, then it was overridden by the user. We will use it
13830      # for the tool.
13831
13832      # First remove it from the list of overridden variables, so we can test
13833      # for unknown variables in the end.
13834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13835
13836      # Check if we try to supply an empty value
13837      if test "x$CYGPATH" = x; then
13838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13839$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13841$as_echo_n "checking for CYGPATH... " >&6; }
13842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13843$as_echo "disabled" >&6; }
13844      else
13845        # Check if the provided tool contains a complete path.
13846        tool_specified="$CYGPATH"
13847        tool_basename="${tool_specified##*/}"
13848        if test "x$tool_basename" = "x$tool_specified"; then
13849          # A command without a complete path is provided, search $PATH.
13850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13851$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13852          # Extract the first word of "$tool_basename", so it can be a program name with args.
13853set dummy $tool_basename; 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_CYGPATH+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  case $CYGPATH in
13860  [\\/]* | ?:[\\/]*)
13861  ac_cv_path_CYGPATH="$CYGPATH" # 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_CYGPATH="$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
13882CYGPATH=$ac_cv_path_CYGPATH
13883if test -n "$CYGPATH"; then
13884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13885$as_echo "$CYGPATH" >&6; }
13886else
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; }
13889fi
13890
13891
13892          if test "x$CYGPATH" = x; then
13893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13894          fi
13895        else
13896          # Otherwise we believe it is a complete path. Use it as it is.
13897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13898$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13900$as_echo_n "checking for CYGPATH... " >&6; }
13901          if test ! -x "$tool_specified"; then
13902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13903$as_echo "not found" >&6; }
13904            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13905          fi
13906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13907$as_echo "$tool_specified" >&6; }
13908        fi
13909      fi
13910    fi
13911
13912  fi
13913
13914
13915
13916
13917  # Publish this variable in the help.
13918
13919
13920  if [ -z "${READLINK+x}" ]; then
13921    # The variable is not set by user, try to locate tool using the code snippet
13922    for ac_prog in greadlink readlink
13923do
13924  # Extract the first word of "$ac_prog", so it can be a program name with args.
13925set dummy $ac_prog; ac_word=$2
13926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13927$as_echo_n "checking for $ac_word... " >&6; }
13928if ${ac_cv_path_READLINK+:} false; then :
13929  $as_echo_n "(cached) " >&6
13930else
13931  case $READLINK in
13932  [\\/]* | ?:[\\/]*)
13933  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13934  ;;
13935  *)
13936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13937for as_dir in $PATH
13938do
13939  IFS=$as_save_IFS
13940  test -z "$as_dir" && as_dir=.
13941    for ac_exec_ext in '' $ac_executable_extensions; do
13942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13943    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13945    break 2
13946  fi
13947done
13948  done
13949IFS=$as_save_IFS
13950
13951  ;;
13952esac
13953fi
13954READLINK=$ac_cv_path_READLINK
13955if test -n "$READLINK"; then
13956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13957$as_echo "$READLINK" >&6; }
13958else
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13960$as_echo "no" >&6; }
13961fi
13962
13963
13964  test -n "$READLINK" && break
13965done
13966
13967  else
13968    # The variable is set, but is it from the command line or the environment?
13969
13970    # Try to remove the string !READLINK! from our list.
13971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13973      # If it failed, the variable was not from the command line. Ignore it,
13974      # but warn the user (except for BASH, which is always set by the calling BASH).
13975      if test "xREADLINK" != xBASH; then
13976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13977$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13978      fi
13979      # Try to locate tool using the code snippet
13980      for ac_prog in greadlink readlink
13981do
13982  # Extract the first word of "$ac_prog", so it can be a program name with args.
13983set dummy $ac_prog; ac_word=$2
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13985$as_echo_n "checking for $ac_word... " >&6; }
13986if ${ac_cv_path_READLINK+:} false; then :
13987  $as_echo_n "(cached) " >&6
13988else
13989  case $READLINK in
13990  [\\/]* | ?:[\\/]*)
13991  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13992  ;;
13993  *)
13994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13995for as_dir in $PATH
13996do
13997  IFS=$as_save_IFS
13998  test -z "$as_dir" && as_dir=.
13999    for ac_exec_ext in '' $ac_executable_extensions; do
14000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14001    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14003    break 2
14004  fi
14005done
14006  done
14007IFS=$as_save_IFS
14008
14009  ;;
14010esac
14011fi
14012READLINK=$ac_cv_path_READLINK
14013if test -n "$READLINK"; then
14014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14015$as_echo "$READLINK" >&6; }
14016else
14017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14018$as_echo "no" >&6; }
14019fi
14020
14021
14022  test -n "$READLINK" && break
14023done
14024
14025    else
14026      # If it succeeded, then it was overridden by the user. We will use it
14027      # for the tool.
14028
14029      # First remove it from the list of overridden variables, so we can test
14030      # for unknown variables in the end.
14031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14032
14033      # Check if we try to supply an empty value
14034      if test "x$READLINK" = x; then
14035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14036$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14038$as_echo_n "checking for READLINK... " >&6; }
14039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14040$as_echo "disabled" >&6; }
14041      else
14042        # Check if the provided tool contains a complete path.
14043        tool_specified="$READLINK"
14044        tool_basename="${tool_specified##*/}"
14045        if test "x$tool_basename" = "x$tool_specified"; then
14046          # A command without a complete path is provided, search $PATH.
14047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14048$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14049          # Extract the first word of "$tool_basename", so it can be a program name with args.
14050set dummy $tool_basename; 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_READLINK+:} false; then :
14054  $as_echo_n "(cached) " >&6
14055else
14056  case $READLINK in
14057  [\\/]* | ?:[\\/]*)
14058  ac_cv_path_READLINK="$READLINK" # 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_READLINK="$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
14079READLINK=$ac_cv_path_READLINK
14080if test -n "$READLINK"; then
14081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14082$as_echo "$READLINK" >&6; }
14083else
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14085$as_echo "no" >&6; }
14086fi
14087
14088
14089          if test "x$READLINK" = x; then
14090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14091          fi
14092        else
14093          # Otherwise we believe it is a complete path. Use it as it is.
14094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14095$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14097$as_echo_n "checking for READLINK... " >&6; }
14098          if test ! -x "$tool_specified"; then
14099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14100$as_echo "not found" >&6; }
14101            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14102          fi
14103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14104$as_echo "$tool_specified" >&6; }
14105        fi
14106      fi
14107    fi
14108
14109  fi
14110
14111
14112
14113
14114  # Publish this variable in the help.
14115
14116
14117  if [ -z "${DF+x}" ]; then
14118    # The variable is not set by user, try to locate tool using the code snippet
14119    for ac_prog in df
14120do
14121  # Extract the first word of "$ac_prog", so it can be a program name with args.
14122set dummy $ac_prog; ac_word=$2
14123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14124$as_echo_n "checking for $ac_word... " >&6; }
14125if ${ac_cv_path_DF+:} false; then :
14126  $as_echo_n "(cached) " >&6
14127else
14128  case $DF in
14129  [\\/]* | ?:[\\/]*)
14130  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14131  ;;
14132  *)
14133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14134for as_dir in $PATH
14135do
14136  IFS=$as_save_IFS
14137  test -z "$as_dir" && as_dir=.
14138    for ac_exec_ext in '' $ac_executable_extensions; do
14139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14140    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14142    break 2
14143  fi
14144done
14145  done
14146IFS=$as_save_IFS
14147
14148  ;;
14149esac
14150fi
14151DF=$ac_cv_path_DF
14152if test -n "$DF"; then
14153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14154$as_echo "$DF" >&6; }
14155else
14156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14157$as_echo "no" >&6; }
14158fi
14159
14160
14161  test -n "$DF" && break
14162done
14163
14164  else
14165    # The variable is set, but is it from the command line or the environment?
14166
14167    # Try to remove the string !DF! from our list.
14168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14170      # If it failed, the variable was not from the command line. Ignore it,
14171      # but warn the user (except for BASH, which is always set by the calling BASH).
14172      if test "xDF" != xBASH; then
14173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14174$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14175      fi
14176      # Try to locate tool using the code snippet
14177      for ac_prog in df
14178do
14179  # Extract the first word of "$ac_prog", so it can be a program name with args.
14180set dummy $ac_prog; ac_word=$2
14181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14182$as_echo_n "checking for $ac_word... " >&6; }
14183if ${ac_cv_path_DF+:} false; then :
14184  $as_echo_n "(cached) " >&6
14185else
14186  case $DF in
14187  [\\/]* | ?:[\\/]*)
14188  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14189  ;;
14190  *)
14191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14192for as_dir in $PATH
14193do
14194  IFS=$as_save_IFS
14195  test -z "$as_dir" && as_dir=.
14196    for ac_exec_ext in '' $ac_executable_extensions; do
14197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14198    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14200    break 2
14201  fi
14202done
14203  done
14204IFS=$as_save_IFS
14205
14206  ;;
14207esac
14208fi
14209DF=$ac_cv_path_DF
14210if test -n "$DF"; then
14211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14212$as_echo "$DF" >&6; }
14213else
14214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14215$as_echo "no" >&6; }
14216fi
14217
14218
14219  test -n "$DF" && break
14220done
14221
14222    else
14223      # If it succeeded, then it was overridden by the user. We will use it
14224      # for the tool.
14225
14226      # First remove it from the list of overridden variables, so we can test
14227      # for unknown variables in the end.
14228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14229
14230      # Check if we try to supply an empty value
14231      if test "x$DF" = x; then
14232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14233$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14235$as_echo_n "checking for DF... " >&6; }
14236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14237$as_echo "disabled" >&6; }
14238      else
14239        # Check if the provided tool contains a complete path.
14240        tool_specified="$DF"
14241        tool_basename="${tool_specified##*/}"
14242        if test "x$tool_basename" = "x$tool_specified"; then
14243          # A command without a complete path is provided, search $PATH.
14244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14245$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14246          # Extract the first word of "$tool_basename", so it can be a program name with args.
14247set dummy $tool_basename; 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_DF+:} false; then :
14251  $as_echo_n "(cached) " >&6
14252else
14253  case $DF in
14254  [\\/]* | ?:[\\/]*)
14255  ac_cv_path_DF="$DF" # 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_DF="$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
14276DF=$ac_cv_path_DF
14277if test -n "$DF"; then
14278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14279$as_echo "$DF" >&6; }
14280else
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14282$as_echo "no" >&6; }
14283fi
14284
14285
14286          if test "x$DF" = x; then
14287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14288          fi
14289        else
14290          # Otherwise we believe it is a complete path. Use it as it is.
14291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14292$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14294$as_echo_n "checking for DF... " >&6; }
14295          if test ! -x "$tool_specified"; then
14296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14297$as_echo "not found" >&6; }
14298            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14299          fi
14300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14301$as_echo "$tool_specified" >&6; }
14302        fi
14303      fi
14304    fi
14305
14306  fi
14307
14308
14309
14310
14311  # Publish this variable in the help.
14312
14313
14314  if [ -z "${CPIO+x}" ]; then
14315    # The variable is not set by user, try to locate tool using the code snippet
14316    for ac_prog in cpio bsdcpio
14317do
14318  # Extract the first word of "$ac_prog", so it can be a program name with args.
14319set dummy $ac_prog; ac_word=$2
14320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14321$as_echo_n "checking for $ac_word... " >&6; }
14322if ${ac_cv_path_CPIO+:} false; then :
14323  $as_echo_n "(cached) " >&6
14324else
14325  case $CPIO in
14326  [\\/]* | ?:[\\/]*)
14327  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14328  ;;
14329  *)
14330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14331for as_dir in $PATH
14332do
14333  IFS=$as_save_IFS
14334  test -z "$as_dir" && as_dir=.
14335    for ac_exec_ext in '' $ac_executable_extensions; do
14336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14337    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14339    break 2
14340  fi
14341done
14342  done
14343IFS=$as_save_IFS
14344
14345  ;;
14346esac
14347fi
14348CPIO=$ac_cv_path_CPIO
14349if test -n "$CPIO"; then
14350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14351$as_echo "$CPIO" >&6; }
14352else
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14354$as_echo "no" >&6; }
14355fi
14356
14357
14358  test -n "$CPIO" && break
14359done
14360
14361  else
14362    # The variable is set, but is it from the command line or the environment?
14363
14364    # Try to remove the string !CPIO! from our list.
14365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14367      # If it failed, the variable was not from the command line. Ignore it,
14368      # but warn the user (except for BASH, which is always set by the calling BASH).
14369      if test "xCPIO" != xBASH; then
14370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14371$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14372      fi
14373      # Try to locate tool using the code snippet
14374      for ac_prog in cpio bsdcpio
14375do
14376  # Extract the first word of "$ac_prog", so it can be a program name with args.
14377set dummy $ac_prog; ac_word=$2
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14379$as_echo_n "checking for $ac_word... " >&6; }
14380if ${ac_cv_path_CPIO+:} false; then :
14381  $as_echo_n "(cached) " >&6
14382else
14383  case $CPIO in
14384  [\\/]* | ?:[\\/]*)
14385  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14386  ;;
14387  *)
14388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14389for as_dir in $PATH
14390do
14391  IFS=$as_save_IFS
14392  test -z "$as_dir" && as_dir=.
14393    for ac_exec_ext in '' $ac_executable_extensions; do
14394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14395    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14397    break 2
14398  fi
14399done
14400  done
14401IFS=$as_save_IFS
14402
14403  ;;
14404esac
14405fi
14406CPIO=$ac_cv_path_CPIO
14407if test -n "$CPIO"; then
14408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14409$as_echo "$CPIO" >&6; }
14410else
14411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14412$as_echo "no" >&6; }
14413fi
14414
14415
14416  test -n "$CPIO" && break
14417done
14418
14419    else
14420      # If it succeeded, then it was overridden by the user. We will use it
14421      # for the tool.
14422
14423      # First remove it from the list of overridden variables, so we can test
14424      # for unknown variables in the end.
14425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14426
14427      # Check if we try to supply an empty value
14428      if test "x$CPIO" = x; then
14429        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14430$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14432$as_echo_n "checking for CPIO... " >&6; }
14433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14434$as_echo "disabled" >&6; }
14435      else
14436        # Check if the provided tool contains a complete path.
14437        tool_specified="$CPIO"
14438        tool_basename="${tool_specified##*/}"
14439        if test "x$tool_basename" = "x$tool_specified"; then
14440          # A command without a complete path is provided, search $PATH.
14441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14442$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14443          # Extract the first word of "$tool_basename", so it can be a program name with args.
14444set dummy $tool_basename; 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_CPIO+:} false; then :
14448  $as_echo_n "(cached) " >&6
14449else
14450  case $CPIO in
14451  [\\/]* | ?:[\\/]*)
14452  ac_cv_path_CPIO="$CPIO" # 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_CPIO="$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
14473CPIO=$ac_cv_path_CPIO
14474if test -n "$CPIO"; then
14475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14476$as_echo "$CPIO" >&6; }
14477else
14478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14479$as_echo "no" >&6; }
14480fi
14481
14482
14483          if test "x$CPIO" = x; then
14484            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14485          fi
14486        else
14487          # Otherwise we believe it is a complete path. Use it as it is.
14488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14489$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14490          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14491$as_echo_n "checking for CPIO... " >&6; }
14492          if test ! -x "$tool_specified"; then
14493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14494$as_echo "not found" >&6; }
14495            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14496          fi
14497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14498$as_echo "$tool_specified" >&6; }
14499        fi
14500      fi
14501    fi
14502
14503  fi
14504
14505
14506
14507
14508  # Publish this variable in the help.
14509
14510
14511  if [ -z "${NICE+x}" ]; then
14512    # The variable is not set by user, try to locate tool using the code snippet
14513    for ac_prog in nice
14514do
14515  # Extract the first word of "$ac_prog", so it can be a program name with args.
14516set dummy $ac_prog; ac_word=$2
14517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14518$as_echo_n "checking for $ac_word... " >&6; }
14519if ${ac_cv_path_NICE+:} false; then :
14520  $as_echo_n "(cached) " >&6
14521else
14522  case $NICE in
14523  [\\/]* | ?:[\\/]*)
14524  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14525  ;;
14526  *)
14527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14528for as_dir in $PATH
14529do
14530  IFS=$as_save_IFS
14531  test -z "$as_dir" && as_dir=.
14532    for ac_exec_ext in '' $ac_executable_extensions; do
14533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14534    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14536    break 2
14537  fi
14538done
14539  done
14540IFS=$as_save_IFS
14541
14542  ;;
14543esac
14544fi
14545NICE=$ac_cv_path_NICE
14546if test -n "$NICE"; then
14547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14548$as_echo "$NICE" >&6; }
14549else
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14551$as_echo "no" >&6; }
14552fi
14553
14554
14555  test -n "$NICE" && break
14556done
14557
14558  else
14559    # The variable is set, but is it from the command line or the environment?
14560
14561    # Try to remove the string !NICE! from our list.
14562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14564      # If it failed, the variable was not from the command line. Ignore it,
14565      # but warn the user (except for BASH, which is always set by the calling BASH).
14566      if test "xNICE" != xBASH; then
14567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14568$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14569      fi
14570      # Try to locate tool using the code snippet
14571      for ac_prog in nice
14572do
14573  # Extract the first word of "$ac_prog", so it can be a program name with args.
14574set dummy $ac_prog; ac_word=$2
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14576$as_echo_n "checking for $ac_word... " >&6; }
14577if ${ac_cv_path_NICE+:} false; then :
14578  $as_echo_n "(cached) " >&6
14579else
14580  case $NICE in
14581  [\\/]* | ?:[\\/]*)
14582  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14583  ;;
14584  *)
14585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14586for as_dir in $PATH
14587do
14588  IFS=$as_save_IFS
14589  test -z "$as_dir" && as_dir=.
14590    for ac_exec_ext in '' $ac_executable_extensions; do
14591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14592    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14594    break 2
14595  fi
14596done
14597  done
14598IFS=$as_save_IFS
14599
14600  ;;
14601esac
14602fi
14603NICE=$ac_cv_path_NICE
14604if test -n "$NICE"; then
14605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14606$as_echo "$NICE" >&6; }
14607else
14608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14609$as_echo "no" >&6; }
14610fi
14611
14612
14613  test -n "$NICE" && break
14614done
14615
14616    else
14617      # If it succeeded, then it was overridden by the user. We will use it
14618      # for the tool.
14619
14620      # First remove it from the list of overridden variables, so we can test
14621      # for unknown variables in the end.
14622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14623
14624      # Check if we try to supply an empty value
14625      if test "x$NICE" = x; then
14626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14627$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14629$as_echo_n "checking for NICE... " >&6; }
14630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14631$as_echo "disabled" >&6; }
14632      else
14633        # Check if the provided tool contains a complete path.
14634        tool_specified="$NICE"
14635        tool_basename="${tool_specified##*/}"
14636        if test "x$tool_basename" = "x$tool_specified"; then
14637          # A command without a complete path is provided, search $PATH.
14638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14639$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14640          # Extract the first word of "$tool_basename", so it can be a program name with args.
14641set dummy $tool_basename; ac_word=$2
14642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14643$as_echo_n "checking for $ac_word... " >&6; }
14644if ${ac_cv_path_NICE+:} false; then :
14645  $as_echo_n "(cached) " >&6
14646else
14647  case $NICE in
14648  [\\/]* | ?:[\\/]*)
14649  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14650  ;;
14651  *)
14652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14653for as_dir in $PATH
14654do
14655  IFS=$as_save_IFS
14656  test -z "$as_dir" && as_dir=.
14657    for ac_exec_ext in '' $ac_executable_extensions; do
14658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14659    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14661    break 2
14662  fi
14663done
14664  done
14665IFS=$as_save_IFS
14666
14667  ;;
14668esac
14669fi
14670NICE=$ac_cv_path_NICE
14671if test -n "$NICE"; then
14672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14673$as_echo "$NICE" >&6; }
14674else
14675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14676$as_echo "no" >&6; }
14677fi
14678
14679
14680          if test "x$NICE" = x; then
14681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14682          fi
14683        else
14684          # Otherwise we believe it is a complete path. Use it as it is.
14685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14686$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14688$as_echo_n "checking for NICE... " >&6; }
14689          if test ! -x "$tool_specified"; then
14690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14691$as_echo "not found" >&6; }
14692            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14693          fi
14694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14695$as_echo "$tool_specified" >&6; }
14696        fi
14697      fi
14698    fi
14699
14700  fi
14701
14702
14703
14704
14705# Now we can determine OpenJDK build and target platforms. This is required to
14706# have early on.
14707# Make sure we can run config.sub.
14708$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14709  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14710
14711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14712$as_echo_n "checking build system type... " >&6; }
14713if ${ac_cv_build+:} false; then :
14714  $as_echo_n "(cached) " >&6
14715else
14716  ac_build_alias=$build_alias
14717test "x$ac_build_alias" = x &&
14718  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14719test "x$ac_build_alias" = x &&
14720  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14721ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14722  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14723
14724fi
14725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14726$as_echo "$ac_cv_build" >&6; }
14727case $ac_cv_build in
14728*-*-*) ;;
14729*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14730esac
14731build=$ac_cv_build
14732ac_save_IFS=$IFS; IFS='-'
14733set x $ac_cv_build
14734shift
14735build_cpu=$1
14736build_vendor=$2
14737shift; shift
14738# Remember, the first character of IFS is used to create $*,
14739# except with old shells:
14740build_os=$*
14741IFS=$ac_save_IFS
14742case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14743
14744
14745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14746$as_echo_n "checking host system type... " >&6; }
14747if ${ac_cv_host+:} false; then :
14748  $as_echo_n "(cached) " >&6
14749else
14750  if test "x$host_alias" = x; then
14751  ac_cv_host=$ac_cv_build
14752else
14753  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14754    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14755fi
14756
14757fi
14758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14759$as_echo "$ac_cv_host" >&6; }
14760case $ac_cv_host in
14761*-*-*) ;;
14762*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14763esac
14764host=$ac_cv_host
14765ac_save_IFS=$IFS; IFS='-'
14766set x $ac_cv_host
14767shift
14768host_cpu=$1
14769host_vendor=$2
14770shift; shift
14771# Remember, the first character of IFS is used to create $*,
14772# except with old shells:
14773host_os=$*
14774IFS=$ac_save_IFS
14775case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14776
14777
14778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14779$as_echo_n "checking target system type... " >&6; }
14780if ${ac_cv_target+:} false; then :
14781  $as_echo_n "(cached) " >&6
14782else
14783  if test "x$target_alias" = x; then
14784  ac_cv_target=$ac_cv_host
14785else
14786  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14787    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14788fi
14789
14790fi
14791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14792$as_echo "$ac_cv_target" >&6; }
14793case $ac_cv_target in
14794*-*-*) ;;
14795*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14796esac
14797target=$ac_cv_target
14798ac_save_IFS=$IFS; IFS='-'
14799set x $ac_cv_target
14800shift
14801target_cpu=$1
14802target_vendor=$2
14803shift; shift
14804# Remember, the first character of IFS is used to create $*,
14805# except with old shells:
14806target_os=$*
14807IFS=$ac_save_IFS
14808case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14809
14810
14811# The aliases save the names the user supplied, while $host etc.
14812# will get canonicalized.
14813test -n "$target_alias" &&
14814  test "$program_prefix$program_suffix$program_transform_name" = \
14815    NONENONEs,x,x, &&
14816  program_prefix=${target_alias}-
14817
14818  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14819  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14820  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14821  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14822  # to use the configure naming style.
14823
14824
14825
14826
14827
14828  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14829  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14830  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14831  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14832  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14833  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14834
14835
14836
14837  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14838
14839  case "$build_os" in
14840    *linux*)
14841      VAR_OS=linux
14842      VAR_OS_TYPE=unix
14843      ;;
14844    *solaris*)
14845      VAR_OS=solaris
14846      VAR_OS_TYPE=unix
14847      ;;
14848    *darwin*)
14849      VAR_OS=macosx
14850      VAR_OS_TYPE=unix
14851      ;;
14852    *bsd*)
14853      VAR_OS=bsd
14854      VAR_OS_TYPE=unix
14855      ;;
14856    *cygwin*)
14857      VAR_OS=windows
14858      VAR_OS_ENV=windows.cygwin
14859      ;;
14860    *mingw*)
14861      VAR_OS=windows
14862      VAR_OS_ENV=windows.msys
14863      ;;
14864    *aix*)
14865      VAR_OS=aix
14866      VAR_OS_TYPE=unix
14867      ;;
14868    *)
14869      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14870      ;;
14871  esac
14872
14873
14874  # First argument is the cpu name from the trip/quad
14875  case "$build_cpu" in
14876    x86_64)
14877      VAR_CPU=x86_64
14878      VAR_CPU_ARCH=x86
14879      VAR_CPU_BITS=64
14880      VAR_CPU_ENDIAN=little
14881      ;;
14882    i?86)
14883      VAR_CPU=x86
14884      VAR_CPU_ARCH=x86
14885      VAR_CPU_BITS=32
14886      VAR_CPU_ENDIAN=little
14887      ;;
14888    arm*)
14889      VAR_CPU=arm
14890      VAR_CPU_ARCH=arm
14891      VAR_CPU_BITS=32
14892      VAR_CPU_ENDIAN=little
14893      ;;
14894    aarch64)
14895      VAR_CPU=aarch64
14896      VAR_CPU_ARCH=aarch64
14897      VAR_CPU_BITS=64
14898      VAR_CPU_ENDIAN=little
14899      ;;
14900    powerpc)
14901      VAR_CPU=ppc
14902      VAR_CPU_ARCH=ppc
14903      VAR_CPU_BITS=32
14904      VAR_CPU_ENDIAN=big
14905      ;;
14906    powerpc64)
14907      VAR_CPU=ppc64
14908      VAR_CPU_ARCH=ppc
14909      VAR_CPU_BITS=64
14910      VAR_CPU_ENDIAN=big
14911      ;;
14912    powerpc64le)
14913      VAR_CPU=ppc64le
14914      VAR_CPU_ARCH=ppc
14915      VAR_CPU_BITS=64
14916      VAR_CPU_ENDIAN=little
14917      ;;
14918    s390)
14919      VAR_CPU=s390
14920      VAR_CPU_ARCH=s390
14921      VAR_CPU_BITS=32
14922      VAR_CPU_ENDIAN=big
14923      ;;
14924    s390x)
14925      VAR_CPU=s390x
14926      VAR_CPU_ARCH=s390
14927      VAR_CPU_BITS=64
14928      VAR_CPU_ENDIAN=big
14929      ;;
14930    sparc)
14931      VAR_CPU=sparc
14932      VAR_CPU_ARCH=sparc
14933      VAR_CPU_BITS=32
14934      VAR_CPU_ENDIAN=big
14935      ;;
14936    sparcv9|sparc64)
14937      VAR_CPU=sparcv9
14938      VAR_CPU_ARCH=sparc
14939      VAR_CPU_BITS=64
14940      VAR_CPU_ENDIAN=big
14941      ;;
14942    *)
14943      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14944      ;;
14945  esac
14946
14947  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14948  OPENJDK_BUILD_OS="$VAR_OS"
14949  if test "x$VAR_OS_TYPE" != x; then
14950    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14951  else
14952    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14953  fi
14954  if test "x$VAR_OS_ENV" != x; then
14955    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14956  else
14957    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14958  fi
14959  OPENJDK_BUILD_CPU="$VAR_CPU"
14960  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14961  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14962  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14963
14964
14965
14966
14967
14968
14969
14970
14971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14972$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14974$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14975
14976  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14977
14978  case "$host_os" in
14979    *linux*)
14980      VAR_OS=linux
14981      VAR_OS_TYPE=unix
14982      ;;
14983    *solaris*)
14984      VAR_OS=solaris
14985      VAR_OS_TYPE=unix
14986      ;;
14987    *darwin*)
14988      VAR_OS=macosx
14989      VAR_OS_TYPE=unix
14990      ;;
14991    *bsd*)
14992      VAR_OS=bsd
14993      VAR_OS_TYPE=unix
14994      ;;
14995    *cygwin*)
14996      VAR_OS=windows
14997      VAR_OS_ENV=windows.cygwin
14998      ;;
14999    *mingw*)
15000      VAR_OS=windows
15001      VAR_OS_ENV=windows.msys
15002      ;;
15003    *aix*)
15004      VAR_OS=aix
15005      VAR_OS_TYPE=unix
15006      ;;
15007    *)
15008      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15009      ;;
15010  esac
15011
15012
15013  # First argument is the cpu name from the trip/quad
15014  case "$host_cpu" in
15015    x86_64)
15016      VAR_CPU=x86_64
15017      VAR_CPU_ARCH=x86
15018      VAR_CPU_BITS=64
15019      VAR_CPU_ENDIAN=little
15020      ;;
15021    i?86)
15022      VAR_CPU=x86
15023      VAR_CPU_ARCH=x86
15024      VAR_CPU_BITS=32
15025      VAR_CPU_ENDIAN=little
15026      ;;
15027    arm*)
15028      VAR_CPU=arm
15029      VAR_CPU_ARCH=arm
15030      VAR_CPU_BITS=32
15031      VAR_CPU_ENDIAN=little
15032      ;;
15033    aarch64)
15034      VAR_CPU=aarch64
15035      VAR_CPU_ARCH=aarch64
15036      VAR_CPU_BITS=64
15037      VAR_CPU_ENDIAN=little
15038      ;;
15039    powerpc)
15040      VAR_CPU=ppc
15041      VAR_CPU_ARCH=ppc
15042      VAR_CPU_BITS=32
15043      VAR_CPU_ENDIAN=big
15044      ;;
15045    powerpc64)
15046      VAR_CPU=ppc64
15047      VAR_CPU_ARCH=ppc
15048      VAR_CPU_BITS=64
15049      VAR_CPU_ENDIAN=big
15050      ;;
15051    powerpc64le)
15052      VAR_CPU=ppc64le
15053      VAR_CPU_ARCH=ppc
15054      VAR_CPU_BITS=64
15055      VAR_CPU_ENDIAN=little
15056      ;;
15057    s390)
15058      VAR_CPU=s390
15059      VAR_CPU_ARCH=s390
15060      VAR_CPU_BITS=32
15061      VAR_CPU_ENDIAN=big
15062      ;;
15063    s390x)
15064      VAR_CPU=s390x
15065      VAR_CPU_ARCH=s390
15066      VAR_CPU_BITS=64
15067      VAR_CPU_ENDIAN=big
15068      ;;
15069    sparc)
15070      VAR_CPU=sparc
15071      VAR_CPU_ARCH=sparc
15072      VAR_CPU_BITS=32
15073      VAR_CPU_ENDIAN=big
15074      ;;
15075    sparcv9|sparc64)
15076      VAR_CPU=sparcv9
15077      VAR_CPU_ARCH=sparc
15078      VAR_CPU_BITS=64
15079      VAR_CPU_ENDIAN=big
15080      ;;
15081    *)
15082      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15083      ;;
15084  esac
15085
15086  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15087  OPENJDK_TARGET_OS="$VAR_OS"
15088  if test "x$VAR_OS_TYPE" != x; then
15089    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15090  else
15091    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15092  fi
15093  if test "x$VAR_OS_ENV" != x; then
15094    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15095  else
15096    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15097  fi
15098  OPENJDK_TARGET_CPU="$VAR_CPU"
15099  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15100  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15101  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15102
15103
15104
15105
15106
15107
15108
15109
15110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15111$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15113$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15114
15115
15116
15117# Check whether --with-target-bits was given.
15118if test "${with_target_bits+set}" = set; then :
15119  withval=$with_target_bits;
15120fi
15121
15122
15123  # We have three types of compiles:
15124  # native  == normal compilation, target system == build system
15125  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15126  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15127  #
15128  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15129    # We're doing a proper cross-compilation
15130    COMPILE_TYPE="cross"
15131  else
15132    COMPILE_TYPE="native"
15133  fi
15134
15135  if test "x$with_target_bits" != x; then
15136    if test "x$COMPILE_TYPE" = "xcross"; then
15137      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15138    fi
15139
15140    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15141      # A reduced build is requested
15142      COMPILE_TYPE="reduced"
15143      OPENJDK_TARGET_CPU_BITS=32
15144      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15145        OPENJDK_TARGET_CPU=x86
15146      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15147        OPENJDK_TARGET_CPU=sparc
15148      else
15149        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15150      fi
15151    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15152      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
15153    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15154      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15155$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15156    else
15157      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15158    fi
15159  fi
15160
15161
15162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15163$as_echo_n "checking compilation type... " >&6; }
15164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15165$as_echo "$COMPILE_TYPE" >&6; }
15166
15167
15168  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15169    REQUIRED_OS_NAME=SunOS
15170    REQUIRED_OS_VERSION=5.10
15171  fi
15172  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15173    REQUIRED_OS_NAME=Linux
15174    REQUIRED_OS_VERSION=2.6
15175  fi
15176  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15177    REQUIRED_OS_NAME=Windows
15178    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15179      REQUIRED_OS_VERSION=5.2
15180    else
15181      REQUIRED_OS_VERSION=5.1
15182    fi
15183  fi
15184  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15185    REQUIRED_OS_NAME=Darwin
15186    REQUIRED_OS_VERSION=11.2
15187  fi
15188  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15189    REQUIRED_OS_NAME=AIX
15190    REQUIRED_OS_VERSION=7.1
15191  fi
15192
15193
15194
15195
15196
15197  # Also store the legacy naming of the cpu.
15198  # Ie i586 and amd64 instead of x86 and x86_64
15199  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15200  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15201    OPENJDK_TARGET_CPU_LEGACY="i586"
15202  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15203    # On all platforms except MacOSX replace x86_64 with amd64.
15204    OPENJDK_TARGET_CPU_LEGACY="amd64"
15205  fi
15206
15207
15208  # And the second legacy naming of the cpu.
15209  # Ie i386 and amd64 instead of x86 and x86_64.
15210  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15211  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15212    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15213  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15214    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15215  fi
15216
15217
15218  # This is the name of the cpu (but using i386 and amd64 instead of
15219  # x86 and x86_64, respectively), preceeded by a /, to be used when
15220  # locating libraries. On macosx, it's empty, though.
15221  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15222  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15223    OPENJDK_TARGET_CPU_LIBDIR=""
15224  fi
15225
15226
15227  # Now do the same for OPENJDK_BUILD_CPU...
15228  # Also store the legacy naming of the cpu.
15229  # Ie i586 and amd64 instead of x86 and x86_64
15230  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15231  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15232    OPENJDK_BUILD_CPU_LEGACY="i586"
15233  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15234    # On all platforms except MacOSX replace x86_64 with amd64.
15235    OPENJDK_BUILD_CPU_LEGACY="amd64"
15236  fi
15237
15238
15239  # And the second legacy naming of the cpu.
15240  # Ie i386 and amd64 instead of x86 and x86_64.
15241  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15242  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15243    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15244  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15245    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15246  fi
15247
15248
15249  # This is the name of the cpu (but using i386 and amd64 instead of
15250  # x86 and x86_64, respectively), preceeded by a /, to be used when
15251  # locating libraries. On macosx, it's empty, though.
15252  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15253  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15254    OPENJDK_BUILD_CPU_LIBDIR=""
15255  fi
15256
15257
15258  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15259  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15260  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15261  OPENJDK_TARGET_CPU_ISADIR=""
15262  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15263    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15264      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15265    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15266      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15267    fi
15268  fi
15269
15270
15271  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15272  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15273  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15274    # On linux only, we replace x86 with i386.
15275    OPENJDK_TARGET_CPU_OSARCH="i386"
15276  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15277    # On all platforms except macosx, we replace x86_64 with amd64.
15278    OPENJDK_TARGET_CPU_OSARCH="amd64"
15279  fi
15280
15281
15282  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15283  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15284    OPENJDK_TARGET_CPU_JLI="i386"
15285  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15286    # On all platforms except macosx, we replace x86_64 with amd64.
15287    OPENJDK_TARGET_CPU_JLI="amd64"
15288  fi
15289  # Now setup the -D flags for building libjli.
15290  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15291  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15292    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15293      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15294    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15295      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15296    fi
15297  fi
15298
15299
15300  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15301  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15302    OPENJDK_BUILD_CPU_JLI="i386"
15303  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15304    # On all platforms except macosx, we replace x86_64 with amd64.
15305    OPENJDK_BUILD_CPU_JLI="amd64"
15306  fi
15307  # Now setup the -D flags for building libjli.
15308  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15309  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15310    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15311      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15312    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15313      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15314    fi
15315  fi
15316
15317
15318  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15319      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15320  else
15321      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15322  fi
15323
15324
15325  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15326    A_LP64="LP64:="
15327    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15328    # unpack200.exe
15329    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15330      ADD_LP64="-D_LP64=1"
15331    fi
15332  fi
15333  LP64=$A_LP64
15334
15335  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15336    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15337      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15338    fi
15339  fi
15340
15341  if test "x$COMPILE_TYPE" = "xcross"; then
15342    # FIXME: ... or should this include reduced builds..?
15343    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15344  else
15345    DEFINE_CROSS_COMPILE_ARCH=""
15346  fi
15347
15348
15349  # ZERO_ARCHDEF is used to enable architecture-specific code
15350  case "${OPENJDK_TARGET_CPU}" in
15351    ppc)     ZERO_ARCHDEF=PPC32 ;;
15352    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15353    s390*)   ZERO_ARCHDEF=S390  ;;
15354    sparc*)  ZERO_ARCHDEF=SPARC ;;
15355    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15356    x86)     ZERO_ARCHDEF=IA32  ;;
15357    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15358  esac
15359
15360
15361
15362
15363# Continue setting up basic stuff. Most remaining code require fundamental tools.
15364
15365  # Save the current directory this script was started from
15366  CURDIR="$PWD"
15367
15368  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15369  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15370  # was not available at that time.
15371  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15372  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15373    ORIGINAL_PATH="$REWRITTEN_PATH"
15374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15375$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15376  fi
15377
15378  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15379    PATH_SEP=";"
15380
15381  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15382  if test $SRC_ROOT_LENGTH -gt 100; then
15383    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15384  fi
15385
15386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15388$as_echo_n "checking cygwin release... " >&6; }
15389    CYGWIN_VERSION=`$UNAME -r`
15390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15391$as_echo "$CYGWIN_VERSION" >&6; }
15392    WINDOWS_ENV_VENDOR='cygwin'
15393    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15394
15395    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15396    if test "x$CYGWIN_VERSION_OLD" != x; then
15397      { $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
15398$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;}
15399      as_fn_error $? "Cannot continue" "$LINENO" 5
15400    fi
15401    if test "x$CYGPATH" = x; then
15402      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15403    fi
15404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15405$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15406    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15407    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15408    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15409    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15411$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15412    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15413    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15414    if test "x$test_cygdrive_prefix" = x; then
15415      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15416    fi
15417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15419$as_echo_n "checking msys release... " >&6; }
15420    MSYS_VERSION=`$UNAME -r`
15421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15422$as_echo "$MSYS_VERSION" >&6; }
15423
15424    WINDOWS_ENV_VENDOR='msys'
15425    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15426
15427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15428$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15429    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15430    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15431
15432  windows_path="$MSYS_ROOT_PATH"
15433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15434    unix_path=`$CYGPATH -u "$windows_path"`
15435    MSYS_ROOT_PATH="$unix_path"
15436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15438    MSYS_ROOT_PATH="$unix_path"
15439  fi
15440
15441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15442$as_echo "$MSYS_ROOT_PATH" >&6; }
15443    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15444  else
15445    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15446  fi
15447
15448  # Test if windows or unix (cygwin/msys) find is first in path.
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15450$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15451  FIND_BINARY_OUTPUT=`find --version 2>&1`
15452  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15454$as_echo "unix style" >&6; }
15455  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15457$as_echo "Windows" >&6; }
15458    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15459$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15460    { $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
15461$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15462    as_fn_error $? "Cannot continue" "$LINENO" 5
15463  else
15464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15465$as_echo "unknown" >&6; }
15466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15467$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15468  fi
15469
15470  else
15471    PATH_SEP=":"
15472  fi
15473
15474
15475  # We get the top-level directory from the supporting wrappers.
15476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15477$as_echo_n "checking for top-level directory... " >&6; }
15478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15479$as_echo "$TOPDIR" >&6; }
15480
15481
15482  # Save the original version of TOPDIR for string comparisons
15483  ORIGINAL_TOPDIR="$TOPDIR"
15484
15485
15486  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15487
15488  # Only process if variable expands to non-empty
15489
15490  if test "x$CURDIR" != x; then
15491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15492
15493  # Input might be given as Windows format, start by converting to
15494  # unix format.
15495  path="$CURDIR"
15496  new_path=`$CYGPATH -u "$path"`
15497
15498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15501  # "foo.exe" is OK but "foo" is an error.
15502  #
15503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15504  # It is also a way to make sure we got the proper file name for the real test later on.
15505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15506  if test "x$test_shortpath" = x; then
15507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15508$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15509    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15510  fi
15511
15512  # Call helper function which possibly converts this using DOS-style short mode.
15513  # If so, the updated path is stored in $new_path.
15514
15515  input_path="$new_path"
15516  # Check if we need to convert this using DOS-style short mode. If the path
15517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15518  # take no chances and rewrite it.
15519  # Note: m4 eats our [], so we need to use [ and ] instead.
15520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15521  if test "x$has_forbidden_chars" != x; then
15522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15526      # Going to short mode and back again did indeed matter. Since short mode is
15527      # case insensitive, let's make it lowercase to improve readability.
15528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15529      # Now convert it back to Unix-style (cygpath)
15530      input_path=`$CYGPATH -u "$shortmode_path"`
15531      new_path="$input_path"
15532    fi
15533  fi
15534
15535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15536  if test "x$test_cygdrive_prefix" = x; then
15537    # As a simple fix, exclude /usr/bin since it's not a real path.
15538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15540      # a path prefixed by /cygdrive for fixpath to work.
15541      new_path="$CYGWIN_ROOT_PATH$input_path"
15542    fi
15543  fi
15544
15545
15546  if test "x$path" != "x$new_path"; then
15547    CURDIR="$new_path"
15548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15549$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15550  fi
15551
15552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15553
15554  path="$CURDIR"
15555  has_colon=`$ECHO $path | $GREP ^.:`
15556  new_path="$path"
15557  if test "x$has_colon" = x; then
15558    # Not in mixed or Windows style, start by that.
15559    new_path=`cmd //c echo $path`
15560  fi
15561
15562
15563  input_path="$new_path"
15564  # Check if we need to convert this using DOS-style short mode. If the path
15565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15566  # take no chances and rewrite it.
15567  # Note: m4 eats our [], so we need to use [ and ] instead.
15568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15569  if test "x$has_forbidden_chars" != x; then
15570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15572  fi
15573
15574
15575  windows_path="$new_path"
15576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15577    unix_path=`$CYGPATH -u "$windows_path"`
15578    new_path="$unix_path"
15579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15581    new_path="$unix_path"
15582  fi
15583
15584  if test "x$path" != "x$new_path"; then
15585    CURDIR="$new_path"
15586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15587$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15588  fi
15589
15590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15592
15593    else
15594      # We're on a unix platform. Hooray! :)
15595      path="$CURDIR"
15596      has_space=`$ECHO "$path" | $GREP " "`
15597      if test "x$has_space" != x; then
15598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15599$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15601      fi
15602
15603      # Use eval to expand a potential ~
15604      eval path="$path"
15605      if test ! -f "$path" && test ! -d "$path"; then
15606        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15607      fi
15608
15609      if test -d "$path"; then
15610        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15611      else
15612        dir="`$DIRNAME "$path"`"
15613        base="`$BASENAME "$path"`"
15614        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15615      fi
15616    fi
15617  fi
15618
15619
15620  # Only process if variable expands to non-empty
15621
15622  if test "x$TOPDIR" != x; then
15623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15624
15625  # Input might be given as Windows format, start by converting to
15626  # unix format.
15627  path="$TOPDIR"
15628  new_path=`$CYGPATH -u "$path"`
15629
15630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15633  # "foo.exe" is OK but "foo" is an error.
15634  #
15635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15636  # It is also a way to make sure we got the proper file name for the real test later on.
15637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15638  if test "x$test_shortpath" = x; then
15639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15640$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15641    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15642  fi
15643
15644  # Call helper function which possibly converts this using DOS-style short mode.
15645  # If so, the updated path is stored in $new_path.
15646
15647  input_path="$new_path"
15648  # Check if we need to convert this using DOS-style short mode. If the path
15649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15650  # take no chances and rewrite it.
15651  # Note: m4 eats our [], so we need to use [ and ] instead.
15652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15653  if test "x$has_forbidden_chars" != x; then
15654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15658      # Going to short mode and back again did indeed matter. Since short mode is
15659      # case insensitive, let's make it lowercase to improve readability.
15660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15661      # Now convert it back to Unix-style (cygpath)
15662      input_path=`$CYGPATH -u "$shortmode_path"`
15663      new_path="$input_path"
15664    fi
15665  fi
15666
15667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15668  if test "x$test_cygdrive_prefix" = x; then
15669    # As a simple fix, exclude /usr/bin since it's not a real path.
15670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15672      # a path prefixed by /cygdrive for fixpath to work.
15673      new_path="$CYGWIN_ROOT_PATH$input_path"
15674    fi
15675  fi
15676
15677
15678  if test "x$path" != "x$new_path"; then
15679    TOPDIR="$new_path"
15680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15681$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15682  fi
15683
15684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15685
15686  path="$TOPDIR"
15687  has_colon=`$ECHO $path | $GREP ^.:`
15688  new_path="$path"
15689  if test "x$has_colon" = x; then
15690    # Not in mixed or Windows style, start by that.
15691    new_path=`cmd //c echo $path`
15692  fi
15693
15694
15695  input_path="$new_path"
15696  # Check if we need to convert this using DOS-style short mode. If the path
15697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15698  # take no chances and rewrite it.
15699  # Note: m4 eats our [], so we need to use [ and ] instead.
15700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15701  if test "x$has_forbidden_chars" != x; then
15702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15704  fi
15705
15706
15707  windows_path="$new_path"
15708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15709    unix_path=`$CYGPATH -u "$windows_path"`
15710    new_path="$unix_path"
15711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15713    new_path="$unix_path"
15714  fi
15715
15716  if test "x$path" != "x$new_path"; then
15717    TOPDIR="$new_path"
15718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15719$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15720  fi
15721
15722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15724
15725    else
15726      # We're on a unix platform. Hooray! :)
15727      path="$TOPDIR"
15728      has_space=`$ECHO "$path" | $GREP " "`
15729      if test "x$has_space" != x; then
15730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15731$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15733      fi
15734
15735      # Use eval to expand a potential ~
15736      eval path="$path"
15737      if test ! -f "$path" && test ! -d "$path"; then
15738        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15739      fi
15740
15741      if test -d "$path"; then
15742        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15743      else
15744        dir="`$DIRNAME "$path"`"
15745        base="`$BASENAME "$path"`"
15746        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15747      fi
15748    fi
15749  fi
15750
15751  # SRC_ROOT is a traditional alias for TOPDIR.
15752  SRC_ROOT=$TOPDIR
15753
15754  # Calculate a canonical version of TOPDIR for string comparisons
15755  CANONICAL_TOPDIR=$TOPDIR
15756
15757  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15758    # Follow a chain of symbolic links. Use readlink
15759    # where it exists, else fall back to horribly
15760    # complicated shell code.
15761    if test "x$READLINK_TESTED" != yes; then
15762      # On MacOSX there is a readlink tool with a different
15763      # purpose than the GNU readlink tool. Check the found readlink.
15764      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15765      if test "x$ISGNU" = x; then
15766        # A readlink that we do not know how to use.
15767        # Are there other non-GNU readlinks out there?
15768        READLINK_TESTED=yes
15769        READLINK=
15770      fi
15771    fi
15772
15773    if test "x$READLINK" != x; then
15774      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15775    else
15776      # Save the current directory for restoring afterwards
15777      STARTDIR=$PWD
15778      COUNTER=0
15779      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15780      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15781      cd $sym_link_dir
15782      # Use -P flag to resolve symlinks in directories.
15783      cd `$THEPWDCMD -P`
15784      sym_link_dir=`$THEPWDCMD -P`
15785      # Resolve file symlinks
15786      while test $COUNTER -lt 20; do
15787        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15788        if test "x$ISLINK" == x; then
15789          # This is not a symbolic link! We are done!
15790          break
15791        fi
15792        # Again resolve directory symlinks since the target of the just found
15793        # link could be in a different directory
15794        cd `$DIRNAME $ISLINK`
15795        sym_link_dir=`$THEPWDCMD -P`
15796        sym_link_file=`$BASENAME $ISLINK`
15797        let COUNTER=COUNTER+1
15798      done
15799      cd $STARTDIR
15800      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15801    fi
15802  fi
15803
15804
15805
15806  # Locate the directory of this script.
15807  AUTOCONF_DIR=$TOPDIR/common/autoconf
15808
15809  # Setup username (for use in adhoc version strings etc)
15810  # Outer [ ] to quote m4.
15811   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15812
15813
15814
15815# Check if it's a pure open build or if custom sources are to be used.
15816
15817  # Check whether --enable-openjdk-only was given.
15818if test "${enable_openjdk_only+set}" = set; then :
15819  enableval=$enable_openjdk_only;
15820else
15821  enable_openjdk_only="no"
15822fi
15823
15824
15825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15826$as_echo_n "checking for presence of closed sources... " >&6; }
15827  if test -d "$SRC_ROOT/jdk/src/closed"; then
15828    CLOSED_SOURCE_PRESENT=yes
15829  else
15830    CLOSED_SOURCE_PRESENT=no
15831  fi
15832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15833$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15834
15835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15836$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15837  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15839$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15840
15841  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15842    OPENJDK=true
15843    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15845$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15846    fi
15847  else
15848    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15849      OPENJDK=true
15850    else
15851      OPENJDK=false
15852    fi
15853  fi
15854
15855  if test "x$OPENJDK" = "xtrue"; then
15856    SET_OPENJDK="OPENJDK=true"
15857  fi
15858
15859
15860
15861  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15862  # the IncludeCustomExtension macro.
15863
15864
15865# Check whether --with-custom-make-dir was given.
15866if test "${with_custom_make_dir+set}" = set; then :
15867  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
15868$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15869fi
15870
15871
15872
15873
15874# These are needed to be able to create a configuration name (and thus the output directory)
15875
15876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15877$as_echo_n "checking which variant of the JDK to build... " >&6; }
15878
15879# Check whether --with-jdk-variant was given.
15880if test "${with_jdk_variant+set}" = set; then :
15881  withval=$with_jdk_variant;
15882fi
15883
15884
15885  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15886    JDK_VARIANT="normal"
15887  else
15888    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15889  fi
15890
15891
15892
15893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15894$as_echo "$JDK_VARIANT" >&6; }
15895
15896
15897
15898# Check whether --with-jvm-interpreter was given.
15899if test "${with_jvm_interpreter+set}" = set; then :
15900  withval=$with_jvm_interpreter;
15901fi
15902
15903
15904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15905$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15906  if test "x$with_jvm_interpreter" = x; then
15907    JVM_INTERPRETER="template"
15908  else
15909    JVM_INTERPRETER="$with_jvm_interpreter"
15910  fi
15911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15912$as_echo "$JVM_INTERPRETER" >&6; }
15913
15914  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15915    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15916  fi
15917
15918
15919
15920
15921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15922$as_echo_n "checking which variants of the JVM to build... " >&6; }
15923
15924# Check whether --with-jvm-variants was given.
15925if test "${with_jvm_variants+set}" = set; then :
15926  withval=$with_jvm_variants;
15927fi
15928
15929
15930  if test "x$with_jvm_variants" = x; then
15931    with_jvm_variants="server"
15932  fi
15933
15934  JVM_VARIANTS=",$with_jvm_variants,"
15935  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15936
15937  if test "x$TEST_VARIANTS" != "x,"; then
15938    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15939  fi
15940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15941$as_echo "$with_jvm_variants" >&6; }
15942
15943  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15944  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15945  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15946  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15947  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15948  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15949
15950  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15951    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15952      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15953    fi
15954  fi
15955  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15956    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15957      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15958    fi
15959  fi
15960
15961  # Replace the commas with AND for use in the build directory name.
15962  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15963  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/'`
15964  if test "x$COUNT_VARIANTS" != "x,1"; then
15965    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15966  else
15967    BUILDING_MULTIPLE_JVM_VARIANTS=no
15968  fi
15969
15970  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15971    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15972  fi
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15983    MACOSX_UNIVERSAL="true"
15984  fi
15985
15986
15987
15988
15989  DEBUG_LEVEL="release"
15990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15991$as_echo_n "checking which debug level to use... " >&6; }
15992  # Check whether --enable-debug was given.
15993if test "${enable_debug+set}" = set; then :
15994  enableval=$enable_debug;
15995        ENABLE_DEBUG="${enableval}"
15996        DEBUG_LEVEL="fastdebug"
15997
15998else
15999  ENABLE_DEBUG="no"
16000fi
16001
16002
16003
16004# Check whether --with-debug-level was given.
16005if test "${with_debug_level+set}" = set; then :
16006  withval=$with_debug_level;
16007        DEBUG_LEVEL="${withval}"
16008        if test "x$ENABLE_DEBUG" = xyes; then
16009          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16010        fi
16011
16012fi
16013
16014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16015$as_echo "$DEBUG_LEVEL" >&6; }
16016
16017  if test "x$DEBUG_LEVEL" != xrelease && \
16018      test "x$DEBUG_LEVEL" != xoptimized && \
16019      test "x$DEBUG_LEVEL" != xfastdebug && \
16020      test "x$DEBUG_LEVEL" != xslowdebug; then
16021    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16022  fi
16023
16024
16025  case $DEBUG_LEVEL in
16026    release )
16027      VARIANT="OPT"
16028      FASTDEBUG="false"
16029      DEBUG_CLASSFILES="false"
16030      BUILD_VARIANT_RELEASE=""
16031      HOTSPOT_DEBUG_LEVEL="product"
16032      HOTSPOT_EXPORT="product"
16033      ;;
16034    fastdebug )
16035      VARIANT="DBG"
16036      FASTDEBUG="true"
16037      DEBUG_CLASSFILES="true"
16038      BUILD_VARIANT_RELEASE="-fastdebug"
16039      HOTSPOT_DEBUG_LEVEL="fastdebug"
16040      HOTSPOT_EXPORT="fastdebug"
16041      ;;
16042    slowdebug )
16043      VARIANT="DBG"
16044      FASTDEBUG="false"
16045      DEBUG_CLASSFILES="true"
16046      BUILD_VARIANT_RELEASE="-debug"
16047      HOTSPOT_DEBUG_LEVEL="debug"
16048      HOTSPOT_EXPORT="debug"
16049      ;;
16050    optimized )
16051      VARIANT="OPT"
16052      FASTDEBUG="false"
16053      DEBUG_CLASSFILES="false"
16054      BUILD_VARIANT_RELEASE="-optimized"
16055      HOTSPOT_DEBUG_LEVEL="optimized"
16056      HOTSPOT_EXPORT="optimized"
16057      ;;
16058  esac
16059
16060  # The debug level 'optimized' is a little special because it is currently only
16061  # applicable to the HotSpot build where it means to build a completely
16062  # optimized version of the VM without any debugging code (like for the
16063  # 'release' debug level which is called 'product' in the HotSpot build) but
16064  # with the exception that it can contain additional code which is otherwise
16065  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16066  # test new and/or experimental features which are not intended for customer
16067  # shipment. Because these new features need to be tested and benchmarked in
16068  # real world scenarios, we want to build the containing JDK at the 'release'
16069  # debug level.
16070  if test "x$DEBUG_LEVEL" = xoptimized; then
16071    DEBUG_LEVEL="release"
16072  fi
16073
16074  #####
16075  # Generate the legacy makefile targets for hotspot.
16076  # The hotspot api for selecting the build artifacts, really, needs to be improved.
16077  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
16078  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
16079  # But until then ...
16080  HOTSPOT_TARGET=""
16081
16082  if test "x$JVM_VARIANT_SERVER" = xtrue; then
16083    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
16084  fi
16085
16086  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
16087    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
16088  fi
16089
16090  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
16091    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
16092  fi
16093
16094  if test "x$JVM_VARIANT_ZERO" = xtrue; then
16095    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
16096  fi
16097
16098  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
16099    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
16100  fi
16101
16102  if test "x$JVM_VARIANT_CORE" = xtrue; then
16103    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
16104  fi
16105
16106  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
16107
16108  # On Macosx universal binaries are produced, but they only contain
16109  # 64 bit intel. This invalidates control of which jvms are built
16110  # from configure, but only server is valid anyway. Fix this
16111  # when hotspot makefiles are rewritten.
16112  if test "x$MACOSX_UNIVERSAL" = xtrue; then
16113    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
16114  fi
16115
16116  #####
16117
16118
16119
16120
16121
16122
16123
16124
16125# With basic setup done, call the custom early hook.
16126
16127
16128# Check if we have devkits, extra paths or sysroot set.
16129
16130
16131# Check whether --with-devkit was given.
16132if test "${with_devkit+set}" = set; then :
16133  withval=$with_devkit;
16134
16135  # Only process if variable expands to non-empty
16136
16137  if test "x$with_devkit" != x; then
16138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16139
16140  # Input might be given as Windows format, start by converting to
16141  # unix format.
16142  path="$with_devkit"
16143  new_path=`$CYGPATH -u "$path"`
16144
16145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16148  # "foo.exe" is OK but "foo" is an error.
16149  #
16150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16151  # It is also a way to make sure we got the proper file name for the real test later on.
16152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16153  if test "x$test_shortpath" = x; then
16154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16155$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16156    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16157  fi
16158
16159  # Call helper function which possibly converts this using DOS-style short mode.
16160  # If so, the updated path is stored in $new_path.
16161
16162  input_path="$new_path"
16163  # Check if we need to convert this using DOS-style short mode. If the path
16164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16165  # take no chances and rewrite it.
16166  # Note: m4 eats our [], so we need to use [ and ] instead.
16167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16168  if test "x$has_forbidden_chars" != x; then
16169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16173      # Going to short mode and back again did indeed matter. Since short mode is
16174      # case insensitive, let's make it lowercase to improve readability.
16175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16176      # Now convert it back to Unix-style (cygpath)
16177      input_path=`$CYGPATH -u "$shortmode_path"`
16178      new_path="$input_path"
16179    fi
16180  fi
16181
16182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16183  if test "x$test_cygdrive_prefix" = x; then
16184    # As a simple fix, exclude /usr/bin since it's not a real path.
16185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16187      # a path prefixed by /cygdrive for fixpath to work.
16188      new_path="$CYGWIN_ROOT_PATH$input_path"
16189    fi
16190  fi
16191
16192
16193  if test "x$path" != "x$new_path"; then
16194    with_devkit="$new_path"
16195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16196$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16197  fi
16198
16199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16200
16201  path="$with_devkit"
16202  has_colon=`$ECHO $path | $GREP ^.:`
16203  new_path="$path"
16204  if test "x$has_colon" = x; then
16205    # Not in mixed or Windows style, start by that.
16206    new_path=`cmd //c echo $path`
16207  fi
16208
16209
16210  input_path="$new_path"
16211  # Check if we need to convert this using DOS-style short mode. If the path
16212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16213  # take no chances and rewrite it.
16214  # Note: m4 eats our [], so we need to use [ and ] instead.
16215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16216  if test "x$has_forbidden_chars" != x; then
16217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16219  fi
16220
16221
16222  windows_path="$new_path"
16223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16224    unix_path=`$CYGPATH -u "$windows_path"`
16225    new_path="$unix_path"
16226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16228    new_path="$unix_path"
16229  fi
16230
16231  if test "x$path" != "x$new_path"; then
16232    with_devkit="$new_path"
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16234$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16235  fi
16236
16237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16239
16240    else
16241      # We're on a unix platform. Hooray! :)
16242      path="$with_devkit"
16243      has_space=`$ECHO "$path" | $GREP " "`
16244      if test "x$has_space" != x; then
16245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16246$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16247        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16248      fi
16249
16250      # Use eval to expand a potential ~
16251      eval path="$path"
16252      if test ! -f "$path" && test ! -d "$path"; then
16253        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16254      fi
16255
16256      if test -d "$path"; then
16257        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16258      else
16259        dir="`$DIRNAME "$path"`"
16260        base="`$BASENAME "$path"`"
16261        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16262      fi
16263    fi
16264  fi
16265
16266        DEVKIT_ROOT="$with_devkit"
16267        # Check for a meta data info file in the root of the devkit
16268        if test -f "$DEVKIT_ROOT/devkit.info"; then
16269          . $DEVKIT_ROOT/devkit.info
16270          # This potentially sets the following:
16271          # A descriptive name of the devkit
16272
16273  if test "x$DEVKIT_NAME" = x; then
16274    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16275  fi
16276
16277          # Corresponds to --with-extra-path
16278
16279  if test "x$DEVKIT_EXTRA_PATH" = x; then
16280    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16281  fi
16282
16283          # Corresponds to --with-toolchain-path
16284
16285  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16286    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16287  fi
16288
16289          # Corresponds to --with-sysroot
16290
16291  if test "x$DEVKIT_SYSROOT" = x; then
16292    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16293  fi
16294
16295
16296          # Identifies the Visual Studio version in the devkit
16297
16298  if test "x$DEVKIT_VS_VERSION" = x; then
16299    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16300  fi
16301
16302          # The Visual Studio include environment variable
16303
16304  if test "x$DEVKIT_VS_INCLUDE" = x; then
16305    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16306  fi
16307
16308          # The Visual Studio lib environment variable
16309
16310  if test "x$DEVKIT_VS_LIB" = x; then
16311    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16312  fi
16313
16314          # Corresponds to --with-msvcr-dll
16315
16316  if test "x$DEVKIT_MSVCR_DLL" = x; then
16317    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16318  fi
16319
16320          # Corresponds to --with-msvcp-dll
16321
16322  if test "x$DEVKIT_MSVCP_DLL" = x; then
16323    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16324  fi
16325
16326        fi
16327
16328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16329$as_echo_n "checking for devkit... " >&6; }
16330        if test "x$DEVKIT_NAME" != x; then
16331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16332$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16333        else
16334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16335$as_echo "$DEVKIT_ROOT" >&6; }
16336        fi
16337
16338
16339  if test "x$DEVKIT_EXTRA_PATH" != x; then
16340    if test "x$EXTRA_PATH" = x; then
16341      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16342    else
16343      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16344    fi
16345  fi
16346
16347
16348        # Fallback default of just /bin if DEVKIT_PATH is not defined
16349        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16350          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16351        fi
16352
16353  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16354    if test "x$TOOLCHAIN_PATH" = x; then
16355      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16356    else
16357      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16358    fi
16359  fi
16360
16361
16362        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16363        # places for backwards compatiblity.
16364        if test "x$DEVKIT_SYSROOT" != x; then
16365          SYSROOT="$DEVKIT_SYSROOT"
16366        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16367          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16368        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16369          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16370        fi
16371
16372
16373fi
16374
16375
16376  # You can force the sysroot if the sysroot encoded into the compiler tools
16377  # is not correct.
16378
16379# Check whether --with-sys-root was given.
16380if test "${with_sys_root+set}" = set; then :
16381  withval=$with_sys_root; SYSROOT=$with_sys_root
16382
16383fi
16384
16385
16386
16387# Check whether --with-sysroot was given.
16388if test "${with_sysroot+set}" = set; then :
16389  withval=$with_sysroot; SYSROOT=$with_sysroot
16390
16391fi
16392
16393
16394
16395# Check whether --with-tools-dir was given.
16396if test "${with_tools_dir+set}" = set; then :
16397  withval=$with_tools_dir;
16398  if test "x$with_tools_dir" != x; then
16399    if test "x$TOOLCHAIN_PATH" = x; then
16400      TOOLCHAIN_PATH="$with_tools_dir"
16401    else
16402      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16403    fi
16404  fi
16405
16406
16407fi
16408
16409
16410
16411# Check whether --with-toolchain-path was given.
16412if test "${with_toolchain_path+set}" = set; then :
16413  withval=$with_toolchain_path;
16414  if test "x$with_toolchain_path" != x; then
16415    if test "x$TOOLCHAIN_PATH" = x; then
16416      TOOLCHAIN_PATH="$with_toolchain_path"
16417    else
16418      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16419    fi
16420  fi
16421
16422
16423fi
16424
16425
16426
16427# Check whether --with-extra-path was given.
16428if test "${with_extra_path+set}" = set; then :
16429  withval=$with_extra_path;
16430  if test "x$with_extra_path" != x; then
16431    if test "x$EXTRA_PATH" = x; then
16432      EXTRA_PATH="$with_extra_path"
16433    else
16434      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16435    fi
16436  fi
16437
16438
16439fi
16440
16441
16442  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16443    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16444    # If not, detect if Xcode is installed by running xcodebuild -version
16445    # if no Xcode installed, xcodebuild exits with 1
16446    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16447    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16448      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16449      # fall back on the stub binary in /usr/bin/xcodebuild
16450      # Extract the first word of "xcodebuild", so it can be a program name with args.
16451set dummy xcodebuild; ac_word=$2
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16453$as_echo_n "checking for $ac_word... " >&6; }
16454if ${ac_cv_path_XCODEBUILD+:} false; then :
16455  $as_echo_n "(cached) " >&6
16456else
16457  case $XCODEBUILD in
16458  [\\/]* | ?:[\\/]*)
16459  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16460  ;;
16461  *)
16462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16463for as_dir in $TOOLCHAIN_PATH
16464do
16465  IFS=$as_save_IFS
16466  test -z "$as_dir" && as_dir=.
16467    for ac_exec_ext in '' $ac_executable_extensions; do
16468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16469    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16471    break 2
16472  fi
16473done
16474  done
16475IFS=$as_save_IFS
16476
16477  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16478  ;;
16479esac
16480fi
16481XCODEBUILD=$ac_cv_path_XCODEBUILD
16482if test -n "$XCODEBUILD"; then
16483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16484$as_echo "$XCODEBUILD" >&6; }
16485else
16486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16487$as_echo "no" >&6; }
16488fi
16489
16490
16491    else
16492      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16493      # when only the command line tools are installed there are no SDKs, so headers
16494      # are copied into the system frameworks
16495      XCODEBUILD=
16496
16497    fi
16498
16499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16500$as_echo_n "checking for sdk name... " >&6; }
16501
16502# Check whether --with-sdk-name was given.
16503if test "${with_sdk_name+set}" = set; then :
16504  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16505
16506fi
16507
16508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16509$as_echo "$SDKNAME" >&6; }
16510
16511    # if toolchain path is specified then don't rely on system headers, they may not compile
16512    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16513    test -z "$TOOLCHAIN_PATH" && \
16514      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16515
16516    if test -z "$SYSROOT"; then
16517      if test -n "$XCODEBUILD"; then
16518        # if we don't have system headers, use default SDK name (last resort)
16519        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16520          SDKNAME=${SDKNAME:-macosx}
16521        fi
16522
16523        if test -n "$SDKNAME"; then
16524          # Call xcodebuild to determine SYSROOT
16525          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16526        fi
16527      else
16528        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16529          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
16530        fi
16531      fi
16532    else
16533      # warn user if --with-sdk-name was also set
16534      if test -n "$with_sdk_name"; then
16535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16536$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16537      fi
16538    fi
16539
16540    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16541      # If no system framework headers, then SYSROOT must be set, or we won't build
16542      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
16543    fi
16544
16545    # Perform a basic sanity test
16546    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16547      if test -z "$SYSROOT"; then
16548        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
16549      else
16550        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16551      fi
16552    fi
16553
16554    # set SDKROOT too, Xcode tools will pick it up
16555    SDKROOT=$SYSROOT
16556
16557  fi
16558
16559  # Prepend the extra path to the global path
16560
16561  if test "x$EXTRA_PATH" != x; then
16562    if test "x$PATH" = x; then
16563      PATH="$EXTRA_PATH"
16564    else
16565      PATH="$EXTRA_PATH:$PATH"
16566    fi
16567  fi
16568
16569
16570  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16571    # Add extra search paths on solaris for utilities like ar and as etc...
16572    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16573  fi
16574
16575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16576$as_echo_n "checking for sysroot... " >&6; }
16577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16578$as_echo "$SYSROOT" >&6; }
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16580$as_echo_n "checking for toolchain path... " >&6; }
16581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16582$as_echo "$TOOLCHAIN_PATH" >&6; }
16583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16584$as_echo_n "checking for extra path... " >&6; }
16585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16586$as_echo "$EXTRA_PATH" >&6; }
16587
16588
16589# To properly create a configuration name, we need to have the OpenJDK target
16590# and options (variants and debug level) parsed.
16591
16592
16593
16594# Check whether --with-conf-name was given.
16595if test "${with_conf_name+set}" = set; then :
16596  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16597fi
16598
16599
16600  # Test from where we are running configure, in or outside of src root.
16601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16602$as_echo_n "checking where to store configuration... " >&6; }
16603  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16604      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16605      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16606    # We are running configure from the src root.
16607    # Create a default ./build/target-variant-debuglevel output root.
16608    if test "x${CONF_NAME}" = x; then
16609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16610$as_echo "in default location" >&6; }
16611      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16612    else
16613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16614$as_echo "in build directory with custom name" >&6; }
16615    fi
16616    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16617    $MKDIR -p "$OUTPUT_ROOT"
16618    if test ! -d "$OUTPUT_ROOT"; then
16619      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16620    fi
16621  else
16622    # We are running configure from outside of the src dir.
16623    # Then use the current directory as output dir!
16624    # If configuration is situated in normal build directory, just use the build
16625    # directory name as configuration name, otherwise use the complete path.
16626    if test "x${CONF_NAME}" = x; then
16627      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16628    fi
16629    OUTPUT_ROOT="$CURDIR"
16630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16631$as_echo "in current directory" >&6; }
16632
16633    # WARNING: This might be a bad thing to do. You need to be sure you want to
16634    # have a configuration in this directory. Do some sanity checks!
16635
16636    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16637      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16638      # other files
16639      files_present=`$LS $OUTPUT_ROOT`
16640      # Configure has already touched config.log and confdefs.h in the current dir when this check
16641      # is performed.
16642      filtered_files=`$ECHO "$files_present" \
16643          | $SED -e 's/config.log//g' \
16644              -e 's/configure.log//g' \
16645              -e 's/confdefs.h//g' \
16646              -e 's/ //g' \
16647          | $TR -d '\n'`
16648      if test "x$filtered_files" != x; then
16649        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16650$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16651        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16652$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16653        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16654$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16655        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16656$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16657        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16658$as_echo "$as_me: seriously mess up just about everything." >&6;}
16659        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16660$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16661        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16662$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16663        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16664      fi
16665    fi
16666  fi
16667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16668$as_echo_n "checking what configuration name to use... " >&6; }
16669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16670$as_echo "$CONF_NAME" >&6; }
16671
16672
16673  # Only process if variable expands to non-empty
16674
16675  if test "x$OUTPUT_ROOT" != x; then
16676    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16677
16678  # Input might be given as Windows format, start by converting to
16679  # unix format.
16680  path="$OUTPUT_ROOT"
16681  new_path=`$CYGPATH -u "$path"`
16682
16683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16686  # "foo.exe" is OK but "foo" is an error.
16687  #
16688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16689  # It is also a way to make sure we got the proper file name for the real test later on.
16690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16691  if test "x$test_shortpath" = x; then
16692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16693$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16694    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16695  fi
16696
16697  # Call helper function which possibly converts this using DOS-style short mode.
16698  # If so, the updated path is stored in $new_path.
16699
16700  input_path="$new_path"
16701  # Check if we need to convert this using DOS-style short mode. If the path
16702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16703  # take no chances and rewrite it.
16704  # Note: m4 eats our [], so we need to use [ and ] instead.
16705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16706  if test "x$has_forbidden_chars" != x; then
16707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16711      # Going to short mode and back again did indeed matter. Since short mode is
16712      # case insensitive, let's make it lowercase to improve readability.
16713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16714      # Now convert it back to Unix-style (cygpath)
16715      input_path=`$CYGPATH -u "$shortmode_path"`
16716      new_path="$input_path"
16717    fi
16718  fi
16719
16720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16721  if test "x$test_cygdrive_prefix" = x; then
16722    # As a simple fix, exclude /usr/bin since it's not a real path.
16723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16725      # a path prefixed by /cygdrive for fixpath to work.
16726      new_path="$CYGWIN_ROOT_PATH$input_path"
16727    fi
16728  fi
16729
16730
16731  if test "x$path" != "x$new_path"; then
16732    OUTPUT_ROOT="$new_path"
16733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16734$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16735  fi
16736
16737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16738
16739  path="$OUTPUT_ROOT"
16740  has_colon=`$ECHO $path | $GREP ^.:`
16741  new_path="$path"
16742  if test "x$has_colon" = x; then
16743    # Not in mixed or Windows style, start by that.
16744    new_path=`cmd //c echo $path`
16745  fi
16746
16747
16748  input_path="$new_path"
16749  # Check if we need to convert this using DOS-style short mode. If the path
16750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16751  # take no chances and rewrite it.
16752  # Note: m4 eats our [], so we need to use [ and ] instead.
16753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16754  if test "x$has_forbidden_chars" != x; then
16755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16757  fi
16758
16759
16760  windows_path="$new_path"
16761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16762    unix_path=`$CYGPATH -u "$windows_path"`
16763    new_path="$unix_path"
16764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16766    new_path="$unix_path"
16767  fi
16768
16769  if test "x$path" != "x$new_path"; then
16770    OUTPUT_ROOT="$new_path"
16771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16772$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16773  fi
16774
16775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16777
16778    else
16779      # We're on a unix platform. Hooray! :)
16780      path="$OUTPUT_ROOT"
16781      has_space=`$ECHO "$path" | $GREP " "`
16782      if test "x$has_space" != x; then
16783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16784$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16785        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16786      fi
16787
16788      # Use eval to expand a potential ~
16789      eval path="$path"
16790      if test ! -f "$path" && test ! -d "$path"; then
16791        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16792      fi
16793
16794      if test -d "$path"; then
16795        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16796      else
16797        dir="`$DIRNAME "$path"`"
16798        base="`$BASENAME "$path"`"
16799        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16800      fi
16801    fi
16802  fi
16803
16804
16805  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16806  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16807
16808  SPEC=$OUTPUT_ROOT/spec.gmk
16809
16810  CONF_NAME=$CONF_NAME
16811
16812  OUTPUT_ROOT=$OUTPUT_ROOT
16813
16814
16815
16816  # The spec.gmk file contains all variables for the make system.
16817  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16818
16819  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16820  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16821
16822  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16823  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16824
16825  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
16826  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
16827
16828  # The compare.sh is used to compare the build output to other builds.
16829  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16830
16831  # The generated Makefile knows where the spec.gmk is and where the source is.
16832  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16833  # which will look for generated configurations
16834  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16835
16836
16837
16838# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16839
16840  for ac_prog in apt-get yum port pkgutil pkgadd
16841do
16842  # Extract the first word of "$ac_prog", so it can be a program name with args.
16843set dummy $ac_prog; ac_word=$2
16844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16845$as_echo_n "checking for $ac_word... " >&6; }
16846if ${ac_cv_prog_PKGHANDLER+:} false; then :
16847  $as_echo_n "(cached) " >&6
16848else
16849  if test -n "$PKGHANDLER"; then
16850  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16851else
16852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16853for as_dir in $PATH
16854do
16855  IFS=$as_save_IFS
16856  test -z "$as_dir" && as_dir=.
16857    for ac_exec_ext in '' $ac_executable_extensions; do
16858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16859    ac_cv_prog_PKGHANDLER="$ac_prog"
16860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16861    break 2
16862  fi
16863done
16864  done
16865IFS=$as_save_IFS
16866
16867fi
16868fi
16869PKGHANDLER=$ac_cv_prog_PKGHANDLER
16870if test -n "$PKGHANDLER"; then
16871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16872$as_echo "$PKGHANDLER" >&6; }
16873else
16874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16875$as_echo "no" >&6; }
16876fi
16877
16878
16879  test -n "$PKGHANDLER" && break
16880done
16881
16882
16883
16884# Setup tools that requires more complex handling, or that is not needed by the configure script.
16885
16886
16887
16888  # Publish this variable in the help.
16889
16890
16891  if [ -z "${MAKE+x}" ]; then
16892    # The variable is not set by user, try to locate tool using the code snippet
16893
16894    # Try our hardest to locate a correct version of GNU make
16895    for ac_prog in gmake
16896do
16897  # Extract the first word of "$ac_prog", so it can be a program name with args.
16898set dummy $ac_prog; ac_word=$2
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16900$as_echo_n "checking for $ac_word... " >&6; }
16901if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16902  $as_echo_n "(cached) " >&6
16903else
16904  case $CHECK_GMAKE in
16905  [\\/]* | ?:[\\/]*)
16906  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16907  ;;
16908  *)
16909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16910for as_dir in $PATH
16911do
16912  IFS=$as_save_IFS
16913  test -z "$as_dir" && as_dir=.
16914    for ac_exec_ext in '' $ac_executable_extensions; do
16915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16916    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16918    break 2
16919  fi
16920done
16921  done
16922IFS=$as_save_IFS
16923
16924  ;;
16925esac
16926fi
16927CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16928if test -n "$CHECK_GMAKE"; then
16929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16930$as_echo "$CHECK_GMAKE" >&6; }
16931else
16932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16933$as_echo "no" >&6; }
16934fi
16935
16936
16937  test -n "$CHECK_GMAKE" && break
16938done
16939
16940
16941  MAKE_CANDIDATE=""$CHECK_GMAKE""
16942  DESCRIPTION="gmake in PATH"
16943
16944  # On Cygwin, we require a newer version of make than on other platforms
16945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16946    MAKE_VERSION_EXPR="-e 4\."
16947    MAKE_REQUIRED_VERSION="4.0"
16948   else
16949    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16950    MAKE_REQUIRED_VERSION="3.81"
16951  fi
16952
16953  if test "x$MAKE_CANDIDATE" != x; then
16954    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16955$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16956    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16957    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16958    if test "x$IS_GNU_MAKE" = x; then
16959      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16960$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16961    else
16962      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16963      if test "x$IS_MODERN_MAKE" = x; then
16964        { $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
16965$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;}
16966      else
16967        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16968          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16969            MAKE_EXPECTED_ENV='cygwin'
16970          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16971            MAKE_EXPECTED_ENV='msys'
16972          else
16973            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16974          fi
16975          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16976          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16977        else
16978          # Not relevant for non-Windows
16979          IS_MAKE_CORRECT_ENV=true
16980        fi
16981        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16982          { $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
16983$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;}
16984        else
16985          FOUND_MAKE=$MAKE_CANDIDATE
16986
16987  # Only process if variable expands to non-empty
16988
16989  if test "x$FOUND_MAKE" != x; then
16990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991
16992  # First separate the path from the arguments. This will split at the first
16993  # space.
16994  complete="$FOUND_MAKE"
16995  path="${complete%% *}"
16996  tmp="$complete EOL"
16997  arguments="${tmp#* }"
16998
16999  # Input might be given as Windows format, start by converting to
17000  # unix format.
17001  new_path=`$CYGPATH -u "$path"`
17002
17003  # Now try to locate executable using which
17004  new_path=`$WHICH "$new_path" 2> /dev/null`
17005  # bat and cmd files are not always considered executable in cygwin causing which
17006  # to not find them
17007  if test "x$new_path" = x \
17008      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17009      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17010    new_path=`$CYGPATH -u "$path"`
17011  fi
17012  if test "x$new_path" = x; then
17013    # Oops. Which didn't find the executable.
17014    # The splitting of arguments from the executable at a space might have been incorrect,
17015    # since paths with space are more likely in Windows. Give it another try with the whole
17016    # argument.
17017    path="$complete"
17018    arguments="EOL"
17019    new_path=`$CYGPATH -u "$path"`
17020    new_path=`$WHICH "$new_path" 2> /dev/null`
17021    # bat and cmd files are not always considered executable in cygwin causing which
17022    # to not find them
17023    if test "x$new_path" = x \
17024        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17025        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17026      new_path=`$CYGPATH -u "$path"`
17027    fi
17028    if test "x$new_path" = x; then
17029      # It's still not found. Now this is an unrecoverable error.
17030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17032      has_space=`$ECHO "$complete" | $GREP " "`
17033      if test "x$has_space" != x; then
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17036      fi
17037      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17038    fi
17039  fi
17040
17041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17044  # "foo.exe" is OK but "foo" is an error.
17045  #
17046  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17047  # It is also a way to make sure we got the proper file name for the real test later on.
17048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17049  if test "x$test_shortpath" = x; then
17050    # Short path failed, file does not exist as specified.
17051    # Try adding .exe or .cmd
17052    if test -f "${new_path}.exe"; then
17053      input_to_shortpath="${new_path}.exe"
17054    elif test -f "${new_path}.cmd"; then
17055      input_to_shortpath="${new_path}.cmd"
17056    else
17057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17059      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17060$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17061      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17062    fi
17063  else
17064    input_to_shortpath="$new_path"
17065  fi
17066
17067  # Call helper function which possibly converts this using DOS-style short mode.
17068  # If so, the updated path is stored in $new_path.
17069  new_path="$input_to_shortpath"
17070
17071  input_path="$input_to_shortpath"
17072  # Check if we need to convert this using DOS-style short mode. If the path
17073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17074  # take no chances and rewrite it.
17075  # Note: m4 eats our [], so we need to use [ and ] instead.
17076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17077  if test "x$has_forbidden_chars" != x; then
17078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17082      # Going to short mode and back again did indeed matter. Since short mode is
17083      # case insensitive, let's make it lowercase to improve readability.
17084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17085      # Now convert it back to Unix-style (cygpath)
17086      input_path=`$CYGPATH -u "$shortmode_path"`
17087      new_path="$input_path"
17088    fi
17089  fi
17090
17091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17092  if test "x$test_cygdrive_prefix" = x; then
17093    # As a simple fix, exclude /usr/bin since it's not a real path.
17094    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17096      # a path prefixed by /cygdrive for fixpath to work.
17097      new_path="$CYGWIN_ROOT_PATH$input_path"
17098    fi
17099  fi
17100
17101  # remove trailing .exe if any
17102  new_path="${new_path/%.exe/}"
17103
17104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17105
17106  # First separate the path from the arguments. This will split at the first
17107  # space.
17108  complete="$FOUND_MAKE"
17109  path="${complete%% *}"
17110  tmp="$complete EOL"
17111  arguments="${tmp#* }"
17112
17113  # Input might be given as Windows format, start by converting to
17114  # unix format.
17115  new_path="$path"
17116
17117  windows_path="$new_path"
17118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17119    unix_path=`$CYGPATH -u "$windows_path"`
17120    new_path="$unix_path"
17121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17123    new_path="$unix_path"
17124  fi
17125
17126
17127  # Now try to locate executable using which
17128  new_path=`$WHICH "$new_path" 2> /dev/null`
17129
17130  if test "x$new_path" = x; then
17131    # Oops. Which didn't find the executable.
17132    # The splitting of arguments from the executable at a space might have been incorrect,
17133    # since paths with space are more likely in Windows. Give it another try with the whole
17134    # argument.
17135    path="$complete"
17136    arguments="EOL"
17137    new_path="$path"
17138
17139  windows_path="$new_path"
17140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141    unix_path=`$CYGPATH -u "$windows_path"`
17142    new_path="$unix_path"
17143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17145    new_path="$unix_path"
17146  fi
17147
17148
17149    new_path=`$WHICH "$new_path" 2> /dev/null`
17150    # bat and cmd files are not always considered executable in MSYS causing which
17151    # to not find them
17152    if test "x$new_path" = x \
17153        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17154        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17155      new_path="$path"
17156
17157  windows_path="$new_path"
17158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17159    unix_path=`$CYGPATH -u "$windows_path"`
17160    new_path="$unix_path"
17161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17163    new_path="$unix_path"
17164  fi
17165
17166    fi
17167
17168    if test "x$new_path" = x; then
17169      # It's still not found. Now this is an unrecoverable error.
17170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17171$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17172      has_space=`$ECHO "$complete" | $GREP " "`
17173      if test "x$has_space" != x; then
17174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17176      fi
17177      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17178    fi
17179  fi
17180
17181  # Now new_path has a complete unix path to the binary
17182  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17183    # Keep paths in /bin as-is, but remove trailing .exe if any
17184    new_path="${new_path/%.exe/}"
17185    # Do not save /bin paths to all_fixpath_prefixes!
17186  else
17187    # Not in mixed or Windows style, start by that.
17188    new_path=`cmd //c echo $new_path`
17189
17190  input_path="$new_path"
17191  # Check if we need to convert this using DOS-style short mode. If the path
17192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17193  # take no chances and rewrite it.
17194  # Note: m4 eats our [], so we need to use [ and ] instead.
17195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17196  if test "x$has_forbidden_chars" != x; then
17197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17199  fi
17200
17201    # Output is in $new_path
17202
17203  windows_path="$new_path"
17204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17205    unix_path=`$CYGPATH -u "$windows_path"`
17206    new_path="$unix_path"
17207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17209    new_path="$unix_path"
17210  fi
17211
17212    # remove trailing .exe if any
17213    new_path="${new_path/%.exe/}"
17214
17215    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17216    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17217  fi
17218
17219    else
17220      # We're on a unix platform. Hooray! :)
17221      # First separate the path from the arguments. This will split at the first
17222      # space.
17223      complete="$FOUND_MAKE"
17224      path="${complete%% *}"
17225      tmp="$complete EOL"
17226      arguments="${tmp#* }"
17227
17228      # Cannot rely on the command "which" here since it doesn't always work.
17229      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17230      if test -z "$is_absolute_path"; then
17231        # Path to executable is not absolute. Find it.
17232        IFS_save="$IFS"
17233        IFS=:
17234        for p in $PATH; do
17235          if test -f "$p/$path" && test -x "$p/$path"; then
17236            new_path="$p/$path"
17237            break
17238          fi
17239        done
17240        IFS="$IFS_save"
17241      else
17242        # This is an absolute path, we can use it without further modifications.
17243        new_path="$path"
17244      fi
17245
17246      if test "x$new_path" = x; then
17247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17248$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17249        has_space=`$ECHO "$complete" | $GREP " "`
17250        if test "x$has_space" != x; then
17251          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17252$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17253        fi
17254        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17255      fi
17256    fi
17257
17258    # Now join together the path and the arguments once again
17259    if test "x$arguments" != xEOL; then
17260      new_complete="$new_path ${arguments% *}"
17261    else
17262      new_complete="$new_path"
17263    fi
17264
17265    if test "x$complete" != "x$new_complete"; then
17266      FOUND_MAKE="$new_complete"
17267      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17268$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17269    fi
17270  fi
17271
17272        fi
17273      fi
17274    fi
17275  fi
17276
17277
17278    if test "x$FOUND_MAKE" = x; then
17279      for ac_prog in make
17280do
17281  # Extract the first word of "$ac_prog", so it can be a program name with args.
17282set dummy $ac_prog; ac_word=$2
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17284$as_echo_n "checking for $ac_word... " >&6; }
17285if ${ac_cv_path_CHECK_MAKE+:} false; then :
17286  $as_echo_n "(cached) " >&6
17287else
17288  case $CHECK_MAKE in
17289  [\\/]* | ?:[\\/]*)
17290  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17291  ;;
17292  *)
17293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17294for as_dir in $PATH
17295do
17296  IFS=$as_save_IFS
17297  test -z "$as_dir" && as_dir=.
17298    for ac_exec_ext in '' $ac_executable_extensions; do
17299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17300    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17302    break 2
17303  fi
17304done
17305  done
17306IFS=$as_save_IFS
17307
17308  ;;
17309esac
17310fi
17311CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17312if test -n "$CHECK_MAKE"; then
17313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17314$as_echo "$CHECK_MAKE" >&6; }
17315else
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17317$as_echo "no" >&6; }
17318fi
17319
17320
17321  test -n "$CHECK_MAKE" && break
17322done
17323
17324
17325  MAKE_CANDIDATE=""$CHECK_MAKE""
17326  DESCRIPTION="make in PATH"
17327
17328  # On Cygwin, we require a newer version of make than on other platforms
17329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17330    MAKE_VERSION_EXPR="-e 4\."
17331    MAKE_REQUIRED_VERSION="4.0"
17332   else
17333    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17334    MAKE_REQUIRED_VERSION="3.81"
17335  fi
17336
17337  if test "x$MAKE_CANDIDATE" != x; then
17338    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17339$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17340    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17341    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17342    if test "x$IS_GNU_MAKE" = x; then
17343      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17344$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17345    else
17346      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17347      if test "x$IS_MODERN_MAKE" = x; then
17348        { $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
17349$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;}
17350      else
17351        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17352          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17353            MAKE_EXPECTED_ENV='cygwin'
17354          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17355            MAKE_EXPECTED_ENV='msys'
17356          else
17357            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17358          fi
17359          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17360          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17361        else
17362          # Not relevant for non-Windows
17363          IS_MAKE_CORRECT_ENV=true
17364        fi
17365        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17366          { $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
17367$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;}
17368        else
17369          FOUND_MAKE=$MAKE_CANDIDATE
17370
17371  # Only process if variable expands to non-empty
17372
17373  if test "x$FOUND_MAKE" != x; then
17374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17375
17376  # First separate the path from the arguments. This will split at the first
17377  # space.
17378  complete="$FOUND_MAKE"
17379  path="${complete%% *}"
17380  tmp="$complete EOL"
17381  arguments="${tmp#* }"
17382
17383  # Input might be given as Windows format, start by converting to
17384  # unix format.
17385  new_path=`$CYGPATH -u "$path"`
17386
17387  # Now try to locate executable using which
17388  new_path=`$WHICH "$new_path" 2> /dev/null`
17389  # bat and cmd files are not always considered executable in cygwin causing which
17390  # to not find them
17391  if test "x$new_path" = x \
17392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17394    new_path=`$CYGPATH -u "$path"`
17395  fi
17396  if test "x$new_path" = x; then
17397    # Oops. Which didn't find the executable.
17398    # The splitting of arguments from the executable at a space might have been incorrect,
17399    # since paths with space are more likely in Windows. Give it another try with the whole
17400    # argument.
17401    path="$complete"
17402    arguments="EOL"
17403    new_path=`$CYGPATH -u "$path"`
17404    new_path=`$WHICH "$new_path" 2> /dev/null`
17405    # bat and cmd files are not always considered executable in cygwin causing which
17406    # to not find them
17407    if test "x$new_path" = x \
17408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17410      new_path=`$CYGPATH -u "$path"`
17411    fi
17412    if test "x$new_path" = x; then
17413      # It's still not found. Now this is an unrecoverable error.
17414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17415$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17416      has_space=`$ECHO "$complete" | $GREP " "`
17417      if test "x$has_space" != x; then
17418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17420      fi
17421      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17422    fi
17423  fi
17424
17425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17428  # "foo.exe" is OK but "foo" is an error.
17429  #
17430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17431  # It is also a way to make sure we got the proper file name for the real test later on.
17432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17433  if test "x$test_shortpath" = x; then
17434    # Short path failed, file does not exist as specified.
17435    # Try adding .exe or .cmd
17436    if test -f "${new_path}.exe"; then
17437      input_to_shortpath="${new_path}.exe"
17438    elif test -f "${new_path}.cmd"; then
17439      input_to_shortpath="${new_path}.cmd"
17440    else
17441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17445      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17446    fi
17447  else
17448    input_to_shortpath="$new_path"
17449  fi
17450
17451  # Call helper function which possibly converts this using DOS-style short mode.
17452  # If so, the updated path is stored in $new_path.
17453  new_path="$input_to_shortpath"
17454
17455  input_path="$input_to_shortpath"
17456  # Check if we need to convert this using DOS-style short mode. If the path
17457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17458  # take no chances and rewrite it.
17459  # Note: m4 eats our [], so we need to use [ and ] instead.
17460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17461  if test "x$has_forbidden_chars" != x; then
17462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17466      # Going to short mode and back again did indeed matter. Since short mode is
17467      # case insensitive, let's make it lowercase to improve readability.
17468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17469      # Now convert it back to Unix-style (cygpath)
17470      input_path=`$CYGPATH -u "$shortmode_path"`
17471      new_path="$input_path"
17472    fi
17473  fi
17474
17475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17476  if test "x$test_cygdrive_prefix" = x; then
17477    # As a simple fix, exclude /usr/bin since it's not a real path.
17478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17480      # a path prefixed by /cygdrive for fixpath to work.
17481      new_path="$CYGWIN_ROOT_PATH$input_path"
17482    fi
17483  fi
17484
17485  # remove trailing .exe if any
17486  new_path="${new_path/%.exe/}"
17487
17488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17489
17490  # First separate the path from the arguments. This will split at the first
17491  # space.
17492  complete="$FOUND_MAKE"
17493  path="${complete%% *}"
17494  tmp="$complete EOL"
17495  arguments="${tmp#* }"
17496
17497  # Input might be given as Windows format, start by converting to
17498  # unix format.
17499  new_path="$path"
17500
17501  windows_path="$new_path"
17502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17503    unix_path=`$CYGPATH -u "$windows_path"`
17504    new_path="$unix_path"
17505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17507    new_path="$unix_path"
17508  fi
17509
17510
17511  # Now try to locate executable using which
17512  new_path=`$WHICH "$new_path" 2> /dev/null`
17513
17514  if test "x$new_path" = x; then
17515    # Oops. Which didn't find the executable.
17516    # The splitting of arguments from the executable at a space might have been incorrect,
17517    # since paths with space are more likely in Windows. Give it another try with the whole
17518    # argument.
17519    path="$complete"
17520    arguments="EOL"
17521    new_path="$path"
17522
17523  windows_path="$new_path"
17524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17525    unix_path=`$CYGPATH -u "$windows_path"`
17526    new_path="$unix_path"
17527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17529    new_path="$unix_path"
17530  fi
17531
17532
17533    new_path=`$WHICH "$new_path" 2> /dev/null`
17534    # bat and cmd files are not always considered executable in MSYS causing which
17535    # to not find them
17536    if test "x$new_path" = x \
17537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17539      new_path="$path"
17540
17541  windows_path="$new_path"
17542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17543    unix_path=`$CYGPATH -u "$windows_path"`
17544    new_path="$unix_path"
17545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17547    new_path="$unix_path"
17548  fi
17549
17550    fi
17551
17552    if test "x$new_path" = x; then
17553      # It's still not found. Now this is an unrecoverable error.
17554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17555$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17556      has_space=`$ECHO "$complete" | $GREP " "`
17557      if test "x$has_space" != x; then
17558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17560      fi
17561      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17562    fi
17563  fi
17564
17565  # Now new_path has a complete unix path to the binary
17566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17567    # Keep paths in /bin as-is, but remove trailing .exe if any
17568    new_path="${new_path/%.exe/}"
17569    # Do not save /bin paths to all_fixpath_prefixes!
17570  else
17571    # Not in mixed or Windows style, start by that.
17572    new_path=`cmd //c echo $new_path`
17573
17574  input_path="$new_path"
17575  # Check if we need to convert this using DOS-style short mode. If the path
17576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17577  # take no chances and rewrite it.
17578  # Note: m4 eats our [], so we need to use [ and ] instead.
17579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17580  if test "x$has_forbidden_chars" != x; then
17581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17583  fi
17584
17585    # Output is in $new_path
17586
17587  windows_path="$new_path"
17588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17589    unix_path=`$CYGPATH -u "$windows_path"`
17590    new_path="$unix_path"
17591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17593    new_path="$unix_path"
17594  fi
17595
17596    # remove trailing .exe if any
17597    new_path="${new_path/%.exe/}"
17598
17599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17601  fi
17602
17603    else
17604      # We're on a unix platform. Hooray! :)
17605      # First separate the path from the arguments. This will split at the first
17606      # space.
17607      complete="$FOUND_MAKE"
17608      path="${complete%% *}"
17609      tmp="$complete EOL"
17610      arguments="${tmp#* }"
17611
17612      # Cannot rely on the command "which" here since it doesn't always work.
17613      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17614      if test -z "$is_absolute_path"; then
17615        # Path to executable is not absolute. Find it.
17616        IFS_save="$IFS"
17617        IFS=:
17618        for p in $PATH; do
17619          if test -f "$p/$path" && test -x "$p/$path"; then
17620            new_path="$p/$path"
17621            break
17622          fi
17623        done
17624        IFS="$IFS_save"
17625      else
17626        # This is an absolute path, we can use it without further modifications.
17627        new_path="$path"
17628      fi
17629
17630      if test "x$new_path" = x; then
17631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17632$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17633        has_space=`$ECHO "$complete" | $GREP " "`
17634        if test "x$has_space" != x; then
17635          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17637        fi
17638        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17639      fi
17640    fi
17641
17642    # Now join together the path and the arguments once again
17643    if test "x$arguments" != xEOL; then
17644      new_complete="$new_path ${arguments% *}"
17645    else
17646      new_complete="$new_path"
17647    fi
17648
17649    if test "x$complete" != "x$new_complete"; then
17650      FOUND_MAKE="$new_complete"
17651      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17652$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17653    fi
17654  fi
17655
17656        fi
17657      fi
17658    fi
17659  fi
17660
17661    fi
17662
17663    if test "x$FOUND_MAKE" = x; then
17664      if test "x$TOOLCHAIN_PATH" != x; then
17665        # We have a toolchain path, check that as well before giving up.
17666        OLD_PATH=$PATH
17667        PATH=$TOOLCHAIN_PATH:$PATH
17668        for ac_prog in gmake
17669do
17670  # Extract the first word of "$ac_prog", so it can be a program name with args.
17671set dummy $ac_prog; ac_word=$2
17672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17673$as_echo_n "checking for $ac_word... " >&6; }
17674if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17675  $as_echo_n "(cached) " >&6
17676else
17677  case $CHECK_TOOLSDIR_GMAKE in
17678  [\\/]* | ?:[\\/]*)
17679  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17680  ;;
17681  *)
17682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17683for as_dir in $PATH
17684do
17685  IFS=$as_save_IFS
17686  test -z "$as_dir" && as_dir=.
17687    for ac_exec_ext in '' $ac_executable_extensions; do
17688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17689    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17691    break 2
17692  fi
17693done
17694  done
17695IFS=$as_save_IFS
17696
17697  ;;
17698esac
17699fi
17700CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17701if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17703$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17704else
17705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17706$as_echo "no" >&6; }
17707fi
17708
17709
17710  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17711done
17712
17713
17714  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17715  DESCRIPTION="gmake in tools-dir"
17716
17717  # On Cygwin, we require a newer version of make than on other platforms
17718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17719    MAKE_VERSION_EXPR="-e 4\."
17720    MAKE_REQUIRED_VERSION="4.0"
17721   else
17722    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17723    MAKE_REQUIRED_VERSION="3.81"
17724  fi
17725
17726  if test "x$MAKE_CANDIDATE" != x; then
17727    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17728$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17729    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17730    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17731    if test "x$IS_GNU_MAKE" = x; then
17732      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17733$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17734    else
17735      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17736      if test "x$IS_MODERN_MAKE" = x; then
17737        { $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
17738$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;}
17739      else
17740        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17741          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17742            MAKE_EXPECTED_ENV='cygwin'
17743          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17744            MAKE_EXPECTED_ENV='msys'
17745          else
17746            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17747          fi
17748          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17749          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17750        else
17751          # Not relevant for non-Windows
17752          IS_MAKE_CORRECT_ENV=true
17753        fi
17754        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17755          { $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
17756$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;}
17757        else
17758          FOUND_MAKE=$MAKE_CANDIDATE
17759
17760  # Only process if variable expands to non-empty
17761
17762  if test "x$FOUND_MAKE" != x; then
17763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17764
17765  # First separate the path from the arguments. This will split at the first
17766  # space.
17767  complete="$FOUND_MAKE"
17768  path="${complete%% *}"
17769  tmp="$complete EOL"
17770  arguments="${tmp#* }"
17771
17772  # Input might be given as Windows format, start by converting to
17773  # unix format.
17774  new_path=`$CYGPATH -u "$path"`
17775
17776  # Now try to locate executable using which
17777  new_path=`$WHICH "$new_path" 2> /dev/null`
17778  # bat and cmd files are not always considered executable in cygwin causing which
17779  # to not find them
17780  if test "x$new_path" = x \
17781      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17782      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17783    new_path=`$CYGPATH -u "$path"`
17784  fi
17785  if test "x$new_path" = x; then
17786    # Oops. Which didn't find the executable.
17787    # The splitting of arguments from the executable at a space might have been incorrect,
17788    # since paths with space are more likely in Windows. Give it another try with the whole
17789    # argument.
17790    path="$complete"
17791    arguments="EOL"
17792    new_path=`$CYGPATH -u "$path"`
17793    new_path=`$WHICH "$new_path" 2> /dev/null`
17794    # bat and cmd files are not always considered executable in cygwin causing which
17795    # to not find them
17796    if test "x$new_path" = x \
17797        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17798        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17799      new_path=`$CYGPATH -u "$path"`
17800    fi
17801    if test "x$new_path" = x; then
17802      # It's still not found. Now this is an unrecoverable error.
17803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17804$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17805      has_space=`$ECHO "$complete" | $GREP " "`
17806      if test "x$has_space" != x; then
17807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17809      fi
17810      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17811    fi
17812  fi
17813
17814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17817  # "foo.exe" is OK but "foo" is an error.
17818  #
17819  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17820  # It is also a way to make sure we got the proper file name for the real test later on.
17821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17822  if test "x$test_shortpath" = x; then
17823    # Short path failed, file does not exist as specified.
17824    # Try adding .exe or .cmd
17825    if test -f "${new_path}.exe"; then
17826      input_to_shortpath="${new_path}.exe"
17827    elif test -f "${new_path}.cmd"; then
17828      input_to_shortpath="${new_path}.cmd"
17829    else
17830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17832      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17833$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17834      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17835    fi
17836  else
17837    input_to_shortpath="$new_path"
17838  fi
17839
17840  # Call helper function which possibly converts this using DOS-style short mode.
17841  # If so, the updated path is stored in $new_path.
17842  new_path="$input_to_shortpath"
17843
17844  input_path="$input_to_shortpath"
17845  # Check if we need to convert this using DOS-style short mode. If the path
17846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17847  # take no chances and rewrite it.
17848  # Note: m4 eats our [], so we need to use [ and ] instead.
17849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17850  if test "x$has_forbidden_chars" != x; then
17851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17855      # Going to short mode and back again did indeed matter. Since short mode is
17856      # case insensitive, let's make it lowercase to improve readability.
17857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17858      # Now convert it back to Unix-style (cygpath)
17859      input_path=`$CYGPATH -u "$shortmode_path"`
17860      new_path="$input_path"
17861    fi
17862  fi
17863
17864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17865  if test "x$test_cygdrive_prefix" = x; then
17866    # As a simple fix, exclude /usr/bin since it's not a real path.
17867    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17869      # a path prefixed by /cygdrive for fixpath to work.
17870      new_path="$CYGWIN_ROOT_PATH$input_path"
17871    fi
17872  fi
17873
17874  # remove trailing .exe if any
17875  new_path="${new_path/%.exe/}"
17876
17877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17878
17879  # First separate the path from the arguments. This will split at the first
17880  # space.
17881  complete="$FOUND_MAKE"
17882  path="${complete%% *}"
17883  tmp="$complete EOL"
17884  arguments="${tmp#* }"
17885
17886  # Input might be given as Windows format, start by converting to
17887  # unix format.
17888  new_path="$path"
17889
17890  windows_path="$new_path"
17891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17892    unix_path=`$CYGPATH -u "$windows_path"`
17893    new_path="$unix_path"
17894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17896    new_path="$unix_path"
17897  fi
17898
17899
17900  # Now try to locate executable using which
17901  new_path=`$WHICH "$new_path" 2> /dev/null`
17902
17903  if test "x$new_path" = x; then
17904    # Oops. Which didn't find the executable.
17905    # The splitting of arguments from the executable at a space might have been incorrect,
17906    # since paths with space are more likely in Windows. Give it another try with the whole
17907    # argument.
17908    path="$complete"
17909    arguments="EOL"
17910    new_path="$path"
17911
17912  windows_path="$new_path"
17913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17914    unix_path=`$CYGPATH -u "$windows_path"`
17915    new_path="$unix_path"
17916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17918    new_path="$unix_path"
17919  fi
17920
17921
17922    new_path=`$WHICH "$new_path" 2> /dev/null`
17923    # bat and cmd files are not always considered executable in MSYS causing which
17924    # to not find them
17925    if test "x$new_path" = x \
17926        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17927        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17928      new_path="$path"
17929
17930  windows_path="$new_path"
17931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932    unix_path=`$CYGPATH -u "$windows_path"`
17933    new_path="$unix_path"
17934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17936    new_path="$unix_path"
17937  fi
17938
17939    fi
17940
17941    if test "x$new_path" = x; then
17942      # It's still not found. Now this is an unrecoverable error.
17943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17944$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17945      has_space=`$ECHO "$complete" | $GREP " "`
17946      if test "x$has_space" != x; then
17947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17949      fi
17950      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17951    fi
17952  fi
17953
17954  # Now new_path has a complete unix path to the binary
17955  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17956    # Keep paths in /bin as-is, but remove trailing .exe if any
17957    new_path="${new_path/%.exe/}"
17958    # Do not save /bin paths to all_fixpath_prefixes!
17959  else
17960    # Not in mixed or Windows style, start by that.
17961    new_path=`cmd //c echo $new_path`
17962
17963  input_path="$new_path"
17964  # Check if we need to convert this using DOS-style short mode. If the path
17965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17966  # take no chances and rewrite it.
17967  # Note: m4 eats our [], so we need to use [ and ] instead.
17968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17969  if test "x$has_forbidden_chars" != x; then
17970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17972  fi
17973
17974    # Output is in $new_path
17975
17976  windows_path="$new_path"
17977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17978    unix_path=`$CYGPATH -u "$windows_path"`
17979    new_path="$unix_path"
17980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17982    new_path="$unix_path"
17983  fi
17984
17985    # remove trailing .exe if any
17986    new_path="${new_path/%.exe/}"
17987
17988    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17989    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17990  fi
17991
17992    else
17993      # We're on a unix platform. Hooray! :)
17994      # First separate the path from the arguments. This will split at the first
17995      # space.
17996      complete="$FOUND_MAKE"
17997      path="${complete%% *}"
17998      tmp="$complete EOL"
17999      arguments="${tmp#* }"
18000
18001      # Cannot rely on the command "which" here since it doesn't always work.
18002      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18003      if test -z "$is_absolute_path"; then
18004        # Path to executable is not absolute. Find it.
18005        IFS_save="$IFS"
18006        IFS=:
18007        for p in $PATH; do
18008          if test -f "$p/$path" && test -x "$p/$path"; then
18009            new_path="$p/$path"
18010            break
18011          fi
18012        done
18013        IFS="$IFS_save"
18014      else
18015        # This is an absolute path, we can use it without further modifications.
18016        new_path="$path"
18017      fi
18018
18019      if test "x$new_path" = x; then
18020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18021$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18022        has_space=`$ECHO "$complete" | $GREP " "`
18023        if test "x$has_space" != x; then
18024          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18025$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18026        fi
18027        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18028      fi
18029    fi
18030
18031    # Now join together the path and the arguments once again
18032    if test "x$arguments" != xEOL; then
18033      new_complete="$new_path ${arguments% *}"
18034    else
18035      new_complete="$new_path"
18036    fi
18037
18038    if test "x$complete" != "x$new_complete"; then
18039      FOUND_MAKE="$new_complete"
18040      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18041$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18042    fi
18043  fi
18044
18045        fi
18046      fi
18047    fi
18048  fi
18049
18050        if test "x$FOUND_MAKE" = x; then
18051          for ac_prog in make
18052do
18053  # Extract the first word of "$ac_prog", so it can be a program name with args.
18054set dummy $ac_prog; ac_word=$2
18055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18056$as_echo_n "checking for $ac_word... " >&6; }
18057if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18058  $as_echo_n "(cached) " >&6
18059else
18060  case $CHECK_TOOLSDIR_MAKE in
18061  [\\/]* | ?:[\\/]*)
18062  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18063  ;;
18064  *)
18065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18066for as_dir in $PATH
18067do
18068  IFS=$as_save_IFS
18069  test -z "$as_dir" && as_dir=.
18070    for ac_exec_ext in '' $ac_executable_extensions; do
18071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18072    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18074    break 2
18075  fi
18076done
18077  done
18078IFS=$as_save_IFS
18079
18080  ;;
18081esac
18082fi
18083CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18084if test -n "$CHECK_TOOLSDIR_MAKE"; then
18085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18086$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18087else
18088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18089$as_echo "no" >&6; }
18090fi
18091
18092
18093  test -n "$CHECK_TOOLSDIR_MAKE" && break
18094done
18095
18096
18097  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18098  DESCRIPTION="make in tools-dir"
18099
18100  # On Cygwin, we require a newer version of make than on other platforms
18101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18102    MAKE_VERSION_EXPR="-e 4\."
18103    MAKE_REQUIRED_VERSION="4.0"
18104   else
18105    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18106    MAKE_REQUIRED_VERSION="3.81"
18107  fi
18108
18109  if test "x$MAKE_CANDIDATE" != x; then
18110    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18111$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18112    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18113    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18114    if test "x$IS_GNU_MAKE" = x; then
18115      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18116$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18117    else
18118      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18119      if test "x$IS_MODERN_MAKE" = x; then
18120        { $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
18121$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;}
18122      else
18123        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18124          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18125            MAKE_EXPECTED_ENV='cygwin'
18126          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18127            MAKE_EXPECTED_ENV='msys'
18128          else
18129            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18130          fi
18131          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18132          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18133        else
18134          # Not relevant for non-Windows
18135          IS_MAKE_CORRECT_ENV=true
18136        fi
18137        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18138          { $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
18139$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;}
18140        else
18141          FOUND_MAKE=$MAKE_CANDIDATE
18142
18143  # Only process if variable expands to non-empty
18144
18145  if test "x$FOUND_MAKE" != x; then
18146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18147
18148  # First separate the path from the arguments. This will split at the first
18149  # space.
18150  complete="$FOUND_MAKE"
18151  path="${complete%% *}"
18152  tmp="$complete EOL"
18153  arguments="${tmp#* }"
18154
18155  # Input might be given as Windows format, start by converting to
18156  # unix format.
18157  new_path=`$CYGPATH -u "$path"`
18158
18159  # Now try to locate executable using which
18160  new_path=`$WHICH "$new_path" 2> /dev/null`
18161  # bat and cmd files are not always considered executable in cygwin causing which
18162  # to not find them
18163  if test "x$new_path" = x \
18164      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18165      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18166    new_path=`$CYGPATH -u "$path"`
18167  fi
18168  if test "x$new_path" = x; then
18169    # Oops. Which didn't find the executable.
18170    # The splitting of arguments from the executable at a space might have been incorrect,
18171    # since paths with space are more likely in Windows. Give it another try with the whole
18172    # argument.
18173    path="$complete"
18174    arguments="EOL"
18175    new_path=`$CYGPATH -u "$path"`
18176    new_path=`$WHICH "$new_path" 2> /dev/null`
18177    # bat and cmd files are not always considered executable in cygwin causing which
18178    # to not find them
18179    if test "x$new_path" = x \
18180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18182      new_path=`$CYGPATH -u "$path"`
18183    fi
18184    if test "x$new_path" = x; then
18185      # It's still not found. Now this is an unrecoverable error.
18186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18187$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18188      has_space=`$ECHO "$complete" | $GREP " "`
18189      if test "x$has_space" != x; then
18190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18192      fi
18193      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18194    fi
18195  fi
18196
18197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18200  # "foo.exe" is OK but "foo" is an error.
18201  #
18202  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18203  # It is also a way to make sure we got the proper file name for the real test later on.
18204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18205  if test "x$test_shortpath" = x; then
18206    # Short path failed, file does not exist as specified.
18207    # Try adding .exe or .cmd
18208    if test -f "${new_path}.exe"; then
18209      input_to_shortpath="${new_path}.exe"
18210    elif test -f "${new_path}.cmd"; then
18211      input_to_shortpath="${new_path}.cmd"
18212    else
18213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18214$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18215      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18216$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18217      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18218    fi
18219  else
18220    input_to_shortpath="$new_path"
18221  fi
18222
18223  # Call helper function which possibly converts this using DOS-style short mode.
18224  # If so, the updated path is stored in $new_path.
18225  new_path="$input_to_shortpath"
18226
18227  input_path="$input_to_shortpath"
18228  # Check if we need to convert this using DOS-style short mode. If the path
18229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18230  # take no chances and rewrite it.
18231  # Note: m4 eats our [], so we need to use [ and ] instead.
18232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18233  if test "x$has_forbidden_chars" != x; then
18234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18238      # Going to short mode and back again did indeed matter. Since short mode is
18239      # case insensitive, let's make it lowercase to improve readability.
18240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18241      # Now convert it back to Unix-style (cygpath)
18242      input_path=`$CYGPATH -u "$shortmode_path"`
18243      new_path="$input_path"
18244    fi
18245  fi
18246
18247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18248  if test "x$test_cygdrive_prefix" = x; then
18249    # As a simple fix, exclude /usr/bin since it's not a real path.
18250    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18252      # a path prefixed by /cygdrive for fixpath to work.
18253      new_path="$CYGWIN_ROOT_PATH$input_path"
18254    fi
18255  fi
18256
18257  # remove trailing .exe if any
18258  new_path="${new_path/%.exe/}"
18259
18260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18261
18262  # First separate the path from the arguments. This will split at the first
18263  # space.
18264  complete="$FOUND_MAKE"
18265  path="${complete%% *}"
18266  tmp="$complete EOL"
18267  arguments="${tmp#* }"
18268
18269  # Input might be given as Windows format, start by converting to
18270  # unix format.
18271  new_path="$path"
18272
18273  windows_path="$new_path"
18274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18275    unix_path=`$CYGPATH -u "$windows_path"`
18276    new_path="$unix_path"
18277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18279    new_path="$unix_path"
18280  fi
18281
18282
18283  # Now try to locate executable using which
18284  new_path=`$WHICH "$new_path" 2> /dev/null`
18285
18286  if test "x$new_path" = x; then
18287    # Oops. Which didn't find the executable.
18288    # The splitting of arguments from the executable at a space might have been incorrect,
18289    # since paths with space are more likely in Windows. Give it another try with the whole
18290    # argument.
18291    path="$complete"
18292    arguments="EOL"
18293    new_path="$path"
18294
18295  windows_path="$new_path"
18296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18297    unix_path=`$CYGPATH -u "$windows_path"`
18298    new_path="$unix_path"
18299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18301    new_path="$unix_path"
18302  fi
18303
18304
18305    new_path=`$WHICH "$new_path" 2> /dev/null`
18306    # bat and cmd files are not always considered executable in MSYS causing which
18307    # to not find them
18308    if test "x$new_path" = x \
18309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18311      new_path="$path"
18312
18313  windows_path="$new_path"
18314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18315    unix_path=`$CYGPATH -u "$windows_path"`
18316    new_path="$unix_path"
18317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18319    new_path="$unix_path"
18320  fi
18321
18322    fi
18323
18324    if test "x$new_path" = x; then
18325      # It's still not found. Now this is an unrecoverable error.
18326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18327$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18328      has_space=`$ECHO "$complete" | $GREP " "`
18329      if test "x$has_space" != x; then
18330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18332      fi
18333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18334    fi
18335  fi
18336
18337  # Now new_path has a complete unix path to the binary
18338  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18339    # Keep paths in /bin as-is, but remove trailing .exe if any
18340    new_path="${new_path/%.exe/}"
18341    # Do not save /bin paths to all_fixpath_prefixes!
18342  else
18343    # Not in mixed or Windows style, start by that.
18344    new_path=`cmd //c echo $new_path`
18345
18346  input_path="$new_path"
18347  # Check if we need to convert this using DOS-style short mode. If the path
18348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18349  # take no chances and rewrite it.
18350  # Note: m4 eats our [], so we need to use [ and ] instead.
18351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18352  if test "x$has_forbidden_chars" != x; then
18353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18355  fi
18356
18357    # Output is in $new_path
18358
18359  windows_path="$new_path"
18360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18361    unix_path=`$CYGPATH -u "$windows_path"`
18362    new_path="$unix_path"
18363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18365    new_path="$unix_path"
18366  fi
18367
18368    # remove trailing .exe if any
18369    new_path="${new_path/%.exe/}"
18370
18371    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18372    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18373  fi
18374
18375    else
18376      # We're on a unix platform. Hooray! :)
18377      # First separate the path from the arguments. This will split at the first
18378      # space.
18379      complete="$FOUND_MAKE"
18380      path="${complete%% *}"
18381      tmp="$complete EOL"
18382      arguments="${tmp#* }"
18383
18384      # Cannot rely on the command "which" here since it doesn't always work.
18385      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18386      if test -z "$is_absolute_path"; then
18387        # Path to executable is not absolute. Find it.
18388        IFS_save="$IFS"
18389        IFS=:
18390        for p in $PATH; do
18391          if test -f "$p/$path" && test -x "$p/$path"; then
18392            new_path="$p/$path"
18393            break
18394          fi
18395        done
18396        IFS="$IFS_save"
18397      else
18398        # This is an absolute path, we can use it without further modifications.
18399        new_path="$path"
18400      fi
18401
18402      if test "x$new_path" = x; then
18403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18404$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18405        has_space=`$ECHO "$complete" | $GREP " "`
18406        if test "x$has_space" != x; then
18407          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18408$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18409        fi
18410        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18411      fi
18412    fi
18413
18414    # Now join together the path and the arguments once again
18415    if test "x$arguments" != xEOL; then
18416      new_complete="$new_path ${arguments% *}"
18417    else
18418      new_complete="$new_path"
18419    fi
18420
18421    if test "x$complete" != "x$new_complete"; then
18422      FOUND_MAKE="$new_complete"
18423      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18424$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18425    fi
18426  fi
18427
18428        fi
18429      fi
18430    fi
18431  fi
18432
18433        fi
18434        PATH=$OLD_PATH
18435      fi
18436    fi
18437
18438    if test "x$FOUND_MAKE" = x; then
18439      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
18440    fi
18441
18442  else
18443    # The variable is set, but is it from the command line or the environment?
18444
18445    # Try to remove the string !MAKE! from our list.
18446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18448      # If it failed, the variable was not from the command line. Ignore it,
18449      # but warn the user (except for BASH, which is always set by the calling BASH).
18450      if test "xMAKE" != xBASH; then
18451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18452$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18453      fi
18454      # Try to locate tool using the code snippet
18455
18456    # Try our hardest to locate a correct version of GNU make
18457    for ac_prog in gmake
18458do
18459  # Extract the first word of "$ac_prog", so it can be a program name with args.
18460set dummy $ac_prog; ac_word=$2
18461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18462$as_echo_n "checking for $ac_word... " >&6; }
18463if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18464  $as_echo_n "(cached) " >&6
18465else
18466  case $CHECK_GMAKE in
18467  [\\/]* | ?:[\\/]*)
18468  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18469  ;;
18470  *)
18471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18472for as_dir in $PATH
18473do
18474  IFS=$as_save_IFS
18475  test -z "$as_dir" && as_dir=.
18476    for ac_exec_ext in '' $ac_executable_extensions; do
18477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18478    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18480    break 2
18481  fi
18482done
18483  done
18484IFS=$as_save_IFS
18485
18486  ;;
18487esac
18488fi
18489CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18490if test -n "$CHECK_GMAKE"; then
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18492$as_echo "$CHECK_GMAKE" >&6; }
18493else
18494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18495$as_echo "no" >&6; }
18496fi
18497
18498
18499  test -n "$CHECK_GMAKE" && break
18500done
18501
18502
18503  MAKE_CANDIDATE=""$CHECK_GMAKE""
18504  DESCRIPTION="gmake in PATH"
18505
18506  # On Cygwin, we require a newer version of make than on other platforms
18507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18508    MAKE_VERSION_EXPR="-e 4\."
18509    MAKE_REQUIRED_VERSION="4.0"
18510   else
18511    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18512    MAKE_REQUIRED_VERSION="3.81"
18513  fi
18514
18515  if test "x$MAKE_CANDIDATE" != x; then
18516    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18517$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18518    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18519    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18520    if test "x$IS_GNU_MAKE" = x; then
18521      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18522$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18523    else
18524      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18525      if test "x$IS_MODERN_MAKE" = x; then
18526        { $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
18527$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;}
18528      else
18529        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18530          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18531            MAKE_EXPECTED_ENV='cygwin'
18532          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18533            MAKE_EXPECTED_ENV='msys'
18534          else
18535            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18536          fi
18537          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18538          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18539        else
18540          # Not relevant for non-Windows
18541          IS_MAKE_CORRECT_ENV=true
18542        fi
18543        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18544          { $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
18545$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;}
18546        else
18547          FOUND_MAKE=$MAKE_CANDIDATE
18548
18549  # Only process if variable expands to non-empty
18550
18551  if test "x$FOUND_MAKE" != x; then
18552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18553
18554  # First separate the path from the arguments. This will split at the first
18555  # space.
18556  complete="$FOUND_MAKE"
18557  path="${complete%% *}"
18558  tmp="$complete EOL"
18559  arguments="${tmp#* }"
18560
18561  # Input might be given as Windows format, start by converting to
18562  # unix format.
18563  new_path=`$CYGPATH -u "$path"`
18564
18565  # Now try to locate executable using which
18566  new_path=`$WHICH "$new_path" 2> /dev/null`
18567  # bat and cmd files are not always considered executable in cygwin causing which
18568  # to not find them
18569  if test "x$new_path" = x \
18570      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18571      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18572    new_path=`$CYGPATH -u "$path"`
18573  fi
18574  if test "x$new_path" = x; then
18575    # Oops. Which didn't find the executable.
18576    # The splitting of arguments from the executable at a space might have been incorrect,
18577    # since paths with space are more likely in Windows. Give it another try with the whole
18578    # argument.
18579    path="$complete"
18580    arguments="EOL"
18581    new_path=`$CYGPATH -u "$path"`
18582    new_path=`$WHICH "$new_path" 2> /dev/null`
18583    # bat and cmd files are not always considered executable in cygwin causing which
18584    # to not find them
18585    if test "x$new_path" = x \
18586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18588      new_path=`$CYGPATH -u "$path"`
18589    fi
18590    if test "x$new_path" = x; then
18591      # It's still not found. Now this is an unrecoverable error.
18592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18594      has_space=`$ECHO "$complete" | $GREP " "`
18595      if test "x$has_space" != x; then
18596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18598      fi
18599      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18600    fi
18601  fi
18602
18603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18606  # "foo.exe" is OK but "foo" is an error.
18607  #
18608  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18609  # It is also a way to make sure we got the proper file name for the real test later on.
18610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18611  if test "x$test_shortpath" = x; then
18612    # Short path failed, file does not exist as specified.
18613    # Try adding .exe or .cmd
18614    if test -f "${new_path}.exe"; then
18615      input_to_shortpath="${new_path}.exe"
18616    elif test -f "${new_path}.cmd"; then
18617      input_to_shortpath="${new_path}.cmd"
18618    else
18619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18623      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18624    fi
18625  else
18626    input_to_shortpath="$new_path"
18627  fi
18628
18629  # Call helper function which possibly converts this using DOS-style short mode.
18630  # If so, the updated path is stored in $new_path.
18631  new_path="$input_to_shortpath"
18632
18633  input_path="$input_to_shortpath"
18634  # Check if we need to convert this using DOS-style short mode. If the path
18635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18636  # take no chances and rewrite it.
18637  # Note: m4 eats our [], so we need to use [ and ] instead.
18638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18639  if test "x$has_forbidden_chars" != x; then
18640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18644      # Going to short mode and back again did indeed matter. Since short mode is
18645      # case insensitive, let's make it lowercase to improve readability.
18646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18647      # Now convert it back to Unix-style (cygpath)
18648      input_path=`$CYGPATH -u "$shortmode_path"`
18649      new_path="$input_path"
18650    fi
18651  fi
18652
18653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18654  if test "x$test_cygdrive_prefix" = x; then
18655    # As a simple fix, exclude /usr/bin since it's not a real path.
18656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18658      # a path prefixed by /cygdrive for fixpath to work.
18659      new_path="$CYGWIN_ROOT_PATH$input_path"
18660    fi
18661  fi
18662
18663  # remove trailing .exe if any
18664  new_path="${new_path/%.exe/}"
18665
18666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18667
18668  # First separate the path from the arguments. This will split at the first
18669  # space.
18670  complete="$FOUND_MAKE"
18671  path="${complete%% *}"
18672  tmp="$complete EOL"
18673  arguments="${tmp#* }"
18674
18675  # Input might be given as Windows format, start by converting to
18676  # unix format.
18677  new_path="$path"
18678
18679  windows_path="$new_path"
18680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18681    unix_path=`$CYGPATH -u "$windows_path"`
18682    new_path="$unix_path"
18683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18685    new_path="$unix_path"
18686  fi
18687
18688
18689  # Now try to locate executable using which
18690  new_path=`$WHICH "$new_path" 2> /dev/null`
18691
18692  if test "x$new_path" = x; then
18693    # Oops. Which didn't find the executable.
18694    # The splitting of arguments from the executable at a space might have been incorrect,
18695    # since paths with space are more likely in Windows. Give it another try with the whole
18696    # argument.
18697    path="$complete"
18698    arguments="EOL"
18699    new_path="$path"
18700
18701  windows_path="$new_path"
18702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18703    unix_path=`$CYGPATH -u "$windows_path"`
18704    new_path="$unix_path"
18705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18707    new_path="$unix_path"
18708  fi
18709
18710
18711    new_path=`$WHICH "$new_path" 2> /dev/null`
18712    # bat and cmd files are not always considered executable in MSYS causing which
18713    # to not find them
18714    if test "x$new_path" = x \
18715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18717      new_path="$path"
18718
18719  windows_path="$new_path"
18720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18721    unix_path=`$CYGPATH -u "$windows_path"`
18722    new_path="$unix_path"
18723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18725    new_path="$unix_path"
18726  fi
18727
18728    fi
18729
18730    if test "x$new_path" = x; then
18731      # It's still not found. Now this is an unrecoverable error.
18732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18733$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18734      has_space=`$ECHO "$complete" | $GREP " "`
18735      if test "x$has_space" != x; then
18736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18738      fi
18739      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18740    fi
18741  fi
18742
18743  # Now new_path has a complete unix path to the binary
18744  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18745    # Keep paths in /bin as-is, but remove trailing .exe if any
18746    new_path="${new_path/%.exe/}"
18747    # Do not save /bin paths to all_fixpath_prefixes!
18748  else
18749    # Not in mixed or Windows style, start by that.
18750    new_path=`cmd //c echo $new_path`
18751
18752  input_path="$new_path"
18753  # Check if we need to convert this using DOS-style short mode. If the path
18754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18755  # take no chances and rewrite it.
18756  # Note: m4 eats our [], so we need to use [ and ] instead.
18757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18758  if test "x$has_forbidden_chars" != x; then
18759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18761  fi
18762
18763    # Output is in $new_path
18764
18765  windows_path="$new_path"
18766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18767    unix_path=`$CYGPATH -u "$windows_path"`
18768    new_path="$unix_path"
18769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18771    new_path="$unix_path"
18772  fi
18773
18774    # remove trailing .exe if any
18775    new_path="${new_path/%.exe/}"
18776
18777    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18778    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18779  fi
18780
18781    else
18782      # We're on a unix platform. Hooray! :)
18783      # First separate the path from the arguments. This will split at the first
18784      # space.
18785      complete="$FOUND_MAKE"
18786      path="${complete%% *}"
18787      tmp="$complete EOL"
18788      arguments="${tmp#* }"
18789
18790      # Cannot rely on the command "which" here since it doesn't always work.
18791      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18792      if test -z "$is_absolute_path"; then
18793        # Path to executable is not absolute. Find it.
18794        IFS_save="$IFS"
18795        IFS=:
18796        for p in $PATH; do
18797          if test -f "$p/$path" && test -x "$p/$path"; then
18798            new_path="$p/$path"
18799            break
18800          fi
18801        done
18802        IFS="$IFS_save"
18803      else
18804        # This is an absolute path, we can use it without further modifications.
18805        new_path="$path"
18806      fi
18807
18808      if test "x$new_path" = x; then
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18810$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18811        has_space=`$ECHO "$complete" | $GREP " "`
18812        if test "x$has_space" != x; then
18813          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18814$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18815        fi
18816        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18817      fi
18818    fi
18819
18820    # Now join together the path and the arguments once again
18821    if test "x$arguments" != xEOL; then
18822      new_complete="$new_path ${arguments% *}"
18823    else
18824      new_complete="$new_path"
18825    fi
18826
18827    if test "x$complete" != "x$new_complete"; then
18828      FOUND_MAKE="$new_complete"
18829      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18830$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18831    fi
18832  fi
18833
18834        fi
18835      fi
18836    fi
18837  fi
18838
18839
18840    if test "x$FOUND_MAKE" = x; then
18841      for ac_prog in make
18842do
18843  # Extract the first word of "$ac_prog", so it can be a program name with args.
18844set dummy $ac_prog; ac_word=$2
18845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18846$as_echo_n "checking for $ac_word... " >&6; }
18847if ${ac_cv_path_CHECK_MAKE+:} false; then :
18848  $as_echo_n "(cached) " >&6
18849else
18850  case $CHECK_MAKE in
18851  [\\/]* | ?:[\\/]*)
18852  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18853  ;;
18854  *)
18855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18856for as_dir in $PATH
18857do
18858  IFS=$as_save_IFS
18859  test -z "$as_dir" && as_dir=.
18860    for ac_exec_ext in '' $ac_executable_extensions; do
18861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18862    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18864    break 2
18865  fi
18866done
18867  done
18868IFS=$as_save_IFS
18869
18870  ;;
18871esac
18872fi
18873CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18874if test -n "$CHECK_MAKE"; then
18875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18876$as_echo "$CHECK_MAKE" >&6; }
18877else
18878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18879$as_echo "no" >&6; }
18880fi
18881
18882
18883  test -n "$CHECK_MAKE" && break
18884done
18885
18886
18887  MAKE_CANDIDATE=""$CHECK_MAKE""
18888  DESCRIPTION="make in PATH"
18889
18890  # On Cygwin, we require a newer version of make than on other platforms
18891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18892    MAKE_VERSION_EXPR="-e 4\."
18893    MAKE_REQUIRED_VERSION="4.0"
18894   else
18895    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18896    MAKE_REQUIRED_VERSION="3.81"
18897  fi
18898
18899  if test "x$MAKE_CANDIDATE" != x; then
18900    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18901$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18902    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18903    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18904    if test "x$IS_GNU_MAKE" = x; then
18905      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18906$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18907    else
18908      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18909      if test "x$IS_MODERN_MAKE" = x; then
18910        { $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
18911$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;}
18912      else
18913        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18914          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18915            MAKE_EXPECTED_ENV='cygwin'
18916          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18917            MAKE_EXPECTED_ENV='msys'
18918          else
18919            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18920          fi
18921          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18922          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18923        else
18924          # Not relevant for non-Windows
18925          IS_MAKE_CORRECT_ENV=true
18926        fi
18927        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18928          { $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
18929$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;}
18930        else
18931          FOUND_MAKE=$MAKE_CANDIDATE
18932
18933  # Only process if variable expands to non-empty
18934
18935  if test "x$FOUND_MAKE" != x; then
18936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18937
18938  # First separate the path from the arguments. This will split at the first
18939  # space.
18940  complete="$FOUND_MAKE"
18941  path="${complete%% *}"
18942  tmp="$complete EOL"
18943  arguments="${tmp#* }"
18944
18945  # Input might be given as Windows format, start by converting to
18946  # unix format.
18947  new_path=`$CYGPATH -u "$path"`
18948
18949  # Now try to locate executable using which
18950  new_path=`$WHICH "$new_path" 2> /dev/null`
18951  # bat and cmd files are not always considered executable in cygwin causing which
18952  # to not find them
18953  if test "x$new_path" = x \
18954      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18955      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18956    new_path=`$CYGPATH -u "$path"`
18957  fi
18958  if test "x$new_path" = x; then
18959    # Oops. Which didn't find the executable.
18960    # The splitting of arguments from the executable at a space might have been incorrect,
18961    # since paths with space are more likely in Windows. Give it another try with the whole
18962    # argument.
18963    path="$complete"
18964    arguments="EOL"
18965    new_path=`$CYGPATH -u "$path"`
18966    new_path=`$WHICH "$new_path" 2> /dev/null`
18967    # bat and cmd files are not always considered executable in cygwin causing which
18968    # to not find them
18969    if test "x$new_path" = x \
18970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18972      new_path=`$CYGPATH -u "$path"`
18973    fi
18974    if test "x$new_path" = x; then
18975      # It's still not found. Now this is an unrecoverable error.
18976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18978      has_space=`$ECHO "$complete" | $GREP " "`
18979      if test "x$has_space" != x; then
18980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18982      fi
18983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18984    fi
18985  fi
18986
18987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18990  # "foo.exe" is OK but "foo" is an error.
18991  #
18992  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18993  # It is also a way to make sure we got the proper file name for the real test later on.
18994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18995  if test "x$test_shortpath" = x; then
18996    # Short path failed, file does not exist as specified.
18997    # Try adding .exe or .cmd
18998    if test -f "${new_path}.exe"; then
18999      input_to_shortpath="${new_path}.exe"
19000    elif test -f "${new_path}.cmd"; then
19001      input_to_shortpath="${new_path}.cmd"
19002    else
19003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19005      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19006$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19007      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19008    fi
19009  else
19010    input_to_shortpath="$new_path"
19011  fi
19012
19013  # Call helper function which possibly converts this using DOS-style short mode.
19014  # If so, the updated path is stored in $new_path.
19015  new_path="$input_to_shortpath"
19016
19017  input_path="$input_to_shortpath"
19018  # Check if we need to convert this using DOS-style short mode. If the path
19019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19020  # take no chances and rewrite it.
19021  # Note: m4 eats our [], so we need to use [ and ] instead.
19022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19023  if test "x$has_forbidden_chars" != x; then
19024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19028      # Going to short mode and back again did indeed matter. Since short mode is
19029      # case insensitive, let's make it lowercase to improve readability.
19030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19031      # Now convert it back to Unix-style (cygpath)
19032      input_path=`$CYGPATH -u "$shortmode_path"`
19033      new_path="$input_path"
19034    fi
19035  fi
19036
19037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19038  if test "x$test_cygdrive_prefix" = x; then
19039    # As a simple fix, exclude /usr/bin since it's not a real path.
19040    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19042      # a path prefixed by /cygdrive for fixpath to work.
19043      new_path="$CYGWIN_ROOT_PATH$input_path"
19044    fi
19045  fi
19046
19047  # remove trailing .exe if any
19048  new_path="${new_path/%.exe/}"
19049
19050    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19051
19052  # First separate the path from the arguments. This will split at the first
19053  # space.
19054  complete="$FOUND_MAKE"
19055  path="${complete%% *}"
19056  tmp="$complete EOL"
19057  arguments="${tmp#* }"
19058
19059  # Input might be given as Windows format, start by converting to
19060  # unix format.
19061  new_path="$path"
19062
19063  windows_path="$new_path"
19064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19065    unix_path=`$CYGPATH -u "$windows_path"`
19066    new_path="$unix_path"
19067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19069    new_path="$unix_path"
19070  fi
19071
19072
19073  # Now try to locate executable using which
19074  new_path=`$WHICH "$new_path" 2> /dev/null`
19075
19076  if test "x$new_path" = x; then
19077    # Oops. Which didn't find the executable.
19078    # The splitting of arguments from the executable at a space might have been incorrect,
19079    # since paths with space are more likely in Windows. Give it another try with the whole
19080    # argument.
19081    path="$complete"
19082    arguments="EOL"
19083    new_path="$path"
19084
19085  windows_path="$new_path"
19086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19087    unix_path=`$CYGPATH -u "$windows_path"`
19088    new_path="$unix_path"
19089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19091    new_path="$unix_path"
19092  fi
19093
19094
19095    new_path=`$WHICH "$new_path" 2> /dev/null`
19096    # bat and cmd files are not always considered executable in MSYS causing which
19097    # to not find them
19098    if test "x$new_path" = x \
19099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19101      new_path="$path"
19102
19103  windows_path="$new_path"
19104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19105    unix_path=`$CYGPATH -u "$windows_path"`
19106    new_path="$unix_path"
19107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19109    new_path="$unix_path"
19110  fi
19111
19112    fi
19113
19114    if test "x$new_path" = x; then
19115      # It's still not found. Now this is an unrecoverable error.
19116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19118      has_space=`$ECHO "$complete" | $GREP " "`
19119      if test "x$has_space" != x; then
19120        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19121$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19122      fi
19123      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19124    fi
19125  fi
19126
19127  # Now new_path has a complete unix path to the binary
19128  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19129    # Keep paths in /bin as-is, but remove trailing .exe if any
19130    new_path="${new_path/%.exe/}"
19131    # Do not save /bin paths to all_fixpath_prefixes!
19132  else
19133    # Not in mixed or Windows style, start by that.
19134    new_path=`cmd //c echo $new_path`
19135
19136  input_path="$new_path"
19137  # Check if we need to convert this using DOS-style short mode. If the path
19138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19139  # take no chances and rewrite it.
19140  # Note: m4 eats our [], so we need to use [ and ] instead.
19141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19142  if test "x$has_forbidden_chars" != x; then
19143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19145  fi
19146
19147    # Output is in $new_path
19148
19149  windows_path="$new_path"
19150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19151    unix_path=`$CYGPATH -u "$windows_path"`
19152    new_path="$unix_path"
19153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19155    new_path="$unix_path"
19156  fi
19157
19158    # remove trailing .exe if any
19159    new_path="${new_path/%.exe/}"
19160
19161    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19162    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19163  fi
19164
19165    else
19166      # We're on a unix platform. Hooray! :)
19167      # First separate the path from the arguments. This will split at the first
19168      # space.
19169      complete="$FOUND_MAKE"
19170      path="${complete%% *}"
19171      tmp="$complete EOL"
19172      arguments="${tmp#* }"
19173
19174      # Cannot rely on the command "which" here since it doesn't always work.
19175      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19176      if test -z "$is_absolute_path"; then
19177        # Path to executable is not absolute. Find it.
19178        IFS_save="$IFS"
19179        IFS=:
19180        for p in $PATH; do
19181          if test -f "$p/$path" && test -x "$p/$path"; then
19182            new_path="$p/$path"
19183            break
19184          fi
19185        done
19186        IFS="$IFS_save"
19187      else
19188        # This is an absolute path, we can use it without further modifications.
19189        new_path="$path"
19190      fi
19191
19192      if test "x$new_path" = x; then
19193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19194$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19195        has_space=`$ECHO "$complete" | $GREP " "`
19196        if test "x$has_space" != x; then
19197          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19198$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19199        fi
19200        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19201      fi
19202    fi
19203
19204    # Now join together the path and the arguments once again
19205    if test "x$arguments" != xEOL; then
19206      new_complete="$new_path ${arguments% *}"
19207    else
19208      new_complete="$new_path"
19209    fi
19210
19211    if test "x$complete" != "x$new_complete"; then
19212      FOUND_MAKE="$new_complete"
19213      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19214$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19215    fi
19216  fi
19217
19218        fi
19219      fi
19220    fi
19221  fi
19222
19223    fi
19224
19225    if test "x$FOUND_MAKE" = x; then
19226      if test "x$TOOLCHAIN_PATH" != x; then
19227        # We have a toolchain path, check that as well before giving up.
19228        OLD_PATH=$PATH
19229        PATH=$TOOLCHAIN_PATH:$PATH
19230        for ac_prog in gmake
19231do
19232  # Extract the first word of "$ac_prog", so it can be a program name with args.
19233set dummy $ac_prog; ac_word=$2
19234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19235$as_echo_n "checking for $ac_word... " >&6; }
19236if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19237  $as_echo_n "(cached) " >&6
19238else
19239  case $CHECK_TOOLSDIR_GMAKE in
19240  [\\/]* | ?:[\\/]*)
19241  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19242  ;;
19243  *)
19244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19245for as_dir in $PATH
19246do
19247  IFS=$as_save_IFS
19248  test -z "$as_dir" && as_dir=.
19249    for ac_exec_ext in '' $ac_executable_extensions; do
19250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19251    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19253    break 2
19254  fi
19255done
19256  done
19257IFS=$as_save_IFS
19258
19259  ;;
19260esac
19261fi
19262CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19263if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19265$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19266else
19267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19268$as_echo "no" >&6; }
19269fi
19270
19271
19272  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19273done
19274
19275
19276  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19277  DESCRIPTION="gmake in tools-dir"
19278
19279  # On Cygwin, we require a newer version of make than on other platforms
19280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19281    MAKE_VERSION_EXPR="-e 4\."
19282    MAKE_REQUIRED_VERSION="4.0"
19283   else
19284    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19285    MAKE_REQUIRED_VERSION="3.81"
19286  fi
19287
19288  if test "x$MAKE_CANDIDATE" != x; then
19289    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19290$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19291    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19292    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19293    if test "x$IS_GNU_MAKE" = x; then
19294      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19295$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19296    else
19297      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19298      if test "x$IS_MODERN_MAKE" = x; then
19299        { $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
19300$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;}
19301      else
19302        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19303          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19304            MAKE_EXPECTED_ENV='cygwin'
19305          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19306            MAKE_EXPECTED_ENV='msys'
19307          else
19308            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19309          fi
19310          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19311          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19312        else
19313          # Not relevant for non-Windows
19314          IS_MAKE_CORRECT_ENV=true
19315        fi
19316        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19317          { $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
19318$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;}
19319        else
19320          FOUND_MAKE=$MAKE_CANDIDATE
19321
19322  # Only process if variable expands to non-empty
19323
19324  if test "x$FOUND_MAKE" != x; then
19325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19326
19327  # First separate the path from the arguments. This will split at the first
19328  # space.
19329  complete="$FOUND_MAKE"
19330  path="${complete%% *}"
19331  tmp="$complete EOL"
19332  arguments="${tmp#* }"
19333
19334  # Input might be given as Windows format, start by converting to
19335  # unix format.
19336  new_path=`$CYGPATH -u "$path"`
19337
19338  # Now try to locate executable using which
19339  new_path=`$WHICH "$new_path" 2> /dev/null`
19340  # bat and cmd files are not always considered executable in cygwin causing which
19341  # to not find them
19342  if test "x$new_path" = x \
19343      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19344      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19345    new_path=`$CYGPATH -u "$path"`
19346  fi
19347  if test "x$new_path" = x; then
19348    # Oops. Which didn't find the executable.
19349    # The splitting of arguments from the executable at a space might have been incorrect,
19350    # since paths with space are more likely in Windows. Give it another try with the whole
19351    # argument.
19352    path="$complete"
19353    arguments="EOL"
19354    new_path=`$CYGPATH -u "$path"`
19355    new_path=`$WHICH "$new_path" 2> /dev/null`
19356    # bat and cmd files are not always considered executable in cygwin causing which
19357    # to not find them
19358    if test "x$new_path" = x \
19359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19361      new_path=`$CYGPATH -u "$path"`
19362    fi
19363    if test "x$new_path" = x; then
19364      # It's still not found. Now this is an unrecoverable error.
19365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19366$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19367      has_space=`$ECHO "$complete" | $GREP " "`
19368      if test "x$has_space" != x; then
19369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19371      fi
19372      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19373    fi
19374  fi
19375
19376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19379  # "foo.exe" is OK but "foo" is an error.
19380  #
19381  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19382  # It is also a way to make sure we got the proper file name for the real test later on.
19383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19384  if test "x$test_shortpath" = x; then
19385    # Short path failed, file does not exist as specified.
19386    # Try adding .exe or .cmd
19387    if test -f "${new_path}.exe"; then
19388      input_to_shortpath="${new_path}.exe"
19389    elif test -f "${new_path}.cmd"; then
19390      input_to_shortpath="${new_path}.cmd"
19391    else
19392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19394      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19395$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19396      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19397    fi
19398  else
19399    input_to_shortpath="$new_path"
19400  fi
19401
19402  # Call helper function which possibly converts this using DOS-style short mode.
19403  # If so, the updated path is stored in $new_path.
19404  new_path="$input_to_shortpath"
19405
19406  input_path="$input_to_shortpath"
19407  # Check if we need to convert this using DOS-style short mode. If the path
19408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19409  # take no chances and rewrite it.
19410  # Note: m4 eats our [], so we need to use [ and ] instead.
19411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19412  if test "x$has_forbidden_chars" != x; then
19413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19417      # Going to short mode and back again did indeed matter. Since short mode is
19418      # case insensitive, let's make it lowercase to improve readability.
19419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19420      # Now convert it back to Unix-style (cygpath)
19421      input_path=`$CYGPATH -u "$shortmode_path"`
19422      new_path="$input_path"
19423    fi
19424  fi
19425
19426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19427  if test "x$test_cygdrive_prefix" = x; then
19428    # As a simple fix, exclude /usr/bin since it's not a real path.
19429    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19431      # a path prefixed by /cygdrive for fixpath to work.
19432      new_path="$CYGWIN_ROOT_PATH$input_path"
19433    fi
19434  fi
19435
19436  # remove trailing .exe if any
19437  new_path="${new_path/%.exe/}"
19438
19439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19440
19441  # First separate the path from the arguments. This will split at the first
19442  # space.
19443  complete="$FOUND_MAKE"
19444  path="${complete%% *}"
19445  tmp="$complete EOL"
19446  arguments="${tmp#* }"
19447
19448  # Input might be given as Windows format, start by converting to
19449  # unix format.
19450  new_path="$path"
19451
19452  windows_path="$new_path"
19453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19454    unix_path=`$CYGPATH -u "$windows_path"`
19455    new_path="$unix_path"
19456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19458    new_path="$unix_path"
19459  fi
19460
19461
19462  # Now try to locate executable using which
19463  new_path=`$WHICH "$new_path" 2> /dev/null`
19464
19465  if test "x$new_path" = x; then
19466    # Oops. Which didn't find the executable.
19467    # The splitting of arguments from the executable at a space might have been incorrect,
19468    # since paths with space are more likely in Windows. Give it another try with the whole
19469    # argument.
19470    path="$complete"
19471    arguments="EOL"
19472    new_path="$path"
19473
19474  windows_path="$new_path"
19475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19476    unix_path=`$CYGPATH -u "$windows_path"`
19477    new_path="$unix_path"
19478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19480    new_path="$unix_path"
19481  fi
19482
19483
19484    new_path=`$WHICH "$new_path" 2> /dev/null`
19485    # bat and cmd files are not always considered executable in MSYS causing which
19486    # to not find them
19487    if test "x$new_path" = x \
19488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19490      new_path="$path"
19491
19492  windows_path="$new_path"
19493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19494    unix_path=`$CYGPATH -u "$windows_path"`
19495    new_path="$unix_path"
19496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19498    new_path="$unix_path"
19499  fi
19500
19501    fi
19502
19503    if test "x$new_path" = x; then
19504      # It's still not found. Now this is an unrecoverable error.
19505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19506$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19507      has_space=`$ECHO "$complete" | $GREP " "`
19508      if test "x$has_space" != x; then
19509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19511      fi
19512      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19513    fi
19514  fi
19515
19516  # Now new_path has a complete unix path to the binary
19517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19518    # Keep paths in /bin as-is, but remove trailing .exe if any
19519    new_path="${new_path/%.exe/}"
19520    # Do not save /bin paths to all_fixpath_prefixes!
19521  else
19522    # Not in mixed or Windows style, start by that.
19523    new_path=`cmd //c echo $new_path`
19524
19525  input_path="$new_path"
19526  # Check if we need to convert this using DOS-style short mode. If the path
19527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19528  # take no chances and rewrite it.
19529  # Note: m4 eats our [], so we need to use [ and ] instead.
19530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19531  if test "x$has_forbidden_chars" != x; then
19532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19534  fi
19535
19536    # Output is in $new_path
19537
19538  windows_path="$new_path"
19539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19540    unix_path=`$CYGPATH -u "$windows_path"`
19541    new_path="$unix_path"
19542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19544    new_path="$unix_path"
19545  fi
19546
19547    # remove trailing .exe if any
19548    new_path="${new_path/%.exe/}"
19549
19550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19552  fi
19553
19554    else
19555      # We're on a unix platform. Hooray! :)
19556      # First separate the path from the arguments. This will split at the first
19557      # space.
19558      complete="$FOUND_MAKE"
19559      path="${complete%% *}"
19560      tmp="$complete EOL"
19561      arguments="${tmp#* }"
19562
19563      # Cannot rely on the command "which" here since it doesn't always work.
19564      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19565      if test -z "$is_absolute_path"; then
19566        # Path to executable is not absolute. Find it.
19567        IFS_save="$IFS"
19568        IFS=:
19569        for p in $PATH; do
19570          if test -f "$p/$path" && test -x "$p/$path"; then
19571            new_path="$p/$path"
19572            break
19573          fi
19574        done
19575        IFS="$IFS_save"
19576      else
19577        # This is an absolute path, we can use it without further modifications.
19578        new_path="$path"
19579      fi
19580
19581      if test "x$new_path" = x; then
19582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19584        has_space=`$ECHO "$complete" | $GREP " "`
19585        if test "x$has_space" != x; then
19586          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19588        fi
19589        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19590      fi
19591    fi
19592
19593    # Now join together the path and the arguments once again
19594    if test "x$arguments" != xEOL; then
19595      new_complete="$new_path ${arguments% *}"
19596    else
19597      new_complete="$new_path"
19598    fi
19599
19600    if test "x$complete" != "x$new_complete"; then
19601      FOUND_MAKE="$new_complete"
19602      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19603$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19604    fi
19605  fi
19606
19607        fi
19608      fi
19609    fi
19610  fi
19611
19612        if test "x$FOUND_MAKE" = x; then
19613          for ac_prog in make
19614do
19615  # Extract the first word of "$ac_prog", so it can be a program name with args.
19616set dummy $ac_prog; ac_word=$2
19617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19618$as_echo_n "checking for $ac_word... " >&6; }
19619if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19620  $as_echo_n "(cached) " >&6
19621else
19622  case $CHECK_TOOLSDIR_MAKE in
19623  [\\/]* | ?:[\\/]*)
19624  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19625  ;;
19626  *)
19627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19628for as_dir in $PATH
19629do
19630  IFS=$as_save_IFS
19631  test -z "$as_dir" && as_dir=.
19632    for ac_exec_ext in '' $ac_executable_extensions; do
19633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19634    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19636    break 2
19637  fi
19638done
19639  done
19640IFS=$as_save_IFS
19641
19642  ;;
19643esac
19644fi
19645CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19646if test -n "$CHECK_TOOLSDIR_MAKE"; then
19647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19648$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19649else
19650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19651$as_echo "no" >&6; }
19652fi
19653
19654
19655  test -n "$CHECK_TOOLSDIR_MAKE" && break
19656done
19657
19658
19659  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19660  DESCRIPTION="make in tools-dir"
19661
19662  # On Cygwin, we require a newer version of make than on other platforms
19663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19664    MAKE_VERSION_EXPR="-e 4\."
19665    MAKE_REQUIRED_VERSION="4.0"
19666   else
19667    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19668    MAKE_REQUIRED_VERSION="3.81"
19669  fi
19670
19671  if test "x$MAKE_CANDIDATE" != x; then
19672    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19673$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19674    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19675    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19676    if test "x$IS_GNU_MAKE" = x; then
19677      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19678$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19679    else
19680      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19681      if test "x$IS_MODERN_MAKE" = x; then
19682        { $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
19683$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;}
19684      else
19685        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19686          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19687            MAKE_EXPECTED_ENV='cygwin'
19688          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19689            MAKE_EXPECTED_ENV='msys'
19690          else
19691            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19692          fi
19693          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19694          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19695        else
19696          # Not relevant for non-Windows
19697          IS_MAKE_CORRECT_ENV=true
19698        fi
19699        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19700          { $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
19701$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;}
19702        else
19703          FOUND_MAKE=$MAKE_CANDIDATE
19704
19705  # Only process if variable expands to non-empty
19706
19707  if test "x$FOUND_MAKE" != x; then
19708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19709
19710  # First separate the path from the arguments. This will split at the first
19711  # space.
19712  complete="$FOUND_MAKE"
19713  path="${complete%% *}"
19714  tmp="$complete EOL"
19715  arguments="${tmp#* }"
19716
19717  # Input might be given as Windows format, start by converting to
19718  # unix format.
19719  new_path=`$CYGPATH -u "$path"`
19720
19721  # Now try to locate executable using which
19722  new_path=`$WHICH "$new_path" 2> /dev/null`
19723  # bat and cmd files are not always considered executable in cygwin causing which
19724  # to not find them
19725  if test "x$new_path" = x \
19726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19728    new_path=`$CYGPATH -u "$path"`
19729  fi
19730  if test "x$new_path" = x; then
19731    # Oops. Which didn't find the executable.
19732    # The splitting of arguments from the executable at a space might have been incorrect,
19733    # since paths with space are more likely in Windows. Give it another try with the whole
19734    # argument.
19735    path="$complete"
19736    arguments="EOL"
19737    new_path=`$CYGPATH -u "$path"`
19738    new_path=`$WHICH "$new_path" 2> /dev/null`
19739    # bat and cmd files are not always considered executable in cygwin causing which
19740    # to not find them
19741    if test "x$new_path" = x \
19742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19744      new_path=`$CYGPATH -u "$path"`
19745    fi
19746    if test "x$new_path" = x; then
19747      # It's still not found. Now this is an unrecoverable error.
19748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19750      has_space=`$ECHO "$complete" | $GREP " "`
19751      if test "x$has_space" != x; then
19752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19754      fi
19755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19756    fi
19757  fi
19758
19759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19762  # "foo.exe" is OK but "foo" is an error.
19763  #
19764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19765  # It is also a way to make sure we got the proper file name for the real test later on.
19766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19767  if test "x$test_shortpath" = x; then
19768    # Short path failed, file does not exist as specified.
19769    # Try adding .exe or .cmd
19770    if test -f "${new_path}.exe"; then
19771      input_to_shortpath="${new_path}.exe"
19772    elif test -f "${new_path}.cmd"; then
19773      input_to_shortpath="${new_path}.cmd"
19774    else
19775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19776$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19780    fi
19781  else
19782    input_to_shortpath="$new_path"
19783  fi
19784
19785  # Call helper function which possibly converts this using DOS-style short mode.
19786  # If so, the updated path is stored in $new_path.
19787  new_path="$input_to_shortpath"
19788
19789  input_path="$input_to_shortpath"
19790  # Check if we need to convert this using DOS-style short mode. If the path
19791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19792  # take no chances and rewrite it.
19793  # Note: m4 eats our [], so we need to use [ and ] instead.
19794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19795  if test "x$has_forbidden_chars" != x; then
19796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19800      # Going to short mode and back again did indeed matter. Since short mode is
19801      # case insensitive, let's make it lowercase to improve readability.
19802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19803      # Now convert it back to Unix-style (cygpath)
19804      input_path=`$CYGPATH -u "$shortmode_path"`
19805      new_path="$input_path"
19806    fi
19807  fi
19808
19809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19810  if test "x$test_cygdrive_prefix" = x; then
19811    # As a simple fix, exclude /usr/bin since it's not a real path.
19812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19814      # a path prefixed by /cygdrive for fixpath to work.
19815      new_path="$CYGWIN_ROOT_PATH$input_path"
19816    fi
19817  fi
19818
19819  # remove trailing .exe if any
19820  new_path="${new_path/%.exe/}"
19821
19822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19823
19824  # First separate the path from the arguments. This will split at the first
19825  # space.
19826  complete="$FOUND_MAKE"
19827  path="${complete%% *}"
19828  tmp="$complete EOL"
19829  arguments="${tmp#* }"
19830
19831  # Input might be given as Windows format, start by converting to
19832  # unix format.
19833  new_path="$path"
19834
19835  windows_path="$new_path"
19836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19837    unix_path=`$CYGPATH -u "$windows_path"`
19838    new_path="$unix_path"
19839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19841    new_path="$unix_path"
19842  fi
19843
19844
19845  # Now try to locate executable using which
19846  new_path=`$WHICH "$new_path" 2> /dev/null`
19847
19848  if test "x$new_path" = x; then
19849    # Oops. Which didn't find the executable.
19850    # The splitting of arguments from the executable at a space might have been incorrect,
19851    # since paths with space are more likely in Windows. Give it another try with the whole
19852    # argument.
19853    path="$complete"
19854    arguments="EOL"
19855    new_path="$path"
19856
19857  windows_path="$new_path"
19858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19859    unix_path=`$CYGPATH -u "$windows_path"`
19860    new_path="$unix_path"
19861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19863    new_path="$unix_path"
19864  fi
19865
19866
19867    new_path=`$WHICH "$new_path" 2> /dev/null`
19868    # bat and cmd files are not always considered executable in MSYS causing which
19869    # to not find them
19870    if test "x$new_path" = x \
19871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19873      new_path="$path"
19874
19875  windows_path="$new_path"
19876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19877    unix_path=`$CYGPATH -u "$windows_path"`
19878    new_path="$unix_path"
19879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19881    new_path="$unix_path"
19882  fi
19883
19884    fi
19885
19886    if test "x$new_path" = x; then
19887      # It's still not found. Now this is an unrecoverable error.
19888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19890      has_space=`$ECHO "$complete" | $GREP " "`
19891      if test "x$has_space" != x; then
19892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19894      fi
19895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19896    fi
19897  fi
19898
19899  # Now new_path has a complete unix path to the binary
19900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19901    # Keep paths in /bin as-is, but remove trailing .exe if any
19902    new_path="${new_path/%.exe/}"
19903    # Do not save /bin paths to all_fixpath_prefixes!
19904  else
19905    # Not in mixed or Windows style, start by that.
19906    new_path=`cmd //c echo $new_path`
19907
19908  input_path="$new_path"
19909  # Check if we need to convert this using DOS-style short mode. If the path
19910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19911  # take no chances and rewrite it.
19912  # Note: m4 eats our [], so we need to use [ and ] instead.
19913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19914  if test "x$has_forbidden_chars" != x; then
19915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19917  fi
19918
19919    # Output is in $new_path
19920
19921  windows_path="$new_path"
19922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19923    unix_path=`$CYGPATH -u "$windows_path"`
19924    new_path="$unix_path"
19925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19927    new_path="$unix_path"
19928  fi
19929
19930    # remove trailing .exe if any
19931    new_path="${new_path/%.exe/}"
19932
19933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19935  fi
19936
19937    else
19938      # We're on a unix platform. Hooray! :)
19939      # First separate the path from the arguments. This will split at the first
19940      # space.
19941      complete="$FOUND_MAKE"
19942      path="${complete%% *}"
19943      tmp="$complete EOL"
19944      arguments="${tmp#* }"
19945
19946      # Cannot rely on the command "which" here since it doesn't always work.
19947      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19948      if test -z "$is_absolute_path"; then
19949        # Path to executable is not absolute. Find it.
19950        IFS_save="$IFS"
19951        IFS=:
19952        for p in $PATH; do
19953          if test -f "$p/$path" && test -x "$p/$path"; then
19954            new_path="$p/$path"
19955            break
19956          fi
19957        done
19958        IFS="$IFS_save"
19959      else
19960        # This is an absolute path, we can use it without further modifications.
19961        new_path="$path"
19962      fi
19963
19964      if test "x$new_path" = x; then
19965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19967        has_space=`$ECHO "$complete" | $GREP " "`
19968        if test "x$has_space" != x; then
19969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19971        fi
19972        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19973      fi
19974    fi
19975
19976    # Now join together the path and the arguments once again
19977    if test "x$arguments" != xEOL; then
19978      new_complete="$new_path ${arguments% *}"
19979    else
19980      new_complete="$new_path"
19981    fi
19982
19983    if test "x$complete" != "x$new_complete"; then
19984      FOUND_MAKE="$new_complete"
19985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19986$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19987    fi
19988  fi
19989
19990        fi
19991      fi
19992    fi
19993  fi
19994
19995        fi
19996        PATH=$OLD_PATH
19997      fi
19998    fi
19999
20000    if test "x$FOUND_MAKE" = x; then
20001      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
20002    fi
20003
20004    else
20005      # If it succeeded, then it was overridden by the user. We will use it
20006      # for the tool.
20007
20008      # First remove it from the list of overridden variables, so we can test
20009      # for unknown variables in the end.
20010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20011
20012      # Check if we try to supply an empty value
20013      if test "x$MAKE" = x; then
20014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20015$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20017$as_echo_n "checking for MAKE... " >&6; }
20018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20019$as_echo "disabled" >&6; }
20020      else
20021        # Check if the provided tool contains a complete path.
20022        tool_specified="$MAKE"
20023        tool_basename="${tool_specified##*/}"
20024        if test "x$tool_basename" = "x$tool_specified"; then
20025          # A command without a complete path is provided, search $PATH.
20026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20027$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20028          # Extract the first word of "$tool_basename", so it can be a program name with args.
20029set dummy $tool_basename; ac_word=$2
20030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20031$as_echo_n "checking for $ac_word... " >&6; }
20032if ${ac_cv_path_MAKE+:} false; then :
20033  $as_echo_n "(cached) " >&6
20034else
20035  case $MAKE in
20036  [\\/]* | ?:[\\/]*)
20037  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20038  ;;
20039  *)
20040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20041for as_dir in $PATH
20042do
20043  IFS=$as_save_IFS
20044  test -z "$as_dir" && as_dir=.
20045    for ac_exec_ext in '' $ac_executable_extensions; do
20046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20047    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20049    break 2
20050  fi
20051done
20052  done
20053IFS=$as_save_IFS
20054
20055  ;;
20056esac
20057fi
20058MAKE=$ac_cv_path_MAKE
20059if test -n "$MAKE"; then
20060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20061$as_echo "$MAKE" >&6; }
20062else
20063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20064$as_echo "no" >&6; }
20065fi
20066
20067
20068          if test "x$MAKE" = x; then
20069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20070          fi
20071        else
20072          # Otherwise we believe it is a complete path. Use it as it is.
20073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20074$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20076$as_echo_n "checking for MAKE... " >&6; }
20077          if test ! -x "$tool_specified"; then
20078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20079$as_echo "not found" >&6; }
20080            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20081          fi
20082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20083$as_echo "$tool_specified" >&6; }
20084        fi
20085      fi
20086    fi
20087
20088    # If MAKE was set by user, verify the version
20089
20090  MAKE_CANDIDATE=""$MAKE""
20091  DESCRIPTION="user supplied MAKE=$MAKE"
20092
20093  # On Cygwin, we require a newer version of make than on other platforms
20094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20095    MAKE_VERSION_EXPR="-e 4\."
20096    MAKE_REQUIRED_VERSION="4.0"
20097   else
20098    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20099    MAKE_REQUIRED_VERSION="3.81"
20100  fi
20101
20102  if test "x$MAKE_CANDIDATE" != x; then
20103    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20104$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20105    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20106    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20107    if test "x$IS_GNU_MAKE" = x; then
20108      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20109$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20110    else
20111      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20112      if test "x$IS_MODERN_MAKE" = x; then
20113        { $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
20114$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;}
20115      else
20116        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20117          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20118            MAKE_EXPECTED_ENV='cygwin'
20119          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20120            MAKE_EXPECTED_ENV='msys'
20121          else
20122            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20123          fi
20124          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20125          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20126        else
20127          # Not relevant for non-Windows
20128          IS_MAKE_CORRECT_ENV=true
20129        fi
20130        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20131          { $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
20132$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;}
20133        else
20134          FOUND_MAKE=$MAKE_CANDIDATE
20135
20136  # Only process if variable expands to non-empty
20137
20138  if test "x$FOUND_MAKE" != x; then
20139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20140
20141  # First separate the path from the arguments. This will split at the first
20142  # space.
20143  complete="$FOUND_MAKE"
20144  path="${complete%% *}"
20145  tmp="$complete EOL"
20146  arguments="${tmp#* }"
20147
20148  # Input might be given as Windows format, start by converting to
20149  # unix format.
20150  new_path=`$CYGPATH -u "$path"`
20151
20152  # Now try to locate executable using which
20153  new_path=`$WHICH "$new_path" 2> /dev/null`
20154  # bat and cmd files are not always considered executable in cygwin causing which
20155  # to not find them
20156  if test "x$new_path" = x \
20157      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20158      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20159    new_path=`$CYGPATH -u "$path"`
20160  fi
20161  if test "x$new_path" = x; then
20162    # Oops. Which didn't find the executable.
20163    # The splitting of arguments from the executable at a space might have been incorrect,
20164    # since paths with space are more likely in Windows. Give it another try with the whole
20165    # argument.
20166    path="$complete"
20167    arguments="EOL"
20168    new_path=`$CYGPATH -u "$path"`
20169    new_path=`$WHICH "$new_path" 2> /dev/null`
20170    # bat and cmd files are not always considered executable in cygwin causing which
20171    # to not find them
20172    if test "x$new_path" = x \
20173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20175      new_path=`$CYGPATH -u "$path"`
20176    fi
20177    if test "x$new_path" = x; then
20178      # It's still not found. Now this is an unrecoverable error.
20179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20181      has_space=`$ECHO "$complete" | $GREP " "`
20182      if test "x$has_space" != x; then
20183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20185      fi
20186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20187    fi
20188  fi
20189
20190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20193  # "foo.exe" is OK but "foo" is an error.
20194  #
20195  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20196  # It is also a way to make sure we got the proper file name for the real test later on.
20197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20198  if test "x$test_shortpath" = x; then
20199    # Short path failed, file does not exist as specified.
20200    # Try adding .exe or .cmd
20201    if test -f "${new_path}.exe"; then
20202      input_to_shortpath="${new_path}.exe"
20203    elif test -f "${new_path}.cmd"; then
20204      input_to_shortpath="${new_path}.cmd"
20205    else
20206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20208      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20209$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20211    fi
20212  else
20213    input_to_shortpath="$new_path"
20214  fi
20215
20216  # Call helper function which possibly converts this using DOS-style short mode.
20217  # If so, the updated path is stored in $new_path.
20218  new_path="$input_to_shortpath"
20219
20220  input_path="$input_to_shortpath"
20221  # Check if we need to convert this using DOS-style short mode. If the path
20222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20223  # take no chances and rewrite it.
20224  # Note: m4 eats our [], so we need to use [ and ] instead.
20225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20226  if test "x$has_forbidden_chars" != x; then
20227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20231      # Going to short mode and back again did indeed matter. Since short mode is
20232      # case insensitive, let's make it lowercase to improve readability.
20233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20234      # Now convert it back to Unix-style (cygpath)
20235      input_path=`$CYGPATH -u "$shortmode_path"`
20236      new_path="$input_path"
20237    fi
20238  fi
20239
20240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20241  if test "x$test_cygdrive_prefix" = x; then
20242    # As a simple fix, exclude /usr/bin since it's not a real path.
20243    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20245      # a path prefixed by /cygdrive for fixpath to work.
20246      new_path="$CYGWIN_ROOT_PATH$input_path"
20247    fi
20248  fi
20249
20250  # remove trailing .exe if any
20251  new_path="${new_path/%.exe/}"
20252
20253    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20254
20255  # First separate the path from the arguments. This will split at the first
20256  # space.
20257  complete="$FOUND_MAKE"
20258  path="${complete%% *}"
20259  tmp="$complete EOL"
20260  arguments="${tmp#* }"
20261
20262  # Input might be given as Windows format, start by converting to
20263  # unix format.
20264  new_path="$path"
20265
20266  windows_path="$new_path"
20267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20268    unix_path=`$CYGPATH -u "$windows_path"`
20269    new_path="$unix_path"
20270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20272    new_path="$unix_path"
20273  fi
20274
20275
20276  # Now try to locate executable using which
20277  new_path=`$WHICH "$new_path" 2> /dev/null`
20278
20279  if test "x$new_path" = x; then
20280    # Oops. Which didn't find the executable.
20281    # The splitting of arguments from the executable at a space might have been incorrect,
20282    # since paths with space are more likely in Windows. Give it another try with the whole
20283    # argument.
20284    path="$complete"
20285    arguments="EOL"
20286    new_path="$path"
20287
20288  windows_path="$new_path"
20289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20290    unix_path=`$CYGPATH -u "$windows_path"`
20291    new_path="$unix_path"
20292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20294    new_path="$unix_path"
20295  fi
20296
20297
20298    new_path=`$WHICH "$new_path" 2> /dev/null`
20299    # bat and cmd files are not always considered executable in MSYS causing which
20300    # to not find them
20301    if test "x$new_path" = x \
20302        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20303        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20304      new_path="$path"
20305
20306  windows_path="$new_path"
20307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20308    unix_path=`$CYGPATH -u "$windows_path"`
20309    new_path="$unix_path"
20310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20312    new_path="$unix_path"
20313  fi
20314
20315    fi
20316
20317    if test "x$new_path" = x; then
20318      # It's still not found. Now this is an unrecoverable error.
20319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20320$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20321      has_space=`$ECHO "$complete" | $GREP " "`
20322      if test "x$has_space" != x; then
20323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20325      fi
20326      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20327    fi
20328  fi
20329
20330  # Now new_path has a complete unix path to the binary
20331  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20332    # Keep paths in /bin as-is, but remove trailing .exe if any
20333    new_path="${new_path/%.exe/}"
20334    # Do not save /bin paths to all_fixpath_prefixes!
20335  else
20336    # Not in mixed or Windows style, start by that.
20337    new_path=`cmd //c echo $new_path`
20338
20339  input_path="$new_path"
20340  # Check if we need to convert this using DOS-style short mode. If the path
20341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20342  # take no chances and rewrite it.
20343  # Note: m4 eats our [], so we need to use [ and ] instead.
20344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20345  if test "x$has_forbidden_chars" != x; then
20346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20348  fi
20349
20350    # Output is in $new_path
20351
20352  windows_path="$new_path"
20353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20354    unix_path=`$CYGPATH -u "$windows_path"`
20355    new_path="$unix_path"
20356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20358    new_path="$unix_path"
20359  fi
20360
20361    # remove trailing .exe if any
20362    new_path="${new_path/%.exe/}"
20363
20364    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20365    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20366  fi
20367
20368    else
20369      # We're on a unix platform. Hooray! :)
20370      # First separate the path from the arguments. This will split at the first
20371      # space.
20372      complete="$FOUND_MAKE"
20373      path="${complete%% *}"
20374      tmp="$complete EOL"
20375      arguments="${tmp#* }"
20376
20377      # Cannot rely on the command "which" here since it doesn't always work.
20378      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20379      if test -z "$is_absolute_path"; then
20380        # Path to executable is not absolute. Find it.
20381        IFS_save="$IFS"
20382        IFS=:
20383        for p in $PATH; do
20384          if test -f "$p/$path" && test -x "$p/$path"; then
20385            new_path="$p/$path"
20386            break
20387          fi
20388        done
20389        IFS="$IFS_save"
20390      else
20391        # This is an absolute path, we can use it without further modifications.
20392        new_path="$path"
20393      fi
20394
20395      if test "x$new_path" = x; then
20396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20397$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20398        has_space=`$ECHO "$complete" | $GREP " "`
20399        if test "x$has_space" != x; then
20400          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20401$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20402        fi
20403        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20404      fi
20405    fi
20406
20407    # Now join together the path and the arguments once again
20408    if test "x$arguments" != xEOL; then
20409      new_complete="$new_path ${arguments% *}"
20410    else
20411      new_complete="$new_path"
20412    fi
20413
20414    if test "x$complete" != "x$new_complete"; then
20415      FOUND_MAKE="$new_complete"
20416      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20417$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20418    fi
20419  fi
20420
20421        fi
20422      fi
20423    fi
20424  fi
20425
20426    if test "x$FOUND_MAKE" = x; then
20427      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20428    fi
20429
20430  fi
20431
20432
20433  MAKE=$FOUND_MAKE
20434
20435  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20436$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20437
20438
20439  # Check if make supports the output sync option and if so, setup using it.
20440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20441$as_echo_n "checking if make --output-sync is supported... " >&6; }
20442  if $MAKE --version -O > /dev/null 2>&1; then
20443    OUTPUT_SYNC_SUPPORTED=true
20444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20445$as_echo "yes" >&6; }
20446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20447$as_echo_n "checking for output-sync value... " >&6; }
20448
20449# Check whether --with-output-sync was given.
20450if test "${with_output_sync+set}" = set; then :
20451  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20452fi
20453
20454    if test "x$OUTPUT_SYNC" = "x"; then
20455      OUTPUT_SYNC=none
20456    fi
20457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20458$as_echo "$OUTPUT_SYNC" >&6; }
20459    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20460      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20461    fi
20462  else
20463    OUTPUT_SYNC_SUPPORTED=false
20464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20465$as_echo "no" >&6; }
20466  fi
20467
20468
20469
20470
20471
20472
20473  # Test if find supports -delete
20474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20475$as_echo_n "checking if find supports -delete... " >&6; }
20476  FIND_DELETE="-delete"
20477
20478  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20479
20480  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20481
20482  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20483  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20484    # No, it does not.
20485    rm $DELETEDIR/TestIfFindSupportsDelete
20486    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20487      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20488      FIND_DELETE="-print | xargs rm"
20489    else
20490      FIND_DELETE="-exec rm \{\} \+"
20491    fi
20492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20493$as_echo "no" >&6; }
20494  else
20495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20496$as_echo "yes" >&6; }
20497  fi
20498  rmdir $DELETEDIR
20499
20500
20501
20502  # These tools might not be installed by default,
20503  # need hint on how to install them.
20504
20505
20506
20507  # Publish this variable in the help.
20508
20509
20510  if [ -z "${UNZIP+x}" ]; then
20511    # The variable is not set by user, try to locate tool using the code snippet
20512    for ac_prog in unzip
20513do
20514  # Extract the first word of "$ac_prog", so it can be a program name with args.
20515set dummy $ac_prog; ac_word=$2
20516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20517$as_echo_n "checking for $ac_word... " >&6; }
20518if ${ac_cv_path_UNZIP+:} false; then :
20519  $as_echo_n "(cached) " >&6
20520else
20521  case $UNZIP in
20522  [\\/]* | ?:[\\/]*)
20523  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20524  ;;
20525  *)
20526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20527for as_dir in $PATH
20528do
20529  IFS=$as_save_IFS
20530  test -z "$as_dir" && as_dir=.
20531    for ac_exec_ext in '' $ac_executable_extensions; do
20532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20533    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20535    break 2
20536  fi
20537done
20538  done
20539IFS=$as_save_IFS
20540
20541  ;;
20542esac
20543fi
20544UNZIP=$ac_cv_path_UNZIP
20545if test -n "$UNZIP"; then
20546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20547$as_echo "$UNZIP" >&6; }
20548else
20549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20550$as_echo "no" >&6; }
20551fi
20552
20553
20554  test -n "$UNZIP" && break
20555done
20556
20557  else
20558    # The variable is set, but is it from the command line or the environment?
20559
20560    # Try to remove the string !UNZIP! from our list.
20561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20563      # If it failed, the variable was not from the command line. Ignore it,
20564      # but warn the user (except for BASH, which is always set by the calling BASH).
20565      if test "xUNZIP" != xBASH; then
20566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20567$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20568      fi
20569      # Try to locate tool using the code snippet
20570      for ac_prog in unzip
20571do
20572  # Extract the first word of "$ac_prog", so it can be a program name with args.
20573set dummy $ac_prog; ac_word=$2
20574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20575$as_echo_n "checking for $ac_word... " >&6; }
20576if ${ac_cv_path_UNZIP+:} false; then :
20577  $as_echo_n "(cached) " >&6
20578else
20579  case $UNZIP in
20580  [\\/]* | ?:[\\/]*)
20581  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20582  ;;
20583  *)
20584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20585for as_dir in $PATH
20586do
20587  IFS=$as_save_IFS
20588  test -z "$as_dir" && as_dir=.
20589    for ac_exec_ext in '' $ac_executable_extensions; do
20590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20591    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20593    break 2
20594  fi
20595done
20596  done
20597IFS=$as_save_IFS
20598
20599  ;;
20600esac
20601fi
20602UNZIP=$ac_cv_path_UNZIP
20603if test -n "$UNZIP"; then
20604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20605$as_echo "$UNZIP" >&6; }
20606else
20607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20608$as_echo "no" >&6; }
20609fi
20610
20611
20612  test -n "$UNZIP" && break
20613done
20614
20615    else
20616      # If it succeeded, then it was overridden by the user. We will use it
20617      # for the tool.
20618
20619      # First remove it from the list of overridden variables, so we can test
20620      # for unknown variables in the end.
20621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20622
20623      # Check if we try to supply an empty value
20624      if test "x$UNZIP" = x; then
20625        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20626$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20627        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20628$as_echo_n "checking for UNZIP... " >&6; }
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20630$as_echo "disabled" >&6; }
20631      else
20632        # Check if the provided tool contains a complete path.
20633        tool_specified="$UNZIP"
20634        tool_basename="${tool_specified##*/}"
20635        if test "x$tool_basename" = "x$tool_specified"; then
20636          # A command without a complete path is provided, search $PATH.
20637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20638$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20639          # Extract the first word of "$tool_basename", so it can be a program name with args.
20640set dummy $tool_basename; ac_word=$2
20641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20642$as_echo_n "checking for $ac_word... " >&6; }
20643if ${ac_cv_path_UNZIP+:} false; then :
20644  $as_echo_n "(cached) " >&6
20645else
20646  case $UNZIP in
20647  [\\/]* | ?:[\\/]*)
20648  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20649  ;;
20650  *)
20651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20652for as_dir in $PATH
20653do
20654  IFS=$as_save_IFS
20655  test -z "$as_dir" && as_dir=.
20656    for ac_exec_ext in '' $ac_executable_extensions; do
20657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20658    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20660    break 2
20661  fi
20662done
20663  done
20664IFS=$as_save_IFS
20665
20666  ;;
20667esac
20668fi
20669UNZIP=$ac_cv_path_UNZIP
20670if test -n "$UNZIP"; then
20671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20672$as_echo "$UNZIP" >&6; }
20673else
20674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20675$as_echo "no" >&6; }
20676fi
20677
20678
20679          if test "x$UNZIP" = x; then
20680            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20681          fi
20682        else
20683          # Otherwise we believe it is a complete path. Use it as it is.
20684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20685$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20686          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20687$as_echo_n "checking for UNZIP... " >&6; }
20688          if test ! -x "$tool_specified"; then
20689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20690$as_echo "not found" >&6; }
20691            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20692          fi
20693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20694$as_echo "$tool_specified" >&6; }
20695        fi
20696      fi
20697    fi
20698
20699  fi
20700
20701
20702
20703  if test "x$UNZIP" = x; then
20704    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20705  fi
20706
20707
20708
20709
20710
20711  # Publish this variable in the help.
20712
20713
20714  if [ -z "${ZIP+x}" ]; then
20715    # The variable is not set by user, try to locate tool using the code snippet
20716    for ac_prog in zip
20717do
20718  # Extract the first word of "$ac_prog", so it can be a program name with args.
20719set dummy $ac_prog; ac_word=$2
20720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20721$as_echo_n "checking for $ac_word... " >&6; }
20722if ${ac_cv_path_ZIP+:} false; then :
20723  $as_echo_n "(cached) " >&6
20724else
20725  case $ZIP in
20726  [\\/]* | ?:[\\/]*)
20727  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20728  ;;
20729  *)
20730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20731for as_dir in $PATH
20732do
20733  IFS=$as_save_IFS
20734  test -z "$as_dir" && as_dir=.
20735    for ac_exec_ext in '' $ac_executable_extensions; do
20736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20737    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20739    break 2
20740  fi
20741done
20742  done
20743IFS=$as_save_IFS
20744
20745  ;;
20746esac
20747fi
20748ZIP=$ac_cv_path_ZIP
20749if test -n "$ZIP"; then
20750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20751$as_echo "$ZIP" >&6; }
20752else
20753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20754$as_echo "no" >&6; }
20755fi
20756
20757
20758  test -n "$ZIP" && break
20759done
20760
20761  else
20762    # The variable is set, but is it from the command line or the environment?
20763
20764    # Try to remove the string !ZIP! from our list.
20765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20767      # If it failed, the variable was not from the command line. Ignore it,
20768      # but warn the user (except for BASH, which is always set by the calling BASH).
20769      if test "xZIP" != xBASH; then
20770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20771$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20772      fi
20773      # Try to locate tool using the code snippet
20774      for ac_prog in zip
20775do
20776  # Extract the first word of "$ac_prog", so it can be a program name with args.
20777set dummy $ac_prog; ac_word=$2
20778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20779$as_echo_n "checking for $ac_word... " >&6; }
20780if ${ac_cv_path_ZIP+:} false; then :
20781  $as_echo_n "(cached) " >&6
20782else
20783  case $ZIP in
20784  [\\/]* | ?:[\\/]*)
20785  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20786  ;;
20787  *)
20788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20789for as_dir in $PATH
20790do
20791  IFS=$as_save_IFS
20792  test -z "$as_dir" && as_dir=.
20793    for ac_exec_ext in '' $ac_executable_extensions; do
20794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20795    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20797    break 2
20798  fi
20799done
20800  done
20801IFS=$as_save_IFS
20802
20803  ;;
20804esac
20805fi
20806ZIP=$ac_cv_path_ZIP
20807if test -n "$ZIP"; then
20808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20809$as_echo "$ZIP" >&6; }
20810else
20811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20812$as_echo "no" >&6; }
20813fi
20814
20815
20816  test -n "$ZIP" && break
20817done
20818
20819    else
20820      # If it succeeded, then it was overridden by the user. We will use it
20821      # for the tool.
20822
20823      # First remove it from the list of overridden variables, so we can test
20824      # for unknown variables in the end.
20825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20826
20827      # Check if we try to supply an empty value
20828      if test "x$ZIP" = x; then
20829        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20830$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20832$as_echo_n "checking for ZIP... " >&6; }
20833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20834$as_echo "disabled" >&6; }
20835      else
20836        # Check if the provided tool contains a complete path.
20837        tool_specified="$ZIP"
20838        tool_basename="${tool_specified##*/}"
20839        if test "x$tool_basename" = "x$tool_specified"; then
20840          # A command without a complete path is provided, search $PATH.
20841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20842$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20843          # Extract the first word of "$tool_basename", so it can be a program name with args.
20844set dummy $tool_basename; ac_word=$2
20845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20846$as_echo_n "checking for $ac_word... " >&6; }
20847if ${ac_cv_path_ZIP+:} false; then :
20848  $as_echo_n "(cached) " >&6
20849else
20850  case $ZIP in
20851  [\\/]* | ?:[\\/]*)
20852  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20853  ;;
20854  *)
20855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20856for as_dir in $PATH
20857do
20858  IFS=$as_save_IFS
20859  test -z "$as_dir" && as_dir=.
20860    for ac_exec_ext in '' $ac_executable_extensions; do
20861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20862    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20864    break 2
20865  fi
20866done
20867  done
20868IFS=$as_save_IFS
20869
20870  ;;
20871esac
20872fi
20873ZIP=$ac_cv_path_ZIP
20874if test -n "$ZIP"; then
20875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20876$as_echo "$ZIP" >&6; }
20877else
20878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20879$as_echo "no" >&6; }
20880fi
20881
20882
20883          if test "x$ZIP" = x; then
20884            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20885          fi
20886        else
20887          # Otherwise we believe it is a complete path. Use it as it is.
20888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20889$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20890          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20891$as_echo_n "checking for ZIP... " >&6; }
20892          if test ! -x "$tool_specified"; then
20893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20894$as_echo "not found" >&6; }
20895            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20896          fi
20897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20898$as_echo "$tool_specified" >&6; }
20899        fi
20900      fi
20901    fi
20902
20903  fi
20904
20905
20906
20907  if test "x$ZIP" = x; then
20908    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20909  fi
20910
20911
20912
20913  # Non-required basic tools
20914
20915
20916
20917  # Publish this variable in the help.
20918
20919
20920  if [ -z "${LDD+x}" ]; then
20921    # The variable is not set by user, try to locate tool using the code snippet
20922    for ac_prog in ldd
20923do
20924  # Extract the first word of "$ac_prog", so it can be a program name with args.
20925set dummy $ac_prog; ac_word=$2
20926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20927$as_echo_n "checking for $ac_word... " >&6; }
20928if ${ac_cv_path_LDD+:} false; then :
20929  $as_echo_n "(cached) " >&6
20930else
20931  case $LDD in
20932  [\\/]* | ?:[\\/]*)
20933  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20934  ;;
20935  *)
20936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20937for as_dir in $PATH
20938do
20939  IFS=$as_save_IFS
20940  test -z "$as_dir" && as_dir=.
20941    for ac_exec_ext in '' $ac_executable_extensions; do
20942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20943    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20945    break 2
20946  fi
20947done
20948  done
20949IFS=$as_save_IFS
20950
20951  ;;
20952esac
20953fi
20954LDD=$ac_cv_path_LDD
20955if test -n "$LDD"; then
20956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20957$as_echo "$LDD" >&6; }
20958else
20959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20960$as_echo "no" >&6; }
20961fi
20962
20963
20964  test -n "$LDD" && break
20965done
20966
20967  else
20968    # The variable is set, but is it from the command line or the environment?
20969
20970    # Try to remove the string !LDD! from our list.
20971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20973      # If it failed, the variable was not from the command line. Ignore it,
20974      # but warn the user (except for BASH, which is always set by the calling BASH).
20975      if test "xLDD" != xBASH; then
20976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20977$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20978      fi
20979      # Try to locate tool using the code snippet
20980      for ac_prog in ldd
20981do
20982  # Extract the first word of "$ac_prog", so it can be a program name with args.
20983set dummy $ac_prog; ac_word=$2
20984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20985$as_echo_n "checking for $ac_word... " >&6; }
20986if ${ac_cv_path_LDD+:} false; then :
20987  $as_echo_n "(cached) " >&6
20988else
20989  case $LDD in
20990  [\\/]* | ?:[\\/]*)
20991  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20992  ;;
20993  *)
20994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20995for as_dir in $PATH
20996do
20997  IFS=$as_save_IFS
20998  test -z "$as_dir" && as_dir=.
20999    for ac_exec_ext in '' $ac_executable_extensions; do
21000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21001    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21003    break 2
21004  fi
21005done
21006  done
21007IFS=$as_save_IFS
21008
21009  ;;
21010esac
21011fi
21012LDD=$ac_cv_path_LDD
21013if test -n "$LDD"; then
21014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21015$as_echo "$LDD" >&6; }
21016else
21017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21018$as_echo "no" >&6; }
21019fi
21020
21021
21022  test -n "$LDD" && break
21023done
21024
21025    else
21026      # If it succeeded, then it was overridden by the user. We will use it
21027      # for the tool.
21028
21029      # First remove it from the list of overridden variables, so we can test
21030      # for unknown variables in the end.
21031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21032
21033      # Check if we try to supply an empty value
21034      if test "x$LDD" = x; then
21035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21036$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21038$as_echo_n "checking for LDD... " >&6; }
21039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21040$as_echo "disabled" >&6; }
21041      else
21042        # Check if the provided tool contains a complete path.
21043        tool_specified="$LDD"
21044        tool_basename="${tool_specified##*/}"
21045        if test "x$tool_basename" = "x$tool_specified"; then
21046          # A command without a complete path is provided, search $PATH.
21047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21048$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21049          # Extract the first word of "$tool_basename", so it can be a program name with args.
21050set dummy $tool_basename; ac_word=$2
21051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21052$as_echo_n "checking for $ac_word... " >&6; }
21053if ${ac_cv_path_LDD+:} false; then :
21054  $as_echo_n "(cached) " >&6
21055else
21056  case $LDD in
21057  [\\/]* | ?:[\\/]*)
21058  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21059  ;;
21060  *)
21061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21062for as_dir in $PATH
21063do
21064  IFS=$as_save_IFS
21065  test -z "$as_dir" && as_dir=.
21066    for ac_exec_ext in '' $ac_executable_extensions; do
21067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21068    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21070    break 2
21071  fi
21072done
21073  done
21074IFS=$as_save_IFS
21075
21076  ;;
21077esac
21078fi
21079LDD=$ac_cv_path_LDD
21080if test -n "$LDD"; then
21081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21082$as_echo "$LDD" >&6; }
21083else
21084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21085$as_echo "no" >&6; }
21086fi
21087
21088
21089          if test "x$LDD" = x; then
21090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21091          fi
21092        else
21093          # Otherwise we believe it is a complete path. Use it as it is.
21094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21095$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21097$as_echo_n "checking for LDD... " >&6; }
21098          if test ! -x "$tool_specified"; then
21099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21100$as_echo "not found" >&6; }
21101            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21102          fi
21103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21104$as_echo "$tool_specified" >&6; }
21105        fi
21106      fi
21107    fi
21108
21109  fi
21110
21111
21112  if test "x$LDD" = "x"; then
21113    # List shared lib dependencies is used for
21114    # debug output and checking for forbidden dependencies.
21115    # We can build without it.
21116    LDD="true"
21117  fi
21118
21119
21120  # Publish this variable in the help.
21121
21122
21123  if [ -z "${OTOOL+x}" ]; then
21124    # The variable is not set by user, try to locate tool using the code snippet
21125    for ac_prog in otool
21126do
21127  # Extract the first word of "$ac_prog", so it can be a program name with args.
21128set dummy $ac_prog; ac_word=$2
21129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21130$as_echo_n "checking for $ac_word... " >&6; }
21131if ${ac_cv_path_OTOOL+:} false; then :
21132  $as_echo_n "(cached) " >&6
21133else
21134  case $OTOOL in
21135  [\\/]* | ?:[\\/]*)
21136  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21137  ;;
21138  *)
21139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21140for as_dir in $PATH
21141do
21142  IFS=$as_save_IFS
21143  test -z "$as_dir" && as_dir=.
21144    for ac_exec_ext in '' $ac_executable_extensions; do
21145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21146    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21148    break 2
21149  fi
21150done
21151  done
21152IFS=$as_save_IFS
21153
21154  ;;
21155esac
21156fi
21157OTOOL=$ac_cv_path_OTOOL
21158if test -n "$OTOOL"; then
21159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21160$as_echo "$OTOOL" >&6; }
21161else
21162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21163$as_echo "no" >&6; }
21164fi
21165
21166
21167  test -n "$OTOOL" && break
21168done
21169
21170  else
21171    # The variable is set, but is it from the command line or the environment?
21172
21173    # Try to remove the string !OTOOL! from our list.
21174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21176      # If it failed, the variable was not from the command line. Ignore it,
21177      # but warn the user (except for BASH, which is always set by the calling BASH).
21178      if test "xOTOOL" != xBASH; then
21179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21180$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21181      fi
21182      # Try to locate tool using the code snippet
21183      for ac_prog in otool
21184do
21185  # Extract the first word of "$ac_prog", so it can be a program name with args.
21186set dummy $ac_prog; ac_word=$2
21187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21188$as_echo_n "checking for $ac_word... " >&6; }
21189if ${ac_cv_path_OTOOL+:} false; then :
21190  $as_echo_n "(cached) " >&6
21191else
21192  case $OTOOL in
21193  [\\/]* | ?:[\\/]*)
21194  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21195  ;;
21196  *)
21197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21198for as_dir in $PATH
21199do
21200  IFS=$as_save_IFS
21201  test -z "$as_dir" && as_dir=.
21202    for ac_exec_ext in '' $ac_executable_extensions; do
21203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21204    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21206    break 2
21207  fi
21208done
21209  done
21210IFS=$as_save_IFS
21211
21212  ;;
21213esac
21214fi
21215OTOOL=$ac_cv_path_OTOOL
21216if test -n "$OTOOL"; then
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21218$as_echo "$OTOOL" >&6; }
21219else
21220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21221$as_echo "no" >&6; }
21222fi
21223
21224
21225  test -n "$OTOOL" && break
21226done
21227
21228    else
21229      # If it succeeded, then it was overridden by the user. We will use it
21230      # for the tool.
21231
21232      # First remove it from the list of overridden variables, so we can test
21233      # for unknown variables in the end.
21234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21235
21236      # Check if we try to supply an empty value
21237      if test "x$OTOOL" = x; then
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21239$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21241$as_echo_n "checking for OTOOL... " >&6; }
21242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21243$as_echo "disabled" >&6; }
21244      else
21245        # Check if the provided tool contains a complete path.
21246        tool_specified="$OTOOL"
21247        tool_basename="${tool_specified##*/}"
21248        if test "x$tool_basename" = "x$tool_specified"; then
21249          # A command without a complete path is provided, search $PATH.
21250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21251$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21252          # Extract the first word of "$tool_basename", so it can be a program name with args.
21253set dummy $tool_basename; ac_word=$2
21254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21255$as_echo_n "checking for $ac_word... " >&6; }
21256if ${ac_cv_path_OTOOL+:} false; then :
21257  $as_echo_n "(cached) " >&6
21258else
21259  case $OTOOL in
21260  [\\/]* | ?:[\\/]*)
21261  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21262  ;;
21263  *)
21264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21265for as_dir in $PATH
21266do
21267  IFS=$as_save_IFS
21268  test -z "$as_dir" && as_dir=.
21269    for ac_exec_ext in '' $ac_executable_extensions; do
21270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21271    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21273    break 2
21274  fi
21275done
21276  done
21277IFS=$as_save_IFS
21278
21279  ;;
21280esac
21281fi
21282OTOOL=$ac_cv_path_OTOOL
21283if test -n "$OTOOL"; then
21284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21285$as_echo "$OTOOL" >&6; }
21286else
21287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21288$as_echo "no" >&6; }
21289fi
21290
21291
21292          if test "x$OTOOL" = x; then
21293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21294          fi
21295        else
21296          # Otherwise we believe it is a complete path. Use it as it is.
21297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21298$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21300$as_echo_n "checking for OTOOL... " >&6; }
21301          if test ! -x "$tool_specified"; then
21302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21303$as_echo "not found" >&6; }
21304            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21305          fi
21306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21307$as_echo "$tool_specified" >&6; }
21308        fi
21309      fi
21310    fi
21311
21312  fi
21313
21314
21315  if test "x$OTOOL" = "x"; then
21316    OTOOL="true"
21317  fi
21318
21319
21320  # Publish this variable in the help.
21321
21322
21323  if [ -z "${READELF+x}" ]; then
21324    # The variable is not set by user, try to locate tool using the code snippet
21325    for ac_prog in greadelf readelf
21326do
21327  # Extract the first word of "$ac_prog", so it can be a program name with args.
21328set dummy $ac_prog; ac_word=$2
21329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21330$as_echo_n "checking for $ac_word... " >&6; }
21331if ${ac_cv_path_READELF+:} false; then :
21332  $as_echo_n "(cached) " >&6
21333else
21334  case $READELF in
21335  [\\/]* | ?:[\\/]*)
21336  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21337  ;;
21338  *)
21339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21340for as_dir in $PATH
21341do
21342  IFS=$as_save_IFS
21343  test -z "$as_dir" && as_dir=.
21344    for ac_exec_ext in '' $ac_executable_extensions; do
21345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21346    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21348    break 2
21349  fi
21350done
21351  done
21352IFS=$as_save_IFS
21353
21354  ;;
21355esac
21356fi
21357READELF=$ac_cv_path_READELF
21358if test -n "$READELF"; then
21359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21360$as_echo "$READELF" >&6; }
21361else
21362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21363$as_echo "no" >&6; }
21364fi
21365
21366
21367  test -n "$READELF" && break
21368done
21369
21370  else
21371    # The variable is set, but is it from the command line or the environment?
21372
21373    # Try to remove the string !READELF! from our list.
21374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21376      # If it failed, the variable was not from the command line. Ignore it,
21377      # but warn the user (except for BASH, which is always set by the calling BASH).
21378      if test "xREADELF" != xBASH; then
21379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21380$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21381      fi
21382      # Try to locate tool using the code snippet
21383      for ac_prog in greadelf readelf
21384do
21385  # Extract the first word of "$ac_prog", so it can be a program name with args.
21386set dummy $ac_prog; ac_word=$2
21387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21388$as_echo_n "checking for $ac_word... " >&6; }
21389if ${ac_cv_path_READELF+:} false; then :
21390  $as_echo_n "(cached) " >&6
21391else
21392  case $READELF in
21393  [\\/]* | ?:[\\/]*)
21394  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21395  ;;
21396  *)
21397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21398for as_dir in $PATH
21399do
21400  IFS=$as_save_IFS
21401  test -z "$as_dir" && as_dir=.
21402    for ac_exec_ext in '' $ac_executable_extensions; do
21403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21404    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21406    break 2
21407  fi
21408done
21409  done
21410IFS=$as_save_IFS
21411
21412  ;;
21413esac
21414fi
21415READELF=$ac_cv_path_READELF
21416if test -n "$READELF"; then
21417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21418$as_echo "$READELF" >&6; }
21419else
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21421$as_echo "no" >&6; }
21422fi
21423
21424
21425  test -n "$READELF" && break
21426done
21427
21428    else
21429      # If it succeeded, then it was overridden by the user. We will use it
21430      # for the tool.
21431
21432      # First remove it from the list of overridden variables, so we can test
21433      # for unknown variables in the end.
21434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21435
21436      # Check if we try to supply an empty value
21437      if test "x$READELF" = x; then
21438        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21439$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21441$as_echo_n "checking for READELF... " >&6; }
21442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21443$as_echo "disabled" >&6; }
21444      else
21445        # Check if the provided tool contains a complete path.
21446        tool_specified="$READELF"
21447        tool_basename="${tool_specified##*/}"
21448        if test "x$tool_basename" = "x$tool_specified"; then
21449          # A command without a complete path is provided, search $PATH.
21450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21451$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21452          # Extract the first word of "$tool_basename", so it can be a program name with args.
21453set dummy $tool_basename; ac_word=$2
21454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21455$as_echo_n "checking for $ac_word... " >&6; }
21456if ${ac_cv_path_READELF+:} false; then :
21457  $as_echo_n "(cached) " >&6
21458else
21459  case $READELF in
21460  [\\/]* | ?:[\\/]*)
21461  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21462  ;;
21463  *)
21464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21465for as_dir in $PATH
21466do
21467  IFS=$as_save_IFS
21468  test -z "$as_dir" && as_dir=.
21469    for ac_exec_ext in '' $ac_executable_extensions; do
21470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21471    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21473    break 2
21474  fi
21475done
21476  done
21477IFS=$as_save_IFS
21478
21479  ;;
21480esac
21481fi
21482READELF=$ac_cv_path_READELF
21483if test -n "$READELF"; then
21484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21485$as_echo "$READELF" >&6; }
21486else
21487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21488$as_echo "no" >&6; }
21489fi
21490
21491
21492          if test "x$READELF" = x; then
21493            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21494          fi
21495        else
21496          # Otherwise we believe it is a complete path. Use it as it is.
21497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21498$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21499          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21500$as_echo_n "checking for READELF... " >&6; }
21501          if test ! -x "$tool_specified"; then
21502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21503$as_echo "not found" >&6; }
21504            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21505          fi
21506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21507$as_echo "$tool_specified" >&6; }
21508        fi
21509      fi
21510    fi
21511
21512  fi
21513
21514
21515
21516
21517  # Publish this variable in the help.
21518
21519
21520  if [ -z "${HG+x}" ]; then
21521    # The variable is not set by user, try to locate tool using the code snippet
21522    for ac_prog in hg
21523do
21524  # Extract the first word of "$ac_prog", so it can be a program name with args.
21525set dummy $ac_prog; ac_word=$2
21526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21527$as_echo_n "checking for $ac_word... " >&6; }
21528if ${ac_cv_path_HG+:} false; then :
21529  $as_echo_n "(cached) " >&6
21530else
21531  case $HG in
21532  [\\/]* | ?:[\\/]*)
21533  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21534  ;;
21535  *)
21536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21537for as_dir in $PATH
21538do
21539  IFS=$as_save_IFS
21540  test -z "$as_dir" && as_dir=.
21541    for ac_exec_ext in '' $ac_executable_extensions; do
21542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21543    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21545    break 2
21546  fi
21547done
21548  done
21549IFS=$as_save_IFS
21550
21551  ;;
21552esac
21553fi
21554HG=$ac_cv_path_HG
21555if test -n "$HG"; then
21556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21557$as_echo "$HG" >&6; }
21558else
21559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21560$as_echo "no" >&6; }
21561fi
21562
21563
21564  test -n "$HG" && break
21565done
21566
21567  else
21568    # The variable is set, but is it from the command line or the environment?
21569
21570    # Try to remove the string !HG! from our list.
21571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21573      # If it failed, the variable was not from the command line. Ignore it,
21574      # but warn the user (except for BASH, which is always set by the calling BASH).
21575      if test "xHG" != xBASH; then
21576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21577$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21578      fi
21579      # Try to locate tool using the code snippet
21580      for ac_prog in hg
21581do
21582  # Extract the first word of "$ac_prog", so it can be a program name with args.
21583set dummy $ac_prog; ac_word=$2
21584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21585$as_echo_n "checking for $ac_word... " >&6; }
21586if ${ac_cv_path_HG+:} false; then :
21587  $as_echo_n "(cached) " >&6
21588else
21589  case $HG in
21590  [\\/]* | ?:[\\/]*)
21591  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21592  ;;
21593  *)
21594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21595for as_dir in $PATH
21596do
21597  IFS=$as_save_IFS
21598  test -z "$as_dir" && as_dir=.
21599    for ac_exec_ext in '' $ac_executable_extensions; do
21600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21601    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21603    break 2
21604  fi
21605done
21606  done
21607IFS=$as_save_IFS
21608
21609  ;;
21610esac
21611fi
21612HG=$ac_cv_path_HG
21613if test -n "$HG"; then
21614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21615$as_echo "$HG" >&6; }
21616else
21617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21618$as_echo "no" >&6; }
21619fi
21620
21621
21622  test -n "$HG" && break
21623done
21624
21625    else
21626      # If it succeeded, then it was overridden by the user. We will use it
21627      # for the tool.
21628
21629      # First remove it from the list of overridden variables, so we can test
21630      # for unknown variables in the end.
21631      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21632
21633      # Check if we try to supply an empty value
21634      if test "x$HG" = x; then
21635        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21636$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21638$as_echo_n "checking for HG... " >&6; }
21639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21640$as_echo "disabled" >&6; }
21641      else
21642        # Check if the provided tool contains a complete path.
21643        tool_specified="$HG"
21644        tool_basename="${tool_specified##*/}"
21645        if test "x$tool_basename" = "x$tool_specified"; then
21646          # A command without a complete path is provided, search $PATH.
21647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21648$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21649          # Extract the first word of "$tool_basename", so it can be a program name with args.
21650set dummy $tool_basename; ac_word=$2
21651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21652$as_echo_n "checking for $ac_word... " >&6; }
21653if ${ac_cv_path_HG+:} false; then :
21654  $as_echo_n "(cached) " >&6
21655else
21656  case $HG in
21657  [\\/]* | ?:[\\/]*)
21658  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21659  ;;
21660  *)
21661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21662for as_dir in $PATH
21663do
21664  IFS=$as_save_IFS
21665  test -z "$as_dir" && as_dir=.
21666    for ac_exec_ext in '' $ac_executable_extensions; do
21667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21668    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21670    break 2
21671  fi
21672done
21673  done
21674IFS=$as_save_IFS
21675
21676  ;;
21677esac
21678fi
21679HG=$ac_cv_path_HG
21680if test -n "$HG"; then
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21682$as_echo "$HG" >&6; }
21683else
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21685$as_echo "no" >&6; }
21686fi
21687
21688
21689          if test "x$HG" = x; then
21690            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21691          fi
21692        else
21693          # Otherwise we believe it is a complete path. Use it as it is.
21694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21695$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21696          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21697$as_echo_n "checking for HG... " >&6; }
21698          if test ! -x "$tool_specified"; then
21699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21700$as_echo "not found" >&6; }
21701            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21702          fi
21703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21704$as_echo "$tool_specified" >&6; }
21705        fi
21706      fi
21707    fi
21708
21709  fi
21710
21711
21712
21713
21714  # Publish this variable in the help.
21715
21716
21717  if [ -z "${STAT+x}" ]; then
21718    # The variable is not set by user, try to locate tool using the code snippet
21719    for ac_prog in stat
21720do
21721  # Extract the first word of "$ac_prog", so it can be a program name with args.
21722set dummy $ac_prog; ac_word=$2
21723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21724$as_echo_n "checking for $ac_word... " >&6; }
21725if ${ac_cv_path_STAT+:} false; then :
21726  $as_echo_n "(cached) " >&6
21727else
21728  case $STAT in
21729  [\\/]* | ?:[\\/]*)
21730  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21731  ;;
21732  *)
21733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21734for as_dir in $PATH
21735do
21736  IFS=$as_save_IFS
21737  test -z "$as_dir" && as_dir=.
21738    for ac_exec_ext in '' $ac_executable_extensions; do
21739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21740    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21742    break 2
21743  fi
21744done
21745  done
21746IFS=$as_save_IFS
21747
21748  ;;
21749esac
21750fi
21751STAT=$ac_cv_path_STAT
21752if test -n "$STAT"; then
21753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21754$as_echo "$STAT" >&6; }
21755else
21756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21757$as_echo "no" >&6; }
21758fi
21759
21760
21761  test -n "$STAT" && break
21762done
21763
21764  else
21765    # The variable is set, but is it from the command line or the environment?
21766
21767    # Try to remove the string !STAT! from our list.
21768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21770      # If it failed, the variable was not from the command line. Ignore it,
21771      # but warn the user (except for BASH, which is always set by the calling BASH).
21772      if test "xSTAT" != xBASH; then
21773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21774$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21775      fi
21776      # Try to locate tool using the code snippet
21777      for ac_prog in stat
21778do
21779  # Extract the first word of "$ac_prog", so it can be a program name with args.
21780set dummy $ac_prog; ac_word=$2
21781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21782$as_echo_n "checking for $ac_word... " >&6; }
21783if ${ac_cv_path_STAT+:} false; then :
21784  $as_echo_n "(cached) " >&6
21785else
21786  case $STAT in
21787  [\\/]* | ?:[\\/]*)
21788  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21789  ;;
21790  *)
21791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21792for as_dir in $PATH
21793do
21794  IFS=$as_save_IFS
21795  test -z "$as_dir" && as_dir=.
21796    for ac_exec_ext in '' $ac_executable_extensions; do
21797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21798    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21800    break 2
21801  fi
21802done
21803  done
21804IFS=$as_save_IFS
21805
21806  ;;
21807esac
21808fi
21809STAT=$ac_cv_path_STAT
21810if test -n "$STAT"; then
21811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21812$as_echo "$STAT" >&6; }
21813else
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21815$as_echo "no" >&6; }
21816fi
21817
21818
21819  test -n "$STAT" && break
21820done
21821
21822    else
21823      # If it succeeded, then it was overridden by the user. We will use it
21824      # for the tool.
21825
21826      # First remove it from the list of overridden variables, so we can test
21827      # for unknown variables in the end.
21828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21829
21830      # Check if we try to supply an empty value
21831      if test "x$STAT" = x; then
21832        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21833$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21835$as_echo_n "checking for STAT... " >&6; }
21836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21837$as_echo "disabled" >&6; }
21838      else
21839        # Check if the provided tool contains a complete path.
21840        tool_specified="$STAT"
21841        tool_basename="${tool_specified##*/}"
21842        if test "x$tool_basename" = "x$tool_specified"; then
21843          # A command without a complete path is provided, search $PATH.
21844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21845$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21846          # Extract the first word of "$tool_basename", so it can be a program name with args.
21847set dummy $tool_basename; ac_word=$2
21848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21849$as_echo_n "checking for $ac_word... " >&6; }
21850if ${ac_cv_path_STAT+:} false; then :
21851  $as_echo_n "(cached) " >&6
21852else
21853  case $STAT in
21854  [\\/]* | ?:[\\/]*)
21855  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21856  ;;
21857  *)
21858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21859for as_dir in $PATH
21860do
21861  IFS=$as_save_IFS
21862  test -z "$as_dir" && as_dir=.
21863    for ac_exec_ext in '' $ac_executable_extensions; do
21864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21865    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21867    break 2
21868  fi
21869done
21870  done
21871IFS=$as_save_IFS
21872
21873  ;;
21874esac
21875fi
21876STAT=$ac_cv_path_STAT
21877if test -n "$STAT"; then
21878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21879$as_echo "$STAT" >&6; }
21880else
21881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21882$as_echo "no" >&6; }
21883fi
21884
21885
21886          if test "x$STAT" = x; then
21887            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21888          fi
21889        else
21890          # Otherwise we believe it is a complete path. Use it as it is.
21891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21892$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21893          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21894$as_echo_n "checking for STAT... " >&6; }
21895          if test ! -x "$tool_specified"; then
21896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21897$as_echo "not found" >&6; }
21898            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21899          fi
21900          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21901$as_echo "$tool_specified" >&6; }
21902        fi
21903      fi
21904    fi
21905
21906  fi
21907
21908
21909
21910
21911  # Publish this variable in the help.
21912
21913
21914  if [ -z "${TIME+x}" ]; then
21915    # The variable is not set by user, try to locate tool using the code snippet
21916    for ac_prog in time
21917do
21918  # Extract the first word of "$ac_prog", so it can be a program name with args.
21919set dummy $ac_prog; ac_word=$2
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21921$as_echo_n "checking for $ac_word... " >&6; }
21922if ${ac_cv_path_TIME+:} false; then :
21923  $as_echo_n "(cached) " >&6
21924else
21925  case $TIME in
21926  [\\/]* | ?:[\\/]*)
21927  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21928  ;;
21929  *)
21930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931for as_dir in $PATH
21932do
21933  IFS=$as_save_IFS
21934  test -z "$as_dir" && as_dir=.
21935    for ac_exec_ext in '' $ac_executable_extensions; do
21936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21937    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939    break 2
21940  fi
21941done
21942  done
21943IFS=$as_save_IFS
21944
21945  ;;
21946esac
21947fi
21948TIME=$ac_cv_path_TIME
21949if test -n "$TIME"; then
21950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21951$as_echo "$TIME" >&6; }
21952else
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21954$as_echo "no" >&6; }
21955fi
21956
21957
21958  test -n "$TIME" && break
21959done
21960
21961  else
21962    # The variable is set, but is it from the command line or the environment?
21963
21964    # Try to remove the string !TIME! from our list.
21965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21967      # If it failed, the variable was not from the command line. Ignore it,
21968      # but warn the user (except for BASH, which is always set by the calling BASH).
21969      if test "xTIME" != xBASH; then
21970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21971$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21972      fi
21973      # Try to locate tool using the code snippet
21974      for ac_prog in time
21975do
21976  # Extract the first word of "$ac_prog", so it can be a program name with args.
21977set dummy $ac_prog; ac_word=$2
21978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21979$as_echo_n "checking for $ac_word... " >&6; }
21980if ${ac_cv_path_TIME+:} false; then :
21981  $as_echo_n "(cached) " >&6
21982else
21983  case $TIME in
21984  [\\/]* | ?:[\\/]*)
21985  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21986  ;;
21987  *)
21988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21989for as_dir in $PATH
21990do
21991  IFS=$as_save_IFS
21992  test -z "$as_dir" && as_dir=.
21993    for ac_exec_ext in '' $ac_executable_extensions; do
21994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21995    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21997    break 2
21998  fi
21999done
22000  done
22001IFS=$as_save_IFS
22002
22003  ;;
22004esac
22005fi
22006TIME=$ac_cv_path_TIME
22007if test -n "$TIME"; then
22008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22009$as_echo "$TIME" >&6; }
22010else
22011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22012$as_echo "no" >&6; }
22013fi
22014
22015
22016  test -n "$TIME" && break
22017done
22018
22019    else
22020      # If it succeeded, then it was overridden by the user. We will use it
22021      # for the tool.
22022
22023      # First remove it from the list of overridden variables, so we can test
22024      # for unknown variables in the end.
22025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22026
22027      # Check if we try to supply an empty value
22028      if test "x$TIME" = x; then
22029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22030$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22032$as_echo_n "checking for TIME... " >&6; }
22033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22034$as_echo "disabled" >&6; }
22035      else
22036        # Check if the provided tool contains a complete path.
22037        tool_specified="$TIME"
22038        tool_basename="${tool_specified##*/}"
22039        if test "x$tool_basename" = "x$tool_specified"; then
22040          # A command without a complete path is provided, search $PATH.
22041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22042$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22043          # Extract the first word of "$tool_basename", so it can be a program name with args.
22044set dummy $tool_basename; ac_word=$2
22045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22046$as_echo_n "checking for $ac_word... " >&6; }
22047if ${ac_cv_path_TIME+:} false; then :
22048  $as_echo_n "(cached) " >&6
22049else
22050  case $TIME in
22051  [\\/]* | ?:[\\/]*)
22052  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22053  ;;
22054  *)
22055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22056for as_dir in $PATH
22057do
22058  IFS=$as_save_IFS
22059  test -z "$as_dir" && as_dir=.
22060    for ac_exec_ext in '' $ac_executable_extensions; do
22061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22062    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22064    break 2
22065  fi
22066done
22067  done
22068IFS=$as_save_IFS
22069
22070  ;;
22071esac
22072fi
22073TIME=$ac_cv_path_TIME
22074if test -n "$TIME"; then
22075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22076$as_echo "$TIME" >&6; }
22077else
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22079$as_echo "no" >&6; }
22080fi
22081
22082
22083          if test "x$TIME" = x; then
22084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22085          fi
22086        else
22087          # Otherwise we believe it is a complete path. Use it as it is.
22088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22089$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22091$as_echo_n "checking for TIME... " >&6; }
22092          if test ! -x "$tool_specified"; then
22093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22094$as_echo "not found" >&6; }
22095            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22096          fi
22097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22098$as_echo "$tool_specified" >&6; }
22099        fi
22100      fi
22101    fi
22102
22103  fi
22104
22105
22106
22107
22108  # Publish this variable in the help.
22109
22110
22111  if [ -z "${PATCH+x}" ]; then
22112    # The variable is not set by user, try to locate tool using the code snippet
22113    for ac_prog in gpatch patch
22114do
22115  # Extract the first word of "$ac_prog", so it can be a program name with args.
22116set dummy $ac_prog; ac_word=$2
22117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22118$as_echo_n "checking for $ac_word... " >&6; }
22119if ${ac_cv_path_PATCH+:} false; then :
22120  $as_echo_n "(cached) " >&6
22121else
22122  case $PATCH in
22123  [\\/]* | ?:[\\/]*)
22124  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22125  ;;
22126  *)
22127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22128for as_dir in $PATH
22129do
22130  IFS=$as_save_IFS
22131  test -z "$as_dir" && as_dir=.
22132    for ac_exec_ext in '' $ac_executable_extensions; do
22133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22134    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22136    break 2
22137  fi
22138done
22139  done
22140IFS=$as_save_IFS
22141
22142  ;;
22143esac
22144fi
22145PATCH=$ac_cv_path_PATCH
22146if test -n "$PATCH"; then
22147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22148$as_echo "$PATCH" >&6; }
22149else
22150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22151$as_echo "no" >&6; }
22152fi
22153
22154
22155  test -n "$PATCH" && break
22156done
22157
22158  else
22159    # The variable is set, but is it from the command line or the environment?
22160
22161    # Try to remove the string !PATCH! from our list.
22162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22164      # If it failed, the variable was not from the command line. Ignore it,
22165      # but warn the user (except for BASH, which is always set by the calling BASH).
22166      if test "xPATCH" != xBASH; then
22167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22168$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22169      fi
22170      # Try to locate tool using the code snippet
22171      for ac_prog in gpatch patch
22172do
22173  # Extract the first word of "$ac_prog", so it can be a program name with args.
22174set dummy $ac_prog; ac_word=$2
22175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22176$as_echo_n "checking for $ac_word... " >&6; }
22177if ${ac_cv_path_PATCH+:} false; then :
22178  $as_echo_n "(cached) " >&6
22179else
22180  case $PATCH in
22181  [\\/]* | ?:[\\/]*)
22182  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22183  ;;
22184  *)
22185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22186for as_dir in $PATH
22187do
22188  IFS=$as_save_IFS
22189  test -z "$as_dir" && as_dir=.
22190    for ac_exec_ext in '' $ac_executable_extensions; do
22191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22192    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22194    break 2
22195  fi
22196done
22197  done
22198IFS=$as_save_IFS
22199
22200  ;;
22201esac
22202fi
22203PATCH=$ac_cv_path_PATCH
22204if test -n "$PATCH"; then
22205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22206$as_echo "$PATCH" >&6; }
22207else
22208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22209$as_echo "no" >&6; }
22210fi
22211
22212
22213  test -n "$PATCH" && break
22214done
22215
22216    else
22217      # If it succeeded, then it was overridden by the user. We will use it
22218      # for the tool.
22219
22220      # First remove it from the list of overridden variables, so we can test
22221      # for unknown variables in the end.
22222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22223
22224      # Check if we try to supply an empty value
22225      if test "x$PATCH" = x; then
22226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22227$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22229$as_echo_n "checking for PATCH... " >&6; }
22230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22231$as_echo "disabled" >&6; }
22232      else
22233        # Check if the provided tool contains a complete path.
22234        tool_specified="$PATCH"
22235        tool_basename="${tool_specified##*/}"
22236        if test "x$tool_basename" = "x$tool_specified"; then
22237          # A command without a complete path is provided, search $PATH.
22238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22239$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22240          # Extract the first word of "$tool_basename", so it can be a program name with args.
22241set dummy $tool_basename; ac_word=$2
22242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22243$as_echo_n "checking for $ac_word... " >&6; }
22244if ${ac_cv_path_PATCH+:} false; then :
22245  $as_echo_n "(cached) " >&6
22246else
22247  case $PATCH in
22248  [\\/]* | ?:[\\/]*)
22249  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22250  ;;
22251  *)
22252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22253for as_dir in $PATH
22254do
22255  IFS=$as_save_IFS
22256  test -z "$as_dir" && as_dir=.
22257    for ac_exec_ext in '' $ac_executable_extensions; do
22258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22259    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22261    break 2
22262  fi
22263done
22264  done
22265IFS=$as_save_IFS
22266
22267  ;;
22268esac
22269fi
22270PATCH=$ac_cv_path_PATCH
22271if test -n "$PATCH"; then
22272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22273$as_echo "$PATCH" >&6; }
22274else
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22276$as_echo "no" >&6; }
22277fi
22278
22279
22280          if test "x$PATCH" = x; then
22281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22282          fi
22283        else
22284          # Otherwise we believe it is a complete path. Use it as it is.
22285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22286$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22288$as_echo_n "checking for PATCH... " >&6; }
22289          if test ! -x "$tool_specified"; then
22290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22291$as_echo "not found" >&6; }
22292            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22293          fi
22294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22295$as_echo "$tool_specified" >&6; }
22296        fi
22297      fi
22298    fi
22299
22300  fi
22301
22302
22303  # Check if it's GNU time
22304  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22305  if test "x$IS_GNU_TIME" != x; then
22306    IS_GNU_TIME=yes
22307  else
22308    IS_GNU_TIME=no
22309  fi
22310
22311
22312  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22313
22314
22315
22316  # Publish this variable in the help.
22317
22318
22319  if [ -z "${DSYMUTIL+x}" ]; then
22320    # The variable is not set by user, try to locate tool using the code snippet
22321    for ac_prog in dsymutil
22322do
22323  # Extract the first word of "$ac_prog", so it can be a program name with args.
22324set dummy $ac_prog; ac_word=$2
22325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22326$as_echo_n "checking for $ac_word... " >&6; }
22327if ${ac_cv_path_DSYMUTIL+:} false; then :
22328  $as_echo_n "(cached) " >&6
22329else
22330  case $DSYMUTIL in
22331  [\\/]* | ?:[\\/]*)
22332  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22333  ;;
22334  *)
22335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22336for as_dir in $PATH
22337do
22338  IFS=$as_save_IFS
22339  test -z "$as_dir" && as_dir=.
22340    for ac_exec_ext in '' $ac_executable_extensions; do
22341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22342    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22344    break 2
22345  fi
22346done
22347  done
22348IFS=$as_save_IFS
22349
22350  ;;
22351esac
22352fi
22353DSYMUTIL=$ac_cv_path_DSYMUTIL
22354if test -n "$DSYMUTIL"; then
22355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22356$as_echo "$DSYMUTIL" >&6; }
22357else
22358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22359$as_echo "no" >&6; }
22360fi
22361
22362
22363  test -n "$DSYMUTIL" && break
22364done
22365
22366  else
22367    # The variable is set, but is it from the command line or the environment?
22368
22369    # Try to remove the string !DSYMUTIL! from our list.
22370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22372      # If it failed, the variable was not from the command line. Ignore it,
22373      # but warn the user (except for BASH, which is always set by the calling BASH).
22374      if test "xDSYMUTIL" != xBASH; then
22375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22376$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22377      fi
22378      # Try to locate tool using the code snippet
22379      for ac_prog in dsymutil
22380do
22381  # Extract the first word of "$ac_prog", so it can be a program name with args.
22382set dummy $ac_prog; ac_word=$2
22383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22384$as_echo_n "checking for $ac_word... " >&6; }
22385if ${ac_cv_path_DSYMUTIL+:} false; then :
22386  $as_echo_n "(cached) " >&6
22387else
22388  case $DSYMUTIL in
22389  [\\/]* | ?:[\\/]*)
22390  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22391  ;;
22392  *)
22393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22394for as_dir in $PATH
22395do
22396  IFS=$as_save_IFS
22397  test -z "$as_dir" && as_dir=.
22398    for ac_exec_ext in '' $ac_executable_extensions; do
22399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22400    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22402    break 2
22403  fi
22404done
22405  done
22406IFS=$as_save_IFS
22407
22408  ;;
22409esac
22410fi
22411DSYMUTIL=$ac_cv_path_DSYMUTIL
22412if test -n "$DSYMUTIL"; then
22413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22414$as_echo "$DSYMUTIL" >&6; }
22415else
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22417$as_echo "no" >&6; }
22418fi
22419
22420
22421  test -n "$DSYMUTIL" && break
22422done
22423
22424    else
22425      # If it succeeded, then it was overridden by the user. We will use it
22426      # for the tool.
22427
22428      # First remove it from the list of overridden variables, so we can test
22429      # for unknown variables in the end.
22430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22431
22432      # Check if we try to supply an empty value
22433      if test "x$DSYMUTIL" = x; then
22434        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22435$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22437$as_echo_n "checking for DSYMUTIL... " >&6; }
22438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22439$as_echo "disabled" >&6; }
22440      else
22441        # Check if the provided tool contains a complete path.
22442        tool_specified="$DSYMUTIL"
22443        tool_basename="${tool_specified##*/}"
22444        if test "x$tool_basename" = "x$tool_specified"; then
22445          # A command without a complete path is provided, search $PATH.
22446          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22447$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22448          # Extract the first word of "$tool_basename", so it can be a program name with args.
22449set dummy $tool_basename; ac_word=$2
22450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22451$as_echo_n "checking for $ac_word... " >&6; }
22452if ${ac_cv_path_DSYMUTIL+:} false; then :
22453  $as_echo_n "(cached) " >&6
22454else
22455  case $DSYMUTIL in
22456  [\\/]* | ?:[\\/]*)
22457  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22458  ;;
22459  *)
22460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22461for as_dir in $PATH
22462do
22463  IFS=$as_save_IFS
22464  test -z "$as_dir" && as_dir=.
22465    for ac_exec_ext in '' $ac_executable_extensions; do
22466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22467    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22469    break 2
22470  fi
22471done
22472  done
22473IFS=$as_save_IFS
22474
22475  ;;
22476esac
22477fi
22478DSYMUTIL=$ac_cv_path_DSYMUTIL
22479if test -n "$DSYMUTIL"; then
22480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22481$as_echo "$DSYMUTIL" >&6; }
22482else
22483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22484$as_echo "no" >&6; }
22485fi
22486
22487
22488          if test "x$DSYMUTIL" = x; then
22489            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22490          fi
22491        else
22492          # Otherwise we believe it is a complete path. Use it as it is.
22493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22494$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22495          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22496$as_echo_n "checking for DSYMUTIL... " >&6; }
22497          if test ! -x "$tool_specified"; then
22498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22499$as_echo "not found" >&6; }
22500            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22501          fi
22502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22503$as_echo "$tool_specified" >&6; }
22504        fi
22505      fi
22506    fi
22507
22508  fi
22509
22510
22511
22512  if test "x$DSYMUTIL" = x; then
22513    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22514  fi
22515
22516
22517
22518
22519
22520  # Publish this variable in the help.
22521
22522
22523  if [ -z "${XATTR+x}" ]; then
22524    # The variable is not set by user, try to locate tool using the code snippet
22525    for ac_prog in xattr
22526do
22527  # Extract the first word of "$ac_prog", so it can be a program name with args.
22528set dummy $ac_prog; ac_word=$2
22529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22530$as_echo_n "checking for $ac_word... " >&6; }
22531if ${ac_cv_path_XATTR+:} false; then :
22532  $as_echo_n "(cached) " >&6
22533else
22534  case $XATTR in
22535  [\\/]* | ?:[\\/]*)
22536  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22537  ;;
22538  *)
22539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22540for as_dir in $PATH
22541do
22542  IFS=$as_save_IFS
22543  test -z "$as_dir" && as_dir=.
22544    for ac_exec_ext in '' $ac_executable_extensions; do
22545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22546    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22548    break 2
22549  fi
22550done
22551  done
22552IFS=$as_save_IFS
22553
22554  ;;
22555esac
22556fi
22557XATTR=$ac_cv_path_XATTR
22558if test -n "$XATTR"; then
22559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22560$as_echo "$XATTR" >&6; }
22561else
22562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22563$as_echo "no" >&6; }
22564fi
22565
22566
22567  test -n "$XATTR" && break
22568done
22569
22570  else
22571    # The variable is set, but is it from the command line or the environment?
22572
22573    # Try to remove the string !XATTR! from our list.
22574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22576      # If it failed, the variable was not from the command line. Ignore it,
22577      # but warn the user (except for BASH, which is always set by the calling BASH).
22578      if test "xXATTR" != xBASH; then
22579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22580$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22581      fi
22582      # Try to locate tool using the code snippet
22583      for ac_prog in xattr
22584do
22585  # Extract the first word of "$ac_prog", so it can be a program name with args.
22586set dummy $ac_prog; ac_word=$2
22587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22588$as_echo_n "checking for $ac_word... " >&6; }
22589if ${ac_cv_path_XATTR+:} false; then :
22590  $as_echo_n "(cached) " >&6
22591else
22592  case $XATTR in
22593  [\\/]* | ?:[\\/]*)
22594  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22595  ;;
22596  *)
22597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598for as_dir in $PATH
22599do
22600  IFS=$as_save_IFS
22601  test -z "$as_dir" && as_dir=.
22602    for ac_exec_ext in '' $ac_executable_extensions; do
22603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22606    break 2
22607  fi
22608done
22609  done
22610IFS=$as_save_IFS
22611
22612  ;;
22613esac
22614fi
22615XATTR=$ac_cv_path_XATTR
22616if test -n "$XATTR"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22618$as_echo "$XATTR" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624
22625  test -n "$XATTR" && break
22626done
22627
22628    else
22629      # If it succeeded, then it was overridden by the user. We will use it
22630      # for the tool.
22631
22632      # First remove it from the list of overridden variables, so we can test
22633      # for unknown variables in the end.
22634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22635
22636      # Check if we try to supply an empty value
22637      if test "x$XATTR" = x; then
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22639$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22641$as_echo_n "checking for XATTR... " >&6; }
22642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22643$as_echo "disabled" >&6; }
22644      else
22645        # Check if the provided tool contains a complete path.
22646        tool_specified="$XATTR"
22647        tool_basename="${tool_specified##*/}"
22648        if test "x$tool_basename" = "x$tool_specified"; then
22649          # A command without a complete path is provided, search $PATH.
22650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22651$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22652          # Extract the first word of "$tool_basename", so it can be a program name with args.
22653set dummy $tool_basename; ac_word=$2
22654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22655$as_echo_n "checking for $ac_word... " >&6; }
22656if ${ac_cv_path_XATTR+:} false; then :
22657  $as_echo_n "(cached) " >&6
22658else
22659  case $XATTR in
22660  [\\/]* | ?:[\\/]*)
22661  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22662  ;;
22663  *)
22664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22665for as_dir in $PATH
22666do
22667  IFS=$as_save_IFS
22668  test -z "$as_dir" && as_dir=.
22669    for ac_exec_ext in '' $ac_executable_extensions; do
22670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22671    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22673    break 2
22674  fi
22675done
22676  done
22677IFS=$as_save_IFS
22678
22679  ;;
22680esac
22681fi
22682XATTR=$ac_cv_path_XATTR
22683if test -n "$XATTR"; then
22684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22685$as_echo "$XATTR" >&6; }
22686else
22687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22688$as_echo "no" >&6; }
22689fi
22690
22691
22692          if test "x$XATTR" = x; then
22693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22694          fi
22695        else
22696          # Otherwise we believe it is a complete path. Use it as it is.
22697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22698$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22700$as_echo_n "checking for XATTR... " >&6; }
22701          if test ! -x "$tool_specified"; then
22702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22703$as_echo "not found" >&6; }
22704            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22705          fi
22706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22707$as_echo "$tool_specified" >&6; }
22708        fi
22709      fi
22710    fi
22711
22712  fi
22713
22714
22715
22716  if test "x$XATTR" = x; then
22717    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22718  fi
22719
22720
22721
22722
22723  # Publish this variable in the help.
22724
22725
22726  if [ -z "${CODESIGN+x}" ]; then
22727    # The variable is not set by user, try to locate tool using the code snippet
22728    for ac_prog in codesign
22729do
22730  # Extract the first word of "$ac_prog", so it can be a program name with args.
22731set dummy $ac_prog; ac_word=$2
22732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22733$as_echo_n "checking for $ac_word... " >&6; }
22734if ${ac_cv_path_CODESIGN+:} false; then :
22735  $as_echo_n "(cached) " >&6
22736else
22737  case $CODESIGN in
22738  [\\/]* | ?:[\\/]*)
22739  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22740  ;;
22741  *)
22742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22743for as_dir in $PATH
22744do
22745  IFS=$as_save_IFS
22746  test -z "$as_dir" && as_dir=.
22747    for ac_exec_ext in '' $ac_executable_extensions; do
22748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22749    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22751    break 2
22752  fi
22753done
22754  done
22755IFS=$as_save_IFS
22756
22757  ;;
22758esac
22759fi
22760CODESIGN=$ac_cv_path_CODESIGN
22761if test -n "$CODESIGN"; then
22762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22763$as_echo "$CODESIGN" >&6; }
22764else
22765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22766$as_echo "no" >&6; }
22767fi
22768
22769
22770  test -n "$CODESIGN" && break
22771done
22772
22773  else
22774    # The variable is set, but is it from the command line or the environment?
22775
22776    # Try to remove the string !CODESIGN! from our list.
22777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22779      # If it failed, the variable was not from the command line. Ignore it,
22780      # but warn the user (except for BASH, which is always set by the calling BASH).
22781      if test "xCODESIGN" != xBASH; then
22782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22783$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22784      fi
22785      # Try to locate tool using the code snippet
22786      for ac_prog in codesign
22787do
22788  # Extract the first word of "$ac_prog", so it can be a program name with args.
22789set dummy $ac_prog; ac_word=$2
22790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22791$as_echo_n "checking for $ac_word... " >&6; }
22792if ${ac_cv_path_CODESIGN+:} false; then :
22793  $as_echo_n "(cached) " >&6
22794else
22795  case $CODESIGN in
22796  [\\/]* | ?:[\\/]*)
22797  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22798  ;;
22799  *)
22800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22801for as_dir in $PATH
22802do
22803  IFS=$as_save_IFS
22804  test -z "$as_dir" && as_dir=.
22805    for ac_exec_ext in '' $ac_executable_extensions; do
22806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22807    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22809    break 2
22810  fi
22811done
22812  done
22813IFS=$as_save_IFS
22814
22815  ;;
22816esac
22817fi
22818CODESIGN=$ac_cv_path_CODESIGN
22819if test -n "$CODESIGN"; then
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22821$as_echo "$CODESIGN" >&6; }
22822else
22823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22824$as_echo "no" >&6; }
22825fi
22826
22827
22828  test -n "$CODESIGN" && break
22829done
22830
22831    else
22832      # If it succeeded, then it was overridden by the user. We will use it
22833      # for the tool.
22834
22835      # First remove it from the list of overridden variables, so we can test
22836      # for unknown variables in the end.
22837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22838
22839      # Check if we try to supply an empty value
22840      if test "x$CODESIGN" = x; then
22841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22842$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22844$as_echo_n "checking for CODESIGN... " >&6; }
22845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22846$as_echo "disabled" >&6; }
22847      else
22848        # Check if the provided tool contains a complete path.
22849        tool_specified="$CODESIGN"
22850        tool_basename="${tool_specified##*/}"
22851        if test "x$tool_basename" = "x$tool_specified"; then
22852          # A command without a complete path is provided, search $PATH.
22853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22854$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22855          # Extract the first word of "$tool_basename", so it can be a program name with args.
22856set dummy $tool_basename; ac_word=$2
22857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22858$as_echo_n "checking for $ac_word... " >&6; }
22859if ${ac_cv_path_CODESIGN+:} false; then :
22860  $as_echo_n "(cached) " >&6
22861else
22862  case $CODESIGN in
22863  [\\/]* | ?:[\\/]*)
22864  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22865  ;;
22866  *)
22867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22868for as_dir in $PATH
22869do
22870  IFS=$as_save_IFS
22871  test -z "$as_dir" && as_dir=.
22872    for ac_exec_ext in '' $ac_executable_extensions; do
22873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22874    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22876    break 2
22877  fi
22878done
22879  done
22880IFS=$as_save_IFS
22881
22882  ;;
22883esac
22884fi
22885CODESIGN=$ac_cv_path_CODESIGN
22886if test -n "$CODESIGN"; then
22887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22888$as_echo "$CODESIGN" >&6; }
22889else
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22891$as_echo "no" >&6; }
22892fi
22893
22894
22895          if test "x$CODESIGN" = x; then
22896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22897          fi
22898        else
22899          # Otherwise we believe it is a complete path. Use it as it is.
22900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22901$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22903$as_echo_n "checking for CODESIGN... " >&6; }
22904          if test ! -x "$tool_specified"; then
22905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22906$as_echo "not found" >&6; }
22907            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22908          fi
22909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22910$as_echo "$tool_specified" >&6; }
22911        fi
22912      fi
22913    fi
22914
22915  fi
22916
22917
22918    if test "x$CODESIGN" != "x"; then
22919      # Verify that the openjdk_codesign certificate is present
22920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22921$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22922      rm -f codesign-testfile
22923      touch codesign-testfile
22924      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22925      rm -f codesign-testfile
22926      if test "x$CODESIGN" = x; then
22927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22928$as_echo "no" >&6; }
22929      else
22930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22931$as_echo "yes" >&6; }
22932      fi
22933    fi
22934
22935
22936
22937  # Publish this variable in the help.
22938
22939
22940  if [ -z "${SETFILE+x}" ]; then
22941    # The variable is not set by user, try to locate tool using the code snippet
22942    for ac_prog in SetFile
22943do
22944  # Extract the first word of "$ac_prog", so it can be a program name with args.
22945set dummy $ac_prog; ac_word=$2
22946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22947$as_echo_n "checking for $ac_word... " >&6; }
22948if ${ac_cv_path_SETFILE+:} false; then :
22949  $as_echo_n "(cached) " >&6
22950else
22951  case $SETFILE in
22952  [\\/]* | ?:[\\/]*)
22953  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22954  ;;
22955  *)
22956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22957for as_dir in $PATH
22958do
22959  IFS=$as_save_IFS
22960  test -z "$as_dir" && as_dir=.
22961    for ac_exec_ext in '' $ac_executable_extensions; do
22962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22963    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22965    break 2
22966  fi
22967done
22968  done
22969IFS=$as_save_IFS
22970
22971  ;;
22972esac
22973fi
22974SETFILE=$ac_cv_path_SETFILE
22975if test -n "$SETFILE"; then
22976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22977$as_echo "$SETFILE" >&6; }
22978else
22979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22980$as_echo "no" >&6; }
22981fi
22982
22983
22984  test -n "$SETFILE" && break
22985done
22986
22987  else
22988    # The variable is set, but is it from the command line or the environment?
22989
22990    # Try to remove the string !SETFILE! from our list.
22991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22993      # If it failed, the variable was not from the command line. Ignore it,
22994      # but warn the user (except for BASH, which is always set by the calling BASH).
22995      if test "xSETFILE" != xBASH; then
22996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22997$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22998      fi
22999      # Try to locate tool using the code snippet
23000      for ac_prog in SetFile
23001do
23002  # Extract the first word of "$ac_prog", so it can be a program name with args.
23003set dummy $ac_prog; ac_word=$2
23004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23005$as_echo_n "checking for $ac_word... " >&6; }
23006if ${ac_cv_path_SETFILE+:} false; then :
23007  $as_echo_n "(cached) " >&6
23008else
23009  case $SETFILE in
23010  [\\/]* | ?:[\\/]*)
23011  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23012  ;;
23013  *)
23014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23015for as_dir in $PATH
23016do
23017  IFS=$as_save_IFS
23018  test -z "$as_dir" && as_dir=.
23019    for ac_exec_ext in '' $ac_executable_extensions; do
23020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23021    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23023    break 2
23024  fi
23025done
23026  done
23027IFS=$as_save_IFS
23028
23029  ;;
23030esac
23031fi
23032SETFILE=$ac_cv_path_SETFILE
23033if test -n "$SETFILE"; then
23034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23035$as_echo "$SETFILE" >&6; }
23036else
23037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23038$as_echo "no" >&6; }
23039fi
23040
23041
23042  test -n "$SETFILE" && break
23043done
23044
23045    else
23046      # If it succeeded, then it was overridden by the user. We will use it
23047      # for the tool.
23048
23049      # First remove it from the list of overridden variables, so we can test
23050      # for unknown variables in the end.
23051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23052
23053      # Check if we try to supply an empty value
23054      if test "x$SETFILE" = x; then
23055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23056$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23058$as_echo_n "checking for SETFILE... " >&6; }
23059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23060$as_echo "disabled" >&6; }
23061      else
23062        # Check if the provided tool contains a complete path.
23063        tool_specified="$SETFILE"
23064        tool_basename="${tool_specified##*/}"
23065        if test "x$tool_basename" = "x$tool_specified"; then
23066          # A command without a complete path is provided, search $PATH.
23067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23068$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23069          # Extract the first word of "$tool_basename", so it can be a program name with args.
23070set dummy $tool_basename; ac_word=$2
23071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23072$as_echo_n "checking for $ac_word... " >&6; }
23073if ${ac_cv_path_SETFILE+:} false; then :
23074  $as_echo_n "(cached) " >&6
23075else
23076  case $SETFILE in
23077  [\\/]* | ?:[\\/]*)
23078  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23079  ;;
23080  *)
23081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23082for as_dir in $PATH
23083do
23084  IFS=$as_save_IFS
23085  test -z "$as_dir" && as_dir=.
23086    for ac_exec_ext in '' $ac_executable_extensions; do
23087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23088    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23090    break 2
23091  fi
23092done
23093  done
23094IFS=$as_save_IFS
23095
23096  ;;
23097esac
23098fi
23099SETFILE=$ac_cv_path_SETFILE
23100if test -n "$SETFILE"; then
23101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23102$as_echo "$SETFILE" >&6; }
23103else
23104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23105$as_echo "no" >&6; }
23106fi
23107
23108
23109          if test "x$SETFILE" = x; then
23110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23111          fi
23112        else
23113          # Otherwise we believe it is a complete path. Use it as it is.
23114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23115$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23117$as_echo_n "checking for SETFILE... " >&6; }
23118          if test ! -x "$tool_specified"; then
23119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23120$as_echo "not found" >&6; }
23121            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23122          fi
23123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23124$as_echo "$tool_specified" >&6; }
23125        fi
23126      fi
23127    fi
23128
23129  fi
23130
23131
23132
23133  if test "x$SETFILE" = x; then
23134    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23135  fi
23136
23137
23138  fi
23139
23140
23141  # Test if bash supports pipefail.
23142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23143$as_echo_n "checking if bash supports pipefail... " >&6; }
23144  if ${BASH} -c 'set -o pipefail'; then
23145    BASH_ARGS="$BASH_ARGS -o pipefail"
23146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23147$as_echo "yes" >&6; }
23148  else
23149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23150$as_echo "no" >&6; }
23151  fi
23152
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23154$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23155  if ${BASH} -e -c 'true'; then
23156    BASH_ARGS="$BASH_ARGS -e"
23157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23158$as_echo "yes" >&6; }
23159  else
23160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23161$as_echo "no" >&6; }
23162  fi
23163
23164
23165
23166
23167# Check if pkg-config is available.
23168
23169
23170if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23171	if test -n "$ac_tool_prefix"; then
23172  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23173set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23175$as_echo_n "checking for $ac_word... " >&6; }
23176if ${ac_cv_path_PKG_CONFIG+:} false; then :
23177  $as_echo_n "(cached) " >&6
23178else
23179  case $PKG_CONFIG in
23180  [\\/]* | ?:[\\/]*)
23181  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23182  ;;
23183  *)
23184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23185for as_dir in $PATH
23186do
23187  IFS=$as_save_IFS
23188  test -z "$as_dir" && as_dir=.
23189    for ac_exec_ext in '' $ac_executable_extensions; do
23190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23191    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23193    break 2
23194  fi
23195done
23196  done
23197IFS=$as_save_IFS
23198
23199  ;;
23200esac
23201fi
23202PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23203if test -n "$PKG_CONFIG"; then
23204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23205$as_echo "$PKG_CONFIG" >&6; }
23206else
23207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23208$as_echo "no" >&6; }
23209fi
23210
23211
23212fi
23213if test -z "$ac_cv_path_PKG_CONFIG"; then
23214  ac_pt_PKG_CONFIG=$PKG_CONFIG
23215  # Extract the first word of "pkg-config", so it can be a program name with args.
23216set dummy pkg-config; ac_word=$2
23217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23218$as_echo_n "checking for $ac_word... " >&6; }
23219if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23220  $as_echo_n "(cached) " >&6
23221else
23222  case $ac_pt_PKG_CONFIG in
23223  [\\/]* | ?:[\\/]*)
23224  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23225  ;;
23226  *)
23227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23228for as_dir in $PATH
23229do
23230  IFS=$as_save_IFS
23231  test -z "$as_dir" && as_dir=.
23232    for ac_exec_ext in '' $ac_executable_extensions; do
23233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23234    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23236    break 2
23237  fi
23238done
23239  done
23240IFS=$as_save_IFS
23241
23242  ;;
23243esac
23244fi
23245ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23246if test -n "$ac_pt_PKG_CONFIG"; then
23247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23248$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23249else
23250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23251$as_echo "no" >&6; }
23252fi
23253
23254  if test "x$ac_pt_PKG_CONFIG" = x; then
23255    PKG_CONFIG=""
23256  else
23257    case $cross_compiling:$ac_tool_warned in
23258yes:)
23259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23261ac_tool_warned=yes ;;
23262esac
23263    PKG_CONFIG=$ac_pt_PKG_CONFIG
23264  fi
23265else
23266  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23267fi
23268
23269fi
23270if test -n "$PKG_CONFIG"; then
23271	_pkg_min_version=0.9.0
23272	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23273$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23274	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23275		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23276$as_echo "yes" >&6; }
23277	else
23278		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23279$as_echo "no" >&6; }
23280		PKG_CONFIG=""
23281	fi
23282
23283fi
23284
23285# After basic tools have been setup, we can check build os specific details.
23286
23287  ###############################################################################
23288
23289  # Note that this is the build platform OS version!
23290
23291  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23292  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23293  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23294  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23295
23296
23297
23298
23299
23300# Misc basic settings
23301
23302
23303# Check whether --with-default-make-target was given.
23304if test "${with_default_make_target+set}" = set; then :
23305  withval=$with_default_make_target;
23306fi
23307
23308  if test "x$with_default_make_target" = "x" \
23309      || test "x$with_default_make_target" = "xyes"; then
23310    DEFAULT_MAKE_TARGET="exploded-image"
23311  elif test "x$with_default_make_target" = "xno"; then
23312    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23313  else
23314    DEFAULT_MAKE_TARGET="$with_default_make_target"
23315  fi
23316
23317
23318
23319
23320###############################################################################
23321#
23322# Determine OpenJDK variants, options and version numbers.
23323#
23324###############################################################################
23325
23326# We need build & target for this.
23327
23328  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23329  # We always build headless support.
23330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23331$as_echo_n "checking headful support... " >&6; }
23332  # Check whether --enable-headful was given.
23333if test "${enable_headful+set}" = set; then :
23334  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23335else
23336  SUPPORT_HEADFUL=yes
23337fi
23338
23339
23340  SUPPORT_HEADLESS=yes
23341  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23342
23343  if test "x$SUPPORT_HEADFUL" = xyes; then
23344    # We are building both headful and headless.
23345    headful_msg="include support for both headful and headless"
23346  fi
23347
23348  if test "x$SUPPORT_HEADFUL" = xno; then
23349    # Thus we are building headless only.
23350    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23351    headful_msg="headless only"
23352  fi
23353
23354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23355$as_echo "$headful_msg" >&6; }
23356
23357
23358
23359
23360
23361  # Choose cacerts source file
23362
23363# Check whether --with-cacerts-file was given.
23364if test "${with_cacerts_file+set}" = set; then :
23365  withval=$with_cacerts_file;
23366fi
23367
23368  if test "x$with_cacerts_file" != x; then
23369    CACERTS_FILE=$with_cacerts_file
23370  fi
23371
23372
23373  # Enable or disable unlimited crypto
23374  # Check whether --enable-unlimited-crypto was given.
23375if test "${enable_unlimited_crypto+set}" = set; then :
23376  enableval=$enable_unlimited_crypto;
23377else
23378  enable_unlimited_crypto=no
23379fi
23380
23381  if test "x$enable_unlimited_crypto" = "xyes"; then
23382    UNLIMITED_CRYPTO=true
23383  else
23384    UNLIMITED_CRYPTO=false
23385  fi
23386
23387
23388  # Should we build the serviceability agent (SA)?
23389  INCLUDE_SA=true
23390  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
23391    INCLUDE_SA=false
23392  fi
23393  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
23394    INCLUDE_SA=false
23395  fi
23396  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23397    INCLUDE_SA=false
23398  fi
23399  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23400    INCLUDE_SA=false
23401  fi
23402
23403
23404  # Compress jars
23405  COMPRESS_JARS=false
23406
23407
23408
23409  # Setup default copyright year. Mostly overridden when building close to a new year.
23410
23411# Check whether --with-copyright-year was given.
23412if test "${with_copyright_year+set}" = set; then :
23413  withval=$with_copyright_year;
23414fi
23415
23416  if test "x$with_copyright_year" = xyes; then
23417    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23418  elif test "x$with_copyright_year" != x; then
23419    COPYRIGHT_YEAR="$with_copyright_year"
23420  else
23421    COPYRIGHT_YEAR=`date +'%Y'`
23422  fi
23423
23424
23425
23426  # Check whether --enable-keep-packaged-modules was given.
23427if test "${enable_keep_packaged_modules+set}" = set; then :
23428  enableval=$enable_keep_packaged_modules;
23429fi
23430
23431
23432  if test "x$enable_keep_packaged_modules" = "xyes"; then
23433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23434$as_echo_n "checking if packaged modules are kept... " >&6; }
23435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23436$as_echo "yes" >&6; }
23437    JLINK_KEEP_PACKAGED_MODULES=true
23438  elif test "x$enable_keep_packaged_modules" = "xno"; then
23439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23440$as_echo_n "checking if packaged modules are kept... " >&6; }
23441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23442$as_echo "no" >&6; }
23443    JLINK_KEEP_PACKAGED_MODULES=false
23444  elif test "x$enable_keep_packaged_modules" = "x"; then
23445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23446$as_echo "yes (default)" >&6; }
23447    JLINK_KEEP_PACKAGED_MODULES=true
23448  else
23449    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23450  fi
23451
23452
23453
23454
23455  # Control wether Hotspot runs Queens test after build.
23456  # Check whether --enable-hotspot-test-in-build was given.
23457if test "${enable_hotspot_test_in_build+set}" = set; then :
23458  enableval=$enable_hotspot_test_in_build;
23459else
23460  enable_hotspot_test_in_build=no
23461fi
23462
23463  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23464    TEST_IN_BUILD=true
23465  else
23466    TEST_IN_BUILD=false
23467  fi
23468
23469
23470
23471  # Warn user that old version arguments are deprecated.
23472
23473
23474# Check whether --with-milestone was given.
23475if test "${with_milestone+set}" = set; then :
23476  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23477$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23478fi
23479
23480
23481
23482
23483# Check whether --with-update-version was given.
23484if test "${with_update_version+set}" = set; then :
23485  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23486$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23487fi
23488
23489
23490
23491
23492# Check whether --with-user-release-suffix was given.
23493if test "${with_user_release_suffix+set}" = set; then :
23494  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
23495$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23496fi
23497
23498
23499
23500
23501# Check whether --with-build-number was given.
23502if test "${with_build_number+set}" = set; then :
23503  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23504$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23505fi
23506
23507
23508
23509  # Source the version numbers file
23510  . $AUTOCONF_DIR/version-numbers
23511
23512  # Some non-version number information is set in that file
23513
23514
23515
23516
23517
23518
23519
23520
23521  # Override version from arguments
23522
23523  # If --with-version-string is set, process it first. It is possible to
23524  # override parts with more specific flags, since these are processed later.
23525
23526# Check whether --with-version-string was given.
23527if test "${with_version_string+set}" = set; then :
23528  withval=$with_version_string;
23529fi
23530
23531  if test "x$with_version_string" = xyes; then
23532    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23533  elif test "x$with_version_string" != x; then
23534    # Additional [] needed to keep m4 from mangling shell constructs.
23535    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23536      VERSION_MAJOR=${BASH_REMATCH[1]}
23537      VERSION_MINOR=${BASH_REMATCH[3]}
23538      VERSION_SECURITY=${BASH_REMATCH[5]}
23539      VERSION_PATCH=${BASH_REMATCH[7]}
23540      VERSION_PRE=${BASH_REMATCH[9]}
23541      version_plus_separator=${BASH_REMATCH[11]}
23542      VERSION_BUILD=${BASH_REMATCH[12]}
23543      VERSION_OPT=${BASH_REMATCH[14]}
23544      # Unspecified numerical fields are interpreted as 0.
23545      if test "x$VERSION_MINOR" = x; then
23546        VERSION_MINOR=0
23547      fi
23548      if test "x$VERSION_SECURITY" = x; then
23549        VERSION_SECURITY=0
23550      fi
23551      if test "x$VERSION_PATCH" = x; then
23552        VERSION_PATCH=0
23553      fi
23554      if test "x$version_plus_separator" != x \
23555          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23556        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23557      fi
23558      # Stop the version part process from setting default values.
23559      # We still allow them to explicitely override though.
23560      NO_DEFAULT_VERSION_PARTS=true
23561    else
23562      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23563    fi
23564  fi
23565
23566
23567# Check whether --with-version-pre was given.
23568if test "${with_version_pre+set}" = set; then :
23569  withval=$with_version_pre; with_version_pre_present=true
23570else
23571  with_version_pre_present=false
23572fi
23573
23574
23575  if test "x$with_version_pre_present" = xtrue; then
23576    if test "x$with_version_pre" = xyes; then
23577      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23578    elif test "x$with_version_pre" = xno; then
23579      # Interpret --without-* as empty string instead of the literal "no"
23580      VERSION_PRE=
23581    else
23582      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23583       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23584      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23586$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23587      fi
23588    fi
23589  else
23590    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23591      # Default is to use "internal" as pre
23592      VERSION_PRE="internal"
23593    fi
23594  fi
23595
23596
23597# Check whether --with-version-opt was given.
23598if test "${with_version_opt+set}" = set; then :
23599  withval=$with_version_opt; with_version_opt_present=true
23600else
23601  with_version_opt_present=false
23602fi
23603
23604
23605  if test "x$with_version_opt_present" = xtrue; then
23606    if test "x$with_version_opt" = xyes; then
23607      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23608    elif test "x$with_version_opt" = xno; then
23609      # Interpret --without-* as empty string instead of the literal "no"
23610      VERSION_OPT=
23611    else
23612      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23613       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23614      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23616$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23617      fi
23618    fi
23619  else
23620    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23621      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23622      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23623      # Outer [ ] to quote m4.
23624       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23625      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23626    fi
23627  fi
23628
23629
23630# Check whether --with-version-build was given.
23631if test "${with_version_build+set}" = set; then :
23632  withval=$with_version_build; with_version_build_present=true
23633else
23634  with_version_build_present=false
23635fi
23636
23637
23638  if test "x$with_version_build_present" = xtrue; then
23639    if test "x$with_version_build" = xyes; then
23640      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23641    elif test "x$with_version_build" = xno; then
23642      # Interpret --without-* as empty string instead of the literal "no"
23643      VERSION_BUILD=
23644    elif test "x$with_version_build" = x; then
23645      VERSION_BUILD=
23646    else
23647
23648  # Additional [] needed to keep m4 from mangling shell constructs.
23649  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23650    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23651  fi
23652  # Extract the version number without leading zeros.
23653  cleaned_value=${BASH_REMATCH[1]}
23654  if test "x$cleaned_value" = x; then
23655    # Special case for zero
23656    cleaned_value=${BASH_REMATCH[2]}
23657  fi
23658
23659  if test $cleaned_value -gt 255; then
23660    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23661  fi
23662  if test "x$cleaned_value" != "x$with_version_build"; then
23663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23664$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23665  fi
23666  VERSION_BUILD=$cleaned_value
23667
23668    fi
23669  else
23670    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23671      # Default is to not have a build number.
23672      VERSION_BUILD=""
23673      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23674      VERSION_BUILD=0
23675    fi
23676  fi
23677
23678
23679# Check whether --with-version-major was given.
23680if test "${with_version_major+set}" = set; then :
23681  withval=$with_version_major; with_version_major_present=true
23682else
23683  with_version_major_present=false
23684fi
23685
23686
23687  if test "x$with_version_major_present" = xtrue; then
23688    if test "x$with_version_major" = xyes; then
23689      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23690    else
23691
23692  # Additional [] needed to keep m4 from mangling shell constructs.
23693  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23694    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23695  fi
23696  # Extract the version number without leading zeros.
23697  cleaned_value=${BASH_REMATCH[1]}
23698  if test "x$cleaned_value" = x; then
23699    # Special case for zero
23700    cleaned_value=${BASH_REMATCH[2]}
23701  fi
23702
23703  if test $cleaned_value -gt 255; then
23704    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23705  fi
23706  if test "x$cleaned_value" != "x$with_version_major"; then
23707    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23708$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23709  fi
23710  VERSION_MAJOR=$cleaned_value
23711
23712    fi
23713  else
23714    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23715      # Default is to get value from version-numbers
23716      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23717    fi
23718  fi
23719
23720
23721# Check whether --with-version-minor was given.
23722if test "${with_version_minor+set}" = set; then :
23723  withval=$with_version_minor; with_version_minor_present=true
23724else
23725  with_version_minor_present=false
23726fi
23727
23728
23729  if test "x$with_version_minor_present" = xtrue; then
23730    if test "x$with_version_minor" = xyes; then
23731      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23732    elif test "x$with_version_minor" = xno; then
23733      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23734      VERSION_MINOR=0
23735    elif test "x$with_version_minor" = x; then
23736      VERSION_MINOR=0
23737    else
23738
23739  # Additional [] needed to keep m4 from mangling shell constructs.
23740  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23741    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23742  fi
23743  # Extract the version number without leading zeros.
23744  cleaned_value=${BASH_REMATCH[1]}
23745  if test "x$cleaned_value" = x; then
23746    # Special case for zero
23747    cleaned_value=${BASH_REMATCH[2]}
23748  fi
23749
23750  if test $cleaned_value -gt 255; then
23751    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23752  fi
23753  if test "x$cleaned_value" != "x$with_version_minor"; then
23754    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23755$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23756  fi
23757  VERSION_MINOR=$cleaned_value
23758
23759    fi
23760  else
23761    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23762      # Default is 0, if unspecified
23763      VERSION_MINOR=0
23764    fi
23765  fi
23766
23767
23768# Check whether --with-version-security was given.
23769if test "${with_version_security+set}" = set; then :
23770  withval=$with_version_security; with_version_security_present=true
23771else
23772  with_version_security_present=false
23773fi
23774
23775
23776  if test "x$with_version_security_present" = xtrue; then
23777    if test "x$with_version_security" = xyes; then
23778      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23779    elif test "x$with_version_security" = xno; then
23780      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23781      VERSION_SECURITY=0
23782    elif test "x$with_version_security" = x; then
23783      VERSION_SECURITY=0
23784    else
23785
23786  # Additional [] needed to keep m4 from mangling shell constructs.
23787  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23788    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23789  fi
23790  # Extract the version number without leading zeros.
23791  cleaned_value=${BASH_REMATCH[1]}
23792  if test "x$cleaned_value" = x; then
23793    # Special case for zero
23794    cleaned_value=${BASH_REMATCH[2]}
23795  fi
23796
23797  if test $cleaned_value -gt 255; then
23798    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23799  fi
23800  if test "x$cleaned_value" != "x$with_version_security"; then
23801    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23802$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23803  fi
23804  VERSION_SECURITY=$cleaned_value
23805
23806    fi
23807  else
23808    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23809      # Default is 0, if unspecified
23810      VERSION_SECURITY=0
23811    fi
23812  fi
23813
23814
23815# Check whether --with-version-patch was given.
23816if test "${with_version_patch+set}" = set; then :
23817  withval=$with_version_patch; with_version_patch_present=true
23818else
23819  with_version_patch_present=false
23820fi
23821
23822
23823  if test "x$with_version_patch_present" = xtrue; then
23824    if test "x$with_version_patch" = xyes; then
23825      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23826    elif test "x$with_version_patch" = xno; then
23827      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23828      VERSION_PATCH=0
23829    elif test "x$with_version_patch" = x; then
23830      VERSION_PATCH=0
23831    else
23832
23833  # Additional [] needed to keep m4 from mangling shell constructs.
23834  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23835    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23836  fi
23837  # Extract the version number without leading zeros.
23838  cleaned_value=${BASH_REMATCH[1]}
23839  if test "x$cleaned_value" = x; then
23840    # Special case for zero
23841    cleaned_value=${BASH_REMATCH[2]}
23842  fi
23843
23844  if test $cleaned_value -gt 255; then
23845    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23846  fi
23847  if test "x$cleaned_value" != "x$with_version_patch"; then
23848    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23849$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23850  fi
23851  VERSION_PATCH=$cleaned_value
23852
23853    fi
23854  else
23855    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23856      # Default is 0, if unspecified
23857      VERSION_PATCH=0
23858    fi
23859  fi
23860
23861  # Calculate derived version properties
23862
23863  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23864  if test "x$VERSION_PRE" = x; then
23865    VERSION_IS_GA=true
23866  else
23867    VERSION_IS_GA=false
23868  fi
23869
23870  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23871  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23872
23873  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23874  # Strip trailing zeroes from stripped_version_number
23875  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23876  VERSION_NUMBER=$stripped_version_number
23877
23878  # The complete version string, with additional build information
23879  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23880    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23881  else
23882    # If either build or opt is set, we need a + separator
23883    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23884  fi
23885
23886  # The short version string, just VERSION_NUMBER and PRE, if present.
23887  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23888
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23890$as_echo_n "checking for version string... " >&6; }
23891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23892$as_echo "$VERSION_STRING" >&6; }
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908###############################################################################
23909#
23910# Setup BootJDK, used to bootstrap the build.
23911#
23912###############################################################################
23913
23914
23915  BOOT_JDK_FOUND=no
23916
23917# Check whether --with-boot-jdk was given.
23918if test "${with_boot_jdk+set}" = set; then :
23919  withval=$with_boot_jdk;
23920fi
23921
23922
23923  # We look for the Boot JDK through various means, going from more certain to
23924  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23925  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23926  # must check if this is indeed valid; otherwise we'll continue looking.
23927
23928  # Test: Is bootjdk explicitely set by command line arguments?
23929
23930  if test "x$BOOT_JDK_FOUND" = xno; then
23931    # Now execute the test
23932
23933  if test "x$with_boot_jdk" != x; then
23934    BOOT_JDK=$with_boot_jdk
23935    BOOT_JDK_FOUND=maybe
23936    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23937$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23938  fi
23939
23940
23941    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23942    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23943      # Do we have a bin/java?
23944      if test ! -x "$BOOT_JDK/bin/java"; then
23945        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23947        BOOT_JDK_FOUND=no
23948      else
23949        # Do we have a bin/javac?
23950        if test ! -x "$BOOT_JDK/bin/javac"; then
23951          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23953          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23954$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23955          BOOT_JDK_FOUND=no
23956        else
23957          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23958          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23959
23960          # Extra M4 quote needed to protect [] in grep expression.
23961          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23962          if test "x$FOUND_CORRECT_VERSION" = x; then
23963            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23965            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23966$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23967            BOOT_JDK_FOUND=no
23968          else
23969            # We're done! :-)
23970            BOOT_JDK_FOUND=yes
23971
23972  # Only process if variable expands to non-empty
23973
23974  if test "x$BOOT_JDK" != x; then
23975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23976
23977  # Input might be given as Windows format, start by converting to
23978  # unix format.
23979  path="$BOOT_JDK"
23980  new_path=`$CYGPATH -u "$path"`
23981
23982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23985  # "foo.exe" is OK but "foo" is an error.
23986  #
23987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23988  # It is also a way to make sure we got the proper file name for the real test later on.
23989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23990  if test "x$test_shortpath" = x; then
23991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23993    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23994  fi
23995
23996  # Call helper function which possibly converts this using DOS-style short mode.
23997  # If so, the updated path is stored in $new_path.
23998
23999  input_path="$new_path"
24000  # Check if we need to convert this using DOS-style short mode. If the path
24001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24002  # take no chances and rewrite it.
24003  # Note: m4 eats our [], so we need to use [ and ] instead.
24004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24005  if test "x$has_forbidden_chars" != x; then
24006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24010      # Going to short mode and back again did indeed matter. Since short mode is
24011      # case insensitive, let's make it lowercase to improve readability.
24012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24013      # Now convert it back to Unix-style (cygpath)
24014      input_path=`$CYGPATH -u "$shortmode_path"`
24015      new_path="$input_path"
24016    fi
24017  fi
24018
24019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24020  if test "x$test_cygdrive_prefix" = x; then
24021    # As a simple fix, exclude /usr/bin since it's not a real path.
24022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24024      # a path prefixed by /cygdrive for fixpath to work.
24025      new_path="$CYGWIN_ROOT_PATH$input_path"
24026    fi
24027  fi
24028
24029
24030  if test "x$path" != "x$new_path"; then
24031    BOOT_JDK="$new_path"
24032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24034  fi
24035
24036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24037
24038  path="$BOOT_JDK"
24039  has_colon=`$ECHO $path | $GREP ^.:`
24040  new_path="$path"
24041  if test "x$has_colon" = x; then
24042    # Not in mixed or Windows style, start by that.
24043    new_path=`cmd //c echo $path`
24044  fi
24045
24046
24047  input_path="$new_path"
24048  # Check if we need to convert this using DOS-style short mode. If the path
24049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24050  # take no chances and rewrite it.
24051  # Note: m4 eats our [], so we need to use [ and ] instead.
24052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24053  if test "x$has_forbidden_chars" != x; then
24054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24056  fi
24057
24058
24059  windows_path="$new_path"
24060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24061    unix_path=`$CYGPATH -u "$windows_path"`
24062    new_path="$unix_path"
24063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24065    new_path="$unix_path"
24066  fi
24067
24068  if test "x$path" != "x$new_path"; then
24069    BOOT_JDK="$new_path"
24070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24072  fi
24073
24074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24076
24077    else
24078      # We're on a unix platform. Hooray! :)
24079      path="$BOOT_JDK"
24080      has_space=`$ECHO "$path" | $GREP " "`
24081      if test "x$has_space" != x; then
24082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24084        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24085      fi
24086
24087      # Use eval to expand a potential ~
24088      eval path="$path"
24089      if test ! -f "$path" && test ! -d "$path"; then
24090        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24091      fi
24092
24093      if test -d "$path"; then
24094        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24095      else
24096        dir="`$DIRNAME "$path"`"
24097        base="`$BASENAME "$path"`"
24098        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24099      fi
24100    fi
24101  fi
24102
24103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24104$as_echo_n "checking for Boot JDK... " >&6; }
24105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24106$as_echo "$BOOT_JDK" >&6; }
24107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24108$as_echo_n "checking Boot JDK version... " >&6; }
24109            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24111$as_echo "$BOOT_JDK_VERSION" >&6; }
24112          fi # end check jdk version
24113        fi # end check javac
24114      fi # end check java
24115    fi # end check boot jdk found
24116  fi
24117
24118  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24119    # Having specified an argument which is incorrect will produce an instant failure;
24120    # we should not go on looking
24121    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24122  fi
24123
24124  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24125
24126  if test "x$BOOT_JDK_FOUND" = xno; then
24127    # Now execute the test
24128
24129  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24130    # First check at user selected default
24131
24132  if test "x$BOOT_JDK_FOUND" = xno; then
24133    # Now execute the test
24134
24135  if test -x /usr/libexec/java_home; then
24136    BOOT_JDK=`/usr/libexec/java_home `
24137    BOOT_JDK_FOUND=maybe
24138    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24139$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24140  fi
24141
24142
24143    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24144    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24145      # Do we have a bin/java?
24146      if test ! -x "$BOOT_JDK/bin/java"; then
24147        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24149        BOOT_JDK_FOUND=no
24150      else
24151        # Do we have a bin/javac?
24152        if test ! -x "$BOOT_JDK/bin/javac"; then
24153          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24155          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24156$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24157          BOOT_JDK_FOUND=no
24158        else
24159          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24160          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24161
24162          # Extra M4 quote needed to protect [] in grep expression.
24163          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24164          if test "x$FOUND_CORRECT_VERSION" = x; then
24165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24167            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24168$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24169            BOOT_JDK_FOUND=no
24170          else
24171            # We're done! :-)
24172            BOOT_JDK_FOUND=yes
24173
24174  # Only process if variable expands to non-empty
24175
24176  if test "x$BOOT_JDK" != x; then
24177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24178
24179  # Input might be given as Windows format, start by converting to
24180  # unix format.
24181  path="$BOOT_JDK"
24182  new_path=`$CYGPATH -u "$path"`
24183
24184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24187  # "foo.exe" is OK but "foo" is an error.
24188  #
24189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24190  # It is also a way to make sure we got the proper file name for the real test later on.
24191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24192  if test "x$test_shortpath" = x; then
24193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24195    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24196  fi
24197
24198  # Call helper function which possibly converts this using DOS-style short mode.
24199  # If so, the updated path is stored in $new_path.
24200
24201  input_path="$new_path"
24202  # Check if we need to convert this using DOS-style short mode. If the path
24203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24204  # take no chances and rewrite it.
24205  # Note: m4 eats our [], so we need to use [ and ] instead.
24206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24207  if test "x$has_forbidden_chars" != x; then
24208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24212      # Going to short mode and back again did indeed matter. Since short mode is
24213      # case insensitive, let's make it lowercase to improve readability.
24214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24215      # Now convert it back to Unix-style (cygpath)
24216      input_path=`$CYGPATH -u "$shortmode_path"`
24217      new_path="$input_path"
24218    fi
24219  fi
24220
24221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24222  if test "x$test_cygdrive_prefix" = x; then
24223    # As a simple fix, exclude /usr/bin since it's not a real path.
24224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24226      # a path prefixed by /cygdrive for fixpath to work.
24227      new_path="$CYGWIN_ROOT_PATH$input_path"
24228    fi
24229  fi
24230
24231
24232  if test "x$path" != "x$new_path"; then
24233    BOOT_JDK="$new_path"
24234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24236  fi
24237
24238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24239
24240  path="$BOOT_JDK"
24241  has_colon=`$ECHO $path | $GREP ^.:`
24242  new_path="$path"
24243  if test "x$has_colon" = x; then
24244    # Not in mixed or Windows style, start by that.
24245    new_path=`cmd //c echo $path`
24246  fi
24247
24248
24249  input_path="$new_path"
24250  # Check if we need to convert this using DOS-style short mode. If the path
24251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24252  # take no chances and rewrite it.
24253  # Note: m4 eats our [], so we need to use [ and ] instead.
24254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24255  if test "x$has_forbidden_chars" != x; then
24256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24258  fi
24259
24260
24261  windows_path="$new_path"
24262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24263    unix_path=`$CYGPATH -u "$windows_path"`
24264    new_path="$unix_path"
24265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24267    new_path="$unix_path"
24268  fi
24269
24270  if test "x$path" != "x$new_path"; then
24271    BOOT_JDK="$new_path"
24272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24274  fi
24275
24276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24278
24279    else
24280      # We're on a unix platform. Hooray! :)
24281      path="$BOOT_JDK"
24282      has_space=`$ECHO "$path" | $GREP " "`
24283      if test "x$has_space" != x; then
24284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24287      fi
24288
24289      # Use eval to expand a potential ~
24290      eval path="$path"
24291      if test ! -f "$path" && test ! -d "$path"; then
24292        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24293      fi
24294
24295      if test -d "$path"; then
24296        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24297      else
24298        dir="`$DIRNAME "$path"`"
24299        base="`$BASENAME "$path"`"
24300        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24301      fi
24302    fi
24303  fi
24304
24305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24306$as_echo_n "checking for Boot JDK... " >&6; }
24307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24308$as_echo "$BOOT_JDK" >&6; }
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24310$as_echo_n "checking Boot JDK version... " >&6; }
24311            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24313$as_echo "$BOOT_JDK_VERSION" >&6; }
24314          fi # end check jdk version
24315        fi # end check javac
24316      fi # end check java
24317    fi # end check boot jdk found
24318  fi
24319
24320    # If that did not work out (e.g. too old), try explicit versions instead
24321
24322  if test "x$BOOT_JDK_FOUND" = xno; then
24323    # Now execute the test
24324
24325  if test -x /usr/libexec/java_home; then
24326    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24327    BOOT_JDK_FOUND=maybe
24328    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24329$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24330  fi
24331
24332
24333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24335      # Do we have a bin/java?
24336      if test ! -x "$BOOT_JDK/bin/java"; then
24337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24339        BOOT_JDK_FOUND=no
24340      else
24341        # Do we have a bin/javac?
24342        if test ! -x "$BOOT_JDK/bin/javac"; then
24343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24347          BOOT_JDK_FOUND=no
24348        else
24349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24351
24352          # Extra M4 quote needed to protect [] in grep expression.
24353          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24354          if test "x$FOUND_CORRECT_VERSION" = x; then
24355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24359            BOOT_JDK_FOUND=no
24360          else
24361            # We're done! :-)
24362            BOOT_JDK_FOUND=yes
24363
24364  # Only process if variable expands to non-empty
24365
24366  if test "x$BOOT_JDK" != x; then
24367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24368
24369  # Input might be given as Windows format, start by converting to
24370  # unix format.
24371  path="$BOOT_JDK"
24372  new_path=`$CYGPATH -u "$path"`
24373
24374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24377  # "foo.exe" is OK but "foo" is an error.
24378  #
24379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24380  # It is also a way to make sure we got the proper file name for the real test later on.
24381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24382  if test "x$test_shortpath" = x; then
24383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24386  fi
24387
24388  # Call helper function which possibly converts this using DOS-style short mode.
24389  # If so, the updated path is stored in $new_path.
24390
24391  input_path="$new_path"
24392  # Check if we need to convert this using DOS-style short mode. If the path
24393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24394  # take no chances and rewrite it.
24395  # Note: m4 eats our [], so we need to use [ and ] instead.
24396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24397  if test "x$has_forbidden_chars" != x; then
24398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24402      # Going to short mode and back again did indeed matter. Since short mode is
24403      # case insensitive, let's make it lowercase to improve readability.
24404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24405      # Now convert it back to Unix-style (cygpath)
24406      input_path=`$CYGPATH -u "$shortmode_path"`
24407      new_path="$input_path"
24408    fi
24409  fi
24410
24411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24412  if test "x$test_cygdrive_prefix" = x; then
24413    # As a simple fix, exclude /usr/bin since it's not a real path.
24414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24416      # a path prefixed by /cygdrive for fixpath to work.
24417      new_path="$CYGWIN_ROOT_PATH$input_path"
24418    fi
24419  fi
24420
24421
24422  if test "x$path" != "x$new_path"; then
24423    BOOT_JDK="$new_path"
24424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24426  fi
24427
24428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24429
24430  path="$BOOT_JDK"
24431  has_colon=`$ECHO $path | $GREP ^.:`
24432  new_path="$path"
24433  if test "x$has_colon" = x; then
24434    # Not in mixed or Windows style, start by that.
24435    new_path=`cmd //c echo $path`
24436  fi
24437
24438
24439  input_path="$new_path"
24440  # Check if we need to convert this using DOS-style short mode. If the path
24441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24442  # take no chances and rewrite it.
24443  # Note: m4 eats our [], so we need to use [ and ] instead.
24444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24445  if test "x$has_forbidden_chars" != x; then
24446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24448  fi
24449
24450
24451  windows_path="$new_path"
24452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24453    unix_path=`$CYGPATH -u "$windows_path"`
24454    new_path="$unix_path"
24455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24457    new_path="$unix_path"
24458  fi
24459
24460  if test "x$path" != "x$new_path"; then
24461    BOOT_JDK="$new_path"
24462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24464  fi
24465
24466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24468
24469    else
24470      # We're on a unix platform. Hooray! :)
24471      path="$BOOT_JDK"
24472      has_space=`$ECHO "$path" | $GREP " "`
24473      if test "x$has_space" != x; then
24474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24477      fi
24478
24479      # Use eval to expand a potential ~
24480      eval path="$path"
24481      if test ! -f "$path" && test ! -d "$path"; then
24482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24483      fi
24484
24485      if test -d "$path"; then
24486        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24487      else
24488        dir="`$DIRNAME "$path"`"
24489        base="`$BASENAME "$path"`"
24490        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24491      fi
24492    fi
24493  fi
24494
24495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24496$as_echo_n "checking for Boot JDK... " >&6; }
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24498$as_echo "$BOOT_JDK" >&6; }
24499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24500$as_echo_n "checking Boot JDK version... " >&6; }
24501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24503$as_echo "$BOOT_JDK_VERSION" >&6; }
24504          fi # end check jdk version
24505        fi # end check javac
24506      fi # end check java
24507    fi # end check boot jdk found
24508  fi
24509
24510
24511  if test "x$BOOT_JDK_FOUND" = xno; then
24512    # Now execute the test
24513
24514  if test -x /usr/libexec/java_home; then
24515    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24516    BOOT_JDK_FOUND=maybe
24517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24518$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24519  fi
24520
24521
24522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24524      # Do we have a bin/java?
24525      if test ! -x "$BOOT_JDK/bin/java"; then
24526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24528        BOOT_JDK_FOUND=no
24529      else
24530        # Do we have a bin/javac?
24531        if test ! -x "$BOOT_JDK/bin/javac"; then
24532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24536          BOOT_JDK_FOUND=no
24537        else
24538          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24539          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24540
24541          # Extra M4 quote needed to protect [] in grep expression.
24542          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24543          if test "x$FOUND_CORRECT_VERSION" = x; then
24544            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24546            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24547$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24548            BOOT_JDK_FOUND=no
24549          else
24550            # We're done! :-)
24551            BOOT_JDK_FOUND=yes
24552
24553  # Only process if variable expands to non-empty
24554
24555  if test "x$BOOT_JDK" != x; then
24556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24557
24558  # Input might be given as Windows format, start by converting to
24559  # unix format.
24560  path="$BOOT_JDK"
24561  new_path=`$CYGPATH -u "$path"`
24562
24563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24566  # "foo.exe" is OK but "foo" is an error.
24567  #
24568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24569  # It is also a way to make sure we got the proper file name for the real test later on.
24570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24571  if test "x$test_shortpath" = x; then
24572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24574    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24575  fi
24576
24577  # Call helper function which possibly converts this using DOS-style short mode.
24578  # If so, the updated path is stored in $new_path.
24579
24580  input_path="$new_path"
24581  # Check if we need to convert this using DOS-style short mode. If the path
24582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24583  # take no chances and rewrite it.
24584  # Note: m4 eats our [], so we need to use [ and ] instead.
24585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24586  if test "x$has_forbidden_chars" != x; then
24587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24591      # Going to short mode and back again did indeed matter. Since short mode is
24592      # case insensitive, let's make it lowercase to improve readability.
24593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24594      # Now convert it back to Unix-style (cygpath)
24595      input_path=`$CYGPATH -u "$shortmode_path"`
24596      new_path="$input_path"
24597    fi
24598  fi
24599
24600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24601  if test "x$test_cygdrive_prefix" = x; then
24602    # As a simple fix, exclude /usr/bin since it's not a real path.
24603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24605      # a path prefixed by /cygdrive for fixpath to work.
24606      new_path="$CYGWIN_ROOT_PATH$input_path"
24607    fi
24608  fi
24609
24610
24611  if test "x$path" != "x$new_path"; then
24612    BOOT_JDK="$new_path"
24613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24615  fi
24616
24617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24618
24619  path="$BOOT_JDK"
24620  has_colon=`$ECHO $path | $GREP ^.:`
24621  new_path="$path"
24622  if test "x$has_colon" = x; then
24623    # Not in mixed or Windows style, start by that.
24624    new_path=`cmd //c echo $path`
24625  fi
24626
24627
24628  input_path="$new_path"
24629  # Check if we need to convert this using DOS-style short mode. If the path
24630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24631  # take no chances and rewrite it.
24632  # Note: m4 eats our [], so we need to use [ and ] instead.
24633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24634  if test "x$has_forbidden_chars" != x; then
24635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24637  fi
24638
24639
24640  windows_path="$new_path"
24641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24642    unix_path=`$CYGPATH -u "$windows_path"`
24643    new_path="$unix_path"
24644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24646    new_path="$unix_path"
24647  fi
24648
24649  if test "x$path" != "x$new_path"; then
24650    BOOT_JDK="$new_path"
24651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24653  fi
24654
24655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24657
24658    else
24659      # We're on a unix platform. Hooray! :)
24660      path="$BOOT_JDK"
24661      has_space=`$ECHO "$path" | $GREP " "`
24662      if test "x$has_space" != x; then
24663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24665        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24666      fi
24667
24668      # Use eval to expand a potential ~
24669      eval path="$path"
24670      if test ! -f "$path" && test ! -d "$path"; then
24671        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24672      fi
24673
24674      if test -d "$path"; then
24675        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24676      else
24677        dir="`$DIRNAME "$path"`"
24678        base="`$BASENAME "$path"`"
24679        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24680      fi
24681    fi
24682  fi
24683
24684            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24685$as_echo_n "checking for Boot JDK... " >&6; }
24686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24687$as_echo "$BOOT_JDK" >&6; }
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24689$as_echo_n "checking Boot JDK version... " >&6; }
24690            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24692$as_echo "$BOOT_JDK_VERSION" >&6; }
24693          fi # end check jdk version
24694        fi # end check javac
24695      fi # end check java
24696    fi # end check boot jdk found
24697  fi
24698
24699
24700  if test "x$BOOT_JDK_FOUND" = xno; then
24701    # Now execute the test
24702
24703  if test -x /usr/libexec/java_home; then
24704    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24705    BOOT_JDK_FOUND=maybe
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24707$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24708  fi
24709
24710
24711    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24712    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24713      # Do we have a bin/java?
24714      if test ! -x "$BOOT_JDK/bin/java"; then
24715        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24717        BOOT_JDK_FOUND=no
24718      else
24719        # Do we have a bin/javac?
24720        if test ! -x "$BOOT_JDK/bin/javac"; then
24721          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24723          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24724$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24725          BOOT_JDK_FOUND=no
24726        else
24727          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24728          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24729
24730          # Extra M4 quote needed to protect [] in grep expression.
24731          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24732          if test "x$FOUND_CORRECT_VERSION" = x; then
24733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24735            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24736$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24737            BOOT_JDK_FOUND=no
24738          else
24739            # We're done! :-)
24740            BOOT_JDK_FOUND=yes
24741
24742  # Only process if variable expands to non-empty
24743
24744  if test "x$BOOT_JDK" != x; then
24745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24746
24747  # Input might be given as Windows format, start by converting to
24748  # unix format.
24749  path="$BOOT_JDK"
24750  new_path=`$CYGPATH -u "$path"`
24751
24752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24755  # "foo.exe" is OK but "foo" is an error.
24756  #
24757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24758  # It is also a way to make sure we got the proper file name for the real test later on.
24759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24760  if test "x$test_shortpath" = x; then
24761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24764  fi
24765
24766  # Call helper function which possibly converts this using DOS-style short mode.
24767  # If so, the updated path is stored in $new_path.
24768
24769  input_path="$new_path"
24770  # Check if we need to convert this using DOS-style short mode. If the path
24771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24772  # take no chances and rewrite it.
24773  # Note: m4 eats our [], so we need to use [ and ] instead.
24774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24775  if test "x$has_forbidden_chars" != x; then
24776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24780      # Going to short mode and back again did indeed matter. Since short mode is
24781      # case insensitive, let's make it lowercase to improve readability.
24782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24783      # Now convert it back to Unix-style (cygpath)
24784      input_path=`$CYGPATH -u "$shortmode_path"`
24785      new_path="$input_path"
24786    fi
24787  fi
24788
24789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24790  if test "x$test_cygdrive_prefix" = x; then
24791    # As a simple fix, exclude /usr/bin since it's not a real path.
24792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24794      # a path prefixed by /cygdrive for fixpath to work.
24795      new_path="$CYGWIN_ROOT_PATH$input_path"
24796    fi
24797  fi
24798
24799
24800  if test "x$path" != "x$new_path"; then
24801    BOOT_JDK="$new_path"
24802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24804  fi
24805
24806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24807
24808  path="$BOOT_JDK"
24809  has_colon=`$ECHO $path | $GREP ^.:`
24810  new_path="$path"
24811  if test "x$has_colon" = x; then
24812    # Not in mixed or Windows style, start by that.
24813    new_path=`cmd //c echo $path`
24814  fi
24815
24816
24817  input_path="$new_path"
24818  # Check if we need to convert this using DOS-style short mode. If the path
24819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24820  # take no chances and rewrite it.
24821  # Note: m4 eats our [], so we need to use [ and ] instead.
24822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24823  if test "x$has_forbidden_chars" != x; then
24824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24826  fi
24827
24828
24829  windows_path="$new_path"
24830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24831    unix_path=`$CYGPATH -u "$windows_path"`
24832    new_path="$unix_path"
24833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24835    new_path="$unix_path"
24836  fi
24837
24838  if test "x$path" != "x$new_path"; then
24839    BOOT_JDK="$new_path"
24840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24842  fi
24843
24844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24846
24847    else
24848      # We're on a unix platform. Hooray! :)
24849      path="$BOOT_JDK"
24850      has_space=`$ECHO "$path" | $GREP " "`
24851      if test "x$has_space" != x; then
24852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24854        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24855      fi
24856
24857      # Use eval to expand a potential ~
24858      eval path="$path"
24859      if test ! -f "$path" && test ! -d "$path"; then
24860        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24861      fi
24862
24863      if test -d "$path"; then
24864        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24865      else
24866        dir="`$DIRNAME "$path"`"
24867        base="`$BASENAME "$path"`"
24868        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24869      fi
24870    fi
24871  fi
24872
24873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24874$as_echo_n "checking for Boot JDK... " >&6; }
24875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24876$as_echo "$BOOT_JDK" >&6; }
24877            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24878$as_echo_n "checking Boot JDK version... " >&6; }
24879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24881$as_echo "$BOOT_JDK_VERSION" >&6; }
24882          fi # end check jdk version
24883        fi # end check javac
24884      fi # end check java
24885    fi # end check boot jdk found
24886  fi
24887
24888  fi
24889
24890
24891    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24892    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24893      # Do we have a bin/java?
24894      if test ! -x "$BOOT_JDK/bin/java"; then
24895        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24897        BOOT_JDK_FOUND=no
24898      else
24899        # Do we have a bin/javac?
24900        if test ! -x "$BOOT_JDK/bin/javac"; then
24901          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24903          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24904$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24905          BOOT_JDK_FOUND=no
24906        else
24907          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24908          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24909
24910          # Extra M4 quote needed to protect [] in grep expression.
24911          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24912          if test "x$FOUND_CORRECT_VERSION" = x; then
24913            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24915            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24916$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24917            BOOT_JDK_FOUND=no
24918          else
24919            # We're done! :-)
24920            BOOT_JDK_FOUND=yes
24921
24922  # Only process if variable expands to non-empty
24923
24924  if test "x$BOOT_JDK" != x; then
24925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24926
24927  # Input might be given as Windows format, start by converting to
24928  # unix format.
24929  path="$BOOT_JDK"
24930  new_path=`$CYGPATH -u "$path"`
24931
24932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24935  # "foo.exe" is OK but "foo" is an error.
24936  #
24937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24938  # It is also a way to make sure we got the proper file name for the real test later on.
24939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24940  if test "x$test_shortpath" = x; then
24941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24943    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24944  fi
24945
24946  # Call helper function which possibly converts this using DOS-style short mode.
24947  # If so, the updated path is stored in $new_path.
24948
24949  input_path="$new_path"
24950  # Check if we need to convert this using DOS-style short mode. If the path
24951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24952  # take no chances and rewrite it.
24953  # Note: m4 eats our [], so we need to use [ and ] instead.
24954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24955  if test "x$has_forbidden_chars" != x; then
24956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24960      # Going to short mode and back again did indeed matter. Since short mode is
24961      # case insensitive, let's make it lowercase to improve readability.
24962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24963      # Now convert it back to Unix-style (cygpath)
24964      input_path=`$CYGPATH -u "$shortmode_path"`
24965      new_path="$input_path"
24966    fi
24967  fi
24968
24969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24970  if test "x$test_cygdrive_prefix" = x; then
24971    # As a simple fix, exclude /usr/bin since it's not a real path.
24972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24974      # a path prefixed by /cygdrive for fixpath to work.
24975      new_path="$CYGWIN_ROOT_PATH$input_path"
24976    fi
24977  fi
24978
24979
24980  if test "x$path" != "x$new_path"; then
24981    BOOT_JDK="$new_path"
24982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24983$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24984  fi
24985
24986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24987
24988  path="$BOOT_JDK"
24989  has_colon=`$ECHO $path | $GREP ^.:`
24990  new_path="$path"
24991  if test "x$has_colon" = x; then
24992    # Not in mixed or Windows style, start by that.
24993    new_path=`cmd //c echo $path`
24994  fi
24995
24996
24997  input_path="$new_path"
24998  # Check if we need to convert this using DOS-style short mode. If the path
24999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25000  # take no chances and rewrite it.
25001  # Note: m4 eats our [], so we need to use [ and ] instead.
25002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25003  if test "x$has_forbidden_chars" != x; then
25004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25006  fi
25007
25008
25009  windows_path="$new_path"
25010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25011    unix_path=`$CYGPATH -u "$windows_path"`
25012    new_path="$unix_path"
25013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25015    new_path="$unix_path"
25016  fi
25017
25018  if test "x$path" != "x$new_path"; then
25019    BOOT_JDK="$new_path"
25020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25021$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25022  fi
25023
25024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25026
25027    else
25028      # We're on a unix platform. Hooray! :)
25029      path="$BOOT_JDK"
25030      has_space=`$ECHO "$path" | $GREP " "`
25031      if test "x$has_space" != x; then
25032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25034        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25035      fi
25036
25037      # Use eval to expand a potential ~
25038      eval path="$path"
25039      if test ! -f "$path" && test ! -d "$path"; then
25040        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25041      fi
25042
25043      if test -d "$path"; then
25044        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25045      else
25046        dir="`$DIRNAME "$path"`"
25047        base="`$BASENAME "$path"`"
25048        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25049      fi
25050    fi
25051  fi
25052
25053            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25054$as_echo_n "checking for Boot JDK... " >&6; }
25055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25056$as_echo "$BOOT_JDK" >&6; }
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25058$as_echo_n "checking Boot JDK version... " >&6; }
25059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25061$as_echo "$BOOT_JDK_VERSION" >&6; }
25062          fi # end check jdk version
25063        fi # end check javac
25064      fi # end check java
25065    fi # end check boot jdk found
25066  fi
25067
25068
25069  # Test: Is $JAVA_HOME set?
25070
25071  if test "x$BOOT_JDK_FOUND" = xno; then
25072    # Now execute the test
25073
25074  if test "x$JAVA_HOME" != x; then
25075    JAVA_HOME_PROCESSED="$JAVA_HOME"
25076
25077  # Only process if variable expands to non-empty
25078
25079  if test "x$JAVA_HOME_PROCESSED" != x; then
25080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25081
25082  # Input might be given as Windows format, start by converting to
25083  # unix format.
25084  path="$JAVA_HOME_PROCESSED"
25085  new_path=`$CYGPATH -u "$path"`
25086
25087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25090  # "foo.exe" is OK but "foo" is an error.
25091  #
25092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25093  # It is also a way to make sure we got the proper file name for the real test later on.
25094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25095  if test "x$test_shortpath" = x; then
25096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25097$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25098    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25099  fi
25100
25101  # Call helper function which possibly converts this using DOS-style short mode.
25102  # If so, the updated path is stored in $new_path.
25103
25104  input_path="$new_path"
25105  # Check if we need to convert this using DOS-style short mode. If the path
25106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25107  # take no chances and rewrite it.
25108  # Note: m4 eats our [], so we need to use [ and ] instead.
25109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25110  if test "x$has_forbidden_chars" != x; then
25111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25115      # Going to short mode and back again did indeed matter. Since short mode is
25116      # case insensitive, let's make it lowercase to improve readability.
25117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25118      # Now convert it back to Unix-style (cygpath)
25119      input_path=`$CYGPATH -u "$shortmode_path"`
25120      new_path="$input_path"
25121    fi
25122  fi
25123
25124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25125  if test "x$test_cygdrive_prefix" = x; then
25126    # As a simple fix, exclude /usr/bin since it's not a real path.
25127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25129      # a path prefixed by /cygdrive for fixpath to work.
25130      new_path="$CYGWIN_ROOT_PATH$input_path"
25131    fi
25132  fi
25133
25134
25135  if test "x$path" != "x$new_path"; then
25136    JAVA_HOME_PROCESSED="$new_path"
25137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25138$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25139  fi
25140
25141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25142
25143  path="$JAVA_HOME_PROCESSED"
25144  has_colon=`$ECHO $path | $GREP ^.:`
25145  new_path="$path"
25146  if test "x$has_colon" = x; then
25147    # Not in mixed or Windows style, start by that.
25148    new_path=`cmd //c echo $path`
25149  fi
25150
25151
25152  input_path="$new_path"
25153  # Check if we need to convert this using DOS-style short mode. If the path
25154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25155  # take no chances and rewrite it.
25156  # Note: m4 eats our [], so we need to use [ and ] instead.
25157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25158  if test "x$has_forbidden_chars" != x; then
25159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25161  fi
25162
25163
25164  windows_path="$new_path"
25165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25166    unix_path=`$CYGPATH -u "$windows_path"`
25167    new_path="$unix_path"
25168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25170    new_path="$unix_path"
25171  fi
25172
25173  if test "x$path" != "x$new_path"; then
25174    JAVA_HOME_PROCESSED="$new_path"
25175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25176$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25177  fi
25178
25179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25181
25182    else
25183      # We're on a unix platform. Hooray! :)
25184      path="$JAVA_HOME_PROCESSED"
25185      has_space=`$ECHO "$path" | $GREP " "`
25186      if test "x$has_space" != x; then
25187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25188$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25190      fi
25191
25192      # Use eval to expand a potential ~
25193      eval path="$path"
25194      if test ! -f "$path" && test ! -d "$path"; then
25195        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25196      fi
25197
25198      if test -d "$path"; then
25199        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25200      else
25201        dir="`$DIRNAME "$path"`"
25202        base="`$BASENAME "$path"`"
25203        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25204      fi
25205    fi
25206  fi
25207
25208    if test ! -d "$JAVA_HOME_PROCESSED"; then
25209      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25210$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25211    else
25212      # Aha, the user has set a JAVA_HOME
25213      # let us use that as the Boot JDK.
25214      BOOT_JDK="$JAVA_HOME_PROCESSED"
25215      BOOT_JDK_FOUND=maybe
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25217$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25218    fi
25219  fi
25220
25221
25222    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25223    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25224      # Do we have a bin/java?
25225      if test ! -x "$BOOT_JDK/bin/java"; then
25226        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25228        BOOT_JDK_FOUND=no
25229      else
25230        # Do we have a bin/javac?
25231        if test ! -x "$BOOT_JDK/bin/javac"; then
25232          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25234          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25235$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25236          BOOT_JDK_FOUND=no
25237        else
25238          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25239          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25240
25241          # Extra M4 quote needed to protect [] in grep expression.
25242          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25243          if test "x$FOUND_CORRECT_VERSION" = x; then
25244            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25246            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25247$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25248            BOOT_JDK_FOUND=no
25249          else
25250            # We're done! :-)
25251            BOOT_JDK_FOUND=yes
25252
25253  # Only process if variable expands to non-empty
25254
25255  if test "x$BOOT_JDK" != x; then
25256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25257
25258  # Input might be given as Windows format, start by converting to
25259  # unix format.
25260  path="$BOOT_JDK"
25261  new_path=`$CYGPATH -u "$path"`
25262
25263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25266  # "foo.exe" is OK but "foo" is an error.
25267  #
25268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25269  # It is also a way to make sure we got the proper file name for the real test later on.
25270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25271  if test "x$test_shortpath" = x; then
25272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25275  fi
25276
25277  # Call helper function which possibly converts this using DOS-style short mode.
25278  # If so, the updated path is stored in $new_path.
25279
25280  input_path="$new_path"
25281  # Check if we need to convert this using DOS-style short mode. If the path
25282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25283  # take no chances and rewrite it.
25284  # Note: m4 eats our [], so we need to use [ and ] instead.
25285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25286  if test "x$has_forbidden_chars" != x; then
25287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25291      # Going to short mode and back again did indeed matter. Since short mode is
25292      # case insensitive, let's make it lowercase to improve readability.
25293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25294      # Now convert it back to Unix-style (cygpath)
25295      input_path=`$CYGPATH -u "$shortmode_path"`
25296      new_path="$input_path"
25297    fi
25298  fi
25299
25300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25301  if test "x$test_cygdrive_prefix" = x; then
25302    # As a simple fix, exclude /usr/bin since it's not a real path.
25303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25305      # a path prefixed by /cygdrive for fixpath to work.
25306      new_path="$CYGWIN_ROOT_PATH$input_path"
25307    fi
25308  fi
25309
25310
25311  if test "x$path" != "x$new_path"; then
25312    BOOT_JDK="$new_path"
25313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25315  fi
25316
25317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25318
25319  path="$BOOT_JDK"
25320  has_colon=`$ECHO $path | $GREP ^.:`
25321  new_path="$path"
25322  if test "x$has_colon" = x; then
25323    # Not in mixed or Windows style, start by that.
25324    new_path=`cmd //c echo $path`
25325  fi
25326
25327
25328  input_path="$new_path"
25329  # Check if we need to convert this using DOS-style short mode. If the path
25330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25331  # take no chances and rewrite it.
25332  # Note: m4 eats our [], so we need to use [ and ] instead.
25333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25334  if test "x$has_forbidden_chars" != x; then
25335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25337  fi
25338
25339
25340  windows_path="$new_path"
25341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25342    unix_path=`$CYGPATH -u "$windows_path"`
25343    new_path="$unix_path"
25344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25346    new_path="$unix_path"
25347  fi
25348
25349  if test "x$path" != "x$new_path"; then
25350    BOOT_JDK="$new_path"
25351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25353  fi
25354
25355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25357
25358    else
25359      # We're on a unix platform. Hooray! :)
25360      path="$BOOT_JDK"
25361      has_space=`$ECHO "$path" | $GREP " "`
25362      if test "x$has_space" != x; then
25363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25366      fi
25367
25368      # Use eval to expand a potential ~
25369      eval path="$path"
25370      if test ! -f "$path" && test ! -d "$path"; then
25371        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25372      fi
25373
25374      if test -d "$path"; then
25375        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25376      else
25377        dir="`$DIRNAME "$path"`"
25378        base="`$BASENAME "$path"`"
25379        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25380      fi
25381    fi
25382  fi
25383
25384            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25385$as_echo_n "checking for Boot JDK... " >&6; }
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25387$as_echo "$BOOT_JDK" >&6; }
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25389$as_echo_n "checking Boot JDK version... " >&6; }
25390            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25392$as_echo "$BOOT_JDK_VERSION" >&6; }
25393          fi # end check jdk version
25394        fi # end check javac
25395      fi # end check java
25396    fi # end check boot jdk found
25397  fi
25398
25399
25400  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25401
25402  if test "x$BOOT_JDK_FOUND" = xno; then
25403    # Now execute the test
25404
25405  # Extract the first word of "javac", so it can be a program name with args.
25406set dummy javac; ac_word=$2
25407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25408$as_echo_n "checking for $ac_word... " >&6; }
25409if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25410  $as_echo_n "(cached) " >&6
25411else
25412  case $JAVAC_CHECK in
25413  [\\/]* | ?:[\\/]*)
25414  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25415  ;;
25416  *)
25417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25418for as_dir in $PATH
25419do
25420  IFS=$as_save_IFS
25421  test -z "$as_dir" && as_dir=.
25422    for ac_exec_ext in '' $ac_executable_extensions; do
25423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25424    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25426    break 2
25427  fi
25428done
25429  done
25430IFS=$as_save_IFS
25431
25432  ;;
25433esac
25434fi
25435JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25436if test -n "$JAVAC_CHECK"; then
25437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25438$as_echo "$JAVAC_CHECK" >&6; }
25439else
25440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25441$as_echo "no" >&6; }
25442fi
25443
25444
25445  # Extract the first word of "java", so it can be a program name with args.
25446set dummy java; ac_word=$2
25447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25448$as_echo_n "checking for $ac_word... " >&6; }
25449if ${ac_cv_path_JAVA_CHECK+:} false; then :
25450  $as_echo_n "(cached) " >&6
25451else
25452  case $JAVA_CHECK in
25453  [\\/]* | ?:[\\/]*)
25454  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25455  ;;
25456  *)
25457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25458for as_dir in $PATH
25459do
25460  IFS=$as_save_IFS
25461  test -z "$as_dir" && as_dir=.
25462    for ac_exec_ext in '' $ac_executable_extensions; do
25463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25464    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25466    break 2
25467  fi
25468done
25469  done
25470IFS=$as_save_IFS
25471
25472  ;;
25473esac
25474fi
25475JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25476if test -n "$JAVA_CHECK"; then
25477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25478$as_echo "$JAVA_CHECK" >&6; }
25479else
25480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25481$as_echo "no" >&6; }
25482fi
25483
25484
25485  BINARY="$JAVAC_CHECK"
25486  if test "x$JAVAC_CHECK" = x; then
25487    BINARY="$JAVA_CHECK"
25488  fi
25489  if test "x$BINARY" != x; then
25490    # So there is a java(c) binary, it might be part of a JDK.
25491    # Lets find the JDK/JRE directory by following symbolic links.
25492    # Linux/GNU systems often have links from /usr/bin/java to
25493    # /etc/alternatives/java to the real JDK binary.
25494
25495  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25496    # Follow a chain of symbolic links. Use readlink
25497    # where it exists, else fall back to horribly
25498    # complicated shell code.
25499    if test "x$READLINK_TESTED" != yes; then
25500      # On MacOSX there is a readlink tool with a different
25501      # purpose than the GNU readlink tool. Check the found readlink.
25502      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25503      if test "x$ISGNU" = x; then
25504        # A readlink that we do not know how to use.
25505        # Are there other non-GNU readlinks out there?
25506        READLINK_TESTED=yes
25507        READLINK=
25508      fi
25509    fi
25510
25511    if test "x$READLINK" != x; then
25512      BINARY=`$READLINK -f $BINARY`
25513    else
25514      # Save the current directory for restoring afterwards
25515      STARTDIR=$PWD
25516      COUNTER=0
25517      sym_link_dir=`$DIRNAME $BINARY`
25518      sym_link_file=`$BASENAME $BINARY`
25519      cd $sym_link_dir
25520      # Use -P flag to resolve symlinks in directories.
25521      cd `$THEPWDCMD -P`
25522      sym_link_dir=`$THEPWDCMD -P`
25523      # Resolve file symlinks
25524      while test $COUNTER -lt 20; do
25525        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25526        if test "x$ISLINK" == x; then
25527          # This is not a symbolic link! We are done!
25528          break
25529        fi
25530        # Again resolve directory symlinks since the target of the just found
25531        # link could be in a different directory
25532        cd `$DIRNAME $ISLINK`
25533        sym_link_dir=`$THEPWDCMD -P`
25534        sym_link_file=`$BASENAME $ISLINK`
25535        let COUNTER=COUNTER+1
25536      done
25537      cd $STARTDIR
25538      BINARY=$sym_link_dir/$sym_link_file
25539    fi
25540  fi
25541
25542    BOOT_JDK=`dirname "$BINARY"`
25543    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25544    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25545      # Looks like we found ourselves an JDK
25546      BOOT_JDK_FOUND=maybe
25547      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25548$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25549    fi
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      if test -d "$path"; then
25706        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707      else
25708        dir="`$DIRNAME "$path"`"
25709        base="`$BASENAME "$path"`"
25710        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711      fi
25712    fi
25713  fi
25714
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716$as_echo_n "checking for Boot JDK... " >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718$as_echo "$BOOT_JDK" >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720$as_echo_n "checking Boot JDK version... " >&6; }
25721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723$as_echo "$BOOT_JDK_VERSION" >&6; }
25724          fi # end check jdk version
25725        fi # end check javac
25726      fi # end check java
25727    fi # end check boot jdk found
25728  fi
25729
25730
25731  # Test: Is there a JDK installed in default, well-known locations?
25732
25733  if test "x$BOOT_JDK_FOUND" = xno; then
25734    # Now execute the test
25735
25736  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25737
25738  if test "x$BOOT_JDK_FOUND" = xno; then
25739    # Now execute the test
25740
25741  if test "x$ProgramW6432" != x; then
25742    VIRTUAL_DIR="$ProgramW6432/Java"
25743
25744  windows_path="$VIRTUAL_DIR"
25745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25746    unix_path=`$CYGPATH -u "$windows_path"`
25747    VIRTUAL_DIR="$unix_path"
25748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25750    VIRTUAL_DIR="$unix_path"
25751  fi
25752
25753
25754  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25755  BOOT_JDK_SUFFIX=""
25756  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25757  if test "x$ALL_JDKS_FOUND" != x; then
25758    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25759
25760  if test "x$BOOT_JDK_FOUND" = xno; then
25761    # Now execute the test
25762
25763        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25764        if test -d "$BOOT_JDK"; then
25765          BOOT_JDK_FOUND=maybe
25766          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25767$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25768        fi
25769
25770
25771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25773      # Do we have a bin/java?
25774      if test ! -x "$BOOT_JDK/bin/java"; then
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25777        BOOT_JDK_FOUND=no
25778      else
25779        # Do we have a bin/javac?
25780        if test ! -x "$BOOT_JDK/bin/javac"; then
25781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25785          BOOT_JDK_FOUND=no
25786        else
25787          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25788          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25789
25790          # Extra M4 quote needed to protect [] in grep expression.
25791          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25792          if test "x$FOUND_CORRECT_VERSION" = x; then
25793            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25795            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25797            BOOT_JDK_FOUND=no
25798          else
25799            # We're done! :-)
25800            BOOT_JDK_FOUND=yes
25801
25802  # Only process if variable expands to non-empty
25803
25804  if test "x$BOOT_JDK" != x; then
25805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25806
25807  # Input might be given as Windows format, start by converting to
25808  # unix format.
25809  path="$BOOT_JDK"
25810  new_path=`$CYGPATH -u "$path"`
25811
25812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25815  # "foo.exe" is OK but "foo" is an error.
25816  #
25817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25818  # It is also a way to make sure we got the proper file name for the real test later on.
25819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25820  if test "x$test_shortpath" = x; then
25821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25824  fi
25825
25826  # Call helper function which possibly converts this using DOS-style short mode.
25827  # If so, the updated path is stored in $new_path.
25828
25829  input_path="$new_path"
25830  # Check if we need to convert this using DOS-style short mode. If the path
25831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25832  # take no chances and rewrite it.
25833  # Note: m4 eats our [], so we need to use [ and ] instead.
25834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25835  if test "x$has_forbidden_chars" != x; then
25836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25840      # Going to short mode and back again did indeed matter. Since short mode is
25841      # case insensitive, let's make it lowercase to improve readability.
25842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25843      # Now convert it back to Unix-style (cygpath)
25844      input_path=`$CYGPATH -u "$shortmode_path"`
25845      new_path="$input_path"
25846    fi
25847  fi
25848
25849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25850  if test "x$test_cygdrive_prefix" = x; then
25851    # As a simple fix, exclude /usr/bin since it's not a real path.
25852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25854      # a path prefixed by /cygdrive for fixpath to work.
25855      new_path="$CYGWIN_ROOT_PATH$input_path"
25856    fi
25857  fi
25858
25859
25860  if test "x$path" != "x$new_path"; then
25861    BOOT_JDK="$new_path"
25862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25864  fi
25865
25866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25867
25868  path="$BOOT_JDK"
25869  has_colon=`$ECHO $path | $GREP ^.:`
25870  new_path="$path"
25871  if test "x$has_colon" = x; then
25872    # Not in mixed or Windows style, start by that.
25873    new_path=`cmd //c echo $path`
25874  fi
25875
25876
25877  input_path="$new_path"
25878  # Check if we need to convert this using DOS-style short mode. If the path
25879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25880  # take no chances and rewrite it.
25881  # Note: m4 eats our [], so we need to use [ and ] instead.
25882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25883  if test "x$has_forbidden_chars" != x; then
25884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25886  fi
25887
25888
25889  windows_path="$new_path"
25890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25891    unix_path=`$CYGPATH -u "$windows_path"`
25892    new_path="$unix_path"
25893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25895    new_path="$unix_path"
25896  fi
25897
25898  if test "x$path" != "x$new_path"; then
25899    BOOT_JDK="$new_path"
25900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25902  fi
25903
25904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25906
25907    else
25908      # We're on a unix platform. Hooray! :)
25909      path="$BOOT_JDK"
25910      has_space=`$ECHO "$path" | $GREP " "`
25911      if test "x$has_space" != x; then
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25915      fi
25916
25917      # Use eval to expand a potential ~
25918      eval path="$path"
25919      if test ! -f "$path" && test ! -d "$path"; then
25920        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25921      fi
25922
25923      if test -d "$path"; then
25924        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25925      else
25926        dir="`$DIRNAME "$path"`"
25927        base="`$BASENAME "$path"`"
25928        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25929      fi
25930    fi
25931  fi
25932
25933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25934$as_echo_n "checking for Boot JDK... " >&6; }
25935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25936$as_echo "$BOOT_JDK" >&6; }
25937            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25938$as_echo_n "checking Boot JDK version... " >&6; }
25939            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25941$as_echo "$BOOT_JDK_VERSION" >&6; }
25942          fi # end check jdk version
25943        fi # end check javac
25944      fi # end check java
25945    fi # end check boot jdk found
25946  fi
25947
25948    done
25949  fi
25950
25951  fi
25952
25953
25954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25956      # Do we have a bin/java?
25957      if test ! -x "$BOOT_JDK/bin/java"; then
25958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25960        BOOT_JDK_FOUND=no
25961      else
25962        # Do we have a bin/javac?
25963        if test ! -x "$BOOT_JDK/bin/javac"; then
25964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25968          BOOT_JDK_FOUND=no
25969        else
25970          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25971          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25972
25973          # Extra M4 quote needed to protect [] in grep expression.
25974          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25975          if test "x$FOUND_CORRECT_VERSION" = x; then
25976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25978            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25979$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25980            BOOT_JDK_FOUND=no
25981          else
25982            # We're done! :-)
25983            BOOT_JDK_FOUND=yes
25984
25985  # Only process if variable expands to non-empty
25986
25987  if test "x$BOOT_JDK" != x; then
25988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25989
25990  # Input might be given as Windows format, start by converting to
25991  # unix format.
25992  path="$BOOT_JDK"
25993  new_path=`$CYGPATH -u "$path"`
25994
25995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25998  # "foo.exe" is OK but "foo" is an error.
25999  #
26000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26001  # It is also a way to make sure we got the proper file name for the real test later on.
26002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26003  if test "x$test_shortpath" = x; then
26004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26006    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26007  fi
26008
26009  # Call helper function which possibly converts this using DOS-style short mode.
26010  # If so, the updated path is stored in $new_path.
26011
26012  input_path="$new_path"
26013  # Check if we need to convert this using DOS-style short mode. If the path
26014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26015  # take no chances and rewrite it.
26016  # Note: m4 eats our [], so we need to use [ and ] instead.
26017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26018  if test "x$has_forbidden_chars" != x; then
26019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26023      # Going to short mode and back again did indeed matter. Since short mode is
26024      # case insensitive, let's make it lowercase to improve readability.
26025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26026      # Now convert it back to Unix-style (cygpath)
26027      input_path=`$CYGPATH -u "$shortmode_path"`
26028      new_path="$input_path"
26029    fi
26030  fi
26031
26032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26033  if test "x$test_cygdrive_prefix" = x; then
26034    # As a simple fix, exclude /usr/bin since it's not a real path.
26035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26037      # a path prefixed by /cygdrive for fixpath to work.
26038      new_path="$CYGWIN_ROOT_PATH$input_path"
26039    fi
26040  fi
26041
26042
26043  if test "x$path" != "x$new_path"; then
26044    BOOT_JDK="$new_path"
26045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26047  fi
26048
26049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26050
26051  path="$BOOT_JDK"
26052  has_colon=`$ECHO $path | $GREP ^.:`
26053  new_path="$path"
26054  if test "x$has_colon" = x; then
26055    # Not in mixed or Windows style, start by that.
26056    new_path=`cmd //c echo $path`
26057  fi
26058
26059
26060  input_path="$new_path"
26061  # Check if we need to convert this using DOS-style short mode. If the path
26062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26063  # take no chances and rewrite it.
26064  # Note: m4 eats our [], so we need to use [ and ] instead.
26065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26066  if test "x$has_forbidden_chars" != x; then
26067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26069  fi
26070
26071
26072  windows_path="$new_path"
26073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26074    unix_path=`$CYGPATH -u "$windows_path"`
26075    new_path="$unix_path"
26076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26078    new_path="$unix_path"
26079  fi
26080
26081  if test "x$path" != "x$new_path"; then
26082    BOOT_JDK="$new_path"
26083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26084$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26085  fi
26086
26087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26089
26090    else
26091      # We're on a unix platform. Hooray! :)
26092      path="$BOOT_JDK"
26093      has_space=`$ECHO "$path" | $GREP " "`
26094      if test "x$has_space" != x; then
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26098      fi
26099
26100      # Use eval to expand a potential ~
26101      eval path="$path"
26102      if test ! -f "$path" && test ! -d "$path"; then
26103        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26104      fi
26105
26106      if test -d "$path"; then
26107        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26108      else
26109        dir="`$DIRNAME "$path"`"
26110        base="`$BASENAME "$path"`"
26111        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26112      fi
26113    fi
26114  fi
26115
26116            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26117$as_echo_n "checking for Boot JDK... " >&6; }
26118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26119$as_echo "$BOOT_JDK" >&6; }
26120            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26121$as_echo_n "checking Boot JDK version... " >&6; }
26122            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26124$as_echo "$BOOT_JDK_VERSION" >&6; }
26125          fi # end check jdk version
26126        fi # end check javac
26127      fi # end check java
26128    fi # end check boot jdk found
26129  fi
26130
26131
26132  if test "x$BOOT_JDK_FOUND" = xno; then
26133    # Now execute the test
26134
26135  if test "x$PROGRAMW6432" != x; then
26136    VIRTUAL_DIR="$PROGRAMW6432/Java"
26137
26138  windows_path="$VIRTUAL_DIR"
26139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26140    unix_path=`$CYGPATH -u "$windows_path"`
26141    VIRTUAL_DIR="$unix_path"
26142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26144    VIRTUAL_DIR="$unix_path"
26145  fi
26146
26147
26148  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26149  BOOT_JDK_SUFFIX=""
26150  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26151  if test "x$ALL_JDKS_FOUND" != x; then
26152    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26153
26154  if test "x$BOOT_JDK_FOUND" = xno; then
26155    # Now execute the test
26156
26157        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26158        if test -d "$BOOT_JDK"; then
26159          BOOT_JDK_FOUND=maybe
26160          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26161$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26162        fi
26163
26164
26165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26167      # Do we have a bin/java?
26168      if test ! -x "$BOOT_JDK/bin/java"; then
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26171        BOOT_JDK_FOUND=no
26172      else
26173        # Do we have a bin/javac?
26174        if test ! -x "$BOOT_JDK/bin/javac"; then
26175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26179          BOOT_JDK_FOUND=no
26180        else
26181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26183
26184          # Extra M4 quote needed to protect [] in grep expression.
26185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26186          if test "x$FOUND_CORRECT_VERSION" = x; then
26187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26191            BOOT_JDK_FOUND=no
26192          else
26193            # We're done! :-)
26194            BOOT_JDK_FOUND=yes
26195
26196  # Only process if variable expands to non-empty
26197
26198  if test "x$BOOT_JDK" != x; then
26199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26200
26201  # Input might be given as Windows format, start by converting to
26202  # unix format.
26203  path="$BOOT_JDK"
26204  new_path=`$CYGPATH -u "$path"`
26205
26206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26209  # "foo.exe" is OK but "foo" is an error.
26210  #
26211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26212  # It is also a way to make sure we got the proper file name for the real test later on.
26213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26214  if test "x$test_shortpath" = x; then
26215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26218  fi
26219
26220  # Call helper function which possibly converts this using DOS-style short mode.
26221  # If so, the updated path is stored in $new_path.
26222
26223  input_path="$new_path"
26224  # Check if we need to convert this using DOS-style short mode. If the path
26225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26226  # take no chances and rewrite it.
26227  # Note: m4 eats our [], so we need to use [ and ] instead.
26228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26229  if test "x$has_forbidden_chars" != x; then
26230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26234      # Going to short mode and back again did indeed matter. Since short mode is
26235      # case insensitive, let's make it lowercase to improve readability.
26236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26237      # Now convert it back to Unix-style (cygpath)
26238      input_path=`$CYGPATH -u "$shortmode_path"`
26239      new_path="$input_path"
26240    fi
26241  fi
26242
26243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26244  if test "x$test_cygdrive_prefix" = x; then
26245    # As a simple fix, exclude /usr/bin since it's not a real path.
26246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26248      # a path prefixed by /cygdrive for fixpath to work.
26249      new_path="$CYGWIN_ROOT_PATH$input_path"
26250    fi
26251  fi
26252
26253
26254  if test "x$path" != "x$new_path"; then
26255    BOOT_JDK="$new_path"
26256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26258  fi
26259
26260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26261
26262  path="$BOOT_JDK"
26263  has_colon=`$ECHO $path | $GREP ^.:`
26264  new_path="$path"
26265  if test "x$has_colon" = x; then
26266    # Not in mixed or Windows style, start by that.
26267    new_path=`cmd //c echo $path`
26268  fi
26269
26270
26271  input_path="$new_path"
26272  # Check if we need to convert this using DOS-style short mode. If the path
26273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26274  # take no chances and rewrite it.
26275  # Note: m4 eats our [], so we need to use [ and ] instead.
26276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26277  if test "x$has_forbidden_chars" != x; then
26278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26280  fi
26281
26282
26283  windows_path="$new_path"
26284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26285    unix_path=`$CYGPATH -u "$windows_path"`
26286    new_path="$unix_path"
26287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26289    new_path="$unix_path"
26290  fi
26291
26292  if test "x$path" != "x$new_path"; then
26293    BOOT_JDK="$new_path"
26294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26296  fi
26297
26298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26300
26301    else
26302      # We're on a unix platform. Hooray! :)
26303      path="$BOOT_JDK"
26304      has_space=`$ECHO "$path" | $GREP " "`
26305      if test "x$has_space" != x; then
26306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26309      fi
26310
26311      # Use eval to expand a potential ~
26312      eval path="$path"
26313      if test ! -f "$path" && test ! -d "$path"; then
26314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26315      fi
26316
26317      if test -d "$path"; then
26318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26319      else
26320        dir="`$DIRNAME "$path"`"
26321        base="`$BASENAME "$path"`"
26322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26323      fi
26324    fi
26325  fi
26326
26327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26328$as_echo_n "checking for Boot JDK... " >&6; }
26329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26330$as_echo "$BOOT_JDK" >&6; }
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26332$as_echo_n "checking Boot JDK version... " >&6; }
26333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26335$as_echo "$BOOT_JDK_VERSION" >&6; }
26336          fi # end check jdk version
26337        fi # end check javac
26338      fi # end check java
26339    fi # end check boot jdk found
26340  fi
26341
26342    done
26343  fi
26344
26345  fi
26346
26347
26348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26350      # Do we have a bin/java?
26351      if test ! -x "$BOOT_JDK/bin/java"; then
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26354        BOOT_JDK_FOUND=no
26355      else
26356        # Do we have a bin/javac?
26357        if test ! -x "$BOOT_JDK/bin/javac"; then
26358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26362          BOOT_JDK_FOUND=no
26363        else
26364          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26365          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26366
26367          # Extra M4 quote needed to protect [] in grep expression.
26368          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26369          if test "x$FOUND_CORRECT_VERSION" = x; then
26370            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26372            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26373$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26374            BOOT_JDK_FOUND=no
26375          else
26376            # We're done! :-)
26377            BOOT_JDK_FOUND=yes
26378
26379  # Only process if variable expands to non-empty
26380
26381  if test "x$BOOT_JDK" != x; then
26382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26383
26384  # Input might be given as Windows format, start by converting to
26385  # unix format.
26386  path="$BOOT_JDK"
26387  new_path=`$CYGPATH -u "$path"`
26388
26389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26392  # "foo.exe" is OK but "foo" is an error.
26393  #
26394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26395  # It is also a way to make sure we got the proper file name for the real test later on.
26396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26397  if test "x$test_shortpath" = x; then
26398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26400    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26401  fi
26402
26403  # Call helper function which possibly converts this using DOS-style short mode.
26404  # If so, the updated path is stored in $new_path.
26405
26406  input_path="$new_path"
26407  # Check if we need to convert this using DOS-style short mode. If the path
26408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26409  # take no chances and rewrite it.
26410  # Note: m4 eats our [], so we need to use [ and ] instead.
26411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26412  if test "x$has_forbidden_chars" != x; then
26413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26417      # Going to short mode and back again did indeed matter. Since short mode is
26418      # case insensitive, let's make it lowercase to improve readability.
26419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26420      # Now convert it back to Unix-style (cygpath)
26421      input_path=`$CYGPATH -u "$shortmode_path"`
26422      new_path="$input_path"
26423    fi
26424  fi
26425
26426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26427  if test "x$test_cygdrive_prefix" = x; then
26428    # As a simple fix, exclude /usr/bin since it's not a real path.
26429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26431      # a path prefixed by /cygdrive for fixpath to work.
26432      new_path="$CYGWIN_ROOT_PATH$input_path"
26433    fi
26434  fi
26435
26436
26437  if test "x$path" != "x$new_path"; then
26438    BOOT_JDK="$new_path"
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26441  fi
26442
26443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26444
26445  path="$BOOT_JDK"
26446  has_colon=`$ECHO $path | $GREP ^.:`
26447  new_path="$path"
26448  if test "x$has_colon" = x; then
26449    # Not in mixed or Windows style, start by that.
26450    new_path=`cmd //c echo $path`
26451  fi
26452
26453
26454  input_path="$new_path"
26455  # Check if we need to convert this using DOS-style short mode. If the path
26456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26457  # take no chances and rewrite it.
26458  # Note: m4 eats our [], so we need to use [ and ] instead.
26459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26460  if test "x$has_forbidden_chars" != x; then
26461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26463  fi
26464
26465
26466  windows_path="$new_path"
26467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26468    unix_path=`$CYGPATH -u "$windows_path"`
26469    new_path="$unix_path"
26470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26472    new_path="$unix_path"
26473  fi
26474
26475  if test "x$path" != "x$new_path"; then
26476    BOOT_JDK="$new_path"
26477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26479  fi
26480
26481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26483
26484    else
26485      # We're on a unix platform. Hooray! :)
26486      path="$BOOT_JDK"
26487      has_space=`$ECHO "$path" | $GREP " "`
26488      if test "x$has_space" != x; then
26489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26492      fi
26493
26494      # Use eval to expand a potential ~
26495      eval path="$path"
26496      if test ! -f "$path" && test ! -d "$path"; then
26497        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26498      fi
26499
26500      if test -d "$path"; then
26501        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26502      else
26503        dir="`$DIRNAME "$path"`"
26504        base="`$BASENAME "$path"`"
26505        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26506      fi
26507    fi
26508  fi
26509
26510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26511$as_echo_n "checking for Boot JDK... " >&6; }
26512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26513$as_echo "$BOOT_JDK" >&6; }
26514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26515$as_echo_n "checking Boot JDK version... " >&6; }
26516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26518$as_echo "$BOOT_JDK_VERSION" >&6; }
26519          fi # end check jdk version
26520        fi # end check javac
26521      fi # end check java
26522    fi # end check boot jdk found
26523  fi
26524
26525
26526  if test "x$BOOT_JDK_FOUND" = xno; then
26527    # Now execute the test
26528
26529  if test "x$PROGRAMFILES" != x; then
26530    VIRTUAL_DIR="$PROGRAMFILES/Java"
26531
26532  windows_path="$VIRTUAL_DIR"
26533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26534    unix_path=`$CYGPATH -u "$windows_path"`
26535    VIRTUAL_DIR="$unix_path"
26536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26538    VIRTUAL_DIR="$unix_path"
26539  fi
26540
26541
26542  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26543  BOOT_JDK_SUFFIX=""
26544  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26545  if test "x$ALL_JDKS_FOUND" != x; then
26546    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26547
26548  if test "x$BOOT_JDK_FOUND" = xno; then
26549    # Now execute the test
26550
26551        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26552        if test -d "$BOOT_JDK"; then
26553          BOOT_JDK_FOUND=maybe
26554          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26555$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26556        fi
26557
26558
26559    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26560    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26561      # Do we have a bin/java?
26562      if test ! -x "$BOOT_JDK/bin/java"; then
26563        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26565        BOOT_JDK_FOUND=no
26566      else
26567        # Do we have a bin/javac?
26568        if test ! -x "$BOOT_JDK/bin/javac"; then
26569          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26571          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26572$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26573          BOOT_JDK_FOUND=no
26574        else
26575          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26576          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26577
26578          # Extra M4 quote needed to protect [] in grep expression.
26579          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26580          if test "x$FOUND_CORRECT_VERSION" = x; then
26581            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26583            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26584$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26585            BOOT_JDK_FOUND=no
26586          else
26587            # We're done! :-)
26588            BOOT_JDK_FOUND=yes
26589
26590  # Only process if variable expands to non-empty
26591
26592  if test "x$BOOT_JDK" != x; then
26593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26594
26595  # Input might be given as Windows format, start by converting to
26596  # unix format.
26597  path="$BOOT_JDK"
26598  new_path=`$CYGPATH -u "$path"`
26599
26600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26603  # "foo.exe" is OK but "foo" is an error.
26604  #
26605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26606  # It is also a way to make sure we got the proper file name for the real test later on.
26607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26608  if test "x$test_shortpath" = x; then
26609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26611    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26612  fi
26613
26614  # Call helper function which possibly converts this using DOS-style short mode.
26615  # If so, the updated path is stored in $new_path.
26616
26617  input_path="$new_path"
26618  # Check if we need to convert this using DOS-style short mode. If the path
26619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26620  # take no chances and rewrite it.
26621  # Note: m4 eats our [], so we need to use [ and ] instead.
26622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26623  if test "x$has_forbidden_chars" != x; then
26624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26628      # Going to short mode and back again did indeed matter. Since short mode is
26629      # case insensitive, let's make it lowercase to improve readability.
26630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26631      # Now convert it back to Unix-style (cygpath)
26632      input_path=`$CYGPATH -u "$shortmode_path"`
26633      new_path="$input_path"
26634    fi
26635  fi
26636
26637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26638  if test "x$test_cygdrive_prefix" = x; then
26639    # As a simple fix, exclude /usr/bin since it's not a real path.
26640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26642      # a path prefixed by /cygdrive for fixpath to work.
26643      new_path="$CYGWIN_ROOT_PATH$input_path"
26644    fi
26645  fi
26646
26647
26648  if test "x$path" != "x$new_path"; then
26649    BOOT_JDK="$new_path"
26650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26652  fi
26653
26654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26655
26656  path="$BOOT_JDK"
26657  has_colon=`$ECHO $path | $GREP ^.:`
26658  new_path="$path"
26659  if test "x$has_colon" = x; then
26660    # Not in mixed or Windows style, start by that.
26661    new_path=`cmd //c echo $path`
26662  fi
26663
26664
26665  input_path="$new_path"
26666  # Check if we need to convert this using DOS-style short mode. If the path
26667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26668  # take no chances and rewrite it.
26669  # Note: m4 eats our [], so we need to use [ and ] instead.
26670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26671  if test "x$has_forbidden_chars" != x; then
26672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26674  fi
26675
26676
26677  windows_path="$new_path"
26678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26679    unix_path=`$CYGPATH -u "$windows_path"`
26680    new_path="$unix_path"
26681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26683    new_path="$unix_path"
26684  fi
26685
26686  if test "x$path" != "x$new_path"; then
26687    BOOT_JDK="$new_path"
26688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26689$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26690  fi
26691
26692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26694
26695    else
26696      # We're on a unix platform. Hooray! :)
26697      path="$BOOT_JDK"
26698      has_space=`$ECHO "$path" | $GREP " "`
26699      if test "x$has_space" != x; then
26700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26703      fi
26704
26705      # Use eval to expand a potential ~
26706      eval path="$path"
26707      if test ! -f "$path" && test ! -d "$path"; then
26708        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26709      fi
26710
26711      if test -d "$path"; then
26712        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26713      else
26714        dir="`$DIRNAME "$path"`"
26715        base="`$BASENAME "$path"`"
26716        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26717      fi
26718    fi
26719  fi
26720
26721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26722$as_echo_n "checking for Boot JDK... " >&6; }
26723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26724$as_echo "$BOOT_JDK" >&6; }
26725            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26726$as_echo_n "checking Boot JDK version... " >&6; }
26727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26729$as_echo "$BOOT_JDK_VERSION" >&6; }
26730          fi # end check jdk version
26731        fi # end check javac
26732      fi # end check java
26733    fi # end check boot jdk found
26734  fi
26735
26736    done
26737  fi
26738
26739  fi
26740
26741
26742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26744      # Do we have a bin/java?
26745      if test ! -x "$BOOT_JDK/bin/java"; then
26746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26748        BOOT_JDK_FOUND=no
26749      else
26750        # Do we have a bin/javac?
26751        if test ! -x "$BOOT_JDK/bin/javac"; then
26752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26756          BOOT_JDK_FOUND=no
26757        else
26758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26760
26761          # Extra M4 quote needed to protect [] in grep expression.
26762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26763          if test "x$FOUND_CORRECT_VERSION" = x; then
26764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26768            BOOT_JDK_FOUND=no
26769          else
26770            # We're done! :-)
26771            BOOT_JDK_FOUND=yes
26772
26773  # Only process if variable expands to non-empty
26774
26775  if test "x$BOOT_JDK" != x; then
26776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777
26778  # Input might be given as Windows format, start by converting to
26779  # unix format.
26780  path="$BOOT_JDK"
26781  new_path=`$CYGPATH -u "$path"`
26782
26783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26786  # "foo.exe" is OK but "foo" is an error.
26787  #
26788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26789  # It is also a way to make sure we got the proper file name for the real test later on.
26790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26791  if test "x$test_shortpath" = x; then
26792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26795  fi
26796
26797  # Call helper function which possibly converts this using DOS-style short mode.
26798  # If so, the updated path is stored in $new_path.
26799
26800  input_path="$new_path"
26801  # Check if we need to convert this using DOS-style short mode. If the path
26802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26803  # take no chances and rewrite it.
26804  # Note: m4 eats our [], so we need to use [ and ] instead.
26805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26806  if test "x$has_forbidden_chars" != x; then
26807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26811      # Going to short mode and back again did indeed matter. Since short mode is
26812      # case insensitive, let's make it lowercase to improve readability.
26813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26814      # Now convert it back to Unix-style (cygpath)
26815      input_path=`$CYGPATH -u "$shortmode_path"`
26816      new_path="$input_path"
26817    fi
26818  fi
26819
26820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26821  if test "x$test_cygdrive_prefix" = x; then
26822    # As a simple fix, exclude /usr/bin since it's not a real path.
26823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26825      # a path prefixed by /cygdrive for fixpath to work.
26826      new_path="$CYGWIN_ROOT_PATH$input_path"
26827    fi
26828  fi
26829
26830
26831  if test "x$path" != "x$new_path"; then
26832    BOOT_JDK="$new_path"
26833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26835  fi
26836
26837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26838
26839  path="$BOOT_JDK"
26840  has_colon=`$ECHO $path | $GREP ^.:`
26841  new_path="$path"
26842  if test "x$has_colon" = x; then
26843    # Not in mixed or Windows style, start by that.
26844    new_path=`cmd //c echo $path`
26845  fi
26846
26847
26848  input_path="$new_path"
26849  # Check if we need to convert this using DOS-style short mode. If the path
26850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26851  # take no chances and rewrite it.
26852  # Note: m4 eats our [], so we need to use [ and ] instead.
26853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26854  if test "x$has_forbidden_chars" != x; then
26855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26857  fi
26858
26859
26860  windows_path="$new_path"
26861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26862    unix_path=`$CYGPATH -u "$windows_path"`
26863    new_path="$unix_path"
26864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26866    new_path="$unix_path"
26867  fi
26868
26869  if test "x$path" != "x$new_path"; then
26870    BOOT_JDK="$new_path"
26871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26873  fi
26874
26875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26877
26878    else
26879      # We're on a unix platform. Hooray! :)
26880      path="$BOOT_JDK"
26881      has_space=`$ECHO "$path" | $GREP " "`
26882      if test "x$has_space" != x; then
26883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26886      fi
26887
26888      # Use eval to expand a potential ~
26889      eval path="$path"
26890      if test ! -f "$path" && test ! -d "$path"; then
26891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26892      fi
26893
26894      if test -d "$path"; then
26895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26896      else
26897        dir="`$DIRNAME "$path"`"
26898        base="`$BASENAME "$path"`"
26899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26900      fi
26901    fi
26902  fi
26903
26904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26905$as_echo_n "checking for Boot JDK... " >&6; }
26906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26907$as_echo "$BOOT_JDK" >&6; }
26908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26909$as_echo_n "checking Boot JDK version... " >&6; }
26910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26912$as_echo "$BOOT_JDK_VERSION" >&6; }
26913          fi # end check jdk version
26914        fi # end check javac
26915      fi # end check java
26916    fi # end check boot jdk found
26917  fi
26918
26919
26920  if test "x$BOOT_JDK_FOUND" = xno; then
26921    # Now execute the test
26922
26923  if test "x$ProgramFiles" != x; then
26924    VIRTUAL_DIR="$ProgramFiles/Java"
26925
26926  windows_path="$VIRTUAL_DIR"
26927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928    unix_path=`$CYGPATH -u "$windows_path"`
26929    VIRTUAL_DIR="$unix_path"
26930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26932    VIRTUAL_DIR="$unix_path"
26933  fi
26934
26935
26936  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26937  BOOT_JDK_SUFFIX=""
26938  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26939  if test "x$ALL_JDKS_FOUND" != x; then
26940    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26941
26942  if test "x$BOOT_JDK_FOUND" = xno; then
26943    # Now execute the test
26944
26945        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26946        if test -d "$BOOT_JDK"; then
26947          BOOT_JDK_FOUND=maybe
26948          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26949$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26950        fi
26951
26952
26953    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26954    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26955      # Do we have a bin/java?
26956      if test ! -x "$BOOT_JDK/bin/java"; then
26957        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26959        BOOT_JDK_FOUND=no
26960      else
26961        # Do we have a bin/javac?
26962        if test ! -x "$BOOT_JDK/bin/javac"; then
26963          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26965          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26966$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26967          BOOT_JDK_FOUND=no
26968        else
26969          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26970          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26971
26972          # Extra M4 quote needed to protect [] in grep expression.
26973          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26974          if test "x$FOUND_CORRECT_VERSION" = x; then
26975            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26977            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26978$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26979            BOOT_JDK_FOUND=no
26980          else
26981            # We're done! :-)
26982            BOOT_JDK_FOUND=yes
26983
26984  # Only process if variable expands to non-empty
26985
26986  if test "x$BOOT_JDK" != x; then
26987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26988
26989  # Input might be given as Windows format, start by converting to
26990  # unix format.
26991  path="$BOOT_JDK"
26992  new_path=`$CYGPATH -u "$path"`
26993
26994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26997  # "foo.exe" is OK but "foo" is an error.
26998  #
26999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27000  # It is also a way to make sure we got the proper file name for the real test later on.
27001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27002  if test "x$test_shortpath" = x; then
27003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27005    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27006  fi
27007
27008  # Call helper function which possibly converts this using DOS-style short mode.
27009  # If so, the updated path is stored in $new_path.
27010
27011  input_path="$new_path"
27012  # Check if we need to convert this using DOS-style short mode. If the path
27013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27014  # take no chances and rewrite it.
27015  # Note: m4 eats our [], so we need to use [ and ] instead.
27016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27017  if test "x$has_forbidden_chars" != x; then
27018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27022      # Going to short mode and back again did indeed matter. Since short mode is
27023      # case insensitive, let's make it lowercase to improve readability.
27024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27025      # Now convert it back to Unix-style (cygpath)
27026      input_path=`$CYGPATH -u "$shortmode_path"`
27027      new_path="$input_path"
27028    fi
27029  fi
27030
27031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27032  if test "x$test_cygdrive_prefix" = x; then
27033    # As a simple fix, exclude /usr/bin since it's not a real path.
27034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27036      # a path prefixed by /cygdrive for fixpath to work.
27037      new_path="$CYGWIN_ROOT_PATH$input_path"
27038    fi
27039  fi
27040
27041
27042  if test "x$path" != "x$new_path"; then
27043    BOOT_JDK="$new_path"
27044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27046  fi
27047
27048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27049
27050  path="$BOOT_JDK"
27051  has_colon=`$ECHO $path | $GREP ^.:`
27052  new_path="$path"
27053  if test "x$has_colon" = x; then
27054    # Not in mixed or Windows style, start by that.
27055    new_path=`cmd //c echo $path`
27056  fi
27057
27058
27059  input_path="$new_path"
27060  # Check if we need to convert this using DOS-style short mode. If the path
27061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27062  # take no chances and rewrite it.
27063  # Note: m4 eats our [], so we need to use [ and ] instead.
27064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27065  if test "x$has_forbidden_chars" != x; then
27066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27068  fi
27069
27070
27071  windows_path="$new_path"
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073    unix_path=`$CYGPATH -u "$windows_path"`
27074    new_path="$unix_path"
27075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27077    new_path="$unix_path"
27078  fi
27079
27080  if test "x$path" != "x$new_path"; then
27081    BOOT_JDK="$new_path"
27082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27084  fi
27085
27086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27088
27089    else
27090      # We're on a unix platform. Hooray! :)
27091      path="$BOOT_JDK"
27092      has_space=`$ECHO "$path" | $GREP " "`
27093      if test "x$has_space" != x; then
27094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27097      fi
27098
27099      # Use eval to expand a potential ~
27100      eval path="$path"
27101      if test ! -f "$path" && test ! -d "$path"; then
27102        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27103      fi
27104
27105      if test -d "$path"; then
27106        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27107      else
27108        dir="`$DIRNAME "$path"`"
27109        base="`$BASENAME "$path"`"
27110        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27111      fi
27112    fi
27113  fi
27114
27115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27116$as_echo_n "checking for Boot JDK... " >&6; }
27117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27118$as_echo "$BOOT_JDK" >&6; }
27119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27120$as_echo_n "checking Boot JDK version... " >&6; }
27121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27123$as_echo "$BOOT_JDK_VERSION" >&6; }
27124          fi # end check jdk version
27125        fi # end check javac
27126      fi # end check java
27127    fi # end check boot jdk found
27128  fi
27129
27130    done
27131  fi
27132
27133  fi
27134
27135
27136    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27137    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27138      # Do we have a bin/java?
27139      if test ! -x "$BOOT_JDK/bin/java"; then
27140        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27142        BOOT_JDK_FOUND=no
27143      else
27144        # Do we have a bin/javac?
27145        if test ! -x "$BOOT_JDK/bin/javac"; then
27146          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27148          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27149$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27150          BOOT_JDK_FOUND=no
27151        else
27152          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27153          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27154
27155          # Extra M4 quote needed to protect [] in grep expression.
27156          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27157          if test "x$FOUND_CORRECT_VERSION" = x; then
27158            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27160            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27161$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27162            BOOT_JDK_FOUND=no
27163          else
27164            # We're done! :-)
27165            BOOT_JDK_FOUND=yes
27166
27167  # Only process if variable expands to non-empty
27168
27169  if test "x$BOOT_JDK" != x; then
27170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27171
27172  # Input might be given as Windows format, start by converting to
27173  # unix format.
27174  path="$BOOT_JDK"
27175  new_path=`$CYGPATH -u "$path"`
27176
27177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27180  # "foo.exe" is OK but "foo" is an error.
27181  #
27182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27183  # It is also a way to make sure we got the proper file name for the real test later on.
27184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27185  if test "x$test_shortpath" = x; then
27186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27189  fi
27190
27191  # Call helper function which possibly converts this using DOS-style short mode.
27192  # If so, the updated path is stored in $new_path.
27193
27194  input_path="$new_path"
27195  # Check if we need to convert this using DOS-style short mode. If the path
27196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27197  # take no chances and rewrite it.
27198  # Note: m4 eats our [], so we need to use [ and ] instead.
27199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27200  if test "x$has_forbidden_chars" != x; then
27201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27205      # Going to short mode and back again did indeed matter. Since short mode is
27206      # case insensitive, let's make it lowercase to improve readability.
27207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27208      # Now convert it back to Unix-style (cygpath)
27209      input_path=`$CYGPATH -u "$shortmode_path"`
27210      new_path="$input_path"
27211    fi
27212  fi
27213
27214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27215  if test "x$test_cygdrive_prefix" = x; then
27216    # As a simple fix, exclude /usr/bin since it's not a real path.
27217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27219      # a path prefixed by /cygdrive for fixpath to work.
27220      new_path="$CYGWIN_ROOT_PATH$input_path"
27221    fi
27222  fi
27223
27224
27225  if test "x$path" != "x$new_path"; then
27226    BOOT_JDK="$new_path"
27227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27229  fi
27230
27231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232
27233  path="$BOOT_JDK"
27234  has_colon=`$ECHO $path | $GREP ^.:`
27235  new_path="$path"
27236  if test "x$has_colon" = x; then
27237    # Not in mixed or Windows style, start by that.
27238    new_path=`cmd //c echo $path`
27239  fi
27240
27241
27242  input_path="$new_path"
27243  # Check if we need to convert this using DOS-style short mode. If the path
27244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27245  # take no chances and rewrite it.
27246  # Note: m4 eats our [], so we need to use [ and ] instead.
27247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27248  if test "x$has_forbidden_chars" != x; then
27249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27251  fi
27252
27253
27254  windows_path="$new_path"
27255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27256    unix_path=`$CYGPATH -u "$windows_path"`
27257    new_path="$unix_path"
27258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27260    new_path="$unix_path"
27261  fi
27262
27263  if test "x$path" != "x$new_path"; then
27264    BOOT_JDK="$new_path"
27265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27267  fi
27268
27269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27271
27272    else
27273      # We're on a unix platform. Hooray! :)
27274      path="$BOOT_JDK"
27275      has_space=`$ECHO "$path" | $GREP " "`
27276      if test "x$has_space" != x; then
27277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27280      fi
27281
27282      # Use eval to expand a potential ~
27283      eval path="$path"
27284      if test ! -f "$path" && test ! -d "$path"; then
27285        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27286      fi
27287
27288      if test -d "$path"; then
27289        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27290      else
27291        dir="`$DIRNAME "$path"`"
27292        base="`$BASENAME "$path"`"
27293        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27294      fi
27295    fi
27296  fi
27297
27298            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27299$as_echo_n "checking for Boot JDK... " >&6; }
27300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27301$as_echo "$BOOT_JDK" >&6; }
27302            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27303$as_echo_n "checking Boot JDK version... " >&6; }
27304            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27306$as_echo "$BOOT_JDK_VERSION" >&6; }
27307          fi # end check jdk version
27308        fi # end check javac
27309      fi # end check java
27310    fi # end check boot jdk found
27311  fi
27312
27313
27314  if test "x$BOOT_JDK_FOUND" = xno; then
27315    # Now execute the test
27316
27317  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27318  BOOT_JDK_SUFFIX=""
27319  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27320  if test "x$ALL_JDKS_FOUND" != x; then
27321    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27322
27323  if test "x$BOOT_JDK_FOUND" = xno; then
27324    # Now execute the test
27325
27326        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27327        if test -d "$BOOT_JDK"; then
27328          BOOT_JDK_FOUND=maybe
27329          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27330$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27331        fi
27332
27333
27334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27336      # Do we have a bin/java?
27337      if test ! -x "$BOOT_JDK/bin/java"; then
27338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27340        BOOT_JDK_FOUND=no
27341      else
27342        # Do we have a bin/javac?
27343        if test ! -x "$BOOT_JDK/bin/javac"; then
27344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27348          BOOT_JDK_FOUND=no
27349        else
27350          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27351          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27352
27353          # Extra M4 quote needed to protect [] in grep expression.
27354          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27355          if test "x$FOUND_CORRECT_VERSION" = x; then
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27360            BOOT_JDK_FOUND=no
27361          else
27362            # We're done! :-)
27363            BOOT_JDK_FOUND=yes
27364
27365  # Only process if variable expands to non-empty
27366
27367  if test "x$BOOT_JDK" != x; then
27368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27369
27370  # Input might be given as Windows format, start by converting to
27371  # unix format.
27372  path="$BOOT_JDK"
27373  new_path=`$CYGPATH -u "$path"`
27374
27375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27378  # "foo.exe" is OK but "foo" is an error.
27379  #
27380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27381  # It is also a way to make sure we got the proper file name for the real test later on.
27382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27383  if test "x$test_shortpath" = x; then
27384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27387  fi
27388
27389  # Call helper function which possibly converts this using DOS-style short mode.
27390  # If so, the updated path is stored in $new_path.
27391
27392  input_path="$new_path"
27393  # Check if we need to convert this using DOS-style short mode. If the path
27394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27395  # take no chances and rewrite it.
27396  # Note: m4 eats our [], so we need to use [ and ] instead.
27397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27398  if test "x$has_forbidden_chars" != x; then
27399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27403      # Going to short mode and back again did indeed matter. Since short mode is
27404      # case insensitive, let's make it lowercase to improve readability.
27405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27406      # Now convert it back to Unix-style (cygpath)
27407      input_path=`$CYGPATH -u "$shortmode_path"`
27408      new_path="$input_path"
27409    fi
27410  fi
27411
27412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27413  if test "x$test_cygdrive_prefix" = x; then
27414    # As a simple fix, exclude /usr/bin since it's not a real path.
27415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27417      # a path prefixed by /cygdrive for fixpath to work.
27418      new_path="$CYGWIN_ROOT_PATH$input_path"
27419    fi
27420  fi
27421
27422
27423  if test "x$path" != "x$new_path"; then
27424    BOOT_JDK="$new_path"
27425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27427  fi
27428
27429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27430
27431  path="$BOOT_JDK"
27432  has_colon=`$ECHO $path | $GREP ^.:`
27433  new_path="$path"
27434  if test "x$has_colon" = x; then
27435    # Not in mixed or Windows style, start by that.
27436    new_path=`cmd //c echo $path`
27437  fi
27438
27439
27440  input_path="$new_path"
27441  # Check if we need to convert this using DOS-style short mode. If the path
27442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27443  # take no chances and rewrite it.
27444  # Note: m4 eats our [], so we need to use [ and ] instead.
27445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27446  if test "x$has_forbidden_chars" != x; then
27447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27449  fi
27450
27451
27452  windows_path="$new_path"
27453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454    unix_path=`$CYGPATH -u "$windows_path"`
27455    new_path="$unix_path"
27456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27458    new_path="$unix_path"
27459  fi
27460
27461  if test "x$path" != "x$new_path"; then
27462    BOOT_JDK="$new_path"
27463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27465  fi
27466
27467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27469
27470    else
27471      # We're on a unix platform. Hooray! :)
27472      path="$BOOT_JDK"
27473      has_space=`$ECHO "$path" | $GREP " "`
27474      if test "x$has_space" != x; then
27475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27478      fi
27479
27480      # Use eval to expand a potential ~
27481      eval path="$path"
27482      if test ! -f "$path" && test ! -d "$path"; then
27483        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27484      fi
27485
27486      if test -d "$path"; then
27487        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27488      else
27489        dir="`$DIRNAME "$path"`"
27490        base="`$BASENAME "$path"`"
27491        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27492      fi
27493    fi
27494  fi
27495
27496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27497$as_echo_n "checking for Boot JDK... " >&6; }
27498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27499$as_echo "$BOOT_JDK" >&6; }
27500            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27501$as_echo_n "checking Boot JDK version... " >&6; }
27502            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27503            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27504$as_echo "$BOOT_JDK_VERSION" >&6; }
27505          fi # end check jdk version
27506        fi # end check javac
27507      fi # end check java
27508    fi # end check boot jdk found
27509  fi
27510
27511    done
27512  fi
27513
27514
27515    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27516    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27517      # Do we have a bin/java?
27518      if test ! -x "$BOOT_JDK/bin/java"; then
27519        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27521        BOOT_JDK_FOUND=no
27522      else
27523        # Do we have a bin/javac?
27524        if test ! -x "$BOOT_JDK/bin/javac"; then
27525          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27527          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27528$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27529          BOOT_JDK_FOUND=no
27530        else
27531          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27532          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27533
27534          # Extra M4 quote needed to protect [] in grep expression.
27535          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27536          if test "x$FOUND_CORRECT_VERSION" = x; then
27537            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27539            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27540$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27541            BOOT_JDK_FOUND=no
27542          else
27543            # We're done! :-)
27544            BOOT_JDK_FOUND=yes
27545
27546  # Only process if variable expands to non-empty
27547
27548  if test "x$BOOT_JDK" != x; then
27549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27550
27551  # Input might be given as Windows format, start by converting to
27552  # unix format.
27553  path="$BOOT_JDK"
27554  new_path=`$CYGPATH -u "$path"`
27555
27556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27559  # "foo.exe" is OK but "foo" is an error.
27560  #
27561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27562  # It is also a way to make sure we got the proper file name for the real test later on.
27563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27564  if test "x$test_shortpath" = x; then
27565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27567    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27568  fi
27569
27570  # Call helper function which possibly converts this using DOS-style short mode.
27571  # If so, the updated path is stored in $new_path.
27572
27573  input_path="$new_path"
27574  # Check if we need to convert this using DOS-style short mode. If the path
27575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27576  # take no chances and rewrite it.
27577  # Note: m4 eats our [], so we need to use [ and ] instead.
27578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27579  if test "x$has_forbidden_chars" != x; then
27580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27584      # Going to short mode and back again did indeed matter. Since short mode is
27585      # case insensitive, let's make it lowercase to improve readability.
27586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27587      # Now convert it back to Unix-style (cygpath)
27588      input_path=`$CYGPATH -u "$shortmode_path"`
27589      new_path="$input_path"
27590    fi
27591  fi
27592
27593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27594  if test "x$test_cygdrive_prefix" = x; then
27595    # As a simple fix, exclude /usr/bin since it's not a real path.
27596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27598      # a path prefixed by /cygdrive for fixpath to work.
27599      new_path="$CYGWIN_ROOT_PATH$input_path"
27600    fi
27601  fi
27602
27603
27604  if test "x$path" != "x$new_path"; then
27605    BOOT_JDK="$new_path"
27606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27607$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27608  fi
27609
27610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27611
27612  path="$BOOT_JDK"
27613  has_colon=`$ECHO $path | $GREP ^.:`
27614  new_path="$path"
27615  if test "x$has_colon" = x; then
27616    # Not in mixed or Windows style, start by that.
27617    new_path=`cmd //c echo $path`
27618  fi
27619
27620
27621  input_path="$new_path"
27622  # Check if we need to convert this using DOS-style short mode. If the path
27623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27624  # take no chances and rewrite it.
27625  # Note: m4 eats our [], so we need to use [ and ] instead.
27626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27627  if test "x$has_forbidden_chars" != x; then
27628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27630  fi
27631
27632
27633  windows_path="$new_path"
27634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27635    unix_path=`$CYGPATH -u "$windows_path"`
27636    new_path="$unix_path"
27637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27639    new_path="$unix_path"
27640  fi
27641
27642  if test "x$path" != "x$new_path"; then
27643    BOOT_JDK="$new_path"
27644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27646  fi
27647
27648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27650
27651    else
27652      # We're on a unix platform. Hooray! :)
27653      path="$BOOT_JDK"
27654      has_space=`$ECHO "$path" | $GREP " "`
27655      if test "x$has_space" != x; then
27656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27659      fi
27660
27661      # Use eval to expand a potential ~
27662      eval path="$path"
27663      if test ! -f "$path" && test ! -d "$path"; then
27664        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27665      fi
27666
27667      if test -d "$path"; then
27668        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27669      else
27670        dir="`$DIRNAME "$path"`"
27671        base="`$BASENAME "$path"`"
27672        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27673      fi
27674    fi
27675  fi
27676
27677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27678$as_echo_n "checking for Boot JDK... " >&6; }
27679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27680$as_echo "$BOOT_JDK" >&6; }
27681            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27682$as_echo_n "checking Boot JDK version... " >&6; }
27683            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27685$as_echo "$BOOT_JDK_VERSION" >&6; }
27686          fi # end check jdk version
27687        fi # end check javac
27688      fi # end check java
27689    fi # end check boot jdk found
27690  fi
27691
27692  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27693
27694  if test "x$BOOT_JDK_FOUND" = xno; then
27695    # Now execute the test
27696
27697  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27698  BOOT_JDK_SUFFIX="/Contents/Home"
27699  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27700  if test "x$ALL_JDKS_FOUND" != x; then
27701    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27702
27703  if test "x$BOOT_JDK_FOUND" = xno; then
27704    # Now execute the test
27705
27706        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27707        if test -d "$BOOT_JDK"; then
27708          BOOT_JDK_FOUND=maybe
27709          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27710$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27711        fi
27712
27713
27714    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27715    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27716      # Do we have a bin/java?
27717      if test ! -x "$BOOT_JDK/bin/java"; then
27718        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27720        BOOT_JDK_FOUND=no
27721      else
27722        # Do we have a bin/javac?
27723        if test ! -x "$BOOT_JDK/bin/javac"; then
27724          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27726          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27727$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27728          BOOT_JDK_FOUND=no
27729        else
27730          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27731          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27732
27733          # Extra M4 quote needed to protect [] in grep expression.
27734          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27735          if test "x$FOUND_CORRECT_VERSION" = x; then
27736            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27738            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27739$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27740            BOOT_JDK_FOUND=no
27741          else
27742            # We're done! :-)
27743            BOOT_JDK_FOUND=yes
27744
27745  # Only process if variable expands to non-empty
27746
27747  if test "x$BOOT_JDK" != x; then
27748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27749
27750  # Input might be given as Windows format, start by converting to
27751  # unix format.
27752  path="$BOOT_JDK"
27753  new_path=`$CYGPATH -u "$path"`
27754
27755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27758  # "foo.exe" is OK but "foo" is an error.
27759  #
27760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27761  # It is also a way to make sure we got the proper file name for the real test later on.
27762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27763  if test "x$test_shortpath" = x; then
27764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27765$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27766    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27767  fi
27768
27769  # Call helper function which possibly converts this using DOS-style short mode.
27770  # If so, the updated path is stored in $new_path.
27771
27772  input_path="$new_path"
27773  # Check if we need to convert this using DOS-style short mode. If the path
27774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27775  # take no chances and rewrite it.
27776  # Note: m4 eats our [], so we need to use [ and ] instead.
27777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27778  if test "x$has_forbidden_chars" != x; then
27779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27783      # Going to short mode and back again did indeed matter. Since short mode is
27784      # case insensitive, let's make it lowercase to improve readability.
27785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27786      # Now convert it back to Unix-style (cygpath)
27787      input_path=`$CYGPATH -u "$shortmode_path"`
27788      new_path="$input_path"
27789    fi
27790  fi
27791
27792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27793  if test "x$test_cygdrive_prefix" = x; then
27794    # As a simple fix, exclude /usr/bin since it's not a real path.
27795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27797      # a path prefixed by /cygdrive for fixpath to work.
27798      new_path="$CYGWIN_ROOT_PATH$input_path"
27799    fi
27800  fi
27801
27802
27803  if test "x$path" != "x$new_path"; then
27804    BOOT_JDK="$new_path"
27805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27807  fi
27808
27809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27810
27811  path="$BOOT_JDK"
27812  has_colon=`$ECHO $path | $GREP ^.:`
27813  new_path="$path"
27814  if test "x$has_colon" = x; then
27815    # Not in mixed or Windows style, start by that.
27816    new_path=`cmd //c echo $path`
27817  fi
27818
27819
27820  input_path="$new_path"
27821  # Check if we need to convert this using DOS-style short mode. If the path
27822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27823  # take no chances and rewrite it.
27824  # Note: m4 eats our [], so we need to use [ and ] instead.
27825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27826  if test "x$has_forbidden_chars" != x; then
27827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27829  fi
27830
27831
27832  windows_path="$new_path"
27833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27834    unix_path=`$CYGPATH -u "$windows_path"`
27835    new_path="$unix_path"
27836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27838    new_path="$unix_path"
27839  fi
27840
27841  if test "x$path" != "x$new_path"; then
27842    BOOT_JDK="$new_path"
27843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27844$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27845  fi
27846
27847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27849
27850    else
27851      # We're on a unix platform. Hooray! :)
27852      path="$BOOT_JDK"
27853      has_space=`$ECHO "$path" | $GREP " "`
27854      if test "x$has_space" != x; then
27855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27857        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27858      fi
27859
27860      # Use eval to expand a potential ~
27861      eval path="$path"
27862      if test ! -f "$path" && test ! -d "$path"; then
27863        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27864      fi
27865
27866      if test -d "$path"; then
27867        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27868      else
27869        dir="`$DIRNAME "$path"`"
27870        base="`$BASENAME "$path"`"
27871        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27872      fi
27873    fi
27874  fi
27875
27876            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27877$as_echo_n "checking for Boot JDK... " >&6; }
27878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27879$as_echo "$BOOT_JDK" >&6; }
27880            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27881$as_echo_n "checking Boot JDK version... " >&6; }
27882            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27884$as_echo "$BOOT_JDK_VERSION" >&6; }
27885          fi # end check jdk version
27886        fi # end check javac
27887      fi # end check java
27888    fi # end check boot jdk found
27889  fi
27890
27891    done
27892  fi
27893
27894
27895    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27896    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27897      # Do we have a bin/java?
27898      if test ! -x "$BOOT_JDK/bin/java"; then
27899        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27901        BOOT_JDK_FOUND=no
27902      else
27903        # Do we have a bin/javac?
27904        if test ! -x "$BOOT_JDK/bin/javac"; then
27905          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27907          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27908$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27909          BOOT_JDK_FOUND=no
27910        else
27911          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27912          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27913
27914          # Extra M4 quote needed to protect [] in grep expression.
27915          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27916          if test "x$FOUND_CORRECT_VERSION" = x; then
27917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27919            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27920$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27921            BOOT_JDK_FOUND=no
27922          else
27923            # We're done! :-)
27924            BOOT_JDK_FOUND=yes
27925
27926  # Only process if variable expands to non-empty
27927
27928  if test "x$BOOT_JDK" != x; then
27929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27930
27931  # Input might be given as Windows format, start by converting to
27932  # unix format.
27933  path="$BOOT_JDK"
27934  new_path=`$CYGPATH -u "$path"`
27935
27936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27939  # "foo.exe" is OK but "foo" is an error.
27940  #
27941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27942  # It is also a way to make sure we got the proper file name for the real test later on.
27943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27944  if test "x$test_shortpath" = x; then
27945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27947    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27948  fi
27949
27950  # Call helper function which possibly converts this using DOS-style short mode.
27951  # If so, the updated path is stored in $new_path.
27952
27953  input_path="$new_path"
27954  # Check if we need to convert this using DOS-style short mode. If the path
27955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27956  # take no chances and rewrite it.
27957  # Note: m4 eats our [], so we need to use [ and ] instead.
27958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27959  if test "x$has_forbidden_chars" != x; then
27960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27964      # Going to short mode and back again did indeed matter. Since short mode is
27965      # case insensitive, let's make it lowercase to improve readability.
27966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27967      # Now convert it back to Unix-style (cygpath)
27968      input_path=`$CYGPATH -u "$shortmode_path"`
27969      new_path="$input_path"
27970    fi
27971  fi
27972
27973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27974  if test "x$test_cygdrive_prefix" = x; then
27975    # As a simple fix, exclude /usr/bin since it's not a real path.
27976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27978      # a path prefixed by /cygdrive for fixpath to work.
27979      new_path="$CYGWIN_ROOT_PATH$input_path"
27980    fi
27981  fi
27982
27983
27984  if test "x$path" != "x$new_path"; then
27985    BOOT_JDK="$new_path"
27986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27988  fi
27989
27990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991
27992  path="$BOOT_JDK"
27993  has_colon=`$ECHO $path | $GREP ^.:`
27994  new_path="$path"
27995  if test "x$has_colon" = x; then
27996    # Not in mixed or Windows style, start by that.
27997    new_path=`cmd //c echo $path`
27998  fi
27999
28000
28001  input_path="$new_path"
28002  # Check if we need to convert this using DOS-style short mode. If the path
28003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28004  # take no chances and rewrite it.
28005  # Note: m4 eats our [], so we need to use [ and ] instead.
28006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28007  if test "x$has_forbidden_chars" != x; then
28008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28010  fi
28011
28012
28013  windows_path="$new_path"
28014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28015    unix_path=`$CYGPATH -u "$windows_path"`
28016    new_path="$unix_path"
28017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28019    new_path="$unix_path"
28020  fi
28021
28022  if test "x$path" != "x$new_path"; then
28023    BOOT_JDK="$new_path"
28024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28026  fi
28027
28028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28030
28031    else
28032      # We're on a unix platform. Hooray! :)
28033      path="$BOOT_JDK"
28034      has_space=`$ECHO "$path" | $GREP " "`
28035      if test "x$has_space" != x; then
28036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28039      fi
28040
28041      # Use eval to expand a potential ~
28042      eval path="$path"
28043      if test ! -f "$path" && test ! -d "$path"; then
28044        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28045      fi
28046
28047      if test -d "$path"; then
28048        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28049      else
28050        dir="`$DIRNAME "$path"`"
28051        base="`$BASENAME "$path"`"
28052        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28053      fi
28054    fi
28055  fi
28056
28057            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28058$as_echo_n "checking for Boot JDK... " >&6; }
28059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28060$as_echo "$BOOT_JDK" >&6; }
28061            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28062$as_echo_n "checking Boot JDK version... " >&6; }
28063            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28065$as_echo "$BOOT_JDK_VERSION" >&6; }
28066          fi # end check jdk version
28067        fi # end check javac
28068      fi # end check java
28069    fi # end check boot jdk found
28070  fi
28071
28072
28073  if test "x$BOOT_JDK_FOUND" = xno; then
28074    # Now execute the test
28075
28076  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28077  BOOT_JDK_SUFFIX="/Contents/Home"
28078  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28079  if test "x$ALL_JDKS_FOUND" != x; then
28080    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28081
28082  if test "x$BOOT_JDK_FOUND" = xno; then
28083    # Now execute the test
28084
28085        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28086        if test -d "$BOOT_JDK"; then
28087          BOOT_JDK_FOUND=maybe
28088          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28089$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28090        fi
28091
28092
28093    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28094    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28095      # Do we have a bin/java?
28096      if test ! -x "$BOOT_JDK/bin/java"; then
28097        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28099        BOOT_JDK_FOUND=no
28100      else
28101        # Do we have a bin/javac?
28102        if test ! -x "$BOOT_JDK/bin/javac"; then
28103          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28105          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28106$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28107          BOOT_JDK_FOUND=no
28108        else
28109          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28110          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28111
28112          # Extra M4 quote needed to protect [] in grep expression.
28113          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28114          if test "x$FOUND_CORRECT_VERSION" = x; then
28115            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28117            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28118$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28119            BOOT_JDK_FOUND=no
28120          else
28121            # We're done! :-)
28122            BOOT_JDK_FOUND=yes
28123
28124  # Only process if variable expands to non-empty
28125
28126  if test "x$BOOT_JDK" != x; then
28127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28128
28129  # Input might be given as Windows format, start by converting to
28130  # unix format.
28131  path="$BOOT_JDK"
28132  new_path=`$CYGPATH -u "$path"`
28133
28134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28137  # "foo.exe" is OK but "foo" is an error.
28138  #
28139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28140  # It is also a way to make sure we got the proper file name for the real test later on.
28141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28142  if test "x$test_shortpath" = x; then
28143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28146  fi
28147
28148  # Call helper function which possibly converts this using DOS-style short mode.
28149  # If so, the updated path is stored in $new_path.
28150
28151  input_path="$new_path"
28152  # Check if we need to convert this using DOS-style short mode. If the path
28153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28154  # take no chances and rewrite it.
28155  # Note: m4 eats our [], so we need to use [ and ] instead.
28156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28157  if test "x$has_forbidden_chars" != x; then
28158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28162      # Going to short mode and back again did indeed matter. Since short mode is
28163      # case insensitive, let's make it lowercase to improve readability.
28164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28165      # Now convert it back to Unix-style (cygpath)
28166      input_path=`$CYGPATH -u "$shortmode_path"`
28167      new_path="$input_path"
28168    fi
28169  fi
28170
28171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28172  if test "x$test_cygdrive_prefix" = x; then
28173    # As a simple fix, exclude /usr/bin since it's not a real path.
28174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28176      # a path prefixed by /cygdrive for fixpath to work.
28177      new_path="$CYGWIN_ROOT_PATH$input_path"
28178    fi
28179  fi
28180
28181
28182  if test "x$path" != "x$new_path"; then
28183    BOOT_JDK="$new_path"
28184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28186  fi
28187
28188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28189
28190  path="$BOOT_JDK"
28191  has_colon=`$ECHO $path | $GREP ^.:`
28192  new_path="$path"
28193  if test "x$has_colon" = x; then
28194    # Not in mixed or Windows style, start by that.
28195    new_path=`cmd //c echo $path`
28196  fi
28197
28198
28199  input_path="$new_path"
28200  # Check if we need to convert this using DOS-style short mode. If the path
28201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28202  # take no chances and rewrite it.
28203  # Note: m4 eats our [], so we need to use [ and ] instead.
28204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28205  if test "x$has_forbidden_chars" != x; then
28206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28208  fi
28209
28210
28211  windows_path="$new_path"
28212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213    unix_path=`$CYGPATH -u "$windows_path"`
28214    new_path="$unix_path"
28215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28217    new_path="$unix_path"
28218  fi
28219
28220  if test "x$path" != "x$new_path"; then
28221    BOOT_JDK="$new_path"
28222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28224  fi
28225
28226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28228
28229    else
28230      # We're on a unix platform. Hooray! :)
28231      path="$BOOT_JDK"
28232      has_space=`$ECHO "$path" | $GREP " "`
28233      if test "x$has_space" != x; then
28234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28237      fi
28238
28239      # Use eval to expand a potential ~
28240      eval path="$path"
28241      if test ! -f "$path" && test ! -d "$path"; then
28242        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28243      fi
28244
28245      if test -d "$path"; then
28246        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28247      else
28248        dir="`$DIRNAME "$path"`"
28249        base="`$BASENAME "$path"`"
28250        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28251      fi
28252    fi
28253  fi
28254
28255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28256$as_echo_n "checking for Boot JDK... " >&6; }
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28258$as_echo "$BOOT_JDK" >&6; }
28259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28260$as_echo_n "checking Boot JDK version... " >&6; }
28261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28263$as_echo "$BOOT_JDK_VERSION" >&6; }
28264          fi # end check jdk version
28265        fi # end check javac
28266      fi # end check java
28267    fi # end check boot jdk found
28268  fi
28269
28270    done
28271  fi
28272
28273
28274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28276      # Do we have a bin/java?
28277      if test ! -x "$BOOT_JDK/bin/java"; then
28278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28280        BOOT_JDK_FOUND=no
28281      else
28282        # Do we have a bin/javac?
28283        if test ! -x "$BOOT_JDK/bin/javac"; then
28284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28288          BOOT_JDK_FOUND=no
28289        else
28290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28292
28293          # Extra M4 quote needed to protect [] in grep expression.
28294          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28295          if test "x$FOUND_CORRECT_VERSION" = x; then
28296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28300            BOOT_JDK_FOUND=no
28301          else
28302            # We're done! :-)
28303            BOOT_JDK_FOUND=yes
28304
28305  # Only process if variable expands to non-empty
28306
28307  if test "x$BOOT_JDK" != x; then
28308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28309
28310  # Input might be given as Windows format, start by converting to
28311  # unix format.
28312  path="$BOOT_JDK"
28313  new_path=`$CYGPATH -u "$path"`
28314
28315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28318  # "foo.exe" is OK but "foo" is an error.
28319  #
28320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28321  # It is also a way to make sure we got the proper file name for the real test later on.
28322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28323  if test "x$test_shortpath" = x; then
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28327  fi
28328
28329  # Call helper function which possibly converts this using DOS-style short mode.
28330  # If so, the updated path is stored in $new_path.
28331
28332  input_path="$new_path"
28333  # Check if we need to convert this using DOS-style short mode. If the path
28334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28335  # take no chances and rewrite it.
28336  # Note: m4 eats our [], so we need to use [ and ] instead.
28337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28338  if test "x$has_forbidden_chars" != x; then
28339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28343      # Going to short mode and back again did indeed matter. Since short mode is
28344      # case insensitive, let's make it lowercase to improve readability.
28345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28346      # Now convert it back to Unix-style (cygpath)
28347      input_path=`$CYGPATH -u "$shortmode_path"`
28348      new_path="$input_path"
28349    fi
28350  fi
28351
28352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28353  if test "x$test_cygdrive_prefix" = x; then
28354    # As a simple fix, exclude /usr/bin since it's not a real path.
28355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28357      # a path prefixed by /cygdrive for fixpath to work.
28358      new_path="$CYGWIN_ROOT_PATH$input_path"
28359    fi
28360  fi
28361
28362
28363  if test "x$path" != "x$new_path"; then
28364    BOOT_JDK="$new_path"
28365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28367  fi
28368
28369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370
28371  path="$BOOT_JDK"
28372  has_colon=`$ECHO $path | $GREP ^.:`
28373  new_path="$path"
28374  if test "x$has_colon" = x; then
28375    # Not in mixed or Windows style, start by that.
28376    new_path=`cmd //c echo $path`
28377  fi
28378
28379
28380  input_path="$new_path"
28381  # Check if we need to convert this using DOS-style short mode. If the path
28382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28383  # take no chances and rewrite it.
28384  # Note: m4 eats our [], so we need to use [ and ] instead.
28385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28386  if test "x$has_forbidden_chars" != x; then
28387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28389  fi
28390
28391
28392  windows_path="$new_path"
28393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394    unix_path=`$CYGPATH -u "$windows_path"`
28395    new_path="$unix_path"
28396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28398    new_path="$unix_path"
28399  fi
28400
28401  if test "x$path" != "x$new_path"; then
28402    BOOT_JDK="$new_path"
28403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28405  fi
28406
28407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28409
28410    else
28411      # We're on a unix platform. Hooray! :)
28412      path="$BOOT_JDK"
28413      has_space=`$ECHO "$path" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28418      fi
28419
28420      # Use eval to expand a potential ~
28421      eval path="$path"
28422      if test ! -f "$path" && test ! -d "$path"; then
28423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28424      fi
28425
28426      if test -d "$path"; then
28427        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28428      else
28429        dir="`$DIRNAME "$path"`"
28430        base="`$BASENAME "$path"`"
28431        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28432      fi
28433    fi
28434  fi
28435
28436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28437$as_echo_n "checking for Boot JDK... " >&6; }
28438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28439$as_echo "$BOOT_JDK" >&6; }
28440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28441$as_echo_n "checking Boot JDK version... " >&6; }
28442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28444$as_echo "$BOOT_JDK_VERSION" >&6; }
28445          fi # end check jdk version
28446        fi # end check javac
28447      fi # end check java
28448    fi # end check boot jdk found
28449  fi
28450
28451  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28452
28453  if test "x$BOOT_JDK_FOUND" = xno; then
28454    # Now execute the test
28455
28456  BOOT_JDK_PREFIX="/usr/lib/jvm"
28457  BOOT_JDK_SUFFIX=""
28458  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28459  if test "x$ALL_JDKS_FOUND" != x; then
28460    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28461
28462  if test "x$BOOT_JDK_FOUND" = xno; then
28463    # Now execute the test
28464
28465        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28466        if test -d "$BOOT_JDK"; then
28467          BOOT_JDK_FOUND=maybe
28468          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28469$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28470        fi
28471
28472
28473    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28474    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28475      # Do we have a bin/java?
28476      if test ! -x "$BOOT_JDK/bin/java"; then
28477        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28479        BOOT_JDK_FOUND=no
28480      else
28481        # Do we have a bin/javac?
28482        if test ! -x "$BOOT_JDK/bin/javac"; then
28483          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28485          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28486$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28487          BOOT_JDK_FOUND=no
28488        else
28489          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28490          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28491
28492          # Extra M4 quote needed to protect [] in grep expression.
28493          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28494          if test "x$FOUND_CORRECT_VERSION" = x; then
28495            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28497            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28498$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28499            BOOT_JDK_FOUND=no
28500          else
28501            # We're done! :-)
28502            BOOT_JDK_FOUND=yes
28503
28504  # Only process if variable expands to non-empty
28505
28506  if test "x$BOOT_JDK" != x; then
28507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28508
28509  # Input might be given as Windows format, start by converting to
28510  # unix format.
28511  path="$BOOT_JDK"
28512  new_path=`$CYGPATH -u "$path"`
28513
28514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28517  # "foo.exe" is OK but "foo" is an error.
28518  #
28519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28520  # It is also a way to make sure we got the proper file name for the real test later on.
28521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28522  if test "x$test_shortpath" = x; then
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28525    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28526  fi
28527
28528  # Call helper function which possibly converts this using DOS-style short mode.
28529  # If so, the updated path is stored in $new_path.
28530
28531  input_path="$new_path"
28532  # Check if we need to convert this using DOS-style short mode. If the path
28533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28534  # take no chances and rewrite it.
28535  # Note: m4 eats our [], so we need to use [ and ] instead.
28536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28537  if test "x$has_forbidden_chars" != x; then
28538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28542      # Going to short mode and back again did indeed matter. Since short mode is
28543      # case insensitive, let's make it lowercase to improve readability.
28544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28545      # Now convert it back to Unix-style (cygpath)
28546      input_path=`$CYGPATH -u "$shortmode_path"`
28547      new_path="$input_path"
28548    fi
28549  fi
28550
28551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28552  if test "x$test_cygdrive_prefix" = x; then
28553    # As a simple fix, exclude /usr/bin since it's not a real path.
28554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28556      # a path prefixed by /cygdrive for fixpath to work.
28557      new_path="$CYGWIN_ROOT_PATH$input_path"
28558    fi
28559  fi
28560
28561
28562  if test "x$path" != "x$new_path"; then
28563    BOOT_JDK="$new_path"
28564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28566  fi
28567
28568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28569
28570  path="$BOOT_JDK"
28571  has_colon=`$ECHO $path | $GREP ^.:`
28572  new_path="$path"
28573  if test "x$has_colon" = x; then
28574    # Not in mixed or Windows style, start by that.
28575    new_path=`cmd //c echo $path`
28576  fi
28577
28578
28579  input_path="$new_path"
28580  # Check if we need to convert this using DOS-style short mode. If the path
28581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28582  # take no chances and rewrite it.
28583  # Note: m4 eats our [], so we need to use [ and ] instead.
28584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28585  if test "x$has_forbidden_chars" != x; then
28586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28588  fi
28589
28590
28591  windows_path="$new_path"
28592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28593    unix_path=`$CYGPATH -u "$windows_path"`
28594    new_path="$unix_path"
28595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28597    new_path="$unix_path"
28598  fi
28599
28600  if test "x$path" != "x$new_path"; then
28601    BOOT_JDK="$new_path"
28602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28604  fi
28605
28606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28608
28609    else
28610      # We're on a unix platform. Hooray! :)
28611      path="$BOOT_JDK"
28612      has_space=`$ECHO "$path" | $GREP " "`
28613      if test "x$has_space" != x; then
28614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28616        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28617      fi
28618
28619      # Use eval to expand a potential ~
28620      eval path="$path"
28621      if test ! -f "$path" && test ! -d "$path"; then
28622        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28623      fi
28624
28625      if test -d "$path"; then
28626        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28627      else
28628        dir="`$DIRNAME "$path"`"
28629        base="`$BASENAME "$path"`"
28630        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28631      fi
28632    fi
28633  fi
28634
28635            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28636$as_echo_n "checking for Boot JDK... " >&6; }
28637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28638$as_echo "$BOOT_JDK" >&6; }
28639            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28640$as_echo_n "checking Boot JDK version... " >&6; }
28641            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28643$as_echo "$BOOT_JDK_VERSION" >&6; }
28644          fi # end check jdk version
28645        fi # end check javac
28646      fi # end check java
28647    fi # end check boot jdk found
28648  fi
28649
28650    done
28651  fi
28652
28653
28654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28656      # Do we have a bin/java?
28657      if test ! -x "$BOOT_JDK/bin/java"; then
28658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28660        BOOT_JDK_FOUND=no
28661      else
28662        # Do we have a bin/javac?
28663        if test ! -x "$BOOT_JDK/bin/javac"; then
28664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28668          BOOT_JDK_FOUND=no
28669        else
28670          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28671          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28672
28673          # Extra M4 quote needed to protect [] in grep expression.
28674          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28675          if test "x$FOUND_CORRECT_VERSION" = x; then
28676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28678            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28679$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28680            BOOT_JDK_FOUND=no
28681          else
28682            # We're done! :-)
28683            BOOT_JDK_FOUND=yes
28684
28685  # Only process if variable expands to non-empty
28686
28687  if test "x$BOOT_JDK" != x; then
28688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28689
28690  # Input might be given as Windows format, start by converting to
28691  # unix format.
28692  path="$BOOT_JDK"
28693  new_path=`$CYGPATH -u "$path"`
28694
28695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28698  # "foo.exe" is OK but "foo" is an error.
28699  #
28700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28701  # It is also a way to make sure we got the proper file name for the real test later on.
28702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28703  if test "x$test_shortpath" = x; then
28704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28707  fi
28708
28709  # Call helper function which possibly converts this using DOS-style short mode.
28710  # If so, the updated path is stored in $new_path.
28711
28712  input_path="$new_path"
28713  # Check if we need to convert this using DOS-style short mode. If the path
28714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28715  # take no chances and rewrite it.
28716  # Note: m4 eats our [], so we need to use [ and ] instead.
28717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28718  if test "x$has_forbidden_chars" != x; then
28719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28723      # Going to short mode and back again did indeed matter. Since short mode is
28724      # case insensitive, let's make it lowercase to improve readability.
28725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28726      # Now convert it back to Unix-style (cygpath)
28727      input_path=`$CYGPATH -u "$shortmode_path"`
28728      new_path="$input_path"
28729    fi
28730  fi
28731
28732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28733  if test "x$test_cygdrive_prefix" = x; then
28734    # As a simple fix, exclude /usr/bin since it's not a real path.
28735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28737      # a path prefixed by /cygdrive for fixpath to work.
28738      new_path="$CYGWIN_ROOT_PATH$input_path"
28739    fi
28740  fi
28741
28742
28743  if test "x$path" != "x$new_path"; then
28744    BOOT_JDK="$new_path"
28745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28747  fi
28748
28749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28750
28751  path="$BOOT_JDK"
28752  has_colon=`$ECHO $path | $GREP ^.:`
28753  new_path="$path"
28754  if test "x$has_colon" = x; then
28755    # Not in mixed or Windows style, start by that.
28756    new_path=`cmd //c echo $path`
28757  fi
28758
28759
28760  input_path="$new_path"
28761  # Check if we need to convert this using DOS-style short mode. If the path
28762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28763  # take no chances and rewrite it.
28764  # Note: m4 eats our [], so we need to use [ and ] instead.
28765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28766  if test "x$has_forbidden_chars" != x; then
28767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28769  fi
28770
28771
28772  windows_path="$new_path"
28773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28774    unix_path=`$CYGPATH -u "$windows_path"`
28775    new_path="$unix_path"
28776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28778    new_path="$unix_path"
28779  fi
28780
28781  if test "x$path" != "x$new_path"; then
28782    BOOT_JDK="$new_path"
28783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28785  fi
28786
28787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28789
28790    else
28791      # We're on a unix platform. Hooray! :)
28792      path="$BOOT_JDK"
28793      has_space=`$ECHO "$path" | $GREP " "`
28794      if test "x$has_space" != x; then
28795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28798      fi
28799
28800      # Use eval to expand a potential ~
28801      eval path="$path"
28802      if test ! -f "$path" && test ! -d "$path"; then
28803        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28804      fi
28805
28806      if test -d "$path"; then
28807        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28808      else
28809        dir="`$DIRNAME "$path"`"
28810        base="`$BASENAME "$path"`"
28811        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28812      fi
28813    fi
28814  fi
28815
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28817$as_echo_n "checking for Boot JDK... " >&6; }
28818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28819$as_echo "$BOOT_JDK" >&6; }
28820            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28821$as_echo_n "checking Boot JDK version... " >&6; }
28822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28824$as_echo "$BOOT_JDK_VERSION" >&6; }
28825          fi # end check jdk version
28826        fi # end check javac
28827      fi # end check java
28828    fi # end check boot jdk found
28829  fi
28830
28831  fi
28832
28833
28834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28836      # Do we have a bin/java?
28837      if test ! -x "$BOOT_JDK/bin/java"; then
28838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28840        BOOT_JDK_FOUND=no
28841      else
28842        # Do we have a bin/javac?
28843        if test ! -x "$BOOT_JDK/bin/javac"; then
28844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28848          BOOT_JDK_FOUND=no
28849        else
28850          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28851          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28852
28853          # Extra M4 quote needed to protect [] in grep expression.
28854          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28855          if test "x$FOUND_CORRECT_VERSION" = x; then
28856            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28858            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28859$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28860            BOOT_JDK_FOUND=no
28861          else
28862            # We're done! :-)
28863            BOOT_JDK_FOUND=yes
28864
28865  # Only process if variable expands to non-empty
28866
28867  if test "x$BOOT_JDK" != x; then
28868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28869
28870  # Input might be given as Windows format, start by converting to
28871  # unix format.
28872  path="$BOOT_JDK"
28873  new_path=`$CYGPATH -u "$path"`
28874
28875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28878  # "foo.exe" is OK but "foo" is an error.
28879  #
28880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28881  # It is also a way to make sure we got the proper file name for the real test later on.
28882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28883  if test "x$test_shortpath" = x; then
28884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28887  fi
28888
28889  # Call helper function which possibly converts this using DOS-style short mode.
28890  # If so, the updated path is stored in $new_path.
28891
28892  input_path="$new_path"
28893  # Check if we need to convert this using DOS-style short mode. If the path
28894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28895  # take no chances and rewrite it.
28896  # Note: m4 eats our [], so we need to use [ and ] instead.
28897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28898  if test "x$has_forbidden_chars" != x; then
28899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28903      # Going to short mode and back again did indeed matter. Since short mode is
28904      # case insensitive, let's make it lowercase to improve readability.
28905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28906      # Now convert it back to Unix-style (cygpath)
28907      input_path=`$CYGPATH -u "$shortmode_path"`
28908      new_path="$input_path"
28909    fi
28910  fi
28911
28912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28913  if test "x$test_cygdrive_prefix" = x; then
28914    # As a simple fix, exclude /usr/bin since it's not a real path.
28915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28917      # a path prefixed by /cygdrive for fixpath to work.
28918      new_path="$CYGWIN_ROOT_PATH$input_path"
28919    fi
28920  fi
28921
28922
28923  if test "x$path" != "x$new_path"; then
28924    BOOT_JDK="$new_path"
28925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28927  fi
28928
28929    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28930
28931  path="$BOOT_JDK"
28932  has_colon=`$ECHO $path | $GREP ^.:`
28933  new_path="$path"
28934  if test "x$has_colon" = x; then
28935    # Not in mixed or Windows style, start by that.
28936    new_path=`cmd //c echo $path`
28937  fi
28938
28939
28940  input_path="$new_path"
28941  # Check if we need to convert this using DOS-style short mode. If the path
28942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28943  # take no chances and rewrite it.
28944  # Note: m4 eats our [], so we need to use [ and ] instead.
28945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28946  if test "x$has_forbidden_chars" != x; then
28947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28949  fi
28950
28951
28952  windows_path="$new_path"
28953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28954    unix_path=`$CYGPATH -u "$windows_path"`
28955    new_path="$unix_path"
28956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28958    new_path="$unix_path"
28959  fi
28960
28961  if test "x$path" != "x$new_path"; then
28962    BOOT_JDK="$new_path"
28963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28965  fi
28966
28967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28969
28970    else
28971      # We're on a unix platform. Hooray! :)
28972      path="$BOOT_JDK"
28973      has_space=`$ECHO "$path" | $GREP " "`
28974      if test "x$has_space" != x; then
28975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28977        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28978      fi
28979
28980      # Use eval to expand a potential ~
28981      eval path="$path"
28982      if test ! -f "$path" && test ! -d "$path"; then
28983        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28984      fi
28985
28986      if test -d "$path"; then
28987        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28988      else
28989        dir="`$DIRNAME "$path"`"
28990        base="`$BASENAME "$path"`"
28991        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28992      fi
28993    fi
28994  fi
28995
28996            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28997$as_echo_n "checking for Boot JDK... " >&6; }
28998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28999$as_echo "$BOOT_JDK" >&6; }
29000            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29001$as_echo_n "checking Boot JDK version... " >&6; }
29002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29004$as_echo "$BOOT_JDK_VERSION" >&6; }
29005          fi # end check jdk version
29006        fi # end check javac
29007      fi # end check java
29008    fi # end check boot jdk found
29009  fi
29010
29011
29012  # If we haven't found anything yet, we've truly lost. Give up.
29013  if test "x$BOOT_JDK_FOUND" = xno; then
29014
29015  # Print a helpful message on how to acquire the necessary build dependency.
29016  # openjdk is the help tag: freetype, cups, alsa etc
29017  MISSING_DEPENDENCY=openjdk
29018
29019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29020    cygwin_help $MISSING_DEPENDENCY
29021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29022    msys_help $MISSING_DEPENDENCY
29023  else
29024    PKGHANDLER_COMMAND=
29025
29026    case $PKGHANDLER in
29027      apt-get)
29028        apt_help     $MISSING_DEPENDENCY ;;
29029      yum)
29030        yum_help     $MISSING_DEPENDENCY ;;
29031      port)
29032        port_help    $MISSING_DEPENDENCY ;;
29033      pkgutil)
29034        pkgutil_help $MISSING_DEPENDENCY ;;
29035      pkgadd)
29036        pkgadd_help  $MISSING_DEPENDENCY ;;
29037    esac
29038
29039    if test "x$PKGHANDLER_COMMAND" != x; then
29040      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29041    fi
29042  fi
29043
29044    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29045$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29046    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29047$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29048    as_fn_error $? "Cannot continue" "$LINENO" 5
29049  fi
29050
29051
29052
29053  # Setup tools from the Boot JDK.
29054
29055  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29056
29057  # Publish this variable in the help.
29058
29059
29060  if [ -z "${JAVA+x}" ]; then
29061    # The variable is not set by user, try to locate tool using the code snippet
29062
29063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29064$as_echo_n "checking for java in Boot JDK... " >&6; }
29065      JAVA=$BOOT_JDK/bin/java
29066      if test ! -x $JAVA; then
29067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29068$as_echo "not found" >&6; }
29069        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29070$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29071        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29072      fi
29073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29074$as_echo "ok" >&6; }
29075
29076
29077  else
29078    # The variable is set, but is it from the command line or the environment?
29079
29080    # Try to remove the string !JAVA! from our list.
29081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29083      # If it failed, the variable was not from the command line. Ignore it,
29084      # but warn the user (except for BASH, which is always set by the calling BASH).
29085      if test "xJAVA" != xBASH; then
29086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29087$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29088      fi
29089      # Try to locate tool using the code snippet
29090
29091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29092$as_echo_n "checking for java in Boot JDK... " >&6; }
29093      JAVA=$BOOT_JDK/bin/java
29094      if test ! -x $JAVA; then
29095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29096$as_echo "not found" >&6; }
29097        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29098$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29099        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29100      fi
29101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29102$as_echo "ok" >&6; }
29103
29104
29105    else
29106      # If it succeeded, then it was overridden by the user. We will use it
29107      # for the tool.
29108
29109      # First remove it from the list of overridden variables, so we can test
29110      # for unknown variables in the end.
29111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29112
29113      # Check if we try to supply an empty value
29114      if test "x$JAVA" = x; then
29115        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29116$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29118$as_echo_n "checking for JAVA... " >&6; }
29119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29120$as_echo "disabled" >&6; }
29121      else
29122        # Check if the provided tool contains a complete path.
29123        tool_specified="$JAVA"
29124        tool_basename="${tool_specified##*/}"
29125        if test "x$tool_basename" = "x$tool_specified"; then
29126          # A command without a complete path is provided, search $PATH.
29127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29128$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29129          # Extract the first word of "$tool_basename", so it can be a program name with args.
29130set dummy $tool_basename; ac_word=$2
29131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29132$as_echo_n "checking for $ac_word... " >&6; }
29133if ${ac_cv_path_JAVA+:} false; then :
29134  $as_echo_n "(cached) " >&6
29135else
29136  case $JAVA in
29137  [\\/]* | ?:[\\/]*)
29138  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29139  ;;
29140  *)
29141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29142for as_dir in $PATH
29143do
29144  IFS=$as_save_IFS
29145  test -z "$as_dir" && as_dir=.
29146    for ac_exec_ext in '' $ac_executable_extensions; do
29147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29148    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29150    break 2
29151  fi
29152done
29153  done
29154IFS=$as_save_IFS
29155
29156  ;;
29157esac
29158fi
29159JAVA=$ac_cv_path_JAVA
29160if test -n "$JAVA"; then
29161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29162$as_echo "$JAVA" >&6; }
29163else
29164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29165$as_echo "no" >&6; }
29166fi
29167
29168
29169          if test "x$JAVA" = x; then
29170            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29171          fi
29172        else
29173          # Otherwise we believe it is a complete path. Use it as it is.
29174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29175$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29176          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29177$as_echo_n "checking for JAVA... " >&6; }
29178          if test ! -x "$tool_specified"; then
29179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29180$as_echo "not found" >&6; }
29181            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29182          fi
29183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29184$as_echo "$tool_specified" >&6; }
29185        fi
29186      fi
29187    fi
29188
29189  fi
29190
29191
29192
29193  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29194
29195  # Publish this variable in the help.
29196
29197
29198  if [ -z "${JAVAC+x}" ]; then
29199    # The variable is not set by user, try to locate tool using the code snippet
29200
29201      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29202$as_echo_n "checking for javac in Boot JDK... " >&6; }
29203      JAVAC=$BOOT_JDK/bin/javac
29204      if test ! -x $JAVAC; then
29205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29206$as_echo "not found" >&6; }
29207        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29208$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29209        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29210      fi
29211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29212$as_echo "ok" >&6; }
29213
29214
29215  else
29216    # The variable is set, but is it from the command line or the environment?
29217
29218    # Try to remove the string !JAVAC! from our list.
29219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29221      # If it failed, the variable was not from the command line. Ignore it,
29222      # but warn the user (except for BASH, which is always set by the calling BASH).
29223      if test "xJAVAC" != xBASH; then
29224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29225$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29226      fi
29227      # Try to locate tool using the code snippet
29228
29229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29230$as_echo_n "checking for javac in Boot JDK... " >&6; }
29231      JAVAC=$BOOT_JDK/bin/javac
29232      if test ! -x $JAVAC; then
29233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29234$as_echo "not found" >&6; }
29235        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29236$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29237        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29238      fi
29239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29240$as_echo "ok" >&6; }
29241
29242
29243    else
29244      # If it succeeded, then it was overridden by the user. We will use it
29245      # for the tool.
29246
29247      # First remove it from the list of overridden variables, so we can test
29248      # for unknown variables in the end.
29249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29250
29251      # Check if we try to supply an empty value
29252      if test "x$JAVAC" = x; then
29253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29254$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29256$as_echo_n "checking for JAVAC... " >&6; }
29257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29258$as_echo "disabled" >&6; }
29259      else
29260        # Check if the provided tool contains a complete path.
29261        tool_specified="$JAVAC"
29262        tool_basename="${tool_specified##*/}"
29263        if test "x$tool_basename" = "x$tool_specified"; then
29264          # A command without a complete path is provided, search $PATH.
29265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29266$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29267          # Extract the first word of "$tool_basename", so it can be a program name with args.
29268set dummy $tool_basename; ac_word=$2
29269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29270$as_echo_n "checking for $ac_word... " >&6; }
29271if ${ac_cv_path_JAVAC+:} false; then :
29272  $as_echo_n "(cached) " >&6
29273else
29274  case $JAVAC in
29275  [\\/]* | ?:[\\/]*)
29276  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29277  ;;
29278  *)
29279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29280for as_dir in $PATH
29281do
29282  IFS=$as_save_IFS
29283  test -z "$as_dir" && as_dir=.
29284    for ac_exec_ext in '' $ac_executable_extensions; do
29285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29286    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29288    break 2
29289  fi
29290done
29291  done
29292IFS=$as_save_IFS
29293
29294  ;;
29295esac
29296fi
29297JAVAC=$ac_cv_path_JAVAC
29298if test -n "$JAVAC"; then
29299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29300$as_echo "$JAVAC" >&6; }
29301else
29302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29303$as_echo "no" >&6; }
29304fi
29305
29306
29307          if test "x$JAVAC" = x; then
29308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29309          fi
29310        else
29311          # Otherwise we believe it is a complete path. Use it as it is.
29312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29313$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29315$as_echo_n "checking for JAVAC... " >&6; }
29316          if test ! -x "$tool_specified"; then
29317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29318$as_echo "not found" >&6; }
29319            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29320          fi
29321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29322$as_echo "$tool_specified" >&6; }
29323        fi
29324      fi
29325    fi
29326
29327  fi
29328
29329
29330
29331  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29332
29333  # Publish this variable in the help.
29334
29335
29336  if [ -z "${JAVAH+x}" ]; then
29337    # The variable is not set by user, try to locate tool using the code snippet
29338
29339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29340$as_echo_n "checking for javah in Boot JDK... " >&6; }
29341      JAVAH=$BOOT_JDK/bin/javah
29342      if test ! -x $JAVAH; then
29343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29344$as_echo "not found" >&6; }
29345        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29346$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29347        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29348      fi
29349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29350$as_echo "ok" >&6; }
29351
29352
29353  else
29354    # The variable is set, but is it from the command line or the environment?
29355
29356    # Try to remove the string !JAVAH! from our list.
29357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29359      # If it failed, the variable was not from the command line. Ignore it,
29360      # but warn the user (except for BASH, which is always set by the calling BASH).
29361      if test "xJAVAH" != xBASH; then
29362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29363$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29364      fi
29365      # Try to locate tool using the code snippet
29366
29367      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29368$as_echo_n "checking for javah in Boot JDK... " >&6; }
29369      JAVAH=$BOOT_JDK/bin/javah
29370      if test ! -x $JAVAH; then
29371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29372$as_echo "not found" >&6; }
29373        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29374$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29375        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29376      fi
29377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29378$as_echo "ok" >&6; }
29379
29380
29381    else
29382      # If it succeeded, then it was overridden by the user. We will use it
29383      # for the tool.
29384
29385      # First remove it from the list of overridden variables, so we can test
29386      # for unknown variables in the end.
29387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29388
29389      # Check if we try to supply an empty value
29390      if test "x$JAVAH" = x; then
29391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29392$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29394$as_echo_n "checking for JAVAH... " >&6; }
29395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29396$as_echo "disabled" >&6; }
29397      else
29398        # Check if the provided tool contains a complete path.
29399        tool_specified="$JAVAH"
29400        tool_basename="${tool_specified##*/}"
29401        if test "x$tool_basename" = "x$tool_specified"; then
29402          # A command without a complete path is provided, search $PATH.
29403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29404$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29405          # Extract the first word of "$tool_basename", so it can be a program name with args.
29406set dummy $tool_basename; ac_word=$2
29407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29408$as_echo_n "checking for $ac_word... " >&6; }
29409if ${ac_cv_path_JAVAH+:} false; then :
29410  $as_echo_n "(cached) " >&6
29411else
29412  case $JAVAH in
29413  [\\/]* | ?:[\\/]*)
29414  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29415  ;;
29416  *)
29417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29418for as_dir in $PATH
29419do
29420  IFS=$as_save_IFS
29421  test -z "$as_dir" && as_dir=.
29422    for ac_exec_ext in '' $ac_executable_extensions; do
29423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29424    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29426    break 2
29427  fi
29428done
29429  done
29430IFS=$as_save_IFS
29431
29432  ;;
29433esac
29434fi
29435JAVAH=$ac_cv_path_JAVAH
29436if test -n "$JAVAH"; then
29437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29438$as_echo "$JAVAH" >&6; }
29439else
29440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29441$as_echo "no" >&6; }
29442fi
29443
29444
29445          if test "x$JAVAH" = x; then
29446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29447          fi
29448        else
29449          # Otherwise we believe it is a complete path. Use it as it is.
29450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29451$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29453$as_echo_n "checking for JAVAH... " >&6; }
29454          if test ! -x "$tool_specified"; then
29455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29456$as_echo "not found" >&6; }
29457            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29458          fi
29459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29460$as_echo "$tool_specified" >&6; }
29461        fi
29462      fi
29463    fi
29464
29465  fi
29466
29467
29468
29469  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29470
29471  # Publish this variable in the help.
29472
29473
29474  if [ -z "${JAR+x}" ]; then
29475    # The variable is not set by user, try to locate tool using the code snippet
29476
29477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29478$as_echo_n "checking for jar in Boot JDK... " >&6; }
29479      JAR=$BOOT_JDK/bin/jar
29480      if test ! -x $JAR; then
29481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29482$as_echo "not found" >&6; }
29483        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29484$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29485        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29486      fi
29487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29488$as_echo "ok" >&6; }
29489
29490
29491  else
29492    # The variable is set, but is it from the command line or the environment?
29493
29494    # Try to remove the string !JAR! from our list.
29495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29497      # If it failed, the variable was not from the command line. Ignore it,
29498      # but warn the user (except for BASH, which is always set by the calling BASH).
29499      if test "xJAR" != xBASH; then
29500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29501$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29502      fi
29503      # Try to locate tool using the code snippet
29504
29505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29506$as_echo_n "checking for jar in Boot JDK... " >&6; }
29507      JAR=$BOOT_JDK/bin/jar
29508      if test ! -x $JAR; then
29509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29510$as_echo "not found" >&6; }
29511        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29512$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29513        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29514      fi
29515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29516$as_echo "ok" >&6; }
29517
29518
29519    else
29520      # If it succeeded, then it was overridden by the user. We will use it
29521      # for the tool.
29522
29523      # First remove it from the list of overridden variables, so we can test
29524      # for unknown variables in the end.
29525      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29526
29527      # Check if we try to supply an empty value
29528      if test "x$JAR" = x; then
29529        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29530$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29532$as_echo_n "checking for JAR... " >&6; }
29533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29534$as_echo "disabled" >&6; }
29535      else
29536        # Check if the provided tool contains a complete path.
29537        tool_specified="$JAR"
29538        tool_basename="${tool_specified##*/}"
29539        if test "x$tool_basename" = "x$tool_specified"; then
29540          # A command without a complete path is provided, search $PATH.
29541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29542$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29543          # Extract the first word of "$tool_basename", so it can be a program name with args.
29544set dummy $tool_basename; ac_word=$2
29545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29546$as_echo_n "checking for $ac_word... " >&6; }
29547if ${ac_cv_path_JAR+:} false; then :
29548  $as_echo_n "(cached) " >&6
29549else
29550  case $JAR in
29551  [\\/]* | ?:[\\/]*)
29552  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29553  ;;
29554  *)
29555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29556for as_dir in $PATH
29557do
29558  IFS=$as_save_IFS
29559  test -z "$as_dir" && as_dir=.
29560    for ac_exec_ext in '' $ac_executable_extensions; do
29561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29562    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29564    break 2
29565  fi
29566done
29567  done
29568IFS=$as_save_IFS
29569
29570  ;;
29571esac
29572fi
29573JAR=$ac_cv_path_JAR
29574if test -n "$JAR"; then
29575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29576$as_echo "$JAR" >&6; }
29577else
29578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29579$as_echo "no" >&6; }
29580fi
29581
29582
29583          if test "x$JAR" = x; then
29584            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29585          fi
29586        else
29587          # Otherwise we believe it is a complete path. Use it as it is.
29588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29589$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29591$as_echo_n "checking for JAR... " >&6; }
29592          if test ! -x "$tool_specified"; then
29593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29594$as_echo "not found" >&6; }
29595            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29596          fi
29597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29598$as_echo "$tool_specified" >&6; }
29599        fi
29600      fi
29601    fi
29602
29603  fi
29604
29605
29606
29607  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29608
29609  # Publish this variable in the help.
29610
29611
29612  if [ -z "${JARSIGNER+x}" ]; then
29613    # The variable is not set by user, try to locate tool using the code snippet
29614
29615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29616$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29617      JARSIGNER=$BOOT_JDK/bin/jarsigner
29618      if test ! -x $JARSIGNER; then
29619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29620$as_echo "not found" >&6; }
29621        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29622$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29623        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29624      fi
29625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29626$as_echo "ok" >&6; }
29627
29628
29629  else
29630    # The variable is set, but is it from the command line or the environment?
29631
29632    # Try to remove the string !JARSIGNER! from our list.
29633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29635      # If it failed, the variable was not from the command line. Ignore it,
29636      # but warn the user (except for BASH, which is always set by the calling BASH).
29637      if test "xJARSIGNER" != xBASH; then
29638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29639$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29640      fi
29641      # Try to locate tool using the code snippet
29642
29643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29644$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29645      JARSIGNER=$BOOT_JDK/bin/jarsigner
29646      if test ! -x $JARSIGNER; then
29647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29648$as_echo "not found" >&6; }
29649        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29650$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29651        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29652      fi
29653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29654$as_echo "ok" >&6; }
29655
29656
29657    else
29658      # If it succeeded, then it was overridden by the user. We will use it
29659      # for the tool.
29660
29661      # First remove it from the list of overridden variables, so we can test
29662      # for unknown variables in the end.
29663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29664
29665      # Check if we try to supply an empty value
29666      if test "x$JARSIGNER" = x; then
29667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29668$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29670$as_echo_n "checking for JARSIGNER... " >&6; }
29671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29672$as_echo "disabled" >&6; }
29673      else
29674        # Check if the provided tool contains a complete path.
29675        tool_specified="$JARSIGNER"
29676        tool_basename="${tool_specified##*/}"
29677        if test "x$tool_basename" = "x$tool_specified"; then
29678          # A command without a complete path is provided, search $PATH.
29679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29680$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29681          # Extract the first word of "$tool_basename", so it can be a program name with args.
29682set dummy $tool_basename; ac_word=$2
29683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29684$as_echo_n "checking for $ac_word... " >&6; }
29685if ${ac_cv_path_JARSIGNER+:} false; then :
29686  $as_echo_n "(cached) " >&6
29687else
29688  case $JARSIGNER in
29689  [\\/]* | ?:[\\/]*)
29690  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29691  ;;
29692  *)
29693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29694for as_dir in $PATH
29695do
29696  IFS=$as_save_IFS
29697  test -z "$as_dir" && as_dir=.
29698    for ac_exec_ext in '' $ac_executable_extensions; do
29699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29700    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29702    break 2
29703  fi
29704done
29705  done
29706IFS=$as_save_IFS
29707
29708  ;;
29709esac
29710fi
29711JARSIGNER=$ac_cv_path_JARSIGNER
29712if test -n "$JARSIGNER"; then
29713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29714$as_echo "$JARSIGNER" >&6; }
29715else
29716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29717$as_echo "no" >&6; }
29718fi
29719
29720
29721          if test "x$JARSIGNER" = x; then
29722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29723          fi
29724        else
29725          # Otherwise we believe it is a complete path. Use it as it is.
29726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29727$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29729$as_echo_n "checking for JARSIGNER... " >&6; }
29730          if test ! -x "$tool_specified"; then
29731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29732$as_echo "not found" >&6; }
29733            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29734          fi
29735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29736$as_echo "$tool_specified" >&6; }
29737        fi
29738      fi
29739    fi
29740
29741  fi
29742
29743
29744
29745  # Finally, set some other options...
29746
29747  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29748  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29749
29750
29751
29752  $ECHO "Check if jvm arg is ok: -Xpatch:" >&5
29753  $ECHO "Command: $JAVA -Xpatch: -version" >&5
29754  OUTPUT=`$JAVA -Xpatch: -version 2>&1`
29755  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
29756  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
29757  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
29758    dummy="$dummy -Xpatch:"
29759    JVM_ARG_OK=true
29760  else
29761    $ECHO "Arg failed:" >&5
29762    $ECHO "$OUTPUT" >&5
29763    JVM_ARG_OK=false
29764  fi
29765
29766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
29767$as_echo_n "checking if Boot JDK supports modules... " >&6; }
29768  if test "x$JVM_ARG_OK" = "xtrue"; then
29769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29770$as_echo "yes" >&6; }
29771    BOOT_JDK_MODULAR="true"
29772  else
29773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29774$as_echo "no" >&6; }
29775    BOOT_JDK_MODULAR="false"
29776  fi
29777
29778
29779
29780
29781  # Check if the boot jdk is 32 or 64 bit
29782  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29783    BOOT_JDK_BITS="64"
29784  else
29785    BOOT_JDK_BITS="32"
29786  fi
29787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29788$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29790$as_echo "$BOOT_JDK_BITS" >&6; }
29791
29792
29793
29794
29795# Check whether --with-build-jdk was given.
29796if test "${with_build_jdk+set}" = set; then :
29797  withval=$with_build_jdk;
29798fi
29799
29800
29801  CREATE_BUILDJDK_FOR_HOST=false
29802  BUILD_JDK_FOUND="no"
29803  if test "x$with_build_jdk" != "x"; then
29804
29805  if test "x$BUILD_JDK_FOUND" = xno; then
29806    # Execute the test
29807
29808       if test "x$with_build_jdk" != x; then
29809         BUILD_JDK=$with_build_jdk
29810         BUILD_JDK_FOUND=maybe
29811         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
29812$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
29813       fi
29814
29815    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29816    if test "x$BUILD_JDK_FOUND" = xmaybe; then
29817      # Do we have a bin/java?
29818      if test ! -x "$BUILD_JDK/bin/java"; then
29819        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
29820$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
29821        BUILD_JDK_FOUND=no
29822      elif test ! -x "$BUILD_JDK/bin/jlink"; then
29823        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
29824$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
29825        BUILD_JDK_FOUND=no
29826      elif test ! -x "$BUILD_JDK/bin/javac"; then
29827        # Do we have a bin/javac?
29828        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
29829$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
29830        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
29831$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
29832        BUILD_JDK_FOUND=no
29833      else
29834        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29835        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
29836
29837        # Extra M4 quote needed to protect [] in grep expression.
29838        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`
29839        if test "x$FOUND_CORRECT_VERSION" = x; then
29840          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
29841$as_echo "$as_me: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
29842          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
29843$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
29844          BUILD_JDK_FOUND=no
29845        else
29846          # We're done!
29847          BUILD_JDK_FOUND=yes
29848
29849  # Only process if variable expands to non-empty
29850
29851  if test "x$BUILD_JDK" != x; then
29852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29853
29854  # Input might be given as Windows format, start by converting to
29855  # unix format.
29856  path="$BUILD_JDK"
29857  new_path=`$CYGPATH -u "$path"`
29858
29859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29862  # "foo.exe" is OK but "foo" is an error.
29863  #
29864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29865  # It is also a way to make sure we got the proper file name for the real test later on.
29866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29867  if test "x$test_shortpath" = x; then
29868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
29869$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
29870    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
29871  fi
29872
29873  # Call helper function which possibly converts this using DOS-style short mode.
29874  # If so, the updated path is stored in $new_path.
29875
29876  input_path="$new_path"
29877  # Check if we need to convert this using DOS-style short mode. If the path
29878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29879  # take no chances and rewrite it.
29880  # Note: m4 eats our [], so we need to use [ and ] instead.
29881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29882  if test "x$has_forbidden_chars" != x; then
29883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29887      # Going to short mode and back again did indeed matter. Since short mode is
29888      # case insensitive, let's make it lowercase to improve readability.
29889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29890      # Now convert it back to Unix-style (cygpath)
29891      input_path=`$CYGPATH -u "$shortmode_path"`
29892      new_path="$input_path"
29893    fi
29894  fi
29895
29896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29897  if test "x$test_cygdrive_prefix" = x; then
29898    # As a simple fix, exclude /usr/bin since it's not a real path.
29899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29901      # a path prefixed by /cygdrive for fixpath to work.
29902      new_path="$CYGWIN_ROOT_PATH$input_path"
29903    fi
29904  fi
29905
29906
29907  if test "x$path" != "x$new_path"; then
29908    BUILD_JDK="$new_path"
29909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
29910$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
29911  fi
29912
29913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29914
29915  path="$BUILD_JDK"
29916  has_colon=`$ECHO $path | $GREP ^.:`
29917  new_path="$path"
29918  if test "x$has_colon" = x; then
29919    # Not in mixed or Windows style, start by that.
29920    new_path=`cmd //c echo $path`
29921  fi
29922
29923
29924  input_path="$new_path"
29925  # Check if we need to convert this using DOS-style short mode. If the path
29926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29927  # take no chances and rewrite it.
29928  # Note: m4 eats our [], so we need to use [ and ] instead.
29929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29930  if test "x$has_forbidden_chars" != x; then
29931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29933  fi
29934
29935
29936  windows_path="$new_path"
29937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29938    unix_path=`$CYGPATH -u "$windows_path"`
29939    new_path="$unix_path"
29940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29942    new_path="$unix_path"
29943  fi
29944
29945  if test "x$path" != "x$new_path"; then
29946    BUILD_JDK="$new_path"
29947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
29948$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
29949  fi
29950
29951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29953
29954    else
29955      # We're on a unix platform. Hooray! :)
29956      path="$BUILD_JDK"
29957      has_space=`$ECHO "$path" | $GREP " "`
29958      if test "x$has_space" != x; then
29959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
29960$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
29961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29962      fi
29963
29964      # Use eval to expand a potential ~
29965      eval path="$path"
29966      if test ! -f "$path" && test ! -d "$path"; then
29967        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29968      fi
29969
29970      if test -d "$path"; then
29971        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
29972      else
29973        dir="`$DIRNAME "$path"`"
29974        base="`$BASENAME "$path"`"
29975        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29976      fi
29977    fi
29978  fi
29979
29980          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
29981$as_echo_n "checking for Build JDK... " >&6; }
29982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
29983$as_echo "$BUILD_JDK" >&6; }
29984          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
29985$as_echo_n "checking Build JDK version... " >&6; }
29986          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
29988$as_echo "$BUILD_JDK_VERSION" >&6; }
29989        fi # end check jdk version
29990      fi # end check java
29991    fi # end check build jdk found
29992  fi
29993
29994  else
29995    if test "x$COMPILE_TYPE" = "xcross"; then
29996      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
29997      BUILD_JDK_FOUND=yes
29998      CREATE_BUILDJDK=true
29999      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30000$as_echo_n "checking for Build JDK... " >&6; }
30001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30002$as_echo "yes, will build it for the host platform" >&6; }
30003    else
30004      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30005      BUILD_JDK_FOUND=yes
30006      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30007$as_echo_n "checking for Build JDK... " >&6; }
30008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30009$as_echo "yes, will use output dir" >&6; }
30010    fi
30011  fi
30012
30013  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30015$as_echo_n "checking for Build JDK... " >&6; }
30016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30017$as_echo "no" >&6; }
30018    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30019  fi
30020
30021
30022
30023
30024
30025###############################################################################
30026#
30027# Configure the sources to use. We can add or override individual directories.
30028#
30029###############################################################################
30030
30031
30032  # Where are the sources.
30033  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30034  CORBA_TOPDIR="$SRC_ROOT/corba"
30035  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30036  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30037  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30038  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30039  JDK_TOPDIR="$SRC_ROOT/jdk"
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049  # This feature is no longer supported.
30050
30051
30052
30053# Check whether --with-add-source-root was given.
30054if test "${with_add_source_root+set}" = set; then :
30055  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
30056$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30057fi
30058
30059
30060
30061
30062# Check whether --with-override-source-root was given.
30063if test "${with_override_source_root+set}" = set; then :
30064  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
30065$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30066fi
30067
30068
30069
30070
30071# Check whether --with-adds-and-overrides was given.
30072if test "${with_adds_and_overrides+set}" = set; then :
30073  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
30074$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30075fi
30076
30077
30078
30079
30080# Check whether --with-override-langtools was given.
30081if test "${with_override_langtools+set}" = set; then :
30082  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30083$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30084fi
30085
30086
30087
30088
30089# Check whether --with-override-corba was given.
30090if test "${with_override_corba+set}" = set; then :
30091  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30092$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30093fi
30094
30095
30096
30097
30098# Check whether --with-override-jaxp was given.
30099if test "${with_override_jaxp+set}" = set; then :
30100  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30101$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30102fi
30103
30104
30105
30106
30107# Check whether --with-override-jaxws was given.
30108if test "${with_override_jaxws+set}" = set; then :
30109  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30110$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30111fi
30112
30113
30114
30115
30116# Check whether --with-override-hotspot was given.
30117if test "${with_override_hotspot+set}" = set; then :
30118  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30119$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30120fi
30121
30122
30123
30124
30125# Check whether --with-override-nashorn was given.
30126if test "${with_override_nashorn+set}" = set; then :
30127  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30128$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30129fi
30130
30131
30132
30133
30134# Check whether --with-override-jdk was given.
30135if test "${with_override_jdk+set}" = set; then :
30136  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30137$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30138fi
30139
30140
30141
30142
30143  BUILD_OUTPUT="$OUTPUT_ROOT"
30144
30145
30146  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30147  BUILD_HOTSPOT=true
30148
30149
30150
30151# Check whether --with-import-hotspot was given.
30152if test "${with_import_hotspot+set}" = set; then :
30153  withval=$with_import_hotspot;
30154fi
30155
30156  if test "x$with_import_hotspot" != x; then
30157    CURDIR="$PWD"
30158    cd "$with_import_hotspot"
30159    HOTSPOT_DIST="`pwd`"
30160    cd "$CURDIR"
30161    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30162      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30163    fi
30164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30165$as_echo_n "checking if hotspot should be imported... " >&6; }
30166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30167$as_echo "yes from $HOTSPOT_DIST" >&6; }
30168    BUILD_HOTSPOT=false
30169  fi
30170
30171  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30172
30173
30174
30175
30176# Check whether --with-import-modules was given.
30177if test "${with_import_modules+set}" = set; then :
30178  withval=$with_import_modules;
30179fi
30180
30181
30182  if test "x$with_import_modules" != x \
30183      && test "x$with_import_modules" != "xno"; then
30184    if test -d "$with_import_modules"; then
30185      IMPORT_MODULES_TOPDIR="$with_import_modules"
30186
30187  # Only process if variable expands to non-empty
30188
30189  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30191
30192  # Input might be given as Windows format, start by converting to
30193  # unix format.
30194  path="$IMPORT_MODULES_TOPDIR"
30195  new_path=`$CYGPATH -u "$path"`
30196
30197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30200  # "foo.exe" is OK but "foo" is an error.
30201  #
30202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30203  # It is also a way to make sure we got the proper file name for the real test later on.
30204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30205  if test "x$test_shortpath" = x; then
30206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30207$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30208    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30209  fi
30210
30211  # Call helper function which possibly converts this using DOS-style short mode.
30212  # If so, the updated path is stored in $new_path.
30213
30214  input_path="$new_path"
30215  # Check if we need to convert this using DOS-style short mode. If the path
30216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30217  # take no chances and rewrite it.
30218  # Note: m4 eats our [], so we need to use [ and ] instead.
30219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30220  if test "x$has_forbidden_chars" != x; then
30221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30225      # Going to short mode and back again did indeed matter. Since short mode is
30226      # case insensitive, let's make it lowercase to improve readability.
30227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30228      # Now convert it back to Unix-style (cygpath)
30229      input_path=`$CYGPATH -u "$shortmode_path"`
30230      new_path="$input_path"
30231    fi
30232  fi
30233
30234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30235  if test "x$test_cygdrive_prefix" = x; then
30236    # As a simple fix, exclude /usr/bin since it's not a real path.
30237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30239      # a path prefixed by /cygdrive for fixpath to work.
30240      new_path="$CYGWIN_ROOT_PATH$input_path"
30241    fi
30242  fi
30243
30244
30245  if test "x$path" != "x$new_path"; then
30246    IMPORT_MODULES_TOPDIR="$new_path"
30247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30248$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30249  fi
30250
30251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30252
30253  path="$IMPORT_MODULES_TOPDIR"
30254  has_colon=`$ECHO $path | $GREP ^.:`
30255  new_path="$path"
30256  if test "x$has_colon" = x; then
30257    # Not in mixed or Windows style, start by that.
30258    new_path=`cmd //c echo $path`
30259  fi
30260
30261
30262  input_path="$new_path"
30263  # Check if we need to convert this using DOS-style short mode. If the path
30264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30265  # take no chances and rewrite it.
30266  # Note: m4 eats our [], so we need to use [ and ] instead.
30267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30268  if test "x$has_forbidden_chars" != x; then
30269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30271  fi
30272
30273
30274  windows_path="$new_path"
30275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30276    unix_path=`$CYGPATH -u "$windows_path"`
30277    new_path="$unix_path"
30278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30280    new_path="$unix_path"
30281  fi
30282
30283  if test "x$path" != "x$new_path"; then
30284    IMPORT_MODULES_TOPDIR="$new_path"
30285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30286$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30287  fi
30288
30289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30291
30292    else
30293      # We're on a unix platform. Hooray! :)
30294      path="$IMPORT_MODULES_TOPDIR"
30295      has_space=`$ECHO "$path" | $GREP " "`
30296      if test "x$has_space" != x; then
30297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30298$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30300      fi
30301
30302      # Use eval to expand a potential ~
30303      eval path="$path"
30304      if test ! -f "$path" && test ! -d "$path"; then
30305        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30306      fi
30307
30308      if test -d "$path"; then
30309        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30310      else
30311        dir="`$DIRNAME "$path"`"
30312        base="`$BASENAME "$path"`"
30313        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30314      fi
30315    fi
30316  fi
30317
30318    elif test -e "$with_import_modules"; then
30319      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30320      $RM -rf "$IMPORT_MODULES_TOPDIR"
30321      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30322      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30323        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30324      fi
30325    else
30326      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30327    fi
30328  fi
30329
30330  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30331    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30332  fi
30333  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30334    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30335  fi
30336  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30337    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30338  fi
30339  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30340    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30341  fi
30342  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30343    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30344  fi
30345  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30346    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30347  fi
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357###############################################################################
30358#
30359# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30360# native code.
30361#
30362###############################################################################
30363
30364# See if we are doing a complete static build or not
30365
30366  # Check whether --enable-static-build was given.
30367if test "${enable_static_build+set}" = set; then :
30368  enableval=$enable_static_build;
30369fi
30370
30371  STATIC_BUILD=false
30372  if test "x$enable_static_build" = "xyes"; then
30373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30374$as_echo_n "checking if static build is enabled... " >&6; }
30375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30376$as_echo "yes" >&6; }
30377    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30378      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30379    fi
30380    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30381    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30382    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30383    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30384    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30385    STATIC_BUILD=true
30386  elif test "x$enable_static_build" = "xno"; then
30387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30388$as_echo_n "checking if static build is enabled... " >&6; }
30389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30390$as_echo "no" >&6; }
30391  elif test "x$enable_static_build" != "x"; then
30392    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30393  fi
30394
30395
30396
30397
30398# First determine the toolchain type (compiler family)
30399
30400
30401# Check whether --with-toolchain-type was given.
30402if test "${with_toolchain_type+set}" = set; then :
30403  withval=$with_toolchain_type;
30404fi
30405
30406
30407  # Use indirect variable referencing
30408  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30409  VALID_TOOLCHAINS=${!toolchain_var_name}
30410
30411  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30412    if test -n "$XCODEBUILD"; then
30413      # On Mac OS X, default toolchain to clang after Xcode 5
30414      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30415      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30416      if test $? -ne 0; then
30417        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30418      fi
30419      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30420          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30421          $CUT -f 1 -d .`
30422      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30423$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30424      if test $XCODE_MAJOR_VERSION -ge 5; then
30425          DEFAULT_TOOLCHAIN="clang"
30426      else
30427          DEFAULT_TOOLCHAIN="gcc"
30428      fi
30429    else
30430      # If Xcode is not installed, but the command line tools are
30431      # then we can't run xcodebuild. On these systems we should
30432      # default to clang
30433      DEFAULT_TOOLCHAIN="clang"
30434    fi
30435  else
30436    # First toolchain type in the list is the default
30437    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30438  fi
30439
30440  if test "x$with_toolchain_type" = xlist; then
30441    # List all toolchains
30442    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30443$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30444    for toolchain in $VALID_TOOLCHAINS; do
30445      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30446      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30447      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30448    done
30449
30450    exit 0
30451  elif test "x$with_toolchain_type" != x; then
30452    # User override; check that it is valid
30453    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30454      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30455$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30456      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30457$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30458      as_fn_error $? "Cannot continue." "$LINENO" 5
30459    fi
30460    TOOLCHAIN_TYPE=$with_toolchain_type
30461  else
30462    # No flag given, use default
30463    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30464  fi
30465
30466
30467  TOOLCHAIN_CC_BINARY_clang="clang"
30468  TOOLCHAIN_CC_BINARY_gcc="gcc"
30469  TOOLCHAIN_CC_BINARY_microsoft="cl"
30470  TOOLCHAIN_CC_BINARY_solstudio="cc"
30471  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30472
30473  TOOLCHAIN_CXX_BINARY_clang="clang++"
30474  TOOLCHAIN_CXX_BINARY_gcc="g++"
30475  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30476  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30477  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30478
30479  # Use indirect variable referencing
30480  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30481  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30482  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30483  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30484  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30485  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30486  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30487  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30488
30489
30490  # Define filename patterns
30491  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30492    LIBRARY_PREFIX=
30493    SHARED_LIBRARY_SUFFIX='.dll'
30494    STATIC_LIBRARY_SUFFIX='.lib'
30495    SHARED_LIBRARY='$1.dll'
30496    STATIC_LIBRARY='$1.lib'
30497    OBJ_SUFFIX='.obj'
30498    EXE_SUFFIX='.exe'
30499  else
30500    LIBRARY_PREFIX=lib
30501    SHARED_LIBRARY_SUFFIX='.so'
30502    STATIC_LIBRARY_SUFFIX='.a'
30503    SHARED_LIBRARY='lib$1.so'
30504    STATIC_LIBRARY='lib$1.a'
30505    OBJ_SUFFIX='.o'
30506    EXE_SUFFIX=''
30507    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30508      # For full static builds, we're overloading the SHARED_LIBRARY
30509      # variables in order to limit the amount of changes required.
30510      # It would be better to remove SHARED and just use LIBRARY and
30511      # LIBRARY_SUFFIX for libraries that can be built either
30512      # shared or static and use STATIC_* for libraries that are
30513      # always built statically.
30514      if test "x$STATIC_BUILD" = xtrue; then
30515        SHARED_LIBRARY='lib$1.a'
30516        SHARED_LIBRARY_SUFFIX='.a'
30517      else
30518        SHARED_LIBRARY='lib$1.dylib'
30519        SHARED_LIBRARY_SUFFIX='.dylib'
30520      fi
30521    fi
30522  fi
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30534    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30535$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30536  else
30537    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30538$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30539  fi
30540
30541
30542# User supplied flags should be used when configure detects compilers
30543
30544  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30545    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30546$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30547  fi
30548
30549  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30550    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30551$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30552  fi
30553
30554  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30555    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30556$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30557  fi
30558
30559
30560# Check whether --with-extra-cflags was given.
30561if test "${with_extra_cflags+set}" = set; then :
30562  withval=$with_extra_cflags;
30563fi
30564
30565
30566
30567# Check whether --with-extra-cxxflags was given.
30568if test "${with_extra_cxxflags+set}" = set; then :
30569  withval=$with_extra_cxxflags;
30570fi
30571
30572
30573
30574# Check whether --with-extra-ldflags was given.
30575if test "${with_extra_ldflags+set}" = set; then :
30576  withval=$with_extra_ldflags;
30577fi
30578
30579
30580  EXTRA_CFLAGS="$with_extra_cflags"
30581  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30582  EXTRA_LDFLAGS="$with_extra_ldflags"
30583
30584  # Hotspot needs these set in their legacy form
30585  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30586  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30587  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30588
30589
30590
30591
30592
30593  # The global CFLAGS and LDLAGS variables are used by configure tests and
30594  # should include the extra parameters
30595  CFLAGS="$EXTRA_CFLAGS"
30596  CXXFLAGS="$EXTRA_CXXFLAGS"
30597  LDFLAGS="$EXTRA_LDFLAGS"
30598  CPPFLAGS=""
30599
30600# The sysroot cflags are needed for configure to be able to run the compilers
30601
30602  if test "x$SYSROOT" != "x"; then
30603    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30604      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30605        # Solaris Studio does not have a concept of sysroot. Instead we must
30606        # make sure the default include and lib dirs are appended to each
30607        # compile and link command line. Must also add -I-xbuiltin to enable
30608        # inlining of system functions and intrinsics.
30609        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30610        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30611            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30612            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30613      fi
30614    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30615      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30616      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30617    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30618      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30619      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30620    fi
30621    # Propagate the sysroot args to hotspot
30622    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30623    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30624    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30625    # The global CFLAGS and LDFLAGS variables need these for configure to function
30626    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30627    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30628    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30629    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30630  fi
30631
30632  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30633    # We also need -iframework<path>/System/Library/Frameworks
30634    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30635    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30636    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30637    # set this here so it doesn't have to be peppered throughout the forest
30638    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30639    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30640  fi
30641
30642
30643
30644
30645
30646# Then detect the actual binaries needed
30647
30648  # FIXME: Is this needed?
30649  ac_ext=cpp
30650ac_cpp='$CXXCPP $CPPFLAGS'
30651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30654
30655
30656  # Store the CFLAGS etc passed to the configure script.
30657  ORG_CFLAGS="$CFLAGS"
30658  ORG_CXXFLAGS="$CXXFLAGS"
30659
30660  # autoconf magic only relies on PATH, so update it if tools dir is specified
30661  OLD_PATH="$PATH"
30662
30663  # On Windows, we need to detect the visual studio installation first.
30664  # This will change the PATH, but we need to keep that new PATH even
30665  # after toolchain detection is done, since the compiler (on x86) uses
30666  # it for DLL resolution in runtime.
30667  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30668      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30669
30670  # Store path to cygwin link.exe to help excluding it when searching for
30671  # VS linker. This must be done before changing the PATH when looking for VS.
30672  # Extract the first word of "link", so it can be a program name with args.
30673set dummy link; ac_word=$2
30674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30675$as_echo_n "checking for $ac_word... " >&6; }
30676if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30677  $as_echo_n "(cached) " >&6
30678else
30679  case $CYGWIN_LINK in
30680  [\\/]* | ?:[\\/]*)
30681  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30682  ;;
30683  *)
30684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30685for as_dir in $PATH
30686do
30687  IFS=$as_save_IFS
30688  test -z "$as_dir" && as_dir=.
30689    for ac_exec_ext in '' $ac_executable_extensions; do
30690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30691    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30693    break 2
30694  fi
30695done
30696  done
30697IFS=$as_save_IFS
30698
30699  ;;
30700esac
30701fi
30702CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30703if test -n "$CYGWIN_LINK"; then
30704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30705$as_echo "$CYGWIN_LINK" >&6; }
30706else
30707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30708$as_echo "no" >&6; }
30709fi
30710
30711
30712  if test "x$CYGWIN_LINK" != x; then
30713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30714$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30715    "$CYGWIN_LINK" --version > /dev/null
30716    if test $? -eq 0 ; then
30717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30718$as_echo "yes" >&6; }
30719    else
30720      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30721$as_echo "no" >&6; }
30722      # This might be the VS linker. Don't exclude it later on.
30723      CYGWIN_LINK=""
30724    fi
30725  fi
30726
30727  # First-hand choice is to locate and run the vsvars bat file.
30728
30729
30730# Check whether --with-toolchain-version was given.
30731if test "${with_toolchain_version+set}" = set; then :
30732  withval=$with_toolchain_version;
30733fi
30734
30735
30736  if test "x$with_toolchain_version" = xlist; then
30737    # List all toolchains
30738    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30739$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30740    for version in $VALID_VS_VERSIONS; do
30741      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30742      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30743    done
30744
30745    exit 0
30746  elif test "x$DEVKIT_VS_VERSION" != x; then
30747    VS_VERSION=$DEVKIT_VS_VERSION
30748    TOOLCHAIN_VERSION=$VS_VERSION
30749    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30750    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30751    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30752    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30753    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30754    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30755
30756    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30757    # can still be exported as INCLUDE for compiler invocations without
30758    # SYSROOT_CFLAGS
30759    OLDIFS="$IFS"
30760    IFS=";"
30761    for i in $DEVKIT_VS_INCLUDE; do
30762      ipath=$i
30763
30764  unix_path="$ipath"
30765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30766    windows_path=`$CYGPATH -m "$unix_path"`
30767    ipath="$windows_path"
30768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30769    windows_path=`cmd //c echo $unix_path`
30770    ipath="$windows_path"
30771  fi
30772
30773      VS_INCLUDE="$VS_INCLUDE;$ipath"
30774    done
30775    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30776    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30777    for i in $DEVKIT_VS_LIB; do
30778      libpath=$i
30779
30780  unix_path="$libpath"
30781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30782    windows_path=`$CYGPATH -m "$unix_path"`
30783    libpath="$windows_path"
30784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30785    windows_path=`cmd //c echo $unix_path`
30786    libpath="$windows_path"
30787  fi
30788
30789      VS_LIB="$VS_LIB;$libpath"
30790    done
30791    IFS="$OLDIFS"
30792
30793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30794$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30795
30796  elif test "x$with_toolchain_version" != x; then
30797    # User override; check that it is valid
30798    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30799      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30800$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30801      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30802$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30803      as_fn_error $? "Cannot continue." "$LINENO" 5
30804    fi
30805    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30806  else
30807    # No flag given, use default
30808    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30809  fi
30810
30811  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30812
30813  VS_VERSION="$VS_VERSION"
30814  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30815  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30816  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30817  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30818
30819  # When using --with-tools-dir, assume it points to the correct and default
30820  # version of Visual Studio or that --with-toolchain-version was also set.
30821  if test "x$with_tools_dir" != x; then
30822
30823  if test "x$VS_ENV_CMD" = x; then
30824    VS_VERSION="${VS_VERSION}"
30825    VS_BASE="$with_tools_dir/../.."
30826    METHOD="--with-tools-dir"
30827
30828    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30829      VCVARSFILE="vc/bin/vcvars32.bat"
30830    else
30831      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30832    fi
30833
30834
30835  windows_path="$VS_BASE"
30836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30837    unix_path=`$CYGPATH -u "$windows_path"`
30838    VS_BASE="$unix_path"
30839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30841    VS_BASE="$unix_path"
30842  fi
30843
30844    if test -d "$VS_BASE"; then
30845      if test -f "$VS_BASE/$VCVARSFILE"; then
30846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30847$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30848        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30849        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30850        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30851        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30852      else
30853        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30854$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30855        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30856$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30857      fi
30858    fi
30859  fi
30860
30861
30862  if test "x$VS_ENV_CMD" = x; then
30863    VS_VERSION="${VS_VERSION}"
30864    VS_BASE="$with_tools_dir/../../.."
30865    METHOD="--with-tools-dir"
30866
30867    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30868      VCVARSFILE="vc/bin/vcvars32.bat"
30869    else
30870      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30871    fi
30872
30873
30874  windows_path="$VS_BASE"
30875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30876    unix_path=`$CYGPATH -u "$windows_path"`
30877    VS_BASE="$unix_path"
30878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30880    VS_BASE="$unix_path"
30881  fi
30882
30883    if test -d "$VS_BASE"; then
30884      if test -f "$VS_BASE/$VCVARSFILE"; then
30885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30886$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30887        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30888        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30889        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30890        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30891      else
30892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30893$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30895$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30896      fi
30897    fi
30898  fi
30899
30900    if test "x$VS_ENV_CMD" = x; then
30901      # Having specified an argument which is incorrect will produce an instant failure;
30902      # we should not go on looking
30903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30904$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30905      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30906$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30907      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30908$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30909      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30910    fi
30911  fi
30912
30913  VS_ENV_CMD=""
30914  VS_ENV_ARGS=""
30915
30916  if test "x$VS_COMNTOOLS" != x; then
30917
30918  if test "x$VS_ENV_CMD" = x; then
30919    VS_VERSION="${VS_VERSION}"
30920    VS_BASE="$VS_COMNTOOLS/../.."
30921    METHOD="$VS_COMNTOOLS_VAR variable"
30922
30923    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30924      VCVARSFILE="vc/bin/vcvars32.bat"
30925    else
30926      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30927    fi
30928
30929
30930  windows_path="$VS_BASE"
30931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30932    unix_path=`$CYGPATH -u "$windows_path"`
30933    VS_BASE="$unix_path"
30934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30936    VS_BASE="$unix_path"
30937  fi
30938
30939    if test -d "$VS_BASE"; then
30940      if test -f "$VS_BASE/$VCVARSFILE"; then
30941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30942$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30943        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30944        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30945        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30946        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30947      else
30948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30949$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30950        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30951$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30952      fi
30953    fi
30954  fi
30955
30956  fi
30957  if test "x$PROGRAMFILES" != x; then
30958
30959  if test "x$VS_ENV_CMD" = x; then
30960    VS_VERSION="${VS_VERSION}"
30961    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30962    METHOD="well-known name"
30963
30964    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30965      VCVARSFILE="vc/bin/vcvars32.bat"
30966    else
30967      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30968    fi
30969
30970
30971  windows_path="$VS_BASE"
30972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30973    unix_path=`$CYGPATH -u "$windows_path"`
30974    VS_BASE="$unix_path"
30975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30977    VS_BASE="$unix_path"
30978  fi
30979
30980    if test -d "$VS_BASE"; then
30981      if test -f "$VS_BASE/$VCVARSFILE"; then
30982        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30983$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30984        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30985        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30986        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30987        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30988      else
30989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30990$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30991        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30992$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30993      fi
30994    fi
30995  fi
30996
30997  fi
30998  # Work around the insanely named ProgramFiles(x86) env variable
30999  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31000  if test "x$PROGRAMFILES_X86" != x; then
31001
31002  if test "x$VS_ENV_CMD" = x; then
31003    VS_VERSION="${VS_VERSION}"
31004    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31005    METHOD="well-known name"
31006
31007    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31008      VCVARSFILE="vc/bin/vcvars32.bat"
31009    else
31010      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31011    fi
31012
31013
31014  windows_path="$VS_BASE"
31015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31016    unix_path=`$CYGPATH -u "$windows_path"`
31017    VS_BASE="$unix_path"
31018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31020    VS_BASE="$unix_path"
31021  fi
31022
31023    if test -d "$VS_BASE"; then
31024      if test -f "$VS_BASE/$VCVARSFILE"; then
31025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31026$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31027        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31028        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31029        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31030        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31031      else
31032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31033$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31034        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31035$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31036      fi
31037    fi
31038  fi
31039
31040  fi
31041
31042  if test "x$VS_ENV_CMD" = x; then
31043    VS_VERSION="${VS_VERSION}"
31044    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31045    METHOD="well-known name"
31046
31047    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31048      VCVARSFILE="vc/bin/vcvars32.bat"
31049    else
31050      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31051    fi
31052
31053
31054  windows_path="$VS_BASE"
31055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31056    unix_path=`$CYGPATH -u "$windows_path"`
31057    VS_BASE="$unix_path"
31058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31060    VS_BASE="$unix_path"
31061  fi
31062
31063    if test -d "$VS_BASE"; then
31064      if test -f "$VS_BASE/$VCVARSFILE"; then
31065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31066$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31067        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31068        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31069        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31070        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31071      else
31072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31073$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31075$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31076      fi
31077    fi
31078  fi
31079
31080
31081  if test "x$VS_ENV_CMD" = x; then
31082    VS_VERSION="${VS_VERSION}"
31083    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31084    METHOD="well-known name"
31085
31086    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31087      VCVARSFILE="vc/bin/vcvars32.bat"
31088    else
31089      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31090    fi
31091
31092
31093  windows_path="$VS_BASE"
31094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31095    unix_path=`$CYGPATH -u "$windows_path"`
31096    VS_BASE="$unix_path"
31097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31099    VS_BASE="$unix_path"
31100  fi
31101
31102    if test -d "$VS_BASE"; then
31103      if test -f "$VS_BASE/$VCVARSFILE"; then
31104        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31105$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31106        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31107        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31108        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31109        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31110      else
31111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31112$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31114$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31115      fi
31116    fi
31117  fi
31118
31119
31120  if test "x$SDK_INSTALL_DIR" != x; then
31121    if test "x$ProgramW6432" != x; then
31122
31123  if test "x$VS_ENV_CMD" = x; then
31124    VS_VERSION="${VS_VERSION}"
31125    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31126    METHOD="well-known name"
31127
31128  windows_path="$WIN_SDK_BASE"
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130    unix_path=`$CYGPATH -u "$windows_path"`
31131    WIN_SDK_BASE="$unix_path"
31132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134    WIN_SDK_BASE="$unix_path"
31135  fi
31136
31137    if test -d "$WIN_SDK_BASE"; then
31138      # There have been cases of partial or broken SDK installations. A missing
31139      # lib dir is not going to work.
31140      if test ! -d "$WIN_SDK_BASE/lib"; then
31141        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31142$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31143        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31144$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31145      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31147$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31148        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31149        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31150          VS_ENV_ARGS="/x86"
31151        else
31152          VS_ENV_ARGS="/x64"
31153        fi
31154        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31155        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31156        # TODO: improve detection for other versions of SDK
31157        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31158      else
31159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31160$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31161        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31162$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31163      fi
31164    fi
31165  fi
31166
31167    fi
31168    if test "x$PROGRAMW6432" != x; then
31169
31170  if test "x$VS_ENV_CMD" = x; then
31171    VS_VERSION="${VS_VERSION}"
31172    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31173    METHOD="well-known name"
31174
31175  windows_path="$WIN_SDK_BASE"
31176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31177    unix_path=`$CYGPATH -u "$windows_path"`
31178    WIN_SDK_BASE="$unix_path"
31179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31181    WIN_SDK_BASE="$unix_path"
31182  fi
31183
31184    if test -d "$WIN_SDK_BASE"; then
31185      # There have been cases of partial or broken SDK installations. A missing
31186      # lib dir is not going to work.
31187      if test ! -d "$WIN_SDK_BASE/lib"; then
31188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31190        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31191$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31192      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31195        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31196        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31197          VS_ENV_ARGS="/x86"
31198        else
31199          VS_ENV_ARGS="/x64"
31200        fi
31201        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31202        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31203        # TODO: improve detection for other versions of SDK
31204        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31205      else
31206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31209$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31210      fi
31211    fi
31212  fi
31213
31214    fi
31215    if test "x$PROGRAMFILES" != x; then
31216
31217  if test "x$VS_ENV_CMD" = x; then
31218    VS_VERSION="${VS_VERSION}"
31219    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31220    METHOD="well-known name"
31221
31222  windows_path="$WIN_SDK_BASE"
31223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31224    unix_path=`$CYGPATH -u "$windows_path"`
31225    WIN_SDK_BASE="$unix_path"
31226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31228    WIN_SDK_BASE="$unix_path"
31229  fi
31230
31231    if test -d "$WIN_SDK_BASE"; then
31232      # There have been cases of partial or broken SDK installations. A missing
31233      # lib dir is not going to work.
31234      if test ! -d "$WIN_SDK_BASE/lib"; then
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31237        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31238$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31239      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31240        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31241$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31242        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31243        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31244          VS_ENV_ARGS="/x86"
31245        else
31246          VS_ENV_ARGS="/x64"
31247        fi
31248        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31249        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31250        # TODO: improve detection for other versions of SDK
31251        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31252      else
31253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31256$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31257      fi
31258    fi
31259  fi
31260
31261    fi
31262
31263  if test "x$VS_ENV_CMD" = x; then
31264    VS_VERSION="${VS_VERSION}"
31265    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31266    METHOD="well-known name"
31267
31268  windows_path="$WIN_SDK_BASE"
31269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31270    unix_path=`$CYGPATH -u "$windows_path"`
31271    WIN_SDK_BASE="$unix_path"
31272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31274    WIN_SDK_BASE="$unix_path"
31275  fi
31276
31277    if test -d "$WIN_SDK_BASE"; then
31278      # There have been cases of partial or broken SDK installations. A missing
31279      # lib dir is not going to work.
31280      if test ! -d "$WIN_SDK_BASE/lib"; then
31281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31284$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31285      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31287$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31288        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31289        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31290          VS_ENV_ARGS="/x86"
31291        else
31292          VS_ENV_ARGS="/x64"
31293        fi
31294        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31295        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31296        # TODO: improve detection for other versions of SDK
31297        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31298      else
31299        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31300$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31301        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31302$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31303      fi
31304    fi
31305  fi
31306
31307
31308  if test "x$VS_ENV_CMD" = x; then
31309    VS_VERSION="${VS_VERSION}"
31310    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31311    METHOD="well-known name"
31312
31313  windows_path="$WIN_SDK_BASE"
31314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31315    unix_path=`$CYGPATH -u "$windows_path"`
31316    WIN_SDK_BASE="$unix_path"
31317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31319    WIN_SDK_BASE="$unix_path"
31320  fi
31321
31322    if test -d "$WIN_SDK_BASE"; then
31323      # There have been cases of partial or broken SDK installations. A missing
31324      # lib dir is not going to work.
31325      if test ! -d "$WIN_SDK_BASE/lib"; then
31326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31327$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31328        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31329$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31330      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31331        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31332$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31333        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31334        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31335          VS_ENV_ARGS="/x86"
31336        else
31337          VS_ENV_ARGS="/x64"
31338        fi
31339        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31340        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31341        # TODO: improve detection for other versions of SDK
31342        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31343      else
31344        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31345$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31346        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31347$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31348      fi
31349    fi
31350  fi
31351
31352  fi
31353
31354    if test "x$VS_ENV_CMD" != x; then
31355      TOOLCHAIN_VERSION=$VS_VERSION
31356      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31357      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31358      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31359      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31360      # The rest of the variables are already evaled while probing
31361      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31362$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31363      break
31364    fi
31365  done
31366
31367
31368  # If we have a devkit, skip all of the below.
31369  if test "x$DEVKIT_VS_VERSION" = x; then
31370    if test "x$VS_ENV_CMD" != x; then
31371      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31372
31373  # Only process if variable expands to non-empty
31374
31375  if test "x$VS_ENV_CMD" != x; then
31376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31377
31378  # First separate the path from the arguments. This will split at the first
31379  # space.
31380  complete="$VS_ENV_CMD"
31381  path="${complete%% *}"
31382  tmp="$complete EOL"
31383  arguments="${tmp#* }"
31384
31385  # Input might be given as Windows format, start by converting to
31386  # unix format.
31387  new_path=`$CYGPATH -u "$path"`
31388
31389  # Now try to locate executable using which
31390  new_path=`$WHICH "$new_path" 2> /dev/null`
31391  # bat and cmd files are not always considered executable in cygwin causing which
31392  # to not find them
31393  if test "x$new_path" = x \
31394      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31395      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31396    new_path=`$CYGPATH -u "$path"`
31397  fi
31398  if test "x$new_path" = x; then
31399    # Oops. Which didn't find the executable.
31400    # The splitting of arguments from the executable at a space might have been incorrect,
31401    # since paths with space are more likely in Windows. Give it another try with the whole
31402    # argument.
31403    path="$complete"
31404    arguments="EOL"
31405    new_path=`$CYGPATH -u "$path"`
31406    new_path=`$WHICH "$new_path" 2> /dev/null`
31407    # bat and cmd files are not always considered executable in cygwin causing which
31408    # to not find them
31409    if test "x$new_path" = x \
31410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31412      new_path=`$CYGPATH -u "$path"`
31413    fi
31414    if test "x$new_path" = x; then
31415      # It's still not found. Now this is an unrecoverable error.
31416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31417$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31418      has_space=`$ECHO "$complete" | $GREP " "`
31419      if test "x$has_space" != x; then
31420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31422      fi
31423      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31424    fi
31425  fi
31426
31427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31430  # "foo.exe" is OK but "foo" is an error.
31431  #
31432  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31433  # It is also a way to make sure we got the proper file name for the real test later on.
31434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31435  if test "x$test_shortpath" = x; then
31436    # Short path failed, file does not exist as specified.
31437    # Try adding .exe or .cmd
31438    if test -f "${new_path}.exe"; then
31439      input_to_shortpath="${new_path}.exe"
31440    elif test -f "${new_path}.cmd"; then
31441      input_to_shortpath="${new_path}.cmd"
31442    else
31443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31444$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31445      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31446$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31447      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31448    fi
31449  else
31450    input_to_shortpath="$new_path"
31451  fi
31452
31453  # Call helper function which possibly converts this using DOS-style short mode.
31454  # If so, the updated path is stored in $new_path.
31455  new_path="$input_to_shortpath"
31456
31457  input_path="$input_to_shortpath"
31458  # Check if we need to convert this using DOS-style short mode. If the path
31459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31460  # take no chances and rewrite it.
31461  # Note: m4 eats our [], so we need to use [ and ] instead.
31462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31463  if test "x$has_forbidden_chars" != x; then
31464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31468      # Going to short mode and back again did indeed matter. Since short mode is
31469      # case insensitive, let's make it lowercase to improve readability.
31470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31471      # Now convert it back to Unix-style (cygpath)
31472      input_path=`$CYGPATH -u "$shortmode_path"`
31473      new_path="$input_path"
31474    fi
31475  fi
31476
31477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31478  if test "x$test_cygdrive_prefix" = x; then
31479    # As a simple fix, exclude /usr/bin since it's not a real path.
31480    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31482      # a path prefixed by /cygdrive for fixpath to work.
31483      new_path="$CYGWIN_ROOT_PATH$input_path"
31484    fi
31485  fi
31486
31487  # remove trailing .exe if any
31488  new_path="${new_path/%.exe/}"
31489
31490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31491
31492  # First separate the path from the arguments. This will split at the first
31493  # space.
31494  complete="$VS_ENV_CMD"
31495  path="${complete%% *}"
31496  tmp="$complete EOL"
31497  arguments="${tmp#* }"
31498
31499  # Input might be given as Windows format, start by converting to
31500  # unix format.
31501  new_path="$path"
31502
31503  windows_path="$new_path"
31504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31505    unix_path=`$CYGPATH -u "$windows_path"`
31506    new_path="$unix_path"
31507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31509    new_path="$unix_path"
31510  fi
31511
31512
31513  # Now try to locate executable using which
31514  new_path=`$WHICH "$new_path" 2> /dev/null`
31515
31516  if test "x$new_path" = x; then
31517    # Oops. Which didn't find the executable.
31518    # The splitting of arguments from the executable at a space might have been incorrect,
31519    # since paths with space are more likely in Windows. Give it another try with the whole
31520    # argument.
31521    path="$complete"
31522    arguments="EOL"
31523    new_path="$path"
31524
31525  windows_path="$new_path"
31526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31527    unix_path=`$CYGPATH -u "$windows_path"`
31528    new_path="$unix_path"
31529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31531    new_path="$unix_path"
31532  fi
31533
31534
31535    new_path=`$WHICH "$new_path" 2> /dev/null`
31536    # bat and cmd files are not always considered executable in MSYS causing which
31537    # to not find them
31538    if test "x$new_path" = x \
31539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31541      new_path="$path"
31542
31543  windows_path="$new_path"
31544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31545    unix_path=`$CYGPATH -u "$windows_path"`
31546    new_path="$unix_path"
31547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31549    new_path="$unix_path"
31550  fi
31551
31552    fi
31553
31554    if test "x$new_path" = x; then
31555      # It's still not found. Now this is an unrecoverable error.
31556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31557$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31558      has_space=`$ECHO "$complete" | $GREP " "`
31559      if test "x$has_space" != x; then
31560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31562      fi
31563      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31564    fi
31565  fi
31566
31567  # Now new_path has a complete unix path to the binary
31568  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31569    # Keep paths in /bin as-is, but remove trailing .exe if any
31570    new_path="${new_path/%.exe/}"
31571    # Do not save /bin paths to all_fixpath_prefixes!
31572  else
31573    # Not in mixed or Windows style, start by that.
31574    new_path=`cmd //c echo $new_path`
31575
31576  input_path="$new_path"
31577  # Check if we need to convert this using DOS-style short mode. If the path
31578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31579  # take no chances and rewrite it.
31580  # Note: m4 eats our [], so we need to use [ and ] instead.
31581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31582  if test "x$has_forbidden_chars" != x; then
31583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31585  fi
31586
31587    # Output is in $new_path
31588
31589  windows_path="$new_path"
31590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31591    unix_path=`$CYGPATH -u "$windows_path"`
31592    new_path="$unix_path"
31593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31595    new_path="$unix_path"
31596  fi
31597
31598    # remove trailing .exe if any
31599    new_path="${new_path/%.exe/}"
31600
31601    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31602    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31603  fi
31604
31605    else
31606      # We're on a unix platform. Hooray! :)
31607      # First separate the path from the arguments. This will split at the first
31608      # space.
31609      complete="$VS_ENV_CMD"
31610      path="${complete%% *}"
31611      tmp="$complete EOL"
31612      arguments="${tmp#* }"
31613
31614      # Cannot rely on the command "which" here since it doesn't always work.
31615      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31616      if test -z "$is_absolute_path"; then
31617        # Path to executable is not absolute. Find it.
31618        IFS_save="$IFS"
31619        IFS=:
31620        for p in $PATH; do
31621          if test -f "$p/$path" && test -x "$p/$path"; then
31622            new_path="$p/$path"
31623            break
31624          fi
31625        done
31626        IFS="$IFS_save"
31627      else
31628        # This is an absolute path, we can use it without further modifications.
31629        new_path="$path"
31630      fi
31631
31632      if test "x$new_path" = x; then
31633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31634$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31635        has_space=`$ECHO "$complete" | $GREP " "`
31636        if test "x$has_space" != x; then
31637          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31638$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31639        fi
31640        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31641      fi
31642    fi
31643
31644    # Now join together the path and the arguments once again
31645    if test "x$arguments" != xEOL; then
31646      new_complete="$new_path ${arguments% *}"
31647    else
31648      new_complete="$new_path"
31649    fi
31650
31651    if test "x$complete" != "x$new_complete"; then
31652      VS_ENV_CMD="$new_complete"
31653      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31654$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31655    fi
31656  fi
31657
31658
31659      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31660      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31661$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31662
31663      # We need to create a couple of temporary files.
31664      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31665      $MKDIR -p $VS_ENV_TMP_DIR
31666
31667      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31668      # Instead create a shell script which will set the relevant variables when run.
31669      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31670
31671  unix_path="$WINPATH_VS_ENV_CMD"
31672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31673    windows_path=`$CYGPATH -m "$unix_path"`
31674    WINPATH_VS_ENV_CMD="$windows_path"
31675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31676    windows_path=`cmd //c echo $unix_path`
31677    WINPATH_VS_ENV_CMD="$windows_path"
31678  fi
31679
31680      WINPATH_BASH="$BASH"
31681
31682  unix_path="$WINPATH_BASH"
31683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31684    windows_path=`$CYGPATH -m "$unix_path"`
31685    WINPATH_BASH="$windows_path"
31686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31687    windows_path=`cmd //c echo $unix_path`
31688    WINPATH_BASH="$windows_path"
31689  fi
31690
31691
31692      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31693      # script (executable by bash) that will setup the important variables.
31694      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31695      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31696      # This will end up something like:
31697      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31698      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31699      # These will end up something like:
31700      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31701      # The trailing space for everyone except PATH is no typo, but is needed due
31702      # to trailing \ in the Windows paths. These will be stripped later.
31703      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31704          >> $EXTRACT_VC_ENV_BAT_FILE
31705      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31706          >> $EXTRACT_VC_ENV_BAT_FILE
31707      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31708          >> $EXTRACT_VC_ENV_BAT_FILE
31709      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31710          >> $EXTRACT_VC_ENV_BAT_FILE
31711      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31712          >> $EXTRACT_VC_ENV_BAT_FILE
31713      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31714          >> $EXTRACT_VC_ENV_BAT_FILE
31715
31716      # Now execute the newly created bat file.
31717      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31718      # Change directory so we don't need to mess with Windows paths in redirects.
31719      cd $VS_ENV_TMP_DIR
31720      cmd /c extract-vs-env.bat | $CAT
31721      cd $CURDIR
31722
31723      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31724        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31725$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31726        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31727$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31728        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31729$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31730        as_fn_error $? "Cannot continue" "$LINENO" 5
31731      fi
31732
31733      # Now set all paths and other env variables. This will allow the rest of
31734      # the configure script to find and run the compiler in the proper way.
31735      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31736$as_echo "$as_me: Setting extracted environment variables" >&6;}
31737      . $VS_ENV_TMP_DIR/set-vs-env.sh
31738      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31739      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31740    else
31741      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31742      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31743$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31744    fi
31745  fi
31746
31747  # At this point, we should have correct variables in the environment, or we can't continue.
31748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31749$as_echo_n "checking for Visual Studio variables... " >&6; }
31750
31751  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31752      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31753    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31755$as_echo "present but broken" >&6; }
31756      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31757    else
31758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31759$as_echo "ok" >&6; }
31760      # Remove any trailing "\" ";" and " " from the variables.
31761      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31762      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31763      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31764      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31765      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31766      # Remove any paths containing # (typically F#) as that messes up make. This
31767      # is needed if visual studio was installed with F# support.
31768      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31769
31770
31771
31772
31773
31774      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31775      OLDIFS="$IFS"
31776      IFS=";"
31777      for i in $VS_INCLUDE; do
31778        ipath=$i
31779        # Only process non-empty elements
31780        if test "x$ipath" != x; then
31781          IFS="$OLDIFS"
31782          # Check that directory exists before calling fixup_path
31783          testpath=$ipath
31784
31785  windows_path="$testpath"
31786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31787    unix_path=`$CYGPATH -u "$windows_path"`
31788    testpath="$unix_path"
31789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31791    testpath="$unix_path"
31792  fi
31793
31794          if test -d "$testpath"; then
31795
31796  # Only process if variable expands to non-empty
31797
31798  if test "x$ipath" != x; then
31799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31800
31801  # Input might be given as Windows format, start by converting to
31802  # unix format.
31803  path="$ipath"
31804  new_path=`$CYGPATH -u "$path"`
31805
31806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31809  # "foo.exe" is OK but "foo" is an error.
31810  #
31811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31812  # It is also a way to make sure we got the proper file name for the real test later on.
31813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31814  if test "x$test_shortpath" = x; then
31815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31816$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31817    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31818  fi
31819
31820  # Call helper function which possibly converts this using DOS-style short mode.
31821  # If so, the updated path is stored in $new_path.
31822
31823  input_path="$new_path"
31824  # Check if we need to convert this using DOS-style short mode. If the path
31825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31826  # take no chances and rewrite it.
31827  # Note: m4 eats our [], so we need to use [ and ] instead.
31828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31829  if test "x$has_forbidden_chars" != x; then
31830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31834      # Going to short mode and back again did indeed matter. Since short mode is
31835      # case insensitive, let's make it lowercase to improve readability.
31836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31837      # Now convert it back to Unix-style (cygpath)
31838      input_path=`$CYGPATH -u "$shortmode_path"`
31839      new_path="$input_path"
31840    fi
31841  fi
31842
31843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31844  if test "x$test_cygdrive_prefix" = x; then
31845    # As a simple fix, exclude /usr/bin since it's not a real path.
31846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31848      # a path prefixed by /cygdrive for fixpath to work.
31849      new_path="$CYGWIN_ROOT_PATH$input_path"
31850    fi
31851  fi
31852
31853
31854  if test "x$path" != "x$new_path"; then
31855    ipath="$new_path"
31856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31857$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31858  fi
31859
31860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31861
31862  path="$ipath"
31863  has_colon=`$ECHO $path | $GREP ^.:`
31864  new_path="$path"
31865  if test "x$has_colon" = x; then
31866    # Not in mixed or Windows style, start by that.
31867    new_path=`cmd //c echo $path`
31868  fi
31869
31870
31871  input_path="$new_path"
31872  # Check if we need to convert this using DOS-style short mode. If the path
31873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31874  # take no chances and rewrite it.
31875  # Note: m4 eats our [], so we need to use [ and ] instead.
31876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31877  if test "x$has_forbidden_chars" != x; then
31878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31880  fi
31881
31882
31883  windows_path="$new_path"
31884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31885    unix_path=`$CYGPATH -u "$windows_path"`
31886    new_path="$unix_path"
31887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31889    new_path="$unix_path"
31890  fi
31891
31892  if test "x$path" != "x$new_path"; then
31893    ipath="$new_path"
31894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31895$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31896  fi
31897
31898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31900
31901    else
31902      # We're on a unix platform. Hooray! :)
31903      path="$ipath"
31904      has_space=`$ECHO "$path" | $GREP " "`
31905      if test "x$has_space" != x; then
31906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31907$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31909      fi
31910
31911      # Use eval to expand a potential ~
31912      eval path="$path"
31913      if test ! -f "$path" && test ! -d "$path"; then
31914        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31915      fi
31916
31917      if test -d "$path"; then
31918        ipath="`cd "$path"; $THEPWDCMD -L`"
31919      else
31920        dir="`$DIRNAME "$path"`"
31921        base="`$BASENAME "$path"`"
31922        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31923      fi
31924    fi
31925  fi
31926
31927            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31928          fi
31929          IFS=";"
31930        fi
31931      done
31932      # Convert VS_LIB into SYSROOT_LDFLAGS
31933      for i in $VS_LIB; do
31934        libpath=$i
31935        # Only process non-empty elements
31936        if test "x$libpath" != x; then
31937          IFS="$OLDIFS"
31938          # Check that directory exists before calling fixup_path
31939          testpath=$libpath
31940
31941  windows_path="$testpath"
31942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31943    unix_path=`$CYGPATH -u "$windows_path"`
31944    testpath="$unix_path"
31945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31947    testpath="$unix_path"
31948  fi
31949
31950          if test -d "$testpath"; then
31951
31952  # Only process if variable expands to non-empty
31953
31954  if test "x$libpath" != x; then
31955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31956
31957  # Input might be given as Windows format, start by converting to
31958  # unix format.
31959  path="$libpath"
31960  new_path=`$CYGPATH -u "$path"`
31961
31962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31965  # "foo.exe" is OK but "foo" is an error.
31966  #
31967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31968  # It is also a way to make sure we got the proper file name for the real test later on.
31969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31970  if test "x$test_shortpath" = x; then
31971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31972$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31973    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31974  fi
31975
31976  # Call helper function which possibly converts this using DOS-style short mode.
31977  # If so, the updated path is stored in $new_path.
31978
31979  input_path="$new_path"
31980  # Check if we need to convert this using DOS-style short mode. If the path
31981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31982  # take no chances and rewrite it.
31983  # Note: m4 eats our [], so we need to use [ and ] instead.
31984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31985  if test "x$has_forbidden_chars" != x; then
31986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31990      # Going to short mode and back again did indeed matter. Since short mode is
31991      # case insensitive, let's make it lowercase to improve readability.
31992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31993      # Now convert it back to Unix-style (cygpath)
31994      input_path=`$CYGPATH -u "$shortmode_path"`
31995      new_path="$input_path"
31996    fi
31997  fi
31998
31999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32000  if test "x$test_cygdrive_prefix" = x; then
32001    # As a simple fix, exclude /usr/bin since it's not a real path.
32002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32004      # a path prefixed by /cygdrive for fixpath to work.
32005      new_path="$CYGWIN_ROOT_PATH$input_path"
32006    fi
32007  fi
32008
32009
32010  if test "x$path" != "x$new_path"; then
32011    libpath="$new_path"
32012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32013$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32014  fi
32015
32016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32017
32018  path="$libpath"
32019  has_colon=`$ECHO $path | $GREP ^.:`
32020  new_path="$path"
32021  if test "x$has_colon" = x; then
32022    # Not in mixed or Windows style, start by that.
32023    new_path=`cmd //c echo $path`
32024  fi
32025
32026
32027  input_path="$new_path"
32028  # Check if we need to convert this using DOS-style short mode. If the path
32029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32030  # take no chances and rewrite it.
32031  # Note: m4 eats our [], so we need to use [ and ] instead.
32032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32033  if test "x$has_forbidden_chars" != x; then
32034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32036  fi
32037
32038
32039  windows_path="$new_path"
32040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32041    unix_path=`$CYGPATH -u "$windows_path"`
32042    new_path="$unix_path"
32043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32045    new_path="$unix_path"
32046  fi
32047
32048  if test "x$path" != "x$new_path"; then
32049    libpath="$new_path"
32050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32051$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32052  fi
32053
32054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32056
32057    else
32058      # We're on a unix platform. Hooray! :)
32059      path="$libpath"
32060      has_space=`$ECHO "$path" | $GREP " "`
32061      if test "x$has_space" != x; then
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32063$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32065      fi
32066
32067      # Use eval to expand a potential ~
32068      eval path="$path"
32069      if test ! -f "$path" && test ! -d "$path"; then
32070        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32071      fi
32072
32073      if test -d "$path"; then
32074        libpath="`cd "$path"; $THEPWDCMD -L`"
32075      else
32076        dir="`$DIRNAME "$path"`"
32077        base="`$BASENAME "$path"`"
32078        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32079      fi
32080    fi
32081  fi
32082
32083            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32084          fi
32085          IFS=";"
32086        fi
32087      done
32088      IFS="$OLDIFS"
32089    fi
32090  else
32091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32092$as_echo "not found" >&6; }
32093
32094    if test "x$VS_ENV_CMD" = x; then
32095      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32096$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32097      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32098$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32099    else
32100      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32101$as_echo "$as_me: Running the extraction script failed." >&6;}
32102    fi
32103    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32104$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32105    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32106$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32107    as_fn_error $? "Cannot continue" "$LINENO" 5
32108  fi
32109
32110    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32111    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32112    PATH="$VS_PATH"
32113    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32114    export INCLUDE="$VS_INCLUDE"
32115    export LIB="$VS_LIB"
32116  else
32117    if test "x$XCODE_VERSION_OUTPUT" != x; then
32118      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32119      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32120      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32121    else
32122      # Currently we do not define this for other toolchains. This might change as the need arise.
32123      TOOLCHAIN_VERSION=
32124    fi
32125  fi
32126
32127
32128  # For solaris we really need solaris tools, and not the GNU equivalent.
32129  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32130  # so add that to path before starting to probe.
32131  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32132  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32133    PATH="/usr/ccs/bin:$PATH"
32134  fi
32135
32136  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32137  # override all other locations.
32138  if test "x$TOOLCHAIN_PATH" != x; then
32139    PATH=$TOOLCHAIN_PATH:$PATH
32140  fi
32141
32142
32143  #
32144  # Setup the compilers (CC and CXX)
32145  #
32146
32147  COMPILER_NAME=C
32148  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32149
32150  if test "x$CC" != x; then
32151    # User has supplied compiler name already, always let that override.
32152    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32153$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32154    if test "x`basename $CC`" = "x$CC"; then
32155      # A command without a complete path is provided, search $PATH.
32156
32157      for ac_prog in $CC
32158do
32159  # Extract the first word of "$ac_prog", so it can be a program name with args.
32160set dummy $ac_prog; ac_word=$2
32161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32162$as_echo_n "checking for $ac_word... " >&6; }
32163if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32164  $as_echo_n "(cached) " >&6
32165else
32166  case $POTENTIAL_CC in
32167  [\\/]* | ?:[\\/]*)
32168  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32169  ;;
32170  *)
32171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32172for as_dir in $PATH
32173do
32174  IFS=$as_save_IFS
32175  test -z "$as_dir" && as_dir=.
32176    for ac_exec_ext in '' $ac_executable_extensions; do
32177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32178    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32180    break 2
32181  fi
32182done
32183  done
32184IFS=$as_save_IFS
32185
32186  ;;
32187esac
32188fi
32189POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32190if test -n "$POTENTIAL_CC"; then
32191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32192$as_echo "$POTENTIAL_CC" >&6; }
32193else
32194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32195$as_echo "no" >&6; }
32196fi
32197
32198
32199  test -n "$POTENTIAL_CC" && break
32200done
32201
32202      if test "x$POTENTIAL_CC" != x; then
32203        CC=$POTENTIAL_CC
32204      else
32205        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32206      fi
32207    else
32208      # Otherwise it might already be a complete path
32209      if test ! -x "$CC"; then
32210        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32211      fi
32212    fi
32213  else
32214    # No user supplied value. Locate compiler ourselves.
32215
32216    # If we are cross compiling, assume cross compilation tools follows the
32217    # cross compilation standard where they are prefixed with the autoconf
32218    # standard name for the target. For example the binary
32219    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32220    # If we are not cross compiling, then the default compiler name will be
32221    # used.
32222
32223    CC=
32224    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32225    # before checking the rest of the PATH.
32226    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32227    # step, this should not be necessary.
32228    if test -n "$TOOLCHAIN_PATH"; then
32229      PATH_save="$PATH"
32230      PATH="$TOOLCHAIN_PATH"
32231      for ac_prog in $SEARCH_LIST
32232do
32233  # Extract the first word of "$ac_prog", so it can be a program name with args.
32234set dummy $ac_prog; ac_word=$2
32235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32236$as_echo_n "checking for $ac_word... " >&6; }
32237if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32238  $as_echo_n "(cached) " >&6
32239else
32240  case $TOOLCHAIN_PATH_CC in
32241  [\\/]* | ?:[\\/]*)
32242  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32243  ;;
32244  *)
32245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32246for as_dir in $PATH
32247do
32248  IFS=$as_save_IFS
32249  test -z "$as_dir" && as_dir=.
32250    for ac_exec_ext in '' $ac_executable_extensions; do
32251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32252    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32254    break 2
32255  fi
32256done
32257  done
32258IFS=$as_save_IFS
32259
32260  ;;
32261esac
32262fi
32263TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32264if test -n "$TOOLCHAIN_PATH_CC"; then
32265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32266$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32267else
32268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32269$as_echo "no" >&6; }
32270fi
32271
32272
32273  test -n "$TOOLCHAIN_PATH_CC" && break
32274done
32275
32276      CC=$TOOLCHAIN_PATH_CC
32277      PATH="$PATH_save"
32278    fi
32279
32280    # AC_PATH_PROGS can't be run multiple times with the same variable,
32281    # so create a new name for this run.
32282    if test "x$CC" = x; then
32283      for ac_prog in $SEARCH_LIST
32284do
32285  # Extract the first word of "$ac_prog", so it can be a program name with args.
32286set dummy $ac_prog; ac_word=$2
32287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32288$as_echo_n "checking for $ac_word... " >&6; }
32289if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32290  $as_echo_n "(cached) " >&6
32291else
32292  case $POTENTIAL_CC in
32293  [\\/]* | ?:[\\/]*)
32294  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32295  ;;
32296  *)
32297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32298for as_dir in $PATH
32299do
32300  IFS=$as_save_IFS
32301  test -z "$as_dir" && as_dir=.
32302    for ac_exec_ext in '' $ac_executable_extensions; do
32303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32304    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32306    break 2
32307  fi
32308done
32309  done
32310IFS=$as_save_IFS
32311
32312  ;;
32313esac
32314fi
32315POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32316if test -n "$POTENTIAL_CC"; then
32317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32318$as_echo "$POTENTIAL_CC" >&6; }
32319else
32320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32321$as_echo "no" >&6; }
32322fi
32323
32324
32325  test -n "$POTENTIAL_CC" && break
32326done
32327
32328      CC=$POTENTIAL_CC
32329    fi
32330
32331    if test "x$CC" = x; then
32332
32333  # Print a helpful message on how to acquire the necessary build dependency.
32334  # devkit is the help tag: freetype, cups, alsa etc
32335  MISSING_DEPENDENCY=devkit
32336
32337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32338    cygwin_help $MISSING_DEPENDENCY
32339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32340    msys_help $MISSING_DEPENDENCY
32341  else
32342    PKGHANDLER_COMMAND=
32343
32344    case $PKGHANDLER in
32345      apt-get)
32346        apt_help     $MISSING_DEPENDENCY ;;
32347      yum)
32348        yum_help     $MISSING_DEPENDENCY ;;
32349      port)
32350        port_help    $MISSING_DEPENDENCY ;;
32351      pkgutil)
32352        pkgutil_help $MISSING_DEPENDENCY ;;
32353      pkgadd)
32354        pkgadd_help  $MISSING_DEPENDENCY ;;
32355    esac
32356
32357    if test "x$PKGHANDLER_COMMAND" != x; then
32358      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32359    fi
32360  fi
32361
32362      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32363    fi
32364  fi
32365
32366  # Now we have a compiler binary in CC. Make sure it's okay.
32367
32368  # Only process if variable expands to non-empty
32369
32370  if test "x$CC" != x; then
32371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32372
32373  # First separate the path from the arguments. This will split at the first
32374  # space.
32375  complete="$CC"
32376  path="${complete%% *}"
32377  tmp="$complete EOL"
32378  arguments="${tmp#* }"
32379
32380  # Input might be given as Windows format, start by converting to
32381  # unix format.
32382  new_path=`$CYGPATH -u "$path"`
32383
32384  # Now try to locate executable using which
32385  new_path=`$WHICH "$new_path" 2> /dev/null`
32386  # bat and cmd files are not always considered executable in cygwin causing which
32387  # to not find them
32388  if test "x$new_path" = x \
32389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32391    new_path=`$CYGPATH -u "$path"`
32392  fi
32393  if test "x$new_path" = x; then
32394    # Oops. Which didn't find the executable.
32395    # The splitting of arguments from the executable at a space might have been incorrect,
32396    # since paths with space are more likely in Windows. Give it another try with the whole
32397    # argument.
32398    path="$complete"
32399    arguments="EOL"
32400    new_path=`$CYGPATH -u "$path"`
32401    new_path=`$WHICH "$new_path" 2> /dev/null`
32402    # bat and cmd files are not always considered executable in cygwin causing which
32403    # to not find them
32404    if test "x$new_path" = x \
32405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32407      new_path=`$CYGPATH -u "$path"`
32408    fi
32409    if test "x$new_path" = x; then
32410      # It's still not found. Now this is an unrecoverable error.
32411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32412$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32413      has_space=`$ECHO "$complete" | $GREP " "`
32414      if test "x$has_space" != x; then
32415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32417      fi
32418      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32419    fi
32420  fi
32421
32422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32425  # "foo.exe" is OK but "foo" is an error.
32426  #
32427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32428  # It is also a way to make sure we got the proper file name for the real test later on.
32429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32430  if test "x$test_shortpath" = x; then
32431    # Short path failed, file does not exist as specified.
32432    # Try adding .exe or .cmd
32433    if test -f "${new_path}.exe"; then
32434      input_to_shortpath="${new_path}.exe"
32435    elif test -f "${new_path}.cmd"; then
32436      input_to_shortpath="${new_path}.cmd"
32437    else
32438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32439$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32442      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32443    fi
32444  else
32445    input_to_shortpath="$new_path"
32446  fi
32447
32448  # Call helper function which possibly converts this using DOS-style short mode.
32449  # If so, the updated path is stored in $new_path.
32450  new_path="$input_to_shortpath"
32451
32452  input_path="$input_to_shortpath"
32453  # Check if we need to convert this using DOS-style short mode. If the path
32454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32455  # take no chances and rewrite it.
32456  # Note: m4 eats our [], so we need to use [ and ] instead.
32457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32458  if test "x$has_forbidden_chars" != x; then
32459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32463      # Going to short mode and back again did indeed matter. Since short mode is
32464      # case insensitive, let's make it lowercase to improve readability.
32465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32466      # Now convert it back to Unix-style (cygpath)
32467      input_path=`$CYGPATH -u "$shortmode_path"`
32468      new_path="$input_path"
32469    fi
32470  fi
32471
32472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32473  if test "x$test_cygdrive_prefix" = x; then
32474    # As a simple fix, exclude /usr/bin since it's not a real path.
32475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32477      # a path prefixed by /cygdrive for fixpath to work.
32478      new_path="$CYGWIN_ROOT_PATH$input_path"
32479    fi
32480  fi
32481
32482  # remove trailing .exe if any
32483  new_path="${new_path/%.exe/}"
32484
32485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32486
32487  # First separate the path from the arguments. This will split at the first
32488  # space.
32489  complete="$CC"
32490  path="${complete%% *}"
32491  tmp="$complete EOL"
32492  arguments="${tmp#* }"
32493
32494  # Input might be given as Windows format, start by converting to
32495  # unix format.
32496  new_path="$path"
32497
32498  windows_path="$new_path"
32499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32500    unix_path=`$CYGPATH -u "$windows_path"`
32501    new_path="$unix_path"
32502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32504    new_path="$unix_path"
32505  fi
32506
32507
32508  # Now try to locate executable using which
32509  new_path=`$WHICH "$new_path" 2> /dev/null`
32510
32511  if test "x$new_path" = x; then
32512    # Oops. Which didn't find the executable.
32513    # The splitting of arguments from the executable at a space might have been incorrect,
32514    # since paths with space are more likely in Windows. Give it another try with the whole
32515    # argument.
32516    path="$complete"
32517    arguments="EOL"
32518    new_path="$path"
32519
32520  windows_path="$new_path"
32521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32522    unix_path=`$CYGPATH -u "$windows_path"`
32523    new_path="$unix_path"
32524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32526    new_path="$unix_path"
32527  fi
32528
32529
32530    new_path=`$WHICH "$new_path" 2> /dev/null`
32531    # bat and cmd files are not always considered executable in MSYS causing which
32532    # to not find them
32533    if test "x$new_path" = x \
32534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32536      new_path="$path"
32537
32538  windows_path="$new_path"
32539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32540    unix_path=`$CYGPATH -u "$windows_path"`
32541    new_path="$unix_path"
32542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32544    new_path="$unix_path"
32545  fi
32546
32547    fi
32548
32549    if test "x$new_path" = x; then
32550      # It's still not found. Now this is an unrecoverable error.
32551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32552$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32553      has_space=`$ECHO "$complete" | $GREP " "`
32554      if test "x$has_space" != x; then
32555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32557      fi
32558      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32559    fi
32560  fi
32561
32562  # Now new_path has a complete unix path to the binary
32563  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32564    # Keep paths in /bin as-is, but remove trailing .exe if any
32565    new_path="${new_path/%.exe/}"
32566    # Do not save /bin paths to all_fixpath_prefixes!
32567  else
32568    # Not in mixed or Windows style, start by that.
32569    new_path=`cmd //c echo $new_path`
32570
32571  input_path="$new_path"
32572  # Check if we need to convert this using DOS-style short mode. If the path
32573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32574  # take no chances and rewrite it.
32575  # Note: m4 eats our [], so we need to use [ and ] instead.
32576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32577  if test "x$has_forbidden_chars" != x; then
32578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32580  fi
32581
32582    # Output is in $new_path
32583
32584  windows_path="$new_path"
32585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32586    unix_path=`$CYGPATH -u "$windows_path"`
32587    new_path="$unix_path"
32588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32590    new_path="$unix_path"
32591  fi
32592
32593    # remove trailing .exe if any
32594    new_path="${new_path/%.exe/}"
32595
32596    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32597    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32598  fi
32599
32600    else
32601      # We're on a unix platform. Hooray! :)
32602      # First separate the path from the arguments. This will split at the first
32603      # space.
32604      complete="$CC"
32605      path="${complete%% *}"
32606      tmp="$complete EOL"
32607      arguments="${tmp#* }"
32608
32609      # Cannot rely on the command "which" here since it doesn't always work.
32610      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32611      if test -z "$is_absolute_path"; then
32612        # Path to executable is not absolute. Find it.
32613        IFS_save="$IFS"
32614        IFS=:
32615        for p in $PATH; do
32616          if test -f "$p/$path" && test -x "$p/$path"; then
32617            new_path="$p/$path"
32618            break
32619          fi
32620        done
32621        IFS="$IFS_save"
32622      else
32623        # This is an absolute path, we can use it without further modifications.
32624        new_path="$path"
32625      fi
32626
32627      if test "x$new_path" = x; then
32628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32629$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32630        has_space=`$ECHO "$complete" | $GREP " "`
32631        if test "x$has_space" != x; then
32632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32634        fi
32635        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32636      fi
32637    fi
32638
32639    # Now join together the path and the arguments once again
32640    if test "x$arguments" != xEOL; then
32641      new_complete="$new_path ${arguments% *}"
32642    else
32643      new_complete="$new_path"
32644    fi
32645
32646    if test "x$complete" != "x$new_complete"; then
32647      CC="$new_complete"
32648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32649$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32650    fi
32651  fi
32652
32653  TEST_COMPILER="$CC"
32654
32655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32656$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32657  SYMLINK_ORIGINAL="$TEST_COMPILER"
32658
32659  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32660    # Follow a chain of symbolic links. Use readlink
32661    # where it exists, else fall back to horribly
32662    # complicated shell code.
32663    if test "x$READLINK_TESTED" != yes; then
32664      # On MacOSX there is a readlink tool with a different
32665      # purpose than the GNU readlink tool. Check the found readlink.
32666      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32667      if test "x$ISGNU" = x; then
32668        # A readlink that we do not know how to use.
32669        # Are there other non-GNU readlinks out there?
32670        READLINK_TESTED=yes
32671        READLINK=
32672      fi
32673    fi
32674
32675    if test "x$READLINK" != x; then
32676      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32677    else
32678      # Save the current directory for restoring afterwards
32679      STARTDIR=$PWD
32680      COUNTER=0
32681      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32682      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32683      cd $sym_link_dir
32684      # Use -P flag to resolve symlinks in directories.
32685      cd `$THEPWDCMD -P`
32686      sym_link_dir=`$THEPWDCMD -P`
32687      # Resolve file symlinks
32688      while test $COUNTER -lt 20; do
32689        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32690        if test "x$ISLINK" == x; then
32691          # This is not a symbolic link! We are done!
32692          break
32693        fi
32694        # Again resolve directory symlinks since the target of the just found
32695        # link could be in a different directory
32696        cd `$DIRNAME $ISLINK`
32697        sym_link_dir=`$THEPWDCMD -P`
32698        sym_link_file=`$BASENAME $ISLINK`
32699        let COUNTER=COUNTER+1
32700      done
32701      cd $STARTDIR
32702      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32703    fi
32704  fi
32705
32706  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32708$as_echo "no symlink" >&6; }
32709  else
32710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32711$as_echo "$SYMLINK_ORIGINAL" >&6; }
32712
32713    # We can't handle ccache by gcc wrappers, since we need to know if we're
32714    # using ccache. Instead ccache usage must be controlled by a configure option.
32715    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32716    if test "x$COMPILER_BASENAME" = "xccache"; then
32717      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32718$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32719      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32720    fi
32721  fi
32722
32723
32724  COMPILER=$CC
32725  COMPILER_NAME=$COMPILER_NAME
32726
32727  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32728    # cc -V output typically looks like
32729    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32730    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32731    # Check that this is likely to be the Solaris Studio cc.
32732    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32733    if test $? -ne 0; then
32734      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32735      { $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
32736$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32737      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32738$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32739      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32740$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32741      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32742    fi
32743    # Remove usage instructions (if present), and
32744    # collapse compiler output into a single line
32745    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32746        $SED -e 's/ *[Uu]sage:.*//'`
32747    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32748        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32749  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32750    # xlc -qversion output typically looks like
32751    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32752    #     Version: 11.01.0000.0015
32753    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32754    # Check that this is likely to be the IBM XL C compiler.
32755    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32756    if test $? -ne 0; then
32757      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32758      { $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
32759$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32760      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32761$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32762      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32763$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32764      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32765    fi
32766    # Collapse compiler output into a single line
32767    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32768    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32769        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32770  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32771    # There is no specific version flag, but all output starts with a version string.
32772    # First line typically looks something like:
32773    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32774    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32775    # Check that this is likely to be Microsoft CL.EXE.
32776    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32777    if test $? -ne 0; then
32778      { $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
32779$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32780      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32781$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32782      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32783    fi
32784    # Collapse compiler output into a single line
32785    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32786    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32787        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32788  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32789    # gcc --version output typically looks like
32790    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32791    #     Copyright (C) 2013 Free Software Foundation, Inc.
32792    #     This is free software; see the source for copying conditions.  There is NO
32793    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32794    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32795    # Check that this is likely to be GCC.
32796    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32797    if test $? -ne 0; then
32798      { $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
32799$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32800      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32801$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32802      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32803    fi
32804    # Remove Copyright and legalese from version string, and
32805    # collapse into a single line
32806    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32807        $SED -e 's/ *Copyright .*//'`
32808    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32809        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32810  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32811    # clang --version output typically looks like
32812    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32813    #    clang version 3.3 (tags/RELEASE_33/final)
32814    # or
32815    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32816    #    Target: x86_64-pc-linux-gnu
32817    #    Thread model: posix
32818    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32819    # Check that this is likely to be clang
32820    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32821    if test $? -ne 0; then
32822      { $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
32823$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32824      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32825$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32826      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32827    fi
32828    # Collapse compiler output into a single line
32829    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32830    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32831        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
32832  else
32833      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32834  fi
32835  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32836  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32837  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32838  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32839
32840  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32841$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32842
32843
32844  # Now that we have resolved CC ourself, let autoconf have its go at it
32845  ac_ext=c
32846ac_cpp='$CPP $CPPFLAGS'
32847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32849ac_compiler_gnu=$ac_cv_c_compiler_gnu
32850if test -n "$ac_tool_prefix"; then
32851  for ac_prog in $CC
32852  do
32853    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32854set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32856$as_echo_n "checking for $ac_word... " >&6; }
32857if ${ac_cv_prog_CC+:} false; then :
32858  $as_echo_n "(cached) " >&6
32859else
32860  if test -n "$CC"; then
32861  ac_cv_prog_CC="$CC" # Let the user override the test.
32862else
32863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32864for as_dir in $PATH
32865do
32866  IFS=$as_save_IFS
32867  test -z "$as_dir" && as_dir=.
32868    for ac_exec_ext in '' $ac_executable_extensions; do
32869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32870    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32872    break 2
32873  fi
32874done
32875  done
32876IFS=$as_save_IFS
32877
32878fi
32879fi
32880CC=$ac_cv_prog_CC
32881if test -n "$CC"; then
32882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32883$as_echo "$CC" >&6; }
32884else
32885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32886$as_echo "no" >&6; }
32887fi
32888
32889
32890    test -n "$CC" && break
32891  done
32892fi
32893if test -z "$CC"; then
32894  ac_ct_CC=$CC
32895  for ac_prog in $CC
32896do
32897  # Extract the first word of "$ac_prog", so it can be a program name with args.
32898set dummy $ac_prog; ac_word=$2
32899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32900$as_echo_n "checking for $ac_word... " >&6; }
32901if ${ac_cv_prog_ac_ct_CC+:} false; then :
32902  $as_echo_n "(cached) " >&6
32903else
32904  if test -n "$ac_ct_CC"; then
32905  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32906else
32907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32908for as_dir in $PATH
32909do
32910  IFS=$as_save_IFS
32911  test -z "$as_dir" && as_dir=.
32912    for ac_exec_ext in '' $ac_executable_extensions; do
32913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32914    ac_cv_prog_ac_ct_CC="$ac_prog"
32915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32916    break 2
32917  fi
32918done
32919  done
32920IFS=$as_save_IFS
32921
32922fi
32923fi
32924ac_ct_CC=$ac_cv_prog_ac_ct_CC
32925if test -n "$ac_ct_CC"; then
32926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32927$as_echo "$ac_ct_CC" >&6; }
32928else
32929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32930$as_echo "no" >&6; }
32931fi
32932
32933
32934  test -n "$ac_ct_CC" && break
32935done
32936
32937  if test "x$ac_ct_CC" = x; then
32938    CC=""
32939  else
32940    case $cross_compiling:$ac_tool_warned in
32941yes:)
32942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32944ac_tool_warned=yes ;;
32945esac
32946    CC=$ac_ct_CC
32947  fi
32948fi
32949
32950
32951test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32953as_fn_error $? "no acceptable C compiler found in \$PATH
32954See \`config.log' for more details" "$LINENO" 5; }
32955
32956# Provide some information about the compiler.
32957$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32958set X $ac_compile
32959ac_compiler=$2
32960for ac_option in --version -v -V -qversion; do
32961  { { ac_try="$ac_compiler $ac_option >&5"
32962case "(($ac_try" in
32963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32964  *) ac_try_echo=$ac_try;;
32965esac
32966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32967$as_echo "$ac_try_echo"; } >&5
32968  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32969  ac_status=$?
32970  if test -s conftest.err; then
32971    sed '10a\
32972... rest of stderr output deleted ...
32973         10q' conftest.err >conftest.er1
32974    cat conftest.er1 >&5
32975  fi
32976  rm -f conftest.er1 conftest.err
32977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32978  test $ac_status = 0; }
32979done
32980
32981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32982/* end confdefs.h.  */
32983
32984int
32985main ()
32986{
32987
32988  ;
32989  return 0;
32990}
32991_ACEOF
32992ac_clean_files_save=$ac_clean_files
32993ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32994# Try to create an executable without -o first, disregard a.out.
32995# It will help us diagnose broken compilers, and finding out an intuition
32996# of exeext.
32997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32998$as_echo_n "checking whether the C compiler works... " >&6; }
32999ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33000
33001# The possible output files:
33002ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33003
33004ac_rmfiles=
33005for ac_file in $ac_files
33006do
33007  case $ac_file in
33008    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33009    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33010  esac
33011done
33012rm -f $ac_rmfiles
33013
33014if { { ac_try="$ac_link_default"
33015case "(($ac_try" in
33016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33017  *) ac_try_echo=$ac_try;;
33018esac
33019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33020$as_echo "$ac_try_echo"; } >&5
33021  (eval "$ac_link_default") 2>&5
33022  ac_status=$?
33023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33024  test $ac_status = 0; }; then :
33025  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33026# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33027# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33028# so that the user can short-circuit this test for compilers unknown to
33029# Autoconf.
33030for ac_file in $ac_files ''
33031do
33032  test -f "$ac_file" || continue
33033  case $ac_file in
33034    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33035	;;
33036    [ab].out )
33037	# We found the default executable, but exeext='' is most
33038	# certainly right.
33039	break;;
33040    *.* )
33041	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33042	then :; else
33043	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33044	fi
33045	# We set ac_cv_exeext here because the later test for it is not
33046	# safe: cross compilers may not add the suffix if given an `-o'
33047	# argument, so we may need to know it at that point already.
33048	# Even if this section looks crufty: it has the advantage of
33049	# actually working.
33050	break;;
33051    * )
33052	break;;
33053  esac
33054done
33055test "$ac_cv_exeext" = no && ac_cv_exeext=
33056
33057else
33058  ac_file=''
33059fi
33060if test -z "$ac_file"; then :
33061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33062$as_echo "no" >&6; }
33063$as_echo "$as_me: failed program was:" >&5
33064sed 's/^/| /' conftest.$ac_ext >&5
33065
33066{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33068as_fn_error 77 "C compiler cannot create executables
33069See \`config.log' for more details" "$LINENO" 5; }
33070else
33071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33072$as_echo "yes" >&6; }
33073fi
33074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33075$as_echo_n "checking for C compiler default output file name... " >&6; }
33076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33077$as_echo "$ac_file" >&6; }
33078ac_exeext=$ac_cv_exeext
33079
33080rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33081ac_clean_files=$ac_clean_files_save
33082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33083$as_echo_n "checking for suffix of executables... " >&6; }
33084if { { ac_try="$ac_link"
33085case "(($ac_try" in
33086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33087  *) ac_try_echo=$ac_try;;
33088esac
33089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33090$as_echo "$ac_try_echo"; } >&5
33091  (eval "$ac_link") 2>&5
33092  ac_status=$?
33093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33094  test $ac_status = 0; }; then :
33095  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33096# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33097# work properly (i.e., refer to `conftest.exe'), while it won't with
33098# `rm'.
33099for ac_file in conftest.exe conftest conftest.*; do
33100  test -f "$ac_file" || continue
33101  case $ac_file in
33102    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33103    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33104	  break;;
33105    * ) break;;
33106  esac
33107done
33108else
33109  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33111as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33112See \`config.log' for more details" "$LINENO" 5; }
33113fi
33114rm -f conftest conftest$ac_cv_exeext
33115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33116$as_echo "$ac_cv_exeext" >&6; }
33117
33118rm -f conftest.$ac_ext
33119EXEEXT=$ac_cv_exeext
33120ac_exeext=$EXEEXT
33121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33122/* end confdefs.h.  */
33123#include <stdio.h>
33124int
33125main ()
33126{
33127FILE *f = fopen ("conftest.out", "w");
33128 return ferror (f) || fclose (f) != 0;
33129
33130  ;
33131  return 0;
33132}
33133_ACEOF
33134ac_clean_files="$ac_clean_files conftest.out"
33135# Check that the compiler produces executables we can run.  If not, either
33136# the compiler is broken, or we cross compile.
33137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33138$as_echo_n "checking whether we are cross compiling... " >&6; }
33139if test "$cross_compiling" != yes; then
33140  { { ac_try="$ac_link"
33141case "(($ac_try" in
33142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33143  *) ac_try_echo=$ac_try;;
33144esac
33145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33146$as_echo "$ac_try_echo"; } >&5
33147  (eval "$ac_link") 2>&5
33148  ac_status=$?
33149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33150  test $ac_status = 0; }
33151  if { ac_try='./conftest$ac_cv_exeext'
33152  { { case "(($ac_try" in
33153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33154  *) ac_try_echo=$ac_try;;
33155esac
33156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33157$as_echo "$ac_try_echo"; } >&5
33158  (eval "$ac_try") 2>&5
33159  ac_status=$?
33160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33161  test $ac_status = 0; }; }; then
33162    cross_compiling=no
33163  else
33164    if test "$cross_compiling" = maybe; then
33165	cross_compiling=yes
33166    else
33167	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33169as_fn_error $? "cannot run C compiled programs.
33170If you meant to cross compile, use \`--host'.
33171See \`config.log' for more details" "$LINENO" 5; }
33172    fi
33173  fi
33174fi
33175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33176$as_echo "$cross_compiling" >&6; }
33177
33178rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33179ac_clean_files=$ac_clean_files_save
33180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33181$as_echo_n "checking for suffix of object files... " >&6; }
33182if ${ac_cv_objext+:} false; then :
33183  $as_echo_n "(cached) " >&6
33184else
33185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33186/* end confdefs.h.  */
33187
33188int
33189main ()
33190{
33191
33192  ;
33193  return 0;
33194}
33195_ACEOF
33196rm -f conftest.o conftest.obj
33197if { { ac_try="$ac_compile"
33198case "(($ac_try" in
33199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33200  *) ac_try_echo=$ac_try;;
33201esac
33202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33203$as_echo "$ac_try_echo"; } >&5
33204  (eval "$ac_compile") 2>&5
33205  ac_status=$?
33206  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33207  test $ac_status = 0; }; then :
33208  for ac_file in conftest.o conftest.obj conftest.*; do
33209  test -f "$ac_file" || continue;
33210  case $ac_file in
33211    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33212    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33213       break;;
33214  esac
33215done
33216else
33217  $as_echo "$as_me: failed program was:" >&5
33218sed 's/^/| /' conftest.$ac_ext >&5
33219
33220{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33222as_fn_error $? "cannot compute suffix of object files: cannot compile
33223See \`config.log' for more details" "$LINENO" 5; }
33224fi
33225rm -f conftest.$ac_cv_objext conftest.$ac_ext
33226fi
33227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33228$as_echo "$ac_cv_objext" >&6; }
33229OBJEXT=$ac_cv_objext
33230ac_objext=$OBJEXT
33231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33232$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33233if ${ac_cv_c_compiler_gnu+:} false; then :
33234  $as_echo_n "(cached) " >&6
33235else
33236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33237/* end confdefs.h.  */
33238
33239int
33240main ()
33241{
33242#ifndef __GNUC__
33243       choke me
33244#endif
33245
33246  ;
33247  return 0;
33248}
33249_ACEOF
33250if ac_fn_c_try_compile "$LINENO"; then :
33251  ac_compiler_gnu=yes
33252else
33253  ac_compiler_gnu=no
33254fi
33255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33256ac_cv_c_compiler_gnu=$ac_compiler_gnu
33257
33258fi
33259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33260$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33261if test $ac_compiler_gnu = yes; then
33262  GCC=yes
33263else
33264  GCC=
33265fi
33266ac_test_CFLAGS=${CFLAGS+set}
33267ac_save_CFLAGS=$CFLAGS
33268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33269$as_echo_n "checking whether $CC accepts -g... " >&6; }
33270if ${ac_cv_prog_cc_g+:} false; then :
33271  $as_echo_n "(cached) " >&6
33272else
33273  ac_save_c_werror_flag=$ac_c_werror_flag
33274   ac_c_werror_flag=yes
33275   ac_cv_prog_cc_g=no
33276   CFLAGS="-g"
33277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33278/* end confdefs.h.  */
33279
33280int
33281main ()
33282{
33283
33284  ;
33285  return 0;
33286}
33287_ACEOF
33288if ac_fn_c_try_compile "$LINENO"; then :
33289  ac_cv_prog_cc_g=yes
33290else
33291  CFLAGS=""
33292      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33293/* end confdefs.h.  */
33294
33295int
33296main ()
33297{
33298
33299  ;
33300  return 0;
33301}
33302_ACEOF
33303if ac_fn_c_try_compile "$LINENO"; then :
33304
33305else
33306  ac_c_werror_flag=$ac_save_c_werror_flag
33307	 CFLAGS="-g"
33308	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33309/* end confdefs.h.  */
33310
33311int
33312main ()
33313{
33314
33315  ;
33316  return 0;
33317}
33318_ACEOF
33319if ac_fn_c_try_compile "$LINENO"; then :
33320  ac_cv_prog_cc_g=yes
33321fi
33322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33323fi
33324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33325fi
33326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33327   ac_c_werror_flag=$ac_save_c_werror_flag
33328fi
33329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33330$as_echo "$ac_cv_prog_cc_g" >&6; }
33331if test "$ac_test_CFLAGS" = set; then
33332  CFLAGS=$ac_save_CFLAGS
33333elif test $ac_cv_prog_cc_g = yes; then
33334  if test "$GCC" = yes; then
33335    CFLAGS="-g -O2"
33336  else
33337    CFLAGS="-g"
33338  fi
33339else
33340  if test "$GCC" = yes; then
33341    CFLAGS="-O2"
33342  else
33343    CFLAGS=
33344  fi
33345fi
33346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33347$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33348if ${ac_cv_prog_cc_c89+:} false; then :
33349  $as_echo_n "(cached) " >&6
33350else
33351  ac_cv_prog_cc_c89=no
33352ac_save_CC=$CC
33353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33354/* end confdefs.h.  */
33355#include <stdarg.h>
33356#include <stdio.h>
33357struct stat;
33358/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33359struct buf { int x; };
33360FILE * (*rcsopen) (struct buf *, struct stat *, int);
33361static char *e (p, i)
33362     char **p;
33363     int i;
33364{
33365  return p[i];
33366}
33367static char *f (char * (*g) (char **, int), char **p, ...)
33368{
33369  char *s;
33370  va_list v;
33371  va_start (v,p);
33372  s = g (p, va_arg (v,int));
33373  va_end (v);
33374  return s;
33375}
33376
33377/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33378   function prototypes and stuff, but not '\xHH' hex character constants.
33379   These don't provoke an error unfortunately, instead are silently treated
33380   as 'x'.  The following induces an error, until -std is added to get
33381   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33382   array size at least.  It's necessary to write '\x00'==0 to get something
33383   that's true only with -std.  */
33384int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33385
33386/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33387   inside strings and character constants.  */
33388#define FOO(x) 'x'
33389int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33390
33391int test (int i, double x);
33392struct s1 {int (*f) (int a);};
33393struct s2 {int (*f) (double a);};
33394int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33395int argc;
33396char **argv;
33397int
33398main ()
33399{
33400return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33401  ;
33402  return 0;
33403}
33404_ACEOF
33405for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33406	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33407do
33408  CC="$ac_save_CC $ac_arg"
33409  if ac_fn_c_try_compile "$LINENO"; then :
33410  ac_cv_prog_cc_c89=$ac_arg
33411fi
33412rm -f core conftest.err conftest.$ac_objext
33413  test "x$ac_cv_prog_cc_c89" != "xno" && break
33414done
33415rm -f conftest.$ac_ext
33416CC=$ac_save_CC
33417
33418fi
33419# AC_CACHE_VAL
33420case "x$ac_cv_prog_cc_c89" in
33421  x)
33422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33423$as_echo "none needed" >&6; } ;;
33424  xno)
33425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33426$as_echo "unsupported" >&6; } ;;
33427  *)
33428    CC="$CC $ac_cv_prog_cc_c89"
33429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33430$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33431esac
33432if test "x$ac_cv_prog_cc_c89" != xno; then :
33433
33434fi
33435
33436ac_ext=cpp
33437ac_cpp='$CXXCPP $CPPFLAGS'
33438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33441
33442
33443
33444  COMPILER_NAME=C++
33445  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33446
33447  if test "x$CXX" != x; then
33448    # User has supplied compiler name already, always let that override.
33449    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33450$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33451    if test "x`basename $CXX`" = "x$CXX"; then
33452      # A command without a complete path is provided, search $PATH.
33453
33454      for ac_prog in $CXX
33455do
33456  # Extract the first word of "$ac_prog", so it can be a program name with args.
33457set dummy $ac_prog; ac_word=$2
33458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33459$as_echo_n "checking for $ac_word... " >&6; }
33460if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33461  $as_echo_n "(cached) " >&6
33462else
33463  case $POTENTIAL_CXX in
33464  [\\/]* | ?:[\\/]*)
33465  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33466  ;;
33467  *)
33468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33469for as_dir in $PATH
33470do
33471  IFS=$as_save_IFS
33472  test -z "$as_dir" && as_dir=.
33473    for ac_exec_ext in '' $ac_executable_extensions; do
33474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33475    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33477    break 2
33478  fi
33479done
33480  done
33481IFS=$as_save_IFS
33482
33483  ;;
33484esac
33485fi
33486POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33487if test -n "$POTENTIAL_CXX"; then
33488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33489$as_echo "$POTENTIAL_CXX" >&6; }
33490else
33491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33492$as_echo "no" >&6; }
33493fi
33494
33495
33496  test -n "$POTENTIAL_CXX" && break
33497done
33498
33499      if test "x$POTENTIAL_CXX" != x; then
33500        CXX=$POTENTIAL_CXX
33501      else
33502        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33503      fi
33504    else
33505      # Otherwise it might already be a complete path
33506      if test ! -x "$CXX"; then
33507        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33508      fi
33509    fi
33510  else
33511    # No user supplied value. Locate compiler ourselves.
33512
33513    # If we are cross compiling, assume cross compilation tools follows the
33514    # cross compilation standard where they are prefixed with the autoconf
33515    # standard name for the target. For example the binary
33516    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33517    # If we are not cross compiling, then the default compiler name will be
33518    # used.
33519
33520    CXX=
33521    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33522    # before checking the rest of the PATH.
33523    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33524    # step, this should not be necessary.
33525    if test -n "$TOOLCHAIN_PATH"; then
33526      PATH_save="$PATH"
33527      PATH="$TOOLCHAIN_PATH"
33528      for ac_prog in $SEARCH_LIST
33529do
33530  # Extract the first word of "$ac_prog", so it can be a program name with args.
33531set dummy $ac_prog; ac_word=$2
33532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33533$as_echo_n "checking for $ac_word... " >&6; }
33534if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33535  $as_echo_n "(cached) " >&6
33536else
33537  case $TOOLCHAIN_PATH_CXX in
33538  [\\/]* | ?:[\\/]*)
33539  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33540  ;;
33541  *)
33542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33543for as_dir in $PATH
33544do
33545  IFS=$as_save_IFS
33546  test -z "$as_dir" && as_dir=.
33547    for ac_exec_ext in '' $ac_executable_extensions; do
33548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33549    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33551    break 2
33552  fi
33553done
33554  done
33555IFS=$as_save_IFS
33556
33557  ;;
33558esac
33559fi
33560TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33561if test -n "$TOOLCHAIN_PATH_CXX"; then
33562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33563$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33564else
33565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33566$as_echo "no" >&6; }
33567fi
33568
33569
33570  test -n "$TOOLCHAIN_PATH_CXX" && break
33571done
33572
33573      CXX=$TOOLCHAIN_PATH_CXX
33574      PATH="$PATH_save"
33575    fi
33576
33577    # AC_PATH_PROGS can't be run multiple times with the same variable,
33578    # so create a new name for this run.
33579    if test "x$CXX" = x; then
33580      for ac_prog in $SEARCH_LIST
33581do
33582  # Extract the first word of "$ac_prog", so it can be a program name with args.
33583set dummy $ac_prog; ac_word=$2
33584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33585$as_echo_n "checking for $ac_word... " >&6; }
33586if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33587  $as_echo_n "(cached) " >&6
33588else
33589  case $POTENTIAL_CXX in
33590  [\\/]* | ?:[\\/]*)
33591  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33592  ;;
33593  *)
33594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33595for as_dir in $PATH
33596do
33597  IFS=$as_save_IFS
33598  test -z "$as_dir" && as_dir=.
33599    for ac_exec_ext in '' $ac_executable_extensions; do
33600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33601    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33603    break 2
33604  fi
33605done
33606  done
33607IFS=$as_save_IFS
33608
33609  ;;
33610esac
33611fi
33612POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33613if test -n "$POTENTIAL_CXX"; then
33614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33615$as_echo "$POTENTIAL_CXX" >&6; }
33616else
33617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33618$as_echo "no" >&6; }
33619fi
33620
33621
33622  test -n "$POTENTIAL_CXX" && break
33623done
33624
33625      CXX=$POTENTIAL_CXX
33626    fi
33627
33628    if test "x$CXX" = x; then
33629
33630  # Print a helpful message on how to acquire the necessary build dependency.
33631  # devkit is the help tag: freetype, cups, alsa etc
33632  MISSING_DEPENDENCY=devkit
33633
33634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33635    cygwin_help $MISSING_DEPENDENCY
33636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33637    msys_help $MISSING_DEPENDENCY
33638  else
33639    PKGHANDLER_COMMAND=
33640
33641    case $PKGHANDLER in
33642      apt-get)
33643        apt_help     $MISSING_DEPENDENCY ;;
33644      yum)
33645        yum_help     $MISSING_DEPENDENCY ;;
33646      port)
33647        port_help    $MISSING_DEPENDENCY ;;
33648      pkgutil)
33649        pkgutil_help $MISSING_DEPENDENCY ;;
33650      pkgadd)
33651        pkgadd_help  $MISSING_DEPENDENCY ;;
33652    esac
33653
33654    if test "x$PKGHANDLER_COMMAND" != x; then
33655      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33656    fi
33657  fi
33658
33659      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33660    fi
33661  fi
33662
33663  # Now we have a compiler binary in CXX. Make sure it's okay.
33664
33665  # Only process if variable expands to non-empty
33666
33667  if test "x$CXX" != x; then
33668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33669
33670  # First separate the path from the arguments. This will split at the first
33671  # space.
33672  complete="$CXX"
33673  path="${complete%% *}"
33674  tmp="$complete EOL"
33675  arguments="${tmp#* }"
33676
33677  # Input might be given as Windows format, start by converting to
33678  # unix format.
33679  new_path=`$CYGPATH -u "$path"`
33680
33681  # Now try to locate executable using which
33682  new_path=`$WHICH "$new_path" 2> /dev/null`
33683  # bat and cmd files are not always considered executable in cygwin causing which
33684  # to not find them
33685  if test "x$new_path" = x \
33686      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33687      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33688    new_path=`$CYGPATH -u "$path"`
33689  fi
33690  if test "x$new_path" = x; then
33691    # Oops. Which didn't find the executable.
33692    # The splitting of arguments from the executable at a space might have been incorrect,
33693    # since paths with space are more likely in Windows. Give it another try with the whole
33694    # argument.
33695    path="$complete"
33696    arguments="EOL"
33697    new_path=`$CYGPATH -u "$path"`
33698    new_path=`$WHICH "$new_path" 2> /dev/null`
33699    # bat and cmd files are not always considered executable in cygwin causing which
33700    # to not find them
33701    if test "x$new_path" = x \
33702        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33703        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33704      new_path=`$CYGPATH -u "$path"`
33705    fi
33706    if test "x$new_path" = x; then
33707      # It's still not found. Now this is an unrecoverable error.
33708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33709$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33710      has_space=`$ECHO "$complete" | $GREP " "`
33711      if test "x$has_space" != x; then
33712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33714      fi
33715      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33716    fi
33717  fi
33718
33719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33722  # "foo.exe" is OK but "foo" is an error.
33723  #
33724  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33725  # It is also a way to make sure we got the proper file name for the real test later on.
33726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33727  if test "x$test_shortpath" = x; then
33728    # Short path failed, file does not exist as specified.
33729    # Try adding .exe or .cmd
33730    if test -f "${new_path}.exe"; then
33731      input_to_shortpath="${new_path}.exe"
33732    elif test -f "${new_path}.cmd"; then
33733      input_to_shortpath="${new_path}.cmd"
33734    else
33735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33736$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33739      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33740    fi
33741  else
33742    input_to_shortpath="$new_path"
33743  fi
33744
33745  # Call helper function which possibly converts this using DOS-style short mode.
33746  # If so, the updated path is stored in $new_path.
33747  new_path="$input_to_shortpath"
33748
33749  input_path="$input_to_shortpath"
33750  # Check if we need to convert this using DOS-style short mode. If the path
33751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33752  # take no chances and rewrite it.
33753  # Note: m4 eats our [], so we need to use [ and ] instead.
33754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33755  if test "x$has_forbidden_chars" != x; then
33756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33760      # Going to short mode and back again did indeed matter. Since short mode is
33761      # case insensitive, let's make it lowercase to improve readability.
33762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33763      # Now convert it back to Unix-style (cygpath)
33764      input_path=`$CYGPATH -u "$shortmode_path"`
33765      new_path="$input_path"
33766    fi
33767  fi
33768
33769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33770  if test "x$test_cygdrive_prefix" = x; then
33771    # As a simple fix, exclude /usr/bin since it's not a real path.
33772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33774      # a path prefixed by /cygdrive for fixpath to work.
33775      new_path="$CYGWIN_ROOT_PATH$input_path"
33776    fi
33777  fi
33778
33779  # remove trailing .exe if any
33780  new_path="${new_path/%.exe/}"
33781
33782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33783
33784  # First separate the path from the arguments. This will split at the first
33785  # space.
33786  complete="$CXX"
33787  path="${complete%% *}"
33788  tmp="$complete EOL"
33789  arguments="${tmp#* }"
33790
33791  # Input might be given as Windows format, start by converting to
33792  # unix format.
33793  new_path="$path"
33794
33795  windows_path="$new_path"
33796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33797    unix_path=`$CYGPATH -u "$windows_path"`
33798    new_path="$unix_path"
33799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33801    new_path="$unix_path"
33802  fi
33803
33804
33805  # Now try to locate executable using which
33806  new_path=`$WHICH "$new_path" 2> /dev/null`
33807
33808  if test "x$new_path" = x; then
33809    # Oops. Which didn't find the executable.
33810    # The splitting of arguments from the executable at a space might have been incorrect,
33811    # since paths with space are more likely in Windows. Give it another try with the whole
33812    # argument.
33813    path="$complete"
33814    arguments="EOL"
33815    new_path="$path"
33816
33817  windows_path="$new_path"
33818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33819    unix_path=`$CYGPATH -u "$windows_path"`
33820    new_path="$unix_path"
33821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33823    new_path="$unix_path"
33824  fi
33825
33826
33827    new_path=`$WHICH "$new_path" 2> /dev/null`
33828    # bat and cmd files are not always considered executable in MSYS causing which
33829    # to not find them
33830    if test "x$new_path" = x \
33831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33833      new_path="$path"
33834
33835  windows_path="$new_path"
33836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33837    unix_path=`$CYGPATH -u "$windows_path"`
33838    new_path="$unix_path"
33839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33841    new_path="$unix_path"
33842  fi
33843
33844    fi
33845
33846    if test "x$new_path" = x; then
33847      # It's still not found. Now this is an unrecoverable error.
33848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33849$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33850      has_space=`$ECHO "$complete" | $GREP " "`
33851      if test "x$has_space" != x; then
33852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33854      fi
33855      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33856    fi
33857  fi
33858
33859  # Now new_path has a complete unix path to the binary
33860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33861    # Keep paths in /bin as-is, but remove trailing .exe if any
33862    new_path="${new_path/%.exe/}"
33863    # Do not save /bin paths to all_fixpath_prefixes!
33864  else
33865    # Not in mixed or Windows style, start by that.
33866    new_path=`cmd //c echo $new_path`
33867
33868  input_path="$new_path"
33869  # Check if we need to convert this using DOS-style short mode. If the path
33870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33871  # take no chances and rewrite it.
33872  # Note: m4 eats our [], so we need to use [ and ] instead.
33873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33874  if test "x$has_forbidden_chars" != x; then
33875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33877  fi
33878
33879    # Output is in $new_path
33880
33881  windows_path="$new_path"
33882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33883    unix_path=`$CYGPATH -u "$windows_path"`
33884    new_path="$unix_path"
33885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33887    new_path="$unix_path"
33888  fi
33889
33890    # remove trailing .exe if any
33891    new_path="${new_path/%.exe/}"
33892
33893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33895  fi
33896
33897    else
33898      # We're on a unix platform. Hooray! :)
33899      # First separate the path from the arguments. This will split at the first
33900      # space.
33901      complete="$CXX"
33902      path="${complete%% *}"
33903      tmp="$complete EOL"
33904      arguments="${tmp#* }"
33905
33906      # Cannot rely on the command "which" here since it doesn't always work.
33907      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33908      if test -z "$is_absolute_path"; then
33909        # Path to executable is not absolute. Find it.
33910        IFS_save="$IFS"
33911        IFS=:
33912        for p in $PATH; do
33913          if test -f "$p/$path" && test -x "$p/$path"; then
33914            new_path="$p/$path"
33915            break
33916          fi
33917        done
33918        IFS="$IFS_save"
33919      else
33920        # This is an absolute path, we can use it without further modifications.
33921        new_path="$path"
33922      fi
33923
33924      if test "x$new_path" = x; then
33925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33926$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33927        has_space=`$ECHO "$complete" | $GREP " "`
33928        if test "x$has_space" != x; then
33929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33931        fi
33932        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33933      fi
33934    fi
33935
33936    # Now join together the path and the arguments once again
33937    if test "x$arguments" != xEOL; then
33938      new_complete="$new_path ${arguments% *}"
33939    else
33940      new_complete="$new_path"
33941    fi
33942
33943    if test "x$complete" != "x$new_complete"; then
33944      CXX="$new_complete"
33945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33946$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33947    fi
33948  fi
33949
33950  TEST_COMPILER="$CXX"
33951
33952  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33953$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33954  SYMLINK_ORIGINAL="$TEST_COMPILER"
33955
33956  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33957    # Follow a chain of symbolic links. Use readlink
33958    # where it exists, else fall back to horribly
33959    # complicated shell code.
33960    if test "x$READLINK_TESTED" != yes; then
33961      # On MacOSX there is a readlink tool with a different
33962      # purpose than the GNU readlink tool. Check the found readlink.
33963      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33964      if test "x$ISGNU" = x; then
33965        # A readlink that we do not know how to use.
33966        # Are there other non-GNU readlinks out there?
33967        READLINK_TESTED=yes
33968        READLINK=
33969      fi
33970    fi
33971
33972    if test "x$READLINK" != x; then
33973      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33974    else
33975      # Save the current directory for restoring afterwards
33976      STARTDIR=$PWD
33977      COUNTER=0
33978      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33979      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33980      cd $sym_link_dir
33981      # Use -P flag to resolve symlinks in directories.
33982      cd `$THEPWDCMD -P`
33983      sym_link_dir=`$THEPWDCMD -P`
33984      # Resolve file symlinks
33985      while test $COUNTER -lt 20; do
33986        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33987        if test "x$ISLINK" == x; then
33988          # This is not a symbolic link! We are done!
33989          break
33990        fi
33991        # Again resolve directory symlinks since the target of the just found
33992        # link could be in a different directory
33993        cd `$DIRNAME $ISLINK`
33994        sym_link_dir=`$THEPWDCMD -P`
33995        sym_link_file=`$BASENAME $ISLINK`
33996        let COUNTER=COUNTER+1
33997      done
33998      cd $STARTDIR
33999      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34000    fi
34001  fi
34002
34003  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34005$as_echo "no symlink" >&6; }
34006  else
34007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34008$as_echo "$SYMLINK_ORIGINAL" >&6; }
34009
34010    # We can't handle ccache by gcc wrappers, since we need to know if we're
34011    # using ccache. Instead ccache usage must be controlled by a configure option.
34012    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34013    if test "x$COMPILER_BASENAME" = "xccache"; then
34014      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34015$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34016      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34017    fi
34018  fi
34019
34020
34021  COMPILER=$CXX
34022  COMPILER_NAME=$COMPILER_NAME
34023
34024  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34025    # cc -V output typically looks like
34026    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34027    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34028    # Check that this is likely to be the Solaris Studio cc.
34029    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34030    if test $? -ne 0; then
34031      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34032      { $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
34033$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34034      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34035$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34036      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34037$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34038      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34039    fi
34040    # Remove usage instructions (if present), and
34041    # collapse compiler output into a single line
34042    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34043        $SED -e 's/ *[Uu]sage:.*//'`
34044    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34045        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34046  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34047    # xlc -qversion output typically looks like
34048    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34049    #     Version: 11.01.0000.0015
34050    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34051    # Check that this is likely to be the IBM XL C compiler.
34052    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34053    if test $? -ne 0; then
34054      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34055      { $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
34056$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34058$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34059      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34060$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34061      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34062    fi
34063    # Collapse compiler output into a single line
34064    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34065    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34066        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34067  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34068    # There is no specific version flag, but all output starts with a version string.
34069    # First line typically looks something like:
34070    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34071    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34072    # Check that this is likely to be Microsoft CL.EXE.
34073    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34074    if test $? -ne 0; then
34075      { $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
34076$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34077      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34078$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34079      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34080    fi
34081    # Collapse compiler output into a single line
34082    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34083    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34084        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34085  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34086    # gcc --version output typically looks like
34087    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34088    #     Copyright (C) 2013 Free Software Foundation, Inc.
34089    #     This is free software; see the source for copying conditions.  There is NO
34090    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34091    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34092    # Check that this is likely to be GCC.
34093    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34094    if test $? -ne 0; then
34095      { $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
34096$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34097      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34098$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34099      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34100    fi
34101    # Remove Copyright and legalese from version string, and
34102    # collapse into a single line
34103    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34104        $SED -e 's/ *Copyright .*//'`
34105    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34106        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34107  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34108    # clang --version output typically looks like
34109    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34110    #    clang version 3.3 (tags/RELEASE_33/final)
34111    # or
34112    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34113    #    Target: x86_64-pc-linux-gnu
34114    #    Thread model: posix
34115    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34116    # Check that this is likely to be clang
34117    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34118    if test $? -ne 0; then
34119      { $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
34120$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34122$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34124    fi
34125    # Collapse compiler output into a single line
34126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34128        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34129  else
34130      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34131  fi
34132  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34133  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34134  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34135  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34136
34137  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34138$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34139
34140
34141  # Now that we have resolved CXX ourself, let autoconf have its go at it
34142  ac_ext=cpp
34143ac_cpp='$CXXCPP $CPPFLAGS'
34144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34147if test -z "$CXX"; then
34148  if test -n "$CCC"; then
34149    CXX=$CCC
34150  else
34151    if test -n "$ac_tool_prefix"; then
34152  for ac_prog in $CXX
34153  do
34154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34157$as_echo_n "checking for $ac_word... " >&6; }
34158if ${ac_cv_prog_CXX+:} false; then :
34159  $as_echo_n "(cached) " >&6
34160else
34161  if test -n "$CXX"; then
34162  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34163else
34164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34165for as_dir in $PATH
34166do
34167  IFS=$as_save_IFS
34168  test -z "$as_dir" && as_dir=.
34169    for ac_exec_ext in '' $ac_executable_extensions; do
34170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34171    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34173    break 2
34174  fi
34175done
34176  done
34177IFS=$as_save_IFS
34178
34179fi
34180fi
34181CXX=$ac_cv_prog_CXX
34182if test -n "$CXX"; then
34183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34184$as_echo "$CXX" >&6; }
34185else
34186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34187$as_echo "no" >&6; }
34188fi
34189
34190
34191    test -n "$CXX" && break
34192  done
34193fi
34194if test -z "$CXX"; then
34195  ac_ct_CXX=$CXX
34196  for ac_prog in $CXX
34197do
34198  # Extract the first word of "$ac_prog", so it can be a program name with args.
34199set dummy $ac_prog; ac_word=$2
34200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34201$as_echo_n "checking for $ac_word... " >&6; }
34202if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34203  $as_echo_n "(cached) " >&6
34204else
34205  if test -n "$ac_ct_CXX"; then
34206  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34207else
34208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34209for as_dir in $PATH
34210do
34211  IFS=$as_save_IFS
34212  test -z "$as_dir" && as_dir=.
34213    for ac_exec_ext in '' $ac_executable_extensions; do
34214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34215    ac_cv_prog_ac_ct_CXX="$ac_prog"
34216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34217    break 2
34218  fi
34219done
34220  done
34221IFS=$as_save_IFS
34222
34223fi
34224fi
34225ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34226if test -n "$ac_ct_CXX"; then
34227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34228$as_echo "$ac_ct_CXX" >&6; }
34229else
34230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34231$as_echo "no" >&6; }
34232fi
34233
34234
34235  test -n "$ac_ct_CXX" && break
34236done
34237
34238  if test "x$ac_ct_CXX" = x; then
34239    CXX="g++"
34240  else
34241    case $cross_compiling:$ac_tool_warned in
34242yes:)
34243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34245ac_tool_warned=yes ;;
34246esac
34247    CXX=$ac_ct_CXX
34248  fi
34249fi
34250
34251  fi
34252fi
34253# Provide some information about the compiler.
34254$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34255set X $ac_compile
34256ac_compiler=$2
34257for ac_option in --version -v -V -qversion; do
34258  { { ac_try="$ac_compiler $ac_option >&5"
34259case "(($ac_try" in
34260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34261  *) ac_try_echo=$ac_try;;
34262esac
34263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34264$as_echo "$ac_try_echo"; } >&5
34265  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34266  ac_status=$?
34267  if test -s conftest.err; then
34268    sed '10a\
34269... rest of stderr output deleted ...
34270         10q' conftest.err >conftest.er1
34271    cat conftest.er1 >&5
34272  fi
34273  rm -f conftest.er1 conftest.err
34274  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34275  test $ac_status = 0; }
34276done
34277
34278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34279$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34280if ${ac_cv_cxx_compiler_gnu+:} false; then :
34281  $as_echo_n "(cached) " >&6
34282else
34283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34284/* end confdefs.h.  */
34285
34286int
34287main ()
34288{
34289#ifndef __GNUC__
34290       choke me
34291#endif
34292
34293  ;
34294  return 0;
34295}
34296_ACEOF
34297if ac_fn_cxx_try_compile "$LINENO"; then :
34298  ac_compiler_gnu=yes
34299else
34300  ac_compiler_gnu=no
34301fi
34302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34303ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34304
34305fi
34306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34307$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34308if test $ac_compiler_gnu = yes; then
34309  GXX=yes
34310else
34311  GXX=
34312fi
34313ac_test_CXXFLAGS=${CXXFLAGS+set}
34314ac_save_CXXFLAGS=$CXXFLAGS
34315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34316$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34317if ${ac_cv_prog_cxx_g+:} false; then :
34318  $as_echo_n "(cached) " >&6
34319else
34320  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34321   ac_cxx_werror_flag=yes
34322   ac_cv_prog_cxx_g=no
34323   CXXFLAGS="-g"
34324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34325/* end confdefs.h.  */
34326
34327int
34328main ()
34329{
34330
34331  ;
34332  return 0;
34333}
34334_ACEOF
34335if ac_fn_cxx_try_compile "$LINENO"; then :
34336  ac_cv_prog_cxx_g=yes
34337else
34338  CXXFLAGS=""
34339      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34340/* end confdefs.h.  */
34341
34342int
34343main ()
34344{
34345
34346  ;
34347  return 0;
34348}
34349_ACEOF
34350if ac_fn_cxx_try_compile "$LINENO"; then :
34351
34352else
34353  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34354	 CXXFLAGS="-g"
34355	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34356/* end confdefs.h.  */
34357
34358int
34359main ()
34360{
34361
34362  ;
34363  return 0;
34364}
34365_ACEOF
34366if ac_fn_cxx_try_compile "$LINENO"; then :
34367  ac_cv_prog_cxx_g=yes
34368fi
34369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34370fi
34371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34372fi
34373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34374   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34375fi
34376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34377$as_echo "$ac_cv_prog_cxx_g" >&6; }
34378if test "$ac_test_CXXFLAGS" = set; then
34379  CXXFLAGS=$ac_save_CXXFLAGS
34380elif test $ac_cv_prog_cxx_g = yes; then
34381  if test "$GXX" = yes; then
34382    CXXFLAGS="-g -O2"
34383  else
34384    CXXFLAGS="-g"
34385  fi
34386else
34387  if test "$GXX" = yes; then
34388    CXXFLAGS="-O2"
34389  else
34390    CXXFLAGS=
34391  fi
34392fi
34393ac_ext=cpp
34394ac_cpp='$CXXCPP $CPPFLAGS'
34395ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34396ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34397ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34398
34399
34400  # This is the compiler version number on the form X.Y[.Z]
34401
34402
34403
34404
34405  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34407$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34409$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34410  fi
34411
34412  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34413  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34415$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34416  fi
34417
34418  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34419    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34420$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34421  fi
34422
34423  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34424
34425
34426  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469    # Execute function body
34470
34471  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34472  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34473
34474  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34475    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34476  fi
34477
34478  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34479    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34480  fi
34481
34482  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34483  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34484
34485  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34486    :
34487
34488  else
34489    :
34490
34491          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
34492$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34493
34494
34495  fi
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508  fi
34509
34510  #
34511  # Setup the preprocessor (CPP and CXXCPP)
34512  #
34513  ac_ext=c
34514ac_cpp='$CPP $CPPFLAGS'
34515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34516ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34517ac_compiler_gnu=$ac_cv_c_compiler_gnu
34518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34519$as_echo_n "checking how to run the C preprocessor... " >&6; }
34520# On Suns, sometimes $CPP names a directory.
34521if test -n "$CPP" && test -d "$CPP"; then
34522  CPP=
34523fi
34524if test -z "$CPP"; then
34525  if ${ac_cv_prog_CPP+:} false; then :
34526  $as_echo_n "(cached) " >&6
34527else
34528      # Double quotes because CPP needs to be expanded
34529    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34530    do
34531      ac_preproc_ok=false
34532for ac_c_preproc_warn_flag in '' yes
34533do
34534  # Use a header file that comes with gcc, so configuring glibc
34535  # with a fresh cross-compiler works.
34536  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34537  # <limits.h> exists even on freestanding compilers.
34538  # On the NeXT, cc -E runs the code through the compiler's parser,
34539  # not just through cpp. "Syntax error" is here to catch this case.
34540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34541/* end confdefs.h.  */
34542#ifdef __STDC__
34543# include <limits.h>
34544#else
34545# include <assert.h>
34546#endif
34547		     Syntax error
34548_ACEOF
34549if ac_fn_c_try_cpp "$LINENO"; then :
34550
34551else
34552  # Broken: fails on valid input.
34553continue
34554fi
34555rm -f conftest.err conftest.i conftest.$ac_ext
34556
34557  # OK, works on sane cases.  Now check whether nonexistent headers
34558  # can be detected and how.
34559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34560/* end confdefs.h.  */
34561#include <ac_nonexistent.h>
34562_ACEOF
34563if ac_fn_c_try_cpp "$LINENO"; then :
34564  # Broken: success on invalid input.
34565continue
34566else
34567  # Passes both tests.
34568ac_preproc_ok=:
34569break
34570fi
34571rm -f conftest.err conftest.i conftest.$ac_ext
34572
34573done
34574# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34575rm -f conftest.i conftest.err conftest.$ac_ext
34576if $ac_preproc_ok; then :
34577  break
34578fi
34579
34580    done
34581    ac_cv_prog_CPP=$CPP
34582
34583fi
34584  CPP=$ac_cv_prog_CPP
34585else
34586  ac_cv_prog_CPP=$CPP
34587fi
34588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34589$as_echo "$CPP" >&6; }
34590ac_preproc_ok=false
34591for ac_c_preproc_warn_flag in '' yes
34592do
34593  # Use a header file that comes with gcc, so configuring glibc
34594  # with a fresh cross-compiler works.
34595  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34596  # <limits.h> exists even on freestanding compilers.
34597  # On the NeXT, cc -E runs the code through the compiler's parser,
34598  # not just through cpp. "Syntax error" is here to catch this case.
34599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34600/* end confdefs.h.  */
34601#ifdef __STDC__
34602# include <limits.h>
34603#else
34604# include <assert.h>
34605#endif
34606		     Syntax error
34607_ACEOF
34608if ac_fn_c_try_cpp "$LINENO"; then :
34609
34610else
34611  # Broken: fails on valid input.
34612continue
34613fi
34614rm -f conftest.err conftest.i conftest.$ac_ext
34615
34616  # OK, works on sane cases.  Now check whether nonexistent headers
34617  # can be detected and how.
34618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34619/* end confdefs.h.  */
34620#include <ac_nonexistent.h>
34621_ACEOF
34622if ac_fn_c_try_cpp "$LINENO"; then :
34623  # Broken: success on invalid input.
34624continue
34625else
34626  # Passes both tests.
34627ac_preproc_ok=:
34628break
34629fi
34630rm -f conftest.err conftest.i conftest.$ac_ext
34631
34632done
34633# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34634rm -f conftest.i conftest.err conftest.$ac_ext
34635if $ac_preproc_ok; then :
34636
34637else
34638  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34640as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34641See \`config.log' for more details" "$LINENO" 5; }
34642fi
34643
34644ac_ext=cpp
34645ac_cpp='$CXXCPP $CPPFLAGS'
34646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34647ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34649
34650
34651  # Only process if variable expands to non-empty
34652
34653  if test "x$CPP" != x; then
34654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34655
34656  # First separate the path from the arguments. This will split at the first
34657  # space.
34658  complete="$CPP"
34659  path="${complete%% *}"
34660  tmp="$complete EOL"
34661  arguments="${tmp#* }"
34662
34663  # Input might be given as Windows format, start by converting to
34664  # unix format.
34665  new_path=`$CYGPATH -u "$path"`
34666
34667  # Now try to locate executable using which
34668  new_path=`$WHICH "$new_path" 2> /dev/null`
34669  # bat and cmd files are not always considered executable in cygwin causing which
34670  # to not find them
34671  if test "x$new_path" = x \
34672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34674    new_path=`$CYGPATH -u "$path"`
34675  fi
34676  if test "x$new_path" = x; then
34677    # Oops. Which didn't find the executable.
34678    # The splitting of arguments from the executable at a space might have been incorrect,
34679    # since paths with space are more likely in Windows. Give it another try with the whole
34680    # argument.
34681    path="$complete"
34682    arguments="EOL"
34683    new_path=`$CYGPATH -u "$path"`
34684    new_path=`$WHICH "$new_path" 2> /dev/null`
34685    # bat and cmd files are not always considered executable in cygwin causing which
34686    # to not find them
34687    if test "x$new_path" = x \
34688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34690      new_path=`$CYGPATH -u "$path"`
34691    fi
34692    if test "x$new_path" = x; then
34693      # It's still not found. Now this is an unrecoverable error.
34694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34695$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34696      has_space=`$ECHO "$complete" | $GREP " "`
34697      if test "x$has_space" != x; then
34698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34700      fi
34701      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34702    fi
34703  fi
34704
34705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34708  # "foo.exe" is OK but "foo" is an error.
34709  #
34710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34711  # It is also a way to make sure we got the proper file name for the real test later on.
34712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34713  if test "x$test_shortpath" = x; then
34714    # Short path failed, file does not exist as specified.
34715    # Try adding .exe or .cmd
34716    if test -f "${new_path}.exe"; then
34717      input_to_shortpath="${new_path}.exe"
34718    elif test -f "${new_path}.cmd"; then
34719      input_to_shortpath="${new_path}.cmd"
34720    else
34721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34722$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34725      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34726    fi
34727  else
34728    input_to_shortpath="$new_path"
34729  fi
34730
34731  # Call helper function which possibly converts this using DOS-style short mode.
34732  # If so, the updated path is stored in $new_path.
34733  new_path="$input_to_shortpath"
34734
34735  input_path="$input_to_shortpath"
34736  # Check if we need to convert this using DOS-style short mode. If the path
34737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34738  # take no chances and rewrite it.
34739  # Note: m4 eats our [], so we need to use [ and ] instead.
34740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34741  if test "x$has_forbidden_chars" != x; then
34742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34746      # Going to short mode and back again did indeed matter. Since short mode is
34747      # case insensitive, let's make it lowercase to improve readability.
34748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34749      # Now convert it back to Unix-style (cygpath)
34750      input_path=`$CYGPATH -u "$shortmode_path"`
34751      new_path="$input_path"
34752    fi
34753  fi
34754
34755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34756  if test "x$test_cygdrive_prefix" = x; then
34757    # As a simple fix, exclude /usr/bin since it's not a real path.
34758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34760      # a path prefixed by /cygdrive for fixpath to work.
34761      new_path="$CYGWIN_ROOT_PATH$input_path"
34762    fi
34763  fi
34764
34765  # remove trailing .exe if any
34766  new_path="${new_path/%.exe/}"
34767
34768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34769
34770  # First separate the path from the arguments. This will split at the first
34771  # space.
34772  complete="$CPP"
34773  path="${complete%% *}"
34774  tmp="$complete EOL"
34775  arguments="${tmp#* }"
34776
34777  # Input might be given as Windows format, start by converting to
34778  # unix format.
34779  new_path="$path"
34780
34781  windows_path="$new_path"
34782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34783    unix_path=`$CYGPATH -u "$windows_path"`
34784    new_path="$unix_path"
34785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34787    new_path="$unix_path"
34788  fi
34789
34790
34791  # Now try to locate executable using which
34792  new_path=`$WHICH "$new_path" 2> /dev/null`
34793
34794  if test "x$new_path" = x; then
34795    # Oops. Which didn't find the executable.
34796    # The splitting of arguments from the executable at a space might have been incorrect,
34797    # since paths with space are more likely in Windows. Give it another try with the whole
34798    # argument.
34799    path="$complete"
34800    arguments="EOL"
34801    new_path="$path"
34802
34803  windows_path="$new_path"
34804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34805    unix_path=`$CYGPATH -u "$windows_path"`
34806    new_path="$unix_path"
34807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34809    new_path="$unix_path"
34810  fi
34811
34812
34813    new_path=`$WHICH "$new_path" 2> /dev/null`
34814    # bat and cmd files are not always considered executable in MSYS causing which
34815    # to not find them
34816    if test "x$new_path" = x \
34817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34819      new_path="$path"
34820
34821  windows_path="$new_path"
34822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34823    unix_path=`$CYGPATH -u "$windows_path"`
34824    new_path="$unix_path"
34825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34827    new_path="$unix_path"
34828  fi
34829
34830    fi
34831
34832    if test "x$new_path" = x; then
34833      # It's still not found. Now this is an unrecoverable error.
34834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34835$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34836      has_space=`$ECHO "$complete" | $GREP " "`
34837      if test "x$has_space" != x; then
34838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34840      fi
34841      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34842    fi
34843  fi
34844
34845  # Now new_path has a complete unix path to the binary
34846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34847    # Keep paths in /bin as-is, but remove trailing .exe if any
34848    new_path="${new_path/%.exe/}"
34849    # Do not save /bin paths to all_fixpath_prefixes!
34850  else
34851    # Not in mixed or Windows style, start by that.
34852    new_path=`cmd //c echo $new_path`
34853
34854  input_path="$new_path"
34855  # Check if we need to convert this using DOS-style short mode. If the path
34856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34857  # take no chances and rewrite it.
34858  # Note: m4 eats our [], so we need to use [ and ] instead.
34859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34860  if test "x$has_forbidden_chars" != x; then
34861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34863  fi
34864
34865    # Output is in $new_path
34866
34867  windows_path="$new_path"
34868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34869    unix_path=`$CYGPATH -u "$windows_path"`
34870    new_path="$unix_path"
34871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34873    new_path="$unix_path"
34874  fi
34875
34876    # remove trailing .exe if any
34877    new_path="${new_path/%.exe/}"
34878
34879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34881  fi
34882
34883    else
34884      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
34893      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34894      if test -z "$is_absolute_path"; then
34895        # Path to executable is not absolute. Find it.
34896        IFS_save="$IFS"
34897        IFS=:
34898        for p in $PATH; do
34899          if test -f "$p/$path" && test -x "$p/$path"; then
34900            new_path="$p/$path"
34901            break
34902          fi
34903        done
34904        IFS="$IFS_save"
34905      else
34906        # This is an absolute path, we can use it without further modifications.
34907        new_path="$path"
34908      fi
34909
34910      if test "x$new_path" = x; then
34911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34912$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34913        has_space=`$ECHO "$complete" | $GREP " "`
34914        if test "x$has_space" != x; then
34915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34917        fi
34918        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34919      fi
34920    fi
34921
34922    # Now join together the path and the arguments once again
34923    if test "x$arguments" != xEOL; then
34924      new_complete="$new_path ${arguments% *}"
34925    else
34926      new_complete="$new_path"
34927    fi
34928
34929    if test "x$complete" != "x$new_complete"; then
34930      CPP="$new_complete"
34931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34932$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34933    fi
34934  fi
34935
34936  ac_ext=cpp
34937ac_cpp='$CXXCPP $CPPFLAGS'
34938ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34939ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34940ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34942$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34943if test -z "$CXXCPP"; then
34944  if ${ac_cv_prog_CXXCPP+:} false; then :
34945  $as_echo_n "(cached) " >&6
34946else
34947      # Double quotes because CXXCPP needs to be expanded
34948    for CXXCPP in "$CXX -E" "/lib/cpp"
34949    do
34950      ac_preproc_ok=false
34951for ac_cxx_preproc_warn_flag in '' yes
34952do
34953  # Use a header file that comes with gcc, so configuring glibc
34954  # with a fresh cross-compiler works.
34955  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34956  # <limits.h> exists even on freestanding compilers.
34957  # On the NeXT, cc -E runs the code through the compiler's parser,
34958  # not just through cpp. "Syntax error" is here to catch this case.
34959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34960/* end confdefs.h.  */
34961#ifdef __STDC__
34962# include <limits.h>
34963#else
34964# include <assert.h>
34965#endif
34966		     Syntax error
34967_ACEOF
34968if ac_fn_cxx_try_cpp "$LINENO"; then :
34969
34970else
34971  # Broken: fails on valid input.
34972continue
34973fi
34974rm -f conftest.err conftest.i conftest.$ac_ext
34975
34976  # OK, works on sane cases.  Now check whether nonexistent headers
34977  # can be detected and how.
34978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34979/* end confdefs.h.  */
34980#include <ac_nonexistent.h>
34981_ACEOF
34982if ac_fn_cxx_try_cpp "$LINENO"; then :
34983  # Broken: success on invalid input.
34984continue
34985else
34986  # Passes both tests.
34987ac_preproc_ok=:
34988break
34989fi
34990rm -f conftest.err conftest.i conftest.$ac_ext
34991
34992done
34993# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34994rm -f conftest.i conftest.err conftest.$ac_ext
34995if $ac_preproc_ok; then :
34996  break
34997fi
34998
34999    done
35000    ac_cv_prog_CXXCPP=$CXXCPP
35001
35002fi
35003  CXXCPP=$ac_cv_prog_CXXCPP
35004else
35005  ac_cv_prog_CXXCPP=$CXXCPP
35006fi
35007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35008$as_echo "$CXXCPP" >&6; }
35009ac_preproc_ok=false
35010for ac_cxx_preproc_warn_flag in '' yes
35011do
35012  # Use a header file that comes with gcc, so configuring glibc
35013  # with a fresh cross-compiler works.
35014  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35015  # <limits.h> exists even on freestanding compilers.
35016  # On the NeXT, cc -E runs the code through the compiler's parser,
35017  # not just through cpp. "Syntax error" is here to catch this case.
35018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35019/* end confdefs.h.  */
35020#ifdef __STDC__
35021# include <limits.h>
35022#else
35023# include <assert.h>
35024#endif
35025		     Syntax error
35026_ACEOF
35027if ac_fn_cxx_try_cpp "$LINENO"; then :
35028
35029else
35030  # Broken: fails on valid input.
35031continue
35032fi
35033rm -f conftest.err conftest.i conftest.$ac_ext
35034
35035  # OK, works on sane cases.  Now check whether nonexistent headers
35036  # can be detected and how.
35037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35038/* end confdefs.h.  */
35039#include <ac_nonexistent.h>
35040_ACEOF
35041if ac_fn_cxx_try_cpp "$LINENO"; then :
35042  # Broken: success on invalid input.
35043continue
35044else
35045  # Passes both tests.
35046ac_preproc_ok=:
35047break
35048fi
35049rm -f conftest.err conftest.i conftest.$ac_ext
35050
35051done
35052# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35053rm -f conftest.i conftest.err conftest.$ac_ext
35054if $ac_preproc_ok; then :
35055
35056else
35057  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35059as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35060See \`config.log' for more details" "$LINENO" 5; }
35061fi
35062
35063ac_ext=cpp
35064ac_cpp='$CXXCPP $CPPFLAGS'
35065ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35066ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35067ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35068
35069
35070  # Only process if variable expands to non-empty
35071
35072  if test "x$CXXCPP" != x; then
35073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35074
35075  # First separate the path from the arguments. This will split at the first
35076  # space.
35077  complete="$CXXCPP"
35078  path="${complete%% *}"
35079  tmp="$complete EOL"
35080  arguments="${tmp#* }"
35081
35082  # Input might be given as Windows format, start by converting to
35083  # unix format.
35084  new_path=`$CYGPATH -u "$path"`
35085
35086  # Now try to locate executable using which
35087  new_path=`$WHICH "$new_path" 2> /dev/null`
35088  # bat and cmd files are not always considered executable in cygwin causing which
35089  # to not find them
35090  if test "x$new_path" = x \
35091      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35092      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35093    new_path=`$CYGPATH -u "$path"`
35094  fi
35095  if test "x$new_path" = x; then
35096    # Oops. Which didn't find the executable.
35097    # The splitting of arguments from the executable at a space might have been incorrect,
35098    # since paths with space are more likely in Windows. Give it another try with the whole
35099    # argument.
35100    path="$complete"
35101    arguments="EOL"
35102    new_path=`$CYGPATH -u "$path"`
35103    new_path=`$WHICH "$new_path" 2> /dev/null`
35104    # bat and cmd files are not always considered executable in cygwin causing which
35105    # to not find them
35106    if test "x$new_path" = x \
35107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35109      new_path=`$CYGPATH -u "$path"`
35110    fi
35111    if test "x$new_path" = x; then
35112      # It's still not found. Now this is an unrecoverable error.
35113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35114$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35115      has_space=`$ECHO "$complete" | $GREP " "`
35116      if test "x$has_space" != x; then
35117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35119      fi
35120      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35121    fi
35122  fi
35123
35124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35127  # "foo.exe" is OK but "foo" is an error.
35128  #
35129  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35130  # It is also a way to make sure we got the proper file name for the real test later on.
35131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35132  if test "x$test_shortpath" = x; then
35133    # Short path failed, file does not exist as specified.
35134    # Try adding .exe or .cmd
35135    if test -f "${new_path}.exe"; then
35136      input_to_shortpath="${new_path}.exe"
35137    elif test -f "${new_path}.cmd"; then
35138      input_to_shortpath="${new_path}.cmd"
35139    else
35140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35141$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35142      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35143$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35144      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35145    fi
35146  else
35147    input_to_shortpath="$new_path"
35148  fi
35149
35150  # Call helper function which possibly converts this using DOS-style short mode.
35151  # If so, the updated path is stored in $new_path.
35152  new_path="$input_to_shortpath"
35153
35154  input_path="$input_to_shortpath"
35155  # Check if we need to convert this using DOS-style short mode. If the path
35156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35157  # take no chances and rewrite it.
35158  # Note: m4 eats our [], so we need to use [ and ] instead.
35159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35160  if test "x$has_forbidden_chars" != x; then
35161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35165      # Going to short mode and back again did indeed matter. Since short mode is
35166      # case insensitive, let's make it lowercase to improve readability.
35167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35168      # Now convert it back to Unix-style (cygpath)
35169      input_path=`$CYGPATH -u "$shortmode_path"`
35170      new_path="$input_path"
35171    fi
35172  fi
35173
35174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35175  if test "x$test_cygdrive_prefix" = x; then
35176    # As a simple fix, exclude /usr/bin since it's not a real path.
35177    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35179      # a path prefixed by /cygdrive for fixpath to work.
35180      new_path="$CYGWIN_ROOT_PATH$input_path"
35181    fi
35182  fi
35183
35184  # remove trailing .exe if any
35185  new_path="${new_path/%.exe/}"
35186
35187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35188
35189  # First separate the path from the arguments. This will split at the first
35190  # space.
35191  complete="$CXXCPP"
35192  path="${complete%% *}"
35193  tmp="$complete EOL"
35194  arguments="${tmp#* }"
35195
35196  # Input might be given as Windows format, start by converting to
35197  # unix format.
35198  new_path="$path"
35199
35200  windows_path="$new_path"
35201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35202    unix_path=`$CYGPATH -u "$windows_path"`
35203    new_path="$unix_path"
35204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35206    new_path="$unix_path"
35207  fi
35208
35209
35210  # Now try to locate executable using which
35211  new_path=`$WHICH "$new_path" 2> /dev/null`
35212
35213  if test "x$new_path" = x; then
35214    # Oops. Which didn't find the executable.
35215    # The splitting of arguments from the executable at a space might have been incorrect,
35216    # since paths with space are more likely in Windows. Give it another try with the whole
35217    # argument.
35218    path="$complete"
35219    arguments="EOL"
35220    new_path="$path"
35221
35222  windows_path="$new_path"
35223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35224    unix_path=`$CYGPATH -u "$windows_path"`
35225    new_path="$unix_path"
35226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35228    new_path="$unix_path"
35229  fi
35230
35231
35232    new_path=`$WHICH "$new_path" 2> /dev/null`
35233    # bat and cmd files are not always considered executable in MSYS causing which
35234    # to not find them
35235    if test "x$new_path" = x \
35236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35238      new_path="$path"
35239
35240  windows_path="$new_path"
35241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35242    unix_path=`$CYGPATH -u "$windows_path"`
35243    new_path="$unix_path"
35244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35246    new_path="$unix_path"
35247  fi
35248
35249    fi
35250
35251    if test "x$new_path" = x; then
35252      # It's still not found. Now this is an unrecoverable error.
35253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35254$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35255      has_space=`$ECHO "$complete" | $GREP " "`
35256      if test "x$has_space" != x; then
35257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35259      fi
35260      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35261    fi
35262  fi
35263
35264  # Now new_path has a complete unix path to the binary
35265  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35266    # Keep paths in /bin as-is, but remove trailing .exe if any
35267    new_path="${new_path/%.exe/}"
35268    # Do not save /bin paths to all_fixpath_prefixes!
35269  else
35270    # Not in mixed or Windows style, start by that.
35271    new_path=`cmd //c echo $new_path`
35272
35273  input_path="$new_path"
35274  # Check if we need to convert this using DOS-style short mode. If the path
35275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35276  # take no chances and rewrite it.
35277  # Note: m4 eats our [], so we need to use [ and ] instead.
35278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35279  if test "x$has_forbidden_chars" != x; then
35280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35282  fi
35283
35284    # Output is in $new_path
35285
35286  windows_path="$new_path"
35287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35288    unix_path=`$CYGPATH -u "$windows_path"`
35289    new_path="$unix_path"
35290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35292    new_path="$unix_path"
35293  fi
35294
35295    # remove trailing .exe if any
35296    new_path="${new_path/%.exe/}"
35297
35298    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35299    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35300  fi
35301
35302    else
35303      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
35312      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35313      if test -z "$is_absolute_path"; then
35314        # Path to executable is not absolute. Find it.
35315        IFS_save="$IFS"
35316        IFS=:
35317        for p in $PATH; do
35318          if test -f "$p/$path" && test -x "$p/$path"; then
35319            new_path="$p/$path"
35320            break
35321          fi
35322        done
35323        IFS="$IFS_save"
35324      else
35325        # This is an absolute path, we can use it without further modifications.
35326        new_path="$path"
35327      fi
35328
35329      if test "x$new_path" = x; then
35330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35331$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35332        has_space=`$ECHO "$complete" | $GREP " "`
35333        if test "x$has_space" != x; then
35334          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35336        fi
35337        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35338      fi
35339    fi
35340
35341    # Now join together the path and the arguments once again
35342    if test "x$arguments" != xEOL; then
35343      new_complete="$new_path ${arguments% *}"
35344    else
35345      new_complete="$new_path"
35346    fi
35347
35348    if test "x$complete" != "x$new_complete"; then
35349      CXXCPP="$new_complete"
35350      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35351$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35352    fi
35353  fi
35354
35355
35356  #
35357  # Setup the linker (LD)
35358  #
35359  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35360    # In the Microsoft toolchain we have a separate LD command "link".
35361    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35362    # a cygwin program for something completely different.
35363    # Extract the first word of "link", so it can be a program name with args.
35364set dummy link; ac_word=$2
35365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35366$as_echo_n "checking for $ac_word... " >&6; }
35367if ${ac_cv_prog_LD+:} false; then :
35368  $as_echo_n "(cached) " >&6
35369else
35370  if test -n "$LD"; then
35371  ac_cv_prog_LD="$LD" # Let the user override the test.
35372else
35373  ac_prog_rejected=no
35374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35375for as_dir in $PATH
35376do
35377  IFS=$as_save_IFS
35378  test -z "$as_dir" && as_dir=.
35379    for ac_exec_ext in '' $ac_executable_extensions; do
35380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35381    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35382       ac_prog_rejected=yes
35383       continue
35384     fi
35385    ac_cv_prog_LD="link"
35386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35387    break 2
35388  fi
35389done
35390  done
35391IFS=$as_save_IFS
35392
35393if test $ac_prog_rejected = yes; then
35394  # We found a bogon in the path, so make sure we never use it.
35395  set dummy $ac_cv_prog_LD
35396  shift
35397  if test $# != 0; then
35398    # We chose a different compiler from the bogus one.
35399    # However, it has the same basename, so the bogon will be chosen
35400    # first if we set LD to just the basename; use the full file name.
35401    shift
35402    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35403  fi
35404fi
35405fi
35406fi
35407LD=$ac_cv_prog_LD
35408if test -n "$LD"; then
35409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35410$as_echo "$LD" >&6; }
35411else
35412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35413$as_echo "no" >&6; }
35414fi
35415
35416
35417
35418  # Only process if variable expands to non-empty
35419
35420  if test "x$LD" != x; then
35421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35422
35423  # First separate the path from the arguments. This will split at the first
35424  # space.
35425  complete="$LD"
35426  path="${complete%% *}"
35427  tmp="$complete EOL"
35428  arguments="${tmp#* }"
35429
35430  # Input might be given as Windows format, start by converting to
35431  # unix format.
35432  new_path=`$CYGPATH -u "$path"`
35433
35434  # Now try to locate executable using which
35435  new_path=`$WHICH "$new_path" 2> /dev/null`
35436  # bat and cmd files are not always considered executable in cygwin causing which
35437  # to not find them
35438  if test "x$new_path" = x \
35439      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35440      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35441    new_path=`$CYGPATH -u "$path"`
35442  fi
35443  if test "x$new_path" = x; then
35444    # Oops. Which didn't find the executable.
35445    # The splitting of arguments from the executable at a space might have been incorrect,
35446    # since paths with space are more likely in Windows. Give it another try with the whole
35447    # argument.
35448    path="$complete"
35449    arguments="EOL"
35450    new_path=`$CYGPATH -u "$path"`
35451    new_path=`$WHICH "$new_path" 2> /dev/null`
35452    # bat and cmd files are not always considered executable in cygwin causing which
35453    # to not find them
35454    if test "x$new_path" = x \
35455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35457      new_path=`$CYGPATH -u "$path"`
35458    fi
35459    if test "x$new_path" = x; then
35460      # It's still not found. Now this is an unrecoverable error.
35461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35462$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35463      has_space=`$ECHO "$complete" | $GREP " "`
35464      if test "x$has_space" != x; then
35465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35467      fi
35468      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35469    fi
35470  fi
35471
35472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35475  # "foo.exe" is OK but "foo" is an error.
35476  #
35477  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35478  # It is also a way to make sure we got the proper file name for the real test later on.
35479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35480  if test "x$test_shortpath" = x; then
35481    # Short path failed, file does not exist as specified.
35482    # Try adding .exe or .cmd
35483    if test -f "${new_path}.exe"; then
35484      input_to_shortpath="${new_path}.exe"
35485    elif test -f "${new_path}.cmd"; then
35486      input_to_shortpath="${new_path}.cmd"
35487    else
35488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35489$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35490      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35491$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35492      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35493    fi
35494  else
35495    input_to_shortpath="$new_path"
35496  fi
35497
35498  # Call helper function which possibly converts this using DOS-style short mode.
35499  # If so, the updated path is stored in $new_path.
35500  new_path="$input_to_shortpath"
35501
35502  input_path="$input_to_shortpath"
35503  # Check if we need to convert this using DOS-style short mode. If the path
35504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35505  # take no chances and rewrite it.
35506  # Note: m4 eats our [], so we need to use [ and ] instead.
35507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35508  if test "x$has_forbidden_chars" != x; then
35509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35513      # Going to short mode and back again did indeed matter. Since short mode is
35514      # case insensitive, let's make it lowercase to improve readability.
35515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35516      # Now convert it back to Unix-style (cygpath)
35517      input_path=`$CYGPATH -u "$shortmode_path"`
35518      new_path="$input_path"
35519    fi
35520  fi
35521
35522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35523  if test "x$test_cygdrive_prefix" = x; then
35524    # As a simple fix, exclude /usr/bin since it's not a real path.
35525    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35527      # a path prefixed by /cygdrive for fixpath to work.
35528      new_path="$CYGWIN_ROOT_PATH$input_path"
35529    fi
35530  fi
35531
35532  # remove trailing .exe if any
35533  new_path="${new_path/%.exe/}"
35534
35535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35536
35537  # First separate the path from the arguments. This will split at the first
35538  # space.
35539  complete="$LD"
35540  path="${complete%% *}"
35541  tmp="$complete EOL"
35542  arguments="${tmp#* }"
35543
35544  # Input might be given as Windows format, start by converting to
35545  # unix format.
35546  new_path="$path"
35547
35548  windows_path="$new_path"
35549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35550    unix_path=`$CYGPATH -u "$windows_path"`
35551    new_path="$unix_path"
35552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35554    new_path="$unix_path"
35555  fi
35556
35557
35558  # Now try to locate executable using which
35559  new_path=`$WHICH "$new_path" 2> /dev/null`
35560
35561  if test "x$new_path" = x; then
35562    # Oops. Which didn't find the executable.
35563    # The splitting of arguments from the executable at a space might have been incorrect,
35564    # since paths with space are more likely in Windows. Give it another try with the whole
35565    # argument.
35566    path="$complete"
35567    arguments="EOL"
35568    new_path="$path"
35569
35570  windows_path="$new_path"
35571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35572    unix_path=`$CYGPATH -u "$windows_path"`
35573    new_path="$unix_path"
35574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35576    new_path="$unix_path"
35577  fi
35578
35579
35580    new_path=`$WHICH "$new_path" 2> /dev/null`
35581    # bat and cmd files are not always considered executable in MSYS causing which
35582    # to not find them
35583    if test "x$new_path" = x \
35584        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35585        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35586      new_path="$path"
35587
35588  windows_path="$new_path"
35589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35590    unix_path=`$CYGPATH -u "$windows_path"`
35591    new_path="$unix_path"
35592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35594    new_path="$unix_path"
35595  fi
35596
35597    fi
35598
35599    if test "x$new_path" = x; then
35600      # It's still not found. Now this is an unrecoverable error.
35601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35602$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35603      has_space=`$ECHO "$complete" | $GREP " "`
35604      if test "x$has_space" != x; then
35605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35607      fi
35608      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35609    fi
35610  fi
35611
35612  # Now new_path has a complete unix path to the binary
35613  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35614    # Keep paths in /bin as-is, but remove trailing .exe if any
35615    new_path="${new_path/%.exe/}"
35616    # Do not save /bin paths to all_fixpath_prefixes!
35617  else
35618    # Not in mixed or Windows style, start by that.
35619    new_path=`cmd //c echo $new_path`
35620
35621  input_path="$new_path"
35622  # Check if we need to convert this using DOS-style short mode. If the path
35623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35624  # take no chances and rewrite it.
35625  # Note: m4 eats our [], so we need to use [ and ] instead.
35626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35627  if test "x$has_forbidden_chars" != x; then
35628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35630  fi
35631
35632    # Output is in $new_path
35633
35634  windows_path="$new_path"
35635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35636    unix_path=`$CYGPATH -u "$windows_path"`
35637    new_path="$unix_path"
35638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35640    new_path="$unix_path"
35641  fi
35642
35643    # remove trailing .exe if any
35644    new_path="${new_path/%.exe/}"
35645
35646    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35647    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35648  fi
35649
35650    else
35651      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
35660      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35661      if test -z "$is_absolute_path"; then
35662        # Path to executable is not absolute. Find it.
35663        IFS_save="$IFS"
35664        IFS=:
35665        for p in $PATH; do
35666          if test -f "$p/$path" && test -x "$p/$path"; then
35667            new_path="$p/$path"
35668            break
35669          fi
35670        done
35671        IFS="$IFS_save"
35672      else
35673        # This is an absolute path, we can use it without further modifications.
35674        new_path="$path"
35675      fi
35676
35677      if test "x$new_path" = x; then
35678        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35679$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35680        has_space=`$ECHO "$complete" | $GREP " "`
35681        if test "x$has_space" != x; then
35682          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35683$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35684        fi
35685        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35686      fi
35687    fi
35688
35689    # Now join together the path and the arguments once again
35690    if test "x$arguments" != xEOL; then
35691      new_complete="$new_path ${arguments% *}"
35692    else
35693      new_complete="$new_path"
35694    fi
35695
35696    if test "x$complete" != "x$new_complete"; then
35697      LD="$new_complete"
35698      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35699$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35700    fi
35701  fi
35702
35703    # Verify that we indeed succeeded with this trick.
35704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35705$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35706    "$LD" --version > /dev/null
35707    if test $? -eq 0 ; then
35708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35709$as_echo "no" >&6; }
35710      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35711    else
35712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35713$as_echo "yes" >&6; }
35714    fi
35715    LDCXX="$LD"
35716  else
35717    # All other toolchains use the compiler to link.
35718    LD="$CC"
35719    LDCXX="$CXX"
35720  fi
35721
35722  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35723
35724
35725  #
35726  # Setup the assembler (AS)
35727  #
35728  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35729    # FIXME: should this really be solaris, or solstudio?
35730
35731
35732  # Publish this variable in the help.
35733
35734
35735  if [ -z "${AS+x}" ]; then
35736    # The variable is not set by user, try to locate tool using the code snippet
35737    for ac_prog in as
35738do
35739  # Extract the first word of "$ac_prog", so it can be a program name with args.
35740set dummy $ac_prog; ac_word=$2
35741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35742$as_echo_n "checking for $ac_word... " >&6; }
35743if ${ac_cv_path_AS+:} false; then :
35744  $as_echo_n "(cached) " >&6
35745else
35746  case $AS in
35747  [\\/]* | ?:[\\/]*)
35748  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35749  ;;
35750  *)
35751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35752for as_dir in $PATH
35753do
35754  IFS=$as_save_IFS
35755  test -z "$as_dir" && as_dir=.
35756    for ac_exec_ext in '' $ac_executable_extensions; do
35757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35758    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35760    break 2
35761  fi
35762done
35763  done
35764IFS=$as_save_IFS
35765
35766  ;;
35767esac
35768fi
35769AS=$ac_cv_path_AS
35770if test -n "$AS"; then
35771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35772$as_echo "$AS" >&6; }
35773else
35774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35775$as_echo "no" >&6; }
35776fi
35777
35778
35779  test -n "$AS" && break
35780done
35781
35782  else
35783    # The variable is set, but is it from the command line or the environment?
35784
35785    # Try to remove the string !AS! from our list.
35786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35788      # If it failed, the variable was not from the command line. Ignore it,
35789      # but warn the user (except for BASH, which is always set by the calling BASH).
35790      if test "xAS" != xBASH; then
35791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35792$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35793      fi
35794      # Try to locate tool using the code snippet
35795      for ac_prog in as
35796do
35797  # Extract the first word of "$ac_prog", so it can be a program name with args.
35798set dummy $ac_prog; ac_word=$2
35799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35800$as_echo_n "checking for $ac_word... " >&6; }
35801if ${ac_cv_path_AS+:} false; then :
35802  $as_echo_n "(cached) " >&6
35803else
35804  case $AS in
35805  [\\/]* | ?:[\\/]*)
35806  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35807  ;;
35808  *)
35809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35810for as_dir in $PATH
35811do
35812  IFS=$as_save_IFS
35813  test -z "$as_dir" && as_dir=.
35814    for ac_exec_ext in '' $ac_executable_extensions; do
35815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35816    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35818    break 2
35819  fi
35820done
35821  done
35822IFS=$as_save_IFS
35823
35824  ;;
35825esac
35826fi
35827AS=$ac_cv_path_AS
35828if test -n "$AS"; then
35829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35830$as_echo "$AS" >&6; }
35831else
35832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35833$as_echo "no" >&6; }
35834fi
35835
35836
35837  test -n "$AS" && break
35838done
35839
35840    else
35841      # If it succeeded, then it was overridden by the user. We will use it
35842      # for the tool.
35843
35844      # First remove it from the list of overridden variables, so we can test
35845      # for unknown variables in the end.
35846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35847
35848      # Check if we try to supply an empty value
35849      if test "x$AS" = x; then
35850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35851$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35853$as_echo_n "checking for AS... " >&6; }
35854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35855$as_echo "disabled" >&6; }
35856      else
35857        # Check if the provided tool contains a complete path.
35858        tool_specified="$AS"
35859        tool_basename="${tool_specified##*/}"
35860        if test "x$tool_basename" = "x$tool_specified"; then
35861          # A command without a complete path is provided, search $PATH.
35862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35863$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35864          # Extract the first word of "$tool_basename", so it can be a program name with args.
35865set dummy $tool_basename; ac_word=$2
35866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35867$as_echo_n "checking for $ac_word... " >&6; }
35868if ${ac_cv_path_AS+:} false; then :
35869  $as_echo_n "(cached) " >&6
35870else
35871  case $AS in
35872  [\\/]* | ?:[\\/]*)
35873  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35874  ;;
35875  *)
35876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35877for as_dir in $PATH
35878do
35879  IFS=$as_save_IFS
35880  test -z "$as_dir" && as_dir=.
35881    for ac_exec_ext in '' $ac_executable_extensions; do
35882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35883    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35885    break 2
35886  fi
35887done
35888  done
35889IFS=$as_save_IFS
35890
35891  ;;
35892esac
35893fi
35894AS=$ac_cv_path_AS
35895if test -n "$AS"; then
35896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35897$as_echo "$AS" >&6; }
35898else
35899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35900$as_echo "no" >&6; }
35901fi
35902
35903
35904          if test "x$AS" = x; then
35905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35906          fi
35907        else
35908          # Otherwise we believe it is a complete path. Use it as it is.
35909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35910$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35912$as_echo_n "checking for AS... " >&6; }
35913          if test ! -x "$tool_specified"; then
35914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35915$as_echo "not found" >&6; }
35916            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35917          fi
35918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35919$as_echo "$tool_specified" >&6; }
35920        fi
35921      fi
35922    fi
35923
35924  fi
35925
35926
35927
35928  # Only process if variable expands to non-empty
35929
35930  if test "x$AS" != x; then
35931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35932
35933  # First separate the path from the arguments. This will split at the first
35934  # space.
35935  complete="$AS"
35936  path="${complete%% *}"
35937  tmp="$complete EOL"
35938  arguments="${tmp#* }"
35939
35940  # Input might be given as Windows format, start by converting to
35941  # unix format.
35942  new_path=`$CYGPATH -u "$path"`
35943
35944  # Now try to locate executable using which
35945  new_path=`$WHICH "$new_path" 2> /dev/null`
35946  # bat and cmd files are not always considered executable in cygwin causing which
35947  # to not find them
35948  if test "x$new_path" = x \
35949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35951    new_path=`$CYGPATH -u "$path"`
35952  fi
35953  if test "x$new_path" = x; then
35954    # Oops. Which didn't find the executable.
35955    # The splitting of arguments from the executable at a space might have been incorrect,
35956    # since paths with space are more likely in Windows. Give it another try with the whole
35957    # argument.
35958    path="$complete"
35959    arguments="EOL"
35960    new_path=`$CYGPATH -u "$path"`
35961    new_path=`$WHICH "$new_path" 2> /dev/null`
35962    # bat and cmd files are not always considered executable in cygwin causing which
35963    # to not find them
35964    if test "x$new_path" = x \
35965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35967      new_path=`$CYGPATH -u "$path"`
35968    fi
35969    if test "x$new_path" = x; then
35970      # It's still not found. Now this is an unrecoverable error.
35971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35972$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35973      has_space=`$ECHO "$complete" | $GREP " "`
35974      if test "x$has_space" != x; then
35975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35977      fi
35978      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35979    fi
35980  fi
35981
35982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35985  # "foo.exe" is OK but "foo" is an error.
35986  #
35987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35988  # It is also a way to make sure we got the proper file name for the real test later on.
35989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35990  if test "x$test_shortpath" = x; then
35991    # Short path failed, file does not exist as specified.
35992    # Try adding .exe or .cmd
35993    if test -f "${new_path}.exe"; then
35994      input_to_shortpath="${new_path}.exe"
35995    elif test -f "${new_path}.cmd"; then
35996      input_to_shortpath="${new_path}.cmd"
35997    else
35998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35999$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36002      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36003    fi
36004  else
36005    input_to_shortpath="$new_path"
36006  fi
36007
36008  # Call helper function which possibly converts this using DOS-style short mode.
36009  # If so, the updated path is stored in $new_path.
36010  new_path="$input_to_shortpath"
36011
36012  input_path="$input_to_shortpath"
36013  # Check if we need to convert this using DOS-style short mode. If the path
36014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36015  # take no chances and rewrite it.
36016  # Note: m4 eats our [], so we need to use [ and ] instead.
36017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36018  if test "x$has_forbidden_chars" != x; then
36019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36023      # Going to short mode and back again did indeed matter. Since short mode is
36024      # case insensitive, let's make it lowercase to improve readability.
36025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36026      # Now convert it back to Unix-style (cygpath)
36027      input_path=`$CYGPATH -u "$shortmode_path"`
36028      new_path="$input_path"
36029    fi
36030  fi
36031
36032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36033  if test "x$test_cygdrive_prefix" = x; then
36034    # As a simple fix, exclude /usr/bin since it's not a real path.
36035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36037      # a path prefixed by /cygdrive for fixpath to work.
36038      new_path="$CYGWIN_ROOT_PATH$input_path"
36039    fi
36040  fi
36041
36042  # remove trailing .exe if any
36043  new_path="${new_path/%.exe/}"
36044
36045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36046
36047  # First separate the path from the arguments. This will split at the first
36048  # space.
36049  complete="$AS"
36050  path="${complete%% *}"
36051  tmp="$complete EOL"
36052  arguments="${tmp#* }"
36053
36054  # Input might be given as Windows format, start by converting to
36055  # unix format.
36056  new_path="$path"
36057
36058  windows_path="$new_path"
36059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36060    unix_path=`$CYGPATH -u "$windows_path"`
36061    new_path="$unix_path"
36062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36064    new_path="$unix_path"
36065  fi
36066
36067
36068  # Now try to locate executable using which
36069  new_path=`$WHICH "$new_path" 2> /dev/null`
36070
36071  if test "x$new_path" = x; then
36072    # Oops. Which didn't find the executable.
36073    # The splitting of arguments from the executable at a space might have been incorrect,
36074    # since paths with space are more likely in Windows. Give it another try with the whole
36075    # argument.
36076    path="$complete"
36077    arguments="EOL"
36078    new_path="$path"
36079
36080  windows_path="$new_path"
36081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36082    unix_path=`$CYGPATH -u "$windows_path"`
36083    new_path="$unix_path"
36084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36086    new_path="$unix_path"
36087  fi
36088
36089
36090    new_path=`$WHICH "$new_path" 2> /dev/null`
36091    # bat and cmd files are not always considered executable in MSYS causing which
36092    # to not find them
36093    if test "x$new_path" = x \
36094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36096      new_path="$path"
36097
36098  windows_path="$new_path"
36099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36100    unix_path=`$CYGPATH -u "$windows_path"`
36101    new_path="$unix_path"
36102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36104    new_path="$unix_path"
36105  fi
36106
36107    fi
36108
36109    if test "x$new_path" = x; then
36110      # It's still not found. Now this is an unrecoverable error.
36111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36112$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36113      has_space=`$ECHO "$complete" | $GREP " "`
36114      if test "x$has_space" != x; then
36115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36117      fi
36118      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36119    fi
36120  fi
36121
36122  # Now new_path has a complete unix path to the binary
36123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36124    # Keep paths in /bin as-is, but remove trailing .exe if any
36125    new_path="${new_path/%.exe/}"
36126    # Do not save /bin paths to all_fixpath_prefixes!
36127  else
36128    # Not in mixed or Windows style, start by that.
36129    new_path=`cmd //c echo $new_path`
36130
36131  input_path="$new_path"
36132  # Check if we need to convert this using DOS-style short mode. If the path
36133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36134  # take no chances and rewrite it.
36135  # Note: m4 eats our [], so we need to use [ and ] instead.
36136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36137  if test "x$has_forbidden_chars" != x; then
36138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36140  fi
36141
36142    # Output is in $new_path
36143
36144  windows_path="$new_path"
36145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36146    unix_path=`$CYGPATH -u "$windows_path"`
36147    new_path="$unix_path"
36148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36150    new_path="$unix_path"
36151  fi
36152
36153    # remove trailing .exe if any
36154    new_path="${new_path/%.exe/}"
36155
36156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36158  fi
36159
36160    else
36161      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
36170      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36171      if test -z "$is_absolute_path"; then
36172        # Path to executable is not absolute. Find it.
36173        IFS_save="$IFS"
36174        IFS=:
36175        for p in $PATH; do
36176          if test -f "$p/$path" && test -x "$p/$path"; then
36177            new_path="$p/$path"
36178            break
36179          fi
36180        done
36181        IFS="$IFS_save"
36182      else
36183        # This is an absolute path, we can use it without further modifications.
36184        new_path="$path"
36185      fi
36186
36187      if test "x$new_path" = x; then
36188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36189$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36190        has_space=`$ECHO "$complete" | $GREP " "`
36191        if test "x$has_space" != x; then
36192          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36194        fi
36195        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36196      fi
36197    fi
36198
36199    # Now join together the path and the arguments once again
36200    if test "x$arguments" != xEOL; then
36201      new_complete="$new_path ${arguments% *}"
36202    else
36203      new_complete="$new_path"
36204    fi
36205
36206    if test "x$complete" != "x$new_complete"; then
36207      AS="$new_complete"
36208      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36209$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36210    fi
36211  fi
36212
36213  else
36214    # FIXME: is this correct for microsoft?
36215    AS="$CC -c"
36216  fi
36217
36218
36219  #
36220  # Setup the archiver (AR)
36221  #
36222  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36223    # The corresponding ar tool is lib.exe (used to create static libraries)
36224    # Extract the first word of "lib", so it can be a program name with args.
36225set dummy lib; ac_word=$2
36226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36227$as_echo_n "checking for $ac_word... " >&6; }
36228if ${ac_cv_prog_AR+:} false; then :
36229  $as_echo_n "(cached) " >&6
36230else
36231  if test -n "$AR"; then
36232  ac_cv_prog_AR="$AR" # Let the user override the test.
36233else
36234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36235for as_dir in $PATH
36236do
36237  IFS=$as_save_IFS
36238  test -z "$as_dir" && as_dir=.
36239    for ac_exec_ext in '' $ac_executable_extensions; do
36240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36241    ac_cv_prog_AR="lib"
36242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36243    break 2
36244  fi
36245done
36246  done
36247IFS=$as_save_IFS
36248
36249fi
36250fi
36251AR=$ac_cv_prog_AR
36252if test -n "$AR"; then
36253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36254$as_echo "$AR" >&6; }
36255else
36256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36257$as_echo "no" >&6; }
36258fi
36259
36260
36261  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36262
36263
36264  # Publish this variable in the help.
36265
36266
36267  if [ -z "${AR+x}" ]; then
36268    # The variable is not set by user, try to locate tool using the code snippet
36269    if test -n "$ac_tool_prefix"; then
36270  for ac_prog in ar gcc-ar
36271  do
36272    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36273set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36275$as_echo_n "checking for $ac_word... " >&6; }
36276if ${ac_cv_prog_AR+:} false; then :
36277  $as_echo_n "(cached) " >&6
36278else
36279  if test -n "$AR"; then
36280  ac_cv_prog_AR="$AR" # Let the user override the test.
36281else
36282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36283for as_dir in $PATH
36284do
36285  IFS=$as_save_IFS
36286  test -z "$as_dir" && as_dir=.
36287    for ac_exec_ext in '' $ac_executable_extensions; do
36288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36289    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36291    break 2
36292  fi
36293done
36294  done
36295IFS=$as_save_IFS
36296
36297fi
36298fi
36299AR=$ac_cv_prog_AR
36300if test -n "$AR"; then
36301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36302$as_echo "$AR" >&6; }
36303else
36304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36305$as_echo "no" >&6; }
36306fi
36307
36308
36309    test -n "$AR" && break
36310  done
36311fi
36312if test -z "$AR"; then
36313  ac_ct_AR=$AR
36314  for ac_prog in ar gcc-ar
36315do
36316  # Extract the first word of "$ac_prog", so it can be a program name with args.
36317set dummy $ac_prog; ac_word=$2
36318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36319$as_echo_n "checking for $ac_word... " >&6; }
36320if ${ac_cv_prog_ac_ct_AR+:} false; then :
36321  $as_echo_n "(cached) " >&6
36322else
36323  if test -n "$ac_ct_AR"; then
36324  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36325else
36326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36327for as_dir in $PATH
36328do
36329  IFS=$as_save_IFS
36330  test -z "$as_dir" && as_dir=.
36331    for ac_exec_ext in '' $ac_executable_extensions; do
36332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36333    ac_cv_prog_ac_ct_AR="$ac_prog"
36334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36335    break 2
36336  fi
36337done
36338  done
36339IFS=$as_save_IFS
36340
36341fi
36342fi
36343ac_ct_AR=$ac_cv_prog_ac_ct_AR
36344if test -n "$ac_ct_AR"; then
36345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36346$as_echo "$ac_ct_AR" >&6; }
36347else
36348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36349$as_echo "no" >&6; }
36350fi
36351
36352
36353  test -n "$ac_ct_AR" && break
36354done
36355
36356  if test "x$ac_ct_AR" = x; then
36357    AR=""
36358  else
36359    case $cross_compiling:$ac_tool_warned in
36360yes:)
36361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36363ac_tool_warned=yes ;;
36364esac
36365    AR=$ac_ct_AR
36366  fi
36367fi
36368
36369  else
36370    # The variable is set, but is it from the command line or the environment?
36371
36372    # Try to remove the string !AR! from our list.
36373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36375      # If it failed, the variable was not from the command line. Ignore it,
36376      # but warn the user (except for BASH, which is always set by the calling BASH).
36377      if test "xAR" != xBASH; then
36378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36379$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36380      fi
36381      # Try to locate tool using the code snippet
36382      if test -n "$ac_tool_prefix"; then
36383  for ac_prog in ar gcc-ar
36384  do
36385    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36386set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36388$as_echo_n "checking for $ac_word... " >&6; }
36389if ${ac_cv_prog_AR+:} false; then :
36390  $as_echo_n "(cached) " >&6
36391else
36392  if test -n "$AR"; then
36393  ac_cv_prog_AR="$AR" # Let the user override the test.
36394else
36395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36396for as_dir in $PATH
36397do
36398  IFS=$as_save_IFS
36399  test -z "$as_dir" && as_dir=.
36400    for ac_exec_ext in '' $ac_executable_extensions; do
36401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36402    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36404    break 2
36405  fi
36406done
36407  done
36408IFS=$as_save_IFS
36409
36410fi
36411fi
36412AR=$ac_cv_prog_AR
36413if test -n "$AR"; then
36414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36415$as_echo "$AR" >&6; }
36416else
36417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36418$as_echo "no" >&6; }
36419fi
36420
36421
36422    test -n "$AR" && break
36423  done
36424fi
36425if test -z "$AR"; then
36426  ac_ct_AR=$AR
36427  for ac_prog in ar gcc-ar
36428do
36429  # Extract the first word of "$ac_prog", so it can be a program name with args.
36430set dummy $ac_prog; ac_word=$2
36431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36432$as_echo_n "checking for $ac_word... " >&6; }
36433if ${ac_cv_prog_ac_ct_AR+:} false; then :
36434  $as_echo_n "(cached) " >&6
36435else
36436  if test -n "$ac_ct_AR"; then
36437  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36438else
36439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36440for as_dir in $PATH
36441do
36442  IFS=$as_save_IFS
36443  test -z "$as_dir" && as_dir=.
36444    for ac_exec_ext in '' $ac_executable_extensions; do
36445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36446    ac_cv_prog_ac_ct_AR="$ac_prog"
36447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36448    break 2
36449  fi
36450done
36451  done
36452IFS=$as_save_IFS
36453
36454fi
36455fi
36456ac_ct_AR=$ac_cv_prog_ac_ct_AR
36457if test -n "$ac_ct_AR"; then
36458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36459$as_echo "$ac_ct_AR" >&6; }
36460else
36461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36462$as_echo "no" >&6; }
36463fi
36464
36465
36466  test -n "$ac_ct_AR" && break
36467done
36468
36469  if test "x$ac_ct_AR" = x; then
36470    AR=""
36471  else
36472    case $cross_compiling:$ac_tool_warned in
36473yes:)
36474{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36475$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36476ac_tool_warned=yes ;;
36477esac
36478    AR=$ac_ct_AR
36479  fi
36480fi
36481
36482    else
36483      # If it succeeded, then it was overridden by the user. We will use it
36484      # for the tool.
36485
36486      # First remove it from the list of overridden variables, so we can test
36487      # for unknown variables in the end.
36488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36489
36490      # Check if we try to supply an empty value
36491      if test "x$AR" = x; then
36492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36493$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36495$as_echo_n "checking for AR... " >&6; }
36496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36497$as_echo "disabled" >&6; }
36498      else
36499        # Check if the provided tool contains a complete path.
36500        tool_specified="$AR"
36501        tool_basename="${tool_specified##*/}"
36502        if test "x$tool_basename" = "x$tool_specified"; then
36503          # A command without a complete path is provided, search $PATH.
36504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36505$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36506          # Extract the first word of "$tool_basename", so it can be a program name with args.
36507set dummy $tool_basename; ac_word=$2
36508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36509$as_echo_n "checking for $ac_word... " >&6; }
36510if ${ac_cv_path_AR+:} false; then :
36511  $as_echo_n "(cached) " >&6
36512else
36513  case $AR in
36514  [\\/]* | ?:[\\/]*)
36515  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36516  ;;
36517  *)
36518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36519for as_dir in $PATH
36520do
36521  IFS=$as_save_IFS
36522  test -z "$as_dir" && as_dir=.
36523    for ac_exec_ext in '' $ac_executable_extensions; do
36524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36525    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36527    break 2
36528  fi
36529done
36530  done
36531IFS=$as_save_IFS
36532
36533  ;;
36534esac
36535fi
36536AR=$ac_cv_path_AR
36537if test -n "$AR"; then
36538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36539$as_echo "$AR" >&6; }
36540else
36541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36542$as_echo "no" >&6; }
36543fi
36544
36545
36546          if test "x$AR" = x; then
36547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36548          fi
36549        else
36550          # Otherwise we believe it is a complete path. Use it as it is.
36551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36552$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36554$as_echo_n "checking for AR... " >&6; }
36555          if test ! -x "$tool_specified"; then
36556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36557$as_echo "not found" >&6; }
36558            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36559          fi
36560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36561$as_echo "$tool_specified" >&6; }
36562        fi
36563      fi
36564    fi
36565
36566  fi
36567
36568
36569  else
36570
36571
36572  # Publish this variable in the help.
36573
36574
36575  if [ -z "${AR+x}" ]; then
36576    # The variable is not set by user, try to locate tool using the code snippet
36577    if test -n "$ac_tool_prefix"; then
36578  for ac_prog in ar
36579  do
36580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36583$as_echo_n "checking for $ac_word... " >&6; }
36584if ${ac_cv_prog_AR+:} false; then :
36585  $as_echo_n "(cached) " >&6
36586else
36587  if test -n "$AR"; then
36588  ac_cv_prog_AR="$AR" # Let the user override the test.
36589else
36590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36591for as_dir in $PATH
36592do
36593  IFS=$as_save_IFS
36594  test -z "$as_dir" && as_dir=.
36595    for ac_exec_ext in '' $ac_executable_extensions; do
36596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36597    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36599    break 2
36600  fi
36601done
36602  done
36603IFS=$as_save_IFS
36604
36605fi
36606fi
36607AR=$ac_cv_prog_AR
36608if test -n "$AR"; then
36609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36610$as_echo "$AR" >&6; }
36611else
36612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36613$as_echo "no" >&6; }
36614fi
36615
36616
36617    test -n "$AR" && break
36618  done
36619fi
36620if test -z "$AR"; then
36621  ac_ct_AR=$AR
36622  for ac_prog in ar
36623do
36624  # Extract the first word of "$ac_prog", so it can be a program name with args.
36625set dummy $ac_prog; ac_word=$2
36626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36627$as_echo_n "checking for $ac_word... " >&6; }
36628if ${ac_cv_prog_ac_ct_AR+:} false; then :
36629  $as_echo_n "(cached) " >&6
36630else
36631  if test -n "$ac_ct_AR"; then
36632  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36633else
36634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36635for as_dir in $PATH
36636do
36637  IFS=$as_save_IFS
36638  test -z "$as_dir" && as_dir=.
36639    for ac_exec_ext in '' $ac_executable_extensions; do
36640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36641    ac_cv_prog_ac_ct_AR="$ac_prog"
36642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36643    break 2
36644  fi
36645done
36646  done
36647IFS=$as_save_IFS
36648
36649fi
36650fi
36651ac_ct_AR=$ac_cv_prog_ac_ct_AR
36652if test -n "$ac_ct_AR"; then
36653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36654$as_echo "$ac_ct_AR" >&6; }
36655else
36656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36657$as_echo "no" >&6; }
36658fi
36659
36660
36661  test -n "$ac_ct_AR" && break
36662done
36663
36664  if test "x$ac_ct_AR" = x; then
36665    AR=""
36666  else
36667    case $cross_compiling:$ac_tool_warned in
36668yes:)
36669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36671ac_tool_warned=yes ;;
36672esac
36673    AR=$ac_ct_AR
36674  fi
36675fi
36676
36677  else
36678    # The variable is set, but is it from the command line or the environment?
36679
36680    # Try to remove the string !AR! from our list.
36681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36683      # If it failed, the variable was not from the command line. Ignore it,
36684      # but warn the user (except for BASH, which is always set by the calling BASH).
36685      if test "xAR" != xBASH; then
36686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36687$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36688      fi
36689      # Try to locate tool using the code snippet
36690      if test -n "$ac_tool_prefix"; then
36691  for ac_prog in ar
36692  do
36693    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36696$as_echo_n "checking for $ac_word... " >&6; }
36697if ${ac_cv_prog_AR+:} false; then :
36698  $as_echo_n "(cached) " >&6
36699else
36700  if test -n "$AR"; then
36701  ac_cv_prog_AR="$AR" # Let the user override the test.
36702else
36703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36704for as_dir in $PATH
36705do
36706  IFS=$as_save_IFS
36707  test -z "$as_dir" && as_dir=.
36708    for ac_exec_ext in '' $ac_executable_extensions; do
36709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36710    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36712    break 2
36713  fi
36714done
36715  done
36716IFS=$as_save_IFS
36717
36718fi
36719fi
36720AR=$ac_cv_prog_AR
36721if test -n "$AR"; then
36722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36723$as_echo "$AR" >&6; }
36724else
36725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36726$as_echo "no" >&6; }
36727fi
36728
36729
36730    test -n "$AR" && break
36731  done
36732fi
36733if test -z "$AR"; then
36734  ac_ct_AR=$AR
36735  for ac_prog in ar
36736do
36737  # Extract the first word of "$ac_prog", so it can be a program name with args.
36738set dummy $ac_prog; ac_word=$2
36739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36740$as_echo_n "checking for $ac_word... " >&6; }
36741if ${ac_cv_prog_ac_ct_AR+:} false; then :
36742  $as_echo_n "(cached) " >&6
36743else
36744  if test -n "$ac_ct_AR"; then
36745  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36746else
36747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36748for as_dir in $PATH
36749do
36750  IFS=$as_save_IFS
36751  test -z "$as_dir" && as_dir=.
36752    for ac_exec_ext in '' $ac_executable_extensions; do
36753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36754    ac_cv_prog_ac_ct_AR="$ac_prog"
36755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36756    break 2
36757  fi
36758done
36759  done
36760IFS=$as_save_IFS
36761
36762fi
36763fi
36764ac_ct_AR=$ac_cv_prog_ac_ct_AR
36765if test -n "$ac_ct_AR"; then
36766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36767$as_echo "$ac_ct_AR" >&6; }
36768else
36769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36770$as_echo "no" >&6; }
36771fi
36772
36773
36774  test -n "$ac_ct_AR" && break
36775done
36776
36777  if test "x$ac_ct_AR" = x; then
36778    AR=""
36779  else
36780    case $cross_compiling:$ac_tool_warned in
36781yes:)
36782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36784ac_tool_warned=yes ;;
36785esac
36786    AR=$ac_ct_AR
36787  fi
36788fi
36789
36790    else
36791      # If it succeeded, then it was overridden by the user. We will use it
36792      # for the tool.
36793
36794      # First remove it from the list of overridden variables, so we can test
36795      # for unknown variables in the end.
36796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36797
36798      # Check if we try to supply an empty value
36799      if test "x$AR" = x; then
36800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36801$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36803$as_echo_n "checking for AR... " >&6; }
36804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36805$as_echo "disabled" >&6; }
36806      else
36807        # Check if the provided tool contains a complete path.
36808        tool_specified="$AR"
36809        tool_basename="${tool_specified##*/}"
36810        if test "x$tool_basename" = "x$tool_specified"; then
36811          # A command without a complete path is provided, search $PATH.
36812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36813$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36814          # Extract the first word of "$tool_basename", so it can be a program name with args.
36815set dummy $tool_basename; ac_word=$2
36816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36817$as_echo_n "checking for $ac_word... " >&6; }
36818if ${ac_cv_path_AR+:} false; then :
36819  $as_echo_n "(cached) " >&6
36820else
36821  case $AR in
36822  [\\/]* | ?:[\\/]*)
36823  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36824  ;;
36825  *)
36826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36827for as_dir in $PATH
36828do
36829  IFS=$as_save_IFS
36830  test -z "$as_dir" && as_dir=.
36831    for ac_exec_ext in '' $ac_executable_extensions; do
36832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36833    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36835    break 2
36836  fi
36837done
36838  done
36839IFS=$as_save_IFS
36840
36841  ;;
36842esac
36843fi
36844AR=$ac_cv_path_AR
36845if test -n "$AR"; then
36846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36847$as_echo "$AR" >&6; }
36848else
36849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36850$as_echo "no" >&6; }
36851fi
36852
36853
36854          if test "x$AR" = x; then
36855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36856          fi
36857        else
36858          # Otherwise we believe it is a complete path. Use it as it is.
36859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36860$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36862$as_echo_n "checking for AR... " >&6; }
36863          if test ! -x "$tool_specified"; then
36864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36865$as_echo "not found" >&6; }
36866            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36867          fi
36868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36869$as_echo "$tool_specified" >&6; }
36870        fi
36871      fi
36872    fi
36873
36874  fi
36875
36876
36877  fi
36878
36879  # Only process if variable expands to non-empty
36880
36881  if test "x$AR" != x; then
36882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36883
36884  # First separate the path from the arguments. This will split at the first
36885  # space.
36886  complete="$AR"
36887  path="${complete%% *}"
36888  tmp="$complete EOL"
36889  arguments="${tmp#* }"
36890
36891  # Input might be given as Windows format, start by converting to
36892  # unix format.
36893  new_path=`$CYGPATH -u "$path"`
36894
36895  # Now try to locate executable using which
36896  new_path=`$WHICH "$new_path" 2> /dev/null`
36897  # bat and cmd files are not always considered executable in cygwin causing which
36898  # to not find them
36899  if test "x$new_path" = x \
36900      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36901      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36902    new_path=`$CYGPATH -u "$path"`
36903  fi
36904  if test "x$new_path" = x; then
36905    # Oops. Which didn't find the executable.
36906    # The splitting of arguments from the executable at a space might have been incorrect,
36907    # since paths with space are more likely in Windows. Give it another try with the whole
36908    # argument.
36909    path="$complete"
36910    arguments="EOL"
36911    new_path=`$CYGPATH -u "$path"`
36912    new_path=`$WHICH "$new_path" 2> /dev/null`
36913    # bat and cmd files are not always considered executable in cygwin causing which
36914    # to not find them
36915    if test "x$new_path" = x \
36916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36918      new_path=`$CYGPATH -u "$path"`
36919    fi
36920    if test "x$new_path" = x; then
36921      # It's still not found. Now this is an unrecoverable error.
36922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36923$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36924      has_space=`$ECHO "$complete" | $GREP " "`
36925      if test "x$has_space" != x; then
36926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36928      fi
36929      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36930    fi
36931  fi
36932
36933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36936  # "foo.exe" is OK but "foo" is an error.
36937  #
36938  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36939  # It is also a way to make sure we got the proper file name for the real test later on.
36940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36941  if test "x$test_shortpath" = x; then
36942    # Short path failed, file does not exist as specified.
36943    # Try adding .exe or .cmd
36944    if test -f "${new_path}.exe"; then
36945      input_to_shortpath="${new_path}.exe"
36946    elif test -f "${new_path}.cmd"; then
36947      input_to_shortpath="${new_path}.cmd"
36948    else
36949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36950$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36951      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36952$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36953      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36954    fi
36955  else
36956    input_to_shortpath="$new_path"
36957  fi
36958
36959  # Call helper function which possibly converts this using DOS-style short mode.
36960  # If so, the updated path is stored in $new_path.
36961  new_path="$input_to_shortpath"
36962
36963  input_path="$input_to_shortpath"
36964  # Check if we need to convert this using DOS-style short mode. If the path
36965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36966  # take no chances and rewrite it.
36967  # Note: m4 eats our [], so we need to use [ and ] instead.
36968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36969  if test "x$has_forbidden_chars" != x; then
36970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36974      # Going to short mode and back again did indeed matter. Since short mode is
36975      # case insensitive, let's make it lowercase to improve readability.
36976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36977      # Now convert it back to Unix-style (cygpath)
36978      input_path=`$CYGPATH -u "$shortmode_path"`
36979      new_path="$input_path"
36980    fi
36981  fi
36982
36983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36984  if test "x$test_cygdrive_prefix" = x; then
36985    # As a simple fix, exclude /usr/bin since it's not a real path.
36986    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36988      # a path prefixed by /cygdrive for fixpath to work.
36989      new_path="$CYGWIN_ROOT_PATH$input_path"
36990    fi
36991  fi
36992
36993  # remove trailing .exe if any
36994  new_path="${new_path/%.exe/}"
36995
36996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997
36998  # First separate the path from the arguments. This will split at the first
36999  # space.
37000  complete="$AR"
37001  path="${complete%% *}"
37002  tmp="$complete EOL"
37003  arguments="${tmp#* }"
37004
37005  # Input might be given as Windows format, start by converting to
37006  # unix format.
37007  new_path="$path"
37008
37009  windows_path="$new_path"
37010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37011    unix_path=`$CYGPATH -u "$windows_path"`
37012    new_path="$unix_path"
37013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37015    new_path="$unix_path"
37016  fi
37017
37018
37019  # Now try to locate executable using which
37020  new_path=`$WHICH "$new_path" 2> /dev/null`
37021
37022  if test "x$new_path" = x; then
37023    # Oops. Which didn't find the executable.
37024    # The splitting of arguments from the executable at a space might have been incorrect,
37025    # since paths with space are more likely in Windows. Give it another try with the whole
37026    # argument.
37027    path="$complete"
37028    arguments="EOL"
37029    new_path="$path"
37030
37031  windows_path="$new_path"
37032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37033    unix_path=`$CYGPATH -u "$windows_path"`
37034    new_path="$unix_path"
37035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37037    new_path="$unix_path"
37038  fi
37039
37040
37041    new_path=`$WHICH "$new_path" 2> /dev/null`
37042    # bat and cmd files are not always considered executable in MSYS causing which
37043    # to not find them
37044    if test "x$new_path" = x \
37045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37047      new_path="$path"
37048
37049  windows_path="$new_path"
37050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37051    unix_path=`$CYGPATH -u "$windows_path"`
37052    new_path="$unix_path"
37053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37055    new_path="$unix_path"
37056  fi
37057
37058    fi
37059
37060    if test "x$new_path" = x; then
37061      # It's still not found. Now this is an unrecoverable error.
37062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37063$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37064      has_space=`$ECHO "$complete" | $GREP " "`
37065      if test "x$has_space" != x; then
37066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37068      fi
37069      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37070    fi
37071  fi
37072
37073  # Now new_path has a complete unix path to the binary
37074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37075    # Keep paths in /bin as-is, but remove trailing .exe if any
37076    new_path="${new_path/%.exe/}"
37077    # Do not save /bin paths to all_fixpath_prefixes!
37078  else
37079    # Not in mixed or Windows style, start by that.
37080    new_path=`cmd //c echo $new_path`
37081
37082  input_path="$new_path"
37083  # Check if we need to convert this using DOS-style short mode. If the path
37084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37085  # take no chances and rewrite it.
37086  # Note: m4 eats our [], so we need to use [ and ] instead.
37087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37088  if test "x$has_forbidden_chars" != x; then
37089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37091  fi
37092
37093    # Output is in $new_path
37094
37095  windows_path="$new_path"
37096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37097    unix_path=`$CYGPATH -u "$windows_path"`
37098    new_path="$unix_path"
37099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37101    new_path="$unix_path"
37102  fi
37103
37104    # remove trailing .exe if any
37105    new_path="${new_path/%.exe/}"
37106
37107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37109  fi
37110
37111    else
37112      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
37121      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37122      if test -z "$is_absolute_path"; then
37123        # Path to executable is not absolute. Find it.
37124        IFS_save="$IFS"
37125        IFS=:
37126        for p in $PATH; do
37127          if test -f "$p/$path" && test -x "$p/$path"; then
37128            new_path="$p/$path"
37129            break
37130          fi
37131        done
37132        IFS="$IFS_save"
37133      else
37134        # This is an absolute path, we can use it without further modifications.
37135        new_path="$path"
37136      fi
37137
37138      if test "x$new_path" = x; then
37139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37140$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37141        has_space=`$ECHO "$complete" | $GREP " "`
37142        if test "x$has_space" != x; then
37143          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37145        fi
37146        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37147      fi
37148    fi
37149
37150    # Now join together the path and the arguments once again
37151    if test "x$arguments" != xEOL; then
37152      new_complete="$new_path ${arguments% *}"
37153    else
37154      new_complete="$new_path"
37155    fi
37156
37157    if test "x$complete" != "x$new_complete"; then
37158      AR="$new_complete"
37159      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37160$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37161    fi
37162  fi
37163
37164
37165
37166  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37167
37168
37169  # Publish this variable in the help.
37170
37171
37172  if [ -z "${LIPO+x}" ]; then
37173    # The variable is not set by user, try to locate tool using the code snippet
37174    for ac_prog in lipo
37175do
37176  # Extract the first word of "$ac_prog", so it can be a program name with args.
37177set dummy $ac_prog; ac_word=$2
37178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37179$as_echo_n "checking for $ac_word... " >&6; }
37180if ${ac_cv_path_LIPO+:} false; then :
37181  $as_echo_n "(cached) " >&6
37182else
37183  case $LIPO in
37184  [\\/]* | ?:[\\/]*)
37185  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37186  ;;
37187  *)
37188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37189for as_dir in $PATH
37190do
37191  IFS=$as_save_IFS
37192  test -z "$as_dir" && as_dir=.
37193    for ac_exec_ext in '' $ac_executable_extensions; do
37194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37195    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37197    break 2
37198  fi
37199done
37200  done
37201IFS=$as_save_IFS
37202
37203  ;;
37204esac
37205fi
37206LIPO=$ac_cv_path_LIPO
37207if test -n "$LIPO"; then
37208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37209$as_echo "$LIPO" >&6; }
37210else
37211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37212$as_echo "no" >&6; }
37213fi
37214
37215
37216  test -n "$LIPO" && break
37217done
37218
37219  else
37220    # The variable is set, but is it from the command line or the environment?
37221
37222    # Try to remove the string !LIPO! from our list.
37223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37225      # If it failed, the variable was not from the command line. Ignore it,
37226      # but warn the user (except for BASH, which is always set by the calling BASH).
37227      if test "xLIPO" != xBASH; then
37228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37229$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37230      fi
37231      # Try to locate tool using the code snippet
37232      for ac_prog in lipo
37233do
37234  # Extract the first word of "$ac_prog", so it can be a program name with args.
37235set dummy $ac_prog; ac_word=$2
37236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37237$as_echo_n "checking for $ac_word... " >&6; }
37238if ${ac_cv_path_LIPO+:} false; then :
37239  $as_echo_n "(cached) " >&6
37240else
37241  case $LIPO in
37242  [\\/]* | ?:[\\/]*)
37243  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37244  ;;
37245  *)
37246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37247for as_dir in $PATH
37248do
37249  IFS=$as_save_IFS
37250  test -z "$as_dir" && as_dir=.
37251    for ac_exec_ext in '' $ac_executable_extensions; do
37252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37253    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37255    break 2
37256  fi
37257done
37258  done
37259IFS=$as_save_IFS
37260
37261  ;;
37262esac
37263fi
37264LIPO=$ac_cv_path_LIPO
37265if test -n "$LIPO"; then
37266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37267$as_echo "$LIPO" >&6; }
37268else
37269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37270$as_echo "no" >&6; }
37271fi
37272
37273
37274  test -n "$LIPO" && break
37275done
37276
37277    else
37278      # If it succeeded, then it was overridden by the user. We will use it
37279      # for the tool.
37280
37281      # First remove it from the list of overridden variables, so we can test
37282      # for unknown variables in the end.
37283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37284
37285      # Check if we try to supply an empty value
37286      if test "x$LIPO" = x; then
37287        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37288$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37290$as_echo_n "checking for LIPO... " >&6; }
37291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37292$as_echo "disabled" >&6; }
37293      else
37294        # Check if the provided tool contains a complete path.
37295        tool_specified="$LIPO"
37296        tool_basename="${tool_specified##*/}"
37297        if test "x$tool_basename" = "x$tool_specified"; then
37298          # A command without a complete path is provided, search $PATH.
37299          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37300$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37301          # Extract the first word of "$tool_basename", so it can be a program name with args.
37302set dummy $tool_basename; ac_word=$2
37303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37304$as_echo_n "checking for $ac_word... " >&6; }
37305if ${ac_cv_path_LIPO+:} false; then :
37306  $as_echo_n "(cached) " >&6
37307else
37308  case $LIPO in
37309  [\\/]* | ?:[\\/]*)
37310  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37311  ;;
37312  *)
37313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37314for as_dir in $PATH
37315do
37316  IFS=$as_save_IFS
37317  test -z "$as_dir" && as_dir=.
37318    for ac_exec_ext in '' $ac_executable_extensions; do
37319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37320    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37322    break 2
37323  fi
37324done
37325  done
37326IFS=$as_save_IFS
37327
37328  ;;
37329esac
37330fi
37331LIPO=$ac_cv_path_LIPO
37332if test -n "$LIPO"; then
37333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37334$as_echo "$LIPO" >&6; }
37335else
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37337$as_echo "no" >&6; }
37338fi
37339
37340
37341          if test "x$LIPO" = x; then
37342            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37343          fi
37344        else
37345          # Otherwise we believe it is a complete path. Use it as it is.
37346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37347$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37348          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37349$as_echo_n "checking for LIPO... " >&6; }
37350          if test ! -x "$tool_specified"; then
37351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37352$as_echo "not found" >&6; }
37353            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37354          fi
37355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37356$as_echo "$tool_specified" >&6; }
37357        fi
37358      fi
37359    fi
37360
37361  fi
37362
37363
37364
37365  # Only process if variable expands to non-empty
37366
37367  if test "x$LIPO" != x; then
37368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37369
37370  # First separate the path from the arguments. This will split at the first
37371  # space.
37372  complete="$LIPO"
37373  path="${complete%% *}"
37374  tmp="$complete EOL"
37375  arguments="${tmp#* }"
37376
37377  # Input might be given as Windows format, start by converting to
37378  # unix format.
37379  new_path=`$CYGPATH -u "$path"`
37380
37381  # Now try to locate executable using which
37382  new_path=`$WHICH "$new_path" 2> /dev/null`
37383  # bat and cmd files are not always considered executable in cygwin causing which
37384  # to not find them
37385  if test "x$new_path" = x \
37386      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37387      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37388    new_path=`$CYGPATH -u "$path"`
37389  fi
37390  if test "x$new_path" = x; then
37391    # Oops. Which didn't find the executable.
37392    # The splitting of arguments from the executable at a space might have been incorrect,
37393    # since paths with space are more likely in Windows. Give it another try with the whole
37394    # argument.
37395    path="$complete"
37396    arguments="EOL"
37397    new_path=`$CYGPATH -u "$path"`
37398    new_path=`$WHICH "$new_path" 2> /dev/null`
37399    # bat and cmd files are not always considered executable in cygwin causing which
37400    # to not find them
37401    if test "x$new_path" = x \
37402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37404      new_path=`$CYGPATH -u "$path"`
37405    fi
37406    if test "x$new_path" = x; then
37407      # It's still not found. Now this is an unrecoverable error.
37408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37409$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37410      has_space=`$ECHO "$complete" | $GREP " "`
37411      if test "x$has_space" != x; then
37412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37414      fi
37415      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37416    fi
37417  fi
37418
37419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37422  # "foo.exe" is OK but "foo" is an error.
37423  #
37424  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37425  # It is also a way to make sure we got the proper file name for the real test later on.
37426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37427  if test "x$test_shortpath" = x; then
37428    # Short path failed, file does not exist as specified.
37429    # Try adding .exe or .cmd
37430    if test -f "${new_path}.exe"; then
37431      input_to_shortpath="${new_path}.exe"
37432    elif test -f "${new_path}.cmd"; then
37433      input_to_shortpath="${new_path}.cmd"
37434    else
37435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37436$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37439      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37440    fi
37441  else
37442    input_to_shortpath="$new_path"
37443  fi
37444
37445  # Call helper function which possibly converts this using DOS-style short mode.
37446  # If so, the updated path is stored in $new_path.
37447  new_path="$input_to_shortpath"
37448
37449  input_path="$input_to_shortpath"
37450  # Check if we need to convert this using DOS-style short mode. If the path
37451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37452  # take no chances and rewrite it.
37453  # Note: m4 eats our [], so we need to use [ and ] instead.
37454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37455  if test "x$has_forbidden_chars" != x; then
37456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37460      # Going to short mode and back again did indeed matter. Since short mode is
37461      # case insensitive, let's make it lowercase to improve readability.
37462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37463      # Now convert it back to Unix-style (cygpath)
37464      input_path=`$CYGPATH -u "$shortmode_path"`
37465      new_path="$input_path"
37466    fi
37467  fi
37468
37469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37470  if test "x$test_cygdrive_prefix" = x; then
37471    # As a simple fix, exclude /usr/bin since it's not a real path.
37472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37474      # a path prefixed by /cygdrive for fixpath to work.
37475      new_path="$CYGWIN_ROOT_PATH$input_path"
37476    fi
37477  fi
37478
37479  # remove trailing .exe if any
37480  new_path="${new_path/%.exe/}"
37481
37482    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37483
37484  # First separate the path from the arguments. This will split at the first
37485  # space.
37486  complete="$LIPO"
37487  path="${complete%% *}"
37488  tmp="$complete EOL"
37489  arguments="${tmp#* }"
37490
37491  # Input might be given as Windows format, start by converting to
37492  # unix format.
37493  new_path="$path"
37494
37495  windows_path="$new_path"
37496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37497    unix_path=`$CYGPATH -u "$windows_path"`
37498    new_path="$unix_path"
37499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37501    new_path="$unix_path"
37502  fi
37503
37504
37505  # Now try to locate executable using which
37506  new_path=`$WHICH "$new_path" 2> /dev/null`
37507
37508  if test "x$new_path" = x; then
37509    # Oops. Which didn't find the executable.
37510    # The splitting of arguments from the executable at a space might have been incorrect,
37511    # since paths with space are more likely in Windows. Give it another try with the whole
37512    # argument.
37513    path="$complete"
37514    arguments="EOL"
37515    new_path="$path"
37516
37517  windows_path="$new_path"
37518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37519    unix_path=`$CYGPATH -u "$windows_path"`
37520    new_path="$unix_path"
37521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37523    new_path="$unix_path"
37524  fi
37525
37526
37527    new_path=`$WHICH "$new_path" 2> /dev/null`
37528    # bat and cmd files are not always considered executable in MSYS causing which
37529    # to not find them
37530    if test "x$new_path" = x \
37531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37533      new_path="$path"
37534
37535  windows_path="$new_path"
37536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37537    unix_path=`$CYGPATH -u "$windows_path"`
37538    new_path="$unix_path"
37539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37541    new_path="$unix_path"
37542  fi
37543
37544    fi
37545
37546    if test "x$new_path" = x; then
37547      # It's still not found. Now this is an unrecoverable error.
37548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37549$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37550      has_space=`$ECHO "$complete" | $GREP " "`
37551      if test "x$has_space" != x; then
37552        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37553$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37554      fi
37555      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37556    fi
37557  fi
37558
37559  # Now new_path has a complete unix path to the binary
37560  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37561    # Keep paths in /bin as-is, but remove trailing .exe if any
37562    new_path="${new_path/%.exe/}"
37563    # Do not save /bin paths to all_fixpath_prefixes!
37564  else
37565    # Not in mixed or Windows style, start by that.
37566    new_path=`cmd //c echo $new_path`
37567
37568  input_path="$new_path"
37569  # Check if we need to convert this using DOS-style short mode. If the path
37570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37571  # take no chances and rewrite it.
37572  # Note: m4 eats our [], so we need to use [ and ] instead.
37573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37574  if test "x$has_forbidden_chars" != x; then
37575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37577  fi
37578
37579    # Output is in $new_path
37580
37581  windows_path="$new_path"
37582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37583    unix_path=`$CYGPATH -u "$windows_path"`
37584    new_path="$unix_path"
37585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37587    new_path="$unix_path"
37588  fi
37589
37590    # remove trailing .exe if any
37591    new_path="${new_path/%.exe/}"
37592
37593    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37594    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37595  fi
37596
37597    else
37598      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
37607      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37608      if test -z "$is_absolute_path"; then
37609        # Path to executable is not absolute. Find it.
37610        IFS_save="$IFS"
37611        IFS=:
37612        for p in $PATH; do
37613          if test -f "$p/$path" && test -x "$p/$path"; then
37614            new_path="$p/$path"
37615            break
37616          fi
37617        done
37618        IFS="$IFS_save"
37619      else
37620        # This is an absolute path, we can use it without further modifications.
37621        new_path="$path"
37622      fi
37623
37624      if test "x$new_path" = x; then
37625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37626$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37627        has_space=`$ECHO "$complete" | $GREP " "`
37628        if test "x$has_space" != x; then
37629          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37630$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37631        fi
37632        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37633      fi
37634    fi
37635
37636    # Now join together the path and the arguments once again
37637    if test "x$arguments" != xEOL; then
37638      new_complete="$new_path ${arguments% *}"
37639    else
37640      new_complete="$new_path"
37641    fi
37642
37643    if test "x$complete" != "x$new_complete"; then
37644      LIPO="$new_complete"
37645      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37646$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37647    fi
37648  fi
37649
37650  fi
37651
37652  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37653    # Extract the first word of "mt", so it can be a program name with args.
37654set dummy mt; ac_word=$2
37655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37656$as_echo_n "checking for $ac_word... " >&6; }
37657if ${ac_cv_prog_MT+:} false; then :
37658  $as_echo_n "(cached) " >&6
37659else
37660  if test -n "$MT"; then
37661  ac_cv_prog_MT="$MT" # Let the user override the test.
37662else
37663  ac_prog_rejected=no
37664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37665for as_dir in $PATH
37666do
37667  IFS=$as_save_IFS
37668  test -z "$as_dir" && as_dir=.
37669    for ac_exec_ext in '' $ac_executable_extensions; do
37670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37671    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37672       ac_prog_rejected=yes
37673       continue
37674     fi
37675    ac_cv_prog_MT="mt"
37676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37677    break 2
37678  fi
37679done
37680  done
37681IFS=$as_save_IFS
37682
37683if test $ac_prog_rejected = yes; then
37684  # We found a bogon in the path, so make sure we never use it.
37685  set dummy $ac_cv_prog_MT
37686  shift
37687  if test $# != 0; then
37688    # We chose a different compiler from the bogus one.
37689    # However, it has the same basename, so the bogon will be chosen
37690    # first if we set MT to just the basename; use the full file name.
37691    shift
37692    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37693  fi
37694fi
37695fi
37696fi
37697MT=$ac_cv_prog_MT
37698if test -n "$MT"; then
37699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37700$as_echo "$MT" >&6; }
37701else
37702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37703$as_echo "no" >&6; }
37704fi
37705
37706
37707
37708  # Only process if variable expands to non-empty
37709
37710  if test "x$MT" != x; then
37711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37712
37713  # First separate the path from the arguments. This will split at the first
37714  # space.
37715  complete="$MT"
37716  path="${complete%% *}"
37717  tmp="$complete EOL"
37718  arguments="${tmp#* }"
37719
37720  # Input might be given as Windows format, start by converting to
37721  # unix format.
37722  new_path=`$CYGPATH -u "$path"`
37723
37724  # Now try to locate executable using which
37725  new_path=`$WHICH "$new_path" 2> /dev/null`
37726  # bat and cmd files are not always considered executable in cygwin causing which
37727  # to not find them
37728  if test "x$new_path" = x \
37729      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37730      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37731    new_path=`$CYGPATH -u "$path"`
37732  fi
37733  if test "x$new_path" = x; then
37734    # Oops. Which didn't find the executable.
37735    # The splitting of arguments from the executable at a space might have been incorrect,
37736    # since paths with space are more likely in Windows. Give it another try with the whole
37737    # argument.
37738    path="$complete"
37739    arguments="EOL"
37740    new_path=`$CYGPATH -u "$path"`
37741    new_path=`$WHICH "$new_path" 2> /dev/null`
37742    # bat and cmd files are not always considered executable in cygwin causing which
37743    # to not find them
37744    if test "x$new_path" = x \
37745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37747      new_path=`$CYGPATH -u "$path"`
37748    fi
37749    if test "x$new_path" = x; then
37750      # It's still not found. Now this is an unrecoverable error.
37751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37752$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37753      has_space=`$ECHO "$complete" | $GREP " "`
37754      if test "x$has_space" != x; then
37755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37757      fi
37758      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37759    fi
37760  fi
37761
37762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37765  # "foo.exe" is OK but "foo" is an error.
37766  #
37767  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37768  # It is also a way to make sure we got the proper file name for the real test later on.
37769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37770  if test "x$test_shortpath" = x; then
37771    # Short path failed, file does not exist as specified.
37772    # Try adding .exe or .cmd
37773    if test -f "${new_path}.exe"; then
37774      input_to_shortpath="${new_path}.exe"
37775    elif test -f "${new_path}.cmd"; then
37776      input_to_shortpath="${new_path}.cmd"
37777    else
37778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37779$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37780      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37781$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37782      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37783    fi
37784  else
37785    input_to_shortpath="$new_path"
37786  fi
37787
37788  # Call helper function which possibly converts this using DOS-style short mode.
37789  # If so, the updated path is stored in $new_path.
37790  new_path="$input_to_shortpath"
37791
37792  input_path="$input_to_shortpath"
37793  # Check if we need to convert this using DOS-style short mode. If the path
37794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37795  # take no chances and rewrite it.
37796  # Note: m4 eats our [], so we need to use [ and ] instead.
37797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37798  if test "x$has_forbidden_chars" != x; then
37799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37803      # Going to short mode and back again did indeed matter. Since short mode is
37804      # case insensitive, let's make it lowercase to improve readability.
37805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37806      # Now convert it back to Unix-style (cygpath)
37807      input_path=`$CYGPATH -u "$shortmode_path"`
37808      new_path="$input_path"
37809    fi
37810  fi
37811
37812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37813  if test "x$test_cygdrive_prefix" = x; then
37814    # As a simple fix, exclude /usr/bin since it's not a real path.
37815    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37817      # a path prefixed by /cygdrive for fixpath to work.
37818      new_path="$CYGWIN_ROOT_PATH$input_path"
37819    fi
37820  fi
37821
37822  # remove trailing .exe if any
37823  new_path="${new_path/%.exe/}"
37824
37825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37826
37827  # First separate the path from the arguments. This will split at the first
37828  # space.
37829  complete="$MT"
37830  path="${complete%% *}"
37831  tmp="$complete EOL"
37832  arguments="${tmp#* }"
37833
37834  # Input might be given as Windows format, start by converting to
37835  # unix format.
37836  new_path="$path"
37837
37838  windows_path="$new_path"
37839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37840    unix_path=`$CYGPATH -u "$windows_path"`
37841    new_path="$unix_path"
37842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37844    new_path="$unix_path"
37845  fi
37846
37847
37848  # Now try to locate executable using which
37849  new_path=`$WHICH "$new_path" 2> /dev/null`
37850
37851  if test "x$new_path" = x; then
37852    # Oops. Which didn't find the executable.
37853    # The splitting of arguments from the executable at a space might have been incorrect,
37854    # since paths with space are more likely in Windows. Give it another try with the whole
37855    # argument.
37856    path="$complete"
37857    arguments="EOL"
37858    new_path="$path"
37859
37860  windows_path="$new_path"
37861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37862    unix_path=`$CYGPATH -u "$windows_path"`
37863    new_path="$unix_path"
37864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37866    new_path="$unix_path"
37867  fi
37868
37869
37870    new_path=`$WHICH "$new_path" 2> /dev/null`
37871    # bat and cmd files are not always considered executable in MSYS causing which
37872    # to not find them
37873    if test "x$new_path" = x \
37874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37876      new_path="$path"
37877
37878  windows_path="$new_path"
37879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37880    unix_path=`$CYGPATH -u "$windows_path"`
37881    new_path="$unix_path"
37882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37884    new_path="$unix_path"
37885  fi
37886
37887    fi
37888
37889    if test "x$new_path" = x; then
37890      # It's still not found. Now this is an unrecoverable error.
37891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37892$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37893      has_space=`$ECHO "$complete" | $GREP " "`
37894      if test "x$has_space" != x; then
37895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37897      fi
37898      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37899    fi
37900  fi
37901
37902  # Now new_path has a complete unix path to the binary
37903  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37904    # Keep paths in /bin as-is, but remove trailing .exe if any
37905    new_path="${new_path/%.exe/}"
37906    # Do not save /bin paths to all_fixpath_prefixes!
37907  else
37908    # Not in mixed or Windows style, start by that.
37909    new_path=`cmd //c echo $new_path`
37910
37911  input_path="$new_path"
37912  # Check if we need to convert this using DOS-style short mode. If the path
37913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37914  # take no chances and rewrite it.
37915  # Note: m4 eats our [], so we need to use [ and ] instead.
37916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37917  if test "x$has_forbidden_chars" != x; then
37918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37920  fi
37921
37922    # Output is in $new_path
37923
37924  windows_path="$new_path"
37925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37926    unix_path=`$CYGPATH -u "$windows_path"`
37927    new_path="$unix_path"
37928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37930    new_path="$unix_path"
37931  fi
37932
37933    # remove trailing .exe if any
37934    new_path="${new_path/%.exe/}"
37935
37936    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37937    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37938  fi
37939
37940    else
37941      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
37950      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37951      if test -z "$is_absolute_path"; then
37952        # Path to executable is not absolute. Find it.
37953        IFS_save="$IFS"
37954        IFS=:
37955        for p in $PATH; do
37956          if test -f "$p/$path" && test -x "$p/$path"; then
37957            new_path="$p/$path"
37958            break
37959          fi
37960        done
37961        IFS="$IFS_save"
37962      else
37963        # This is an absolute path, we can use it without further modifications.
37964        new_path="$path"
37965      fi
37966
37967      if test "x$new_path" = x; then
37968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37969$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37970        has_space=`$ECHO "$complete" | $GREP " "`
37971        if test "x$has_space" != x; then
37972          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37973$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37974        fi
37975        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37976      fi
37977    fi
37978
37979    # Now join together the path and the arguments once again
37980    if test "x$arguments" != xEOL; then
37981      new_complete="$new_path ${arguments% *}"
37982    else
37983      new_complete="$new_path"
37984    fi
37985
37986    if test "x$complete" != "x$new_complete"; then
37987      MT="$new_complete"
37988      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37989$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37990    fi
37991  fi
37992
37993    # Setup the resource compiler (RC)
37994    # Extract the first word of "rc", so it can be a program name with args.
37995set dummy rc; ac_word=$2
37996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37997$as_echo_n "checking for $ac_word... " >&6; }
37998if ${ac_cv_prog_RC+:} false; then :
37999  $as_echo_n "(cached) " >&6
38000else
38001  if test -n "$RC"; then
38002  ac_cv_prog_RC="$RC" # Let the user override the test.
38003else
38004  ac_prog_rejected=no
38005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38006for as_dir in $PATH
38007do
38008  IFS=$as_save_IFS
38009  test -z "$as_dir" && as_dir=.
38010    for ac_exec_ext in '' $ac_executable_extensions; do
38011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38012    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38013       ac_prog_rejected=yes
38014       continue
38015     fi
38016    ac_cv_prog_RC="rc"
38017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38018    break 2
38019  fi
38020done
38021  done
38022IFS=$as_save_IFS
38023
38024if test $ac_prog_rejected = yes; then
38025  # We found a bogon in the path, so make sure we never use it.
38026  set dummy $ac_cv_prog_RC
38027  shift
38028  if test $# != 0; then
38029    # We chose a different compiler from the bogus one.
38030    # However, it has the same basename, so the bogon will be chosen
38031    # first if we set RC to just the basename; use the full file name.
38032    shift
38033    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38034  fi
38035fi
38036fi
38037fi
38038RC=$ac_cv_prog_RC
38039if test -n "$RC"; then
38040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38041$as_echo "$RC" >&6; }
38042else
38043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38044$as_echo "no" >&6; }
38045fi
38046
38047
38048
38049  # Only process if variable expands to non-empty
38050
38051  if test "x$RC" != x; then
38052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38053
38054  # First separate the path from the arguments. This will split at the first
38055  # space.
38056  complete="$RC"
38057  path="${complete%% *}"
38058  tmp="$complete EOL"
38059  arguments="${tmp#* }"
38060
38061  # Input might be given as Windows format, start by converting to
38062  # unix format.
38063  new_path=`$CYGPATH -u "$path"`
38064
38065  # Now try to locate executable using which
38066  new_path=`$WHICH "$new_path" 2> /dev/null`
38067  # bat and cmd files are not always considered executable in cygwin causing which
38068  # to not find them
38069  if test "x$new_path" = x \
38070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38072    new_path=`$CYGPATH -u "$path"`
38073  fi
38074  if test "x$new_path" = x; then
38075    # Oops. Which didn't find the executable.
38076    # The splitting of arguments from the executable at a space might have been incorrect,
38077    # since paths with space are more likely in Windows. Give it another try with the whole
38078    # argument.
38079    path="$complete"
38080    arguments="EOL"
38081    new_path=`$CYGPATH -u "$path"`
38082    new_path=`$WHICH "$new_path" 2> /dev/null`
38083    # bat and cmd files are not always considered executable in cygwin causing which
38084    # to not find them
38085    if test "x$new_path" = x \
38086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38088      new_path=`$CYGPATH -u "$path"`
38089    fi
38090    if test "x$new_path" = x; then
38091      # It's still not found. Now this is an unrecoverable error.
38092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38093$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38094      has_space=`$ECHO "$complete" | $GREP " "`
38095      if test "x$has_space" != x; then
38096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38098      fi
38099      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38100    fi
38101  fi
38102
38103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38106  # "foo.exe" is OK but "foo" is an error.
38107  #
38108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38109  # It is also a way to make sure we got the proper file name for the real test later on.
38110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38111  if test "x$test_shortpath" = x; then
38112    # Short path failed, file does not exist as specified.
38113    # Try adding .exe or .cmd
38114    if test -f "${new_path}.exe"; then
38115      input_to_shortpath="${new_path}.exe"
38116    elif test -f "${new_path}.cmd"; then
38117      input_to_shortpath="${new_path}.cmd"
38118    else
38119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38120$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38123      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38124    fi
38125  else
38126    input_to_shortpath="$new_path"
38127  fi
38128
38129  # Call helper function which possibly converts this using DOS-style short mode.
38130  # If so, the updated path is stored in $new_path.
38131  new_path="$input_to_shortpath"
38132
38133  input_path="$input_to_shortpath"
38134  # Check if we need to convert this using DOS-style short mode. If the path
38135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38136  # take no chances and rewrite it.
38137  # Note: m4 eats our [], so we need to use [ and ] instead.
38138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38139  if test "x$has_forbidden_chars" != x; then
38140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38144      # Going to short mode and back again did indeed matter. Since short mode is
38145      # case insensitive, let's make it lowercase to improve readability.
38146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38147      # Now convert it back to Unix-style (cygpath)
38148      input_path=`$CYGPATH -u "$shortmode_path"`
38149      new_path="$input_path"
38150    fi
38151  fi
38152
38153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38154  if test "x$test_cygdrive_prefix" = x; then
38155    # As a simple fix, exclude /usr/bin since it's not a real path.
38156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38158      # a path prefixed by /cygdrive for fixpath to work.
38159      new_path="$CYGWIN_ROOT_PATH$input_path"
38160    fi
38161  fi
38162
38163  # remove trailing .exe if any
38164  new_path="${new_path/%.exe/}"
38165
38166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38167
38168  # First separate the path from the arguments. This will split at the first
38169  # space.
38170  complete="$RC"
38171  path="${complete%% *}"
38172  tmp="$complete EOL"
38173  arguments="${tmp#* }"
38174
38175  # Input might be given as Windows format, start by converting to
38176  # unix format.
38177  new_path="$path"
38178
38179  windows_path="$new_path"
38180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38181    unix_path=`$CYGPATH -u "$windows_path"`
38182    new_path="$unix_path"
38183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38185    new_path="$unix_path"
38186  fi
38187
38188
38189  # Now try to locate executable using which
38190  new_path=`$WHICH "$new_path" 2> /dev/null`
38191
38192  if test "x$new_path" = x; then
38193    # Oops. Which didn't find the executable.
38194    # The splitting of arguments from the executable at a space might have been incorrect,
38195    # since paths with space are more likely in Windows. Give it another try with the whole
38196    # argument.
38197    path="$complete"
38198    arguments="EOL"
38199    new_path="$path"
38200
38201  windows_path="$new_path"
38202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38203    unix_path=`$CYGPATH -u "$windows_path"`
38204    new_path="$unix_path"
38205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38207    new_path="$unix_path"
38208  fi
38209
38210
38211    new_path=`$WHICH "$new_path" 2> /dev/null`
38212    # bat and cmd files are not always considered executable in MSYS causing which
38213    # to not find them
38214    if test "x$new_path" = x \
38215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38217      new_path="$path"
38218
38219  windows_path="$new_path"
38220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38221    unix_path=`$CYGPATH -u "$windows_path"`
38222    new_path="$unix_path"
38223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38225    new_path="$unix_path"
38226  fi
38227
38228    fi
38229
38230    if test "x$new_path" = x; then
38231      # It's still not found. Now this is an unrecoverable error.
38232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38233$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38234      has_space=`$ECHO "$complete" | $GREP " "`
38235      if test "x$has_space" != x; then
38236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38238      fi
38239      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38240    fi
38241  fi
38242
38243  # Now new_path has a complete unix path to the binary
38244  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38245    # Keep paths in /bin as-is, but remove trailing .exe if any
38246    new_path="${new_path/%.exe/}"
38247    # Do not save /bin paths to all_fixpath_prefixes!
38248  else
38249    # Not in mixed or Windows style, start by that.
38250    new_path=`cmd //c echo $new_path`
38251
38252  input_path="$new_path"
38253  # Check if we need to convert this using DOS-style short mode. If the path
38254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38255  # take no chances and rewrite it.
38256  # Note: m4 eats our [], so we need to use [ and ] instead.
38257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38258  if test "x$has_forbidden_chars" != x; then
38259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38261  fi
38262
38263    # Output is in $new_path
38264
38265  windows_path="$new_path"
38266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38267    unix_path=`$CYGPATH -u "$windows_path"`
38268    new_path="$unix_path"
38269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38271    new_path="$unix_path"
38272  fi
38273
38274    # remove trailing .exe if any
38275    new_path="${new_path/%.exe/}"
38276
38277    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38278    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38279  fi
38280
38281    else
38282      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
38291      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38292      if test -z "$is_absolute_path"; then
38293        # Path to executable is not absolute. Find it.
38294        IFS_save="$IFS"
38295        IFS=:
38296        for p in $PATH; do
38297          if test -f "$p/$path" && test -x "$p/$path"; then
38298            new_path="$p/$path"
38299            break
38300          fi
38301        done
38302        IFS="$IFS_save"
38303      else
38304        # This is an absolute path, we can use it without further modifications.
38305        new_path="$path"
38306      fi
38307
38308      if test "x$new_path" = x; then
38309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38310$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38311        has_space=`$ECHO "$complete" | $GREP " "`
38312        if test "x$has_space" != x; then
38313          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38314$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38315        fi
38316        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38317      fi
38318    fi
38319
38320    # Now join together the path and the arguments once again
38321    if test "x$arguments" != xEOL; then
38322      new_complete="$new_path ${arguments% *}"
38323    else
38324      new_complete="$new_path"
38325    fi
38326
38327    if test "x$complete" != "x$new_complete"; then
38328      RC="$new_complete"
38329      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38330$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38331    fi
38332  fi
38333
38334    # Extract the first word of "dumpbin", so it can be a program name with args.
38335set dummy dumpbin; ac_word=$2
38336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38337$as_echo_n "checking for $ac_word... " >&6; }
38338if ${ac_cv_prog_DUMPBIN+:} false; then :
38339  $as_echo_n "(cached) " >&6
38340else
38341  if test -n "$DUMPBIN"; then
38342  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38343else
38344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38345for as_dir in $PATH
38346do
38347  IFS=$as_save_IFS
38348  test -z "$as_dir" && as_dir=.
38349    for ac_exec_ext in '' $ac_executable_extensions; do
38350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38351    ac_cv_prog_DUMPBIN="dumpbin"
38352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38353    break 2
38354  fi
38355done
38356  done
38357IFS=$as_save_IFS
38358
38359fi
38360fi
38361DUMPBIN=$ac_cv_prog_DUMPBIN
38362if test -n "$DUMPBIN"; then
38363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38364$as_echo "$DUMPBIN" >&6; }
38365else
38366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38367$as_echo "no" >&6; }
38368fi
38369
38370
38371
38372  # Only process if variable expands to non-empty
38373
38374  if test "x$DUMPBIN" != x; then
38375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38376
38377  # First separate the path from the arguments. This will split at the first
38378  # space.
38379  complete="$DUMPBIN"
38380  path="${complete%% *}"
38381  tmp="$complete EOL"
38382  arguments="${tmp#* }"
38383
38384  # Input might be given as Windows format, start by converting to
38385  # unix format.
38386  new_path=`$CYGPATH -u "$path"`
38387
38388  # Now try to locate executable using which
38389  new_path=`$WHICH "$new_path" 2> /dev/null`
38390  # bat and cmd files are not always considered executable in cygwin causing which
38391  # to not find them
38392  if test "x$new_path" = x \
38393      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38394      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38395    new_path=`$CYGPATH -u "$path"`
38396  fi
38397  if test "x$new_path" = x; then
38398    # Oops. Which didn't find the executable.
38399    # The splitting of arguments from the executable at a space might have been incorrect,
38400    # since paths with space are more likely in Windows. Give it another try with the whole
38401    # argument.
38402    path="$complete"
38403    arguments="EOL"
38404    new_path=`$CYGPATH -u "$path"`
38405    new_path=`$WHICH "$new_path" 2> /dev/null`
38406    # bat and cmd files are not always considered executable in cygwin causing which
38407    # to not find them
38408    if test "x$new_path" = x \
38409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38411      new_path=`$CYGPATH -u "$path"`
38412    fi
38413    if test "x$new_path" = x; then
38414      # It's still not found. Now this is an unrecoverable error.
38415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38416$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38417      has_space=`$ECHO "$complete" | $GREP " "`
38418      if test "x$has_space" != x; then
38419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38421      fi
38422      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38423    fi
38424  fi
38425
38426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38429  # "foo.exe" is OK but "foo" is an error.
38430  #
38431  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38432  # It is also a way to make sure we got the proper file name for the real test later on.
38433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38434  if test "x$test_shortpath" = x; then
38435    # Short path failed, file does not exist as specified.
38436    # Try adding .exe or .cmd
38437    if test -f "${new_path}.exe"; then
38438      input_to_shortpath="${new_path}.exe"
38439    elif test -f "${new_path}.cmd"; then
38440      input_to_shortpath="${new_path}.cmd"
38441    else
38442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38443$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38444      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38445$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38446      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38447    fi
38448  else
38449    input_to_shortpath="$new_path"
38450  fi
38451
38452  # Call helper function which possibly converts this using DOS-style short mode.
38453  # If so, the updated path is stored in $new_path.
38454  new_path="$input_to_shortpath"
38455
38456  input_path="$input_to_shortpath"
38457  # Check if we need to convert this using DOS-style short mode. If the path
38458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38459  # take no chances and rewrite it.
38460  # Note: m4 eats our [], so we need to use [ and ] instead.
38461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38462  if test "x$has_forbidden_chars" != x; then
38463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38467      # Going to short mode and back again did indeed matter. Since short mode is
38468      # case insensitive, let's make it lowercase to improve readability.
38469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38470      # Now convert it back to Unix-style (cygpath)
38471      input_path=`$CYGPATH -u "$shortmode_path"`
38472      new_path="$input_path"
38473    fi
38474  fi
38475
38476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38477  if test "x$test_cygdrive_prefix" = x; then
38478    # As a simple fix, exclude /usr/bin since it's not a real path.
38479    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38481      # a path prefixed by /cygdrive for fixpath to work.
38482      new_path="$CYGWIN_ROOT_PATH$input_path"
38483    fi
38484  fi
38485
38486  # remove trailing .exe if any
38487  new_path="${new_path/%.exe/}"
38488
38489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38490
38491  # First separate the path from the arguments. This will split at the first
38492  # space.
38493  complete="$DUMPBIN"
38494  path="${complete%% *}"
38495  tmp="$complete EOL"
38496  arguments="${tmp#* }"
38497
38498  # Input might be given as Windows format, start by converting to
38499  # unix format.
38500  new_path="$path"
38501
38502  windows_path="$new_path"
38503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38504    unix_path=`$CYGPATH -u "$windows_path"`
38505    new_path="$unix_path"
38506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38508    new_path="$unix_path"
38509  fi
38510
38511
38512  # Now try to locate executable using which
38513  new_path=`$WHICH "$new_path" 2> /dev/null`
38514
38515  if test "x$new_path" = x; then
38516    # Oops. Which didn't find the executable.
38517    # The splitting of arguments from the executable at a space might have been incorrect,
38518    # since paths with space are more likely in Windows. Give it another try with the whole
38519    # argument.
38520    path="$complete"
38521    arguments="EOL"
38522    new_path="$path"
38523
38524  windows_path="$new_path"
38525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38526    unix_path=`$CYGPATH -u "$windows_path"`
38527    new_path="$unix_path"
38528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38530    new_path="$unix_path"
38531  fi
38532
38533
38534    new_path=`$WHICH "$new_path" 2> /dev/null`
38535    # bat and cmd files are not always considered executable in MSYS causing which
38536    # to not find them
38537    if test "x$new_path" = x \
38538        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38539        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38540      new_path="$path"
38541
38542  windows_path="$new_path"
38543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38544    unix_path=`$CYGPATH -u "$windows_path"`
38545    new_path="$unix_path"
38546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38548    new_path="$unix_path"
38549  fi
38550
38551    fi
38552
38553    if test "x$new_path" = x; then
38554      # It's still not found. Now this is an unrecoverable error.
38555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38556$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38557      has_space=`$ECHO "$complete" | $GREP " "`
38558      if test "x$has_space" != x; then
38559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38561      fi
38562      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38563    fi
38564  fi
38565
38566  # Now new_path has a complete unix path to the binary
38567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38568    # Keep paths in /bin as-is, but remove trailing .exe if any
38569    new_path="${new_path/%.exe/}"
38570    # Do not save /bin paths to all_fixpath_prefixes!
38571  else
38572    # Not in mixed or Windows style, start by that.
38573    new_path=`cmd //c echo $new_path`
38574
38575  input_path="$new_path"
38576  # Check if we need to convert this using DOS-style short mode. If the path
38577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38578  # take no chances and rewrite it.
38579  # Note: m4 eats our [], so we need to use [ and ] instead.
38580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38581  if test "x$has_forbidden_chars" != x; then
38582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38584  fi
38585
38586    # Output is in $new_path
38587
38588  windows_path="$new_path"
38589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38590    unix_path=`$CYGPATH -u "$windows_path"`
38591    new_path="$unix_path"
38592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38594    new_path="$unix_path"
38595  fi
38596
38597    # remove trailing .exe if any
38598    new_path="${new_path/%.exe/}"
38599
38600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38602  fi
38603
38604    else
38605      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
38614      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38615      if test -z "$is_absolute_path"; then
38616        # Path to executable is not absolute. Find it.
38617        IFS_save="$IFS"
38618        IFS=:
38619        for p in $PATH; do
38620          if test -f "$p/$path" && test -x "$p/$path"; then
38621            new_path="$p/$path"
38622            break
38623          fi
38624        done
38625        IFS="$IFS_save"
38626      else
38627        # This is an absolute path, we can use it without further modifications.
38628        new_path="$path"
38629      fi
38630
38631      if test "x$new_path" = x; then
38632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38633$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38634        has_space=`$ECHO "$complete" | $GREP " "`
38635        if test "x$has_space" != x; then
38636          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38637$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38638        fi
38639        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38640      fi
38641    fi
38642
38643    # Now join together the path and the arguments once again
38644    if test "x$arguments" != xEOL; then
38645      new_complete="$new_path ${arguments% *}"
38646    else
38647      new_complete="$new_path"
38648    fi
38649
38650    if test "x$complete" != "x$new_complete"; then
38651      DUMPBIN="$new_complete"
38652      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38653$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38654    fi
38655  fi
38656
38657    # We need to check for 'msbuild.exe' because at the place where we expect to
38658    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38659    # won't find the 'msbuild.exe' executable in that case (and the
38660    # 'ac_executable_extensions' is unusable due to performance reasons).
38661    # Notice that we intentionally don't fix up the path to MSBUILD because we
38662    # will call it in a DOS shell during freetype detection on Windows (see
38663    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38664    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38665set dummy msbuild.exe; ac_word=$2
38666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38667$as_echo_n "checking for $ac_word... " >&6; }
38668if ${ac_cv_prog_MSBUILD+:} false; then :
38669  $as_echo_n "(cached) " >&6
38670else
38671  if test -n "$MSBUILD"; then
38672  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38673else
38674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38675for as_dir in $PATH
38676do
38677  IFS=$as_save_IFS
38678  test -z "$as_dir" && as_dir=.
38679    for ac_exec_ext in '' $ac_executable_extensions; do
38680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38681    ac_cv_prog_MSBUILD="msbuild.exe"
38682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38683    break 2
38684  fi
38685done
38686  done
38687IFS=$as_save_IFS
38688
38689fi
38690fi
38691MSBUILD=$ac_cv_prog_MSBUILD
38692if test -n "$MSBUILD"; then
38693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38694$as_echo "$MSBUILD" >&6; }
38695else
38696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38697$as_echo "no" >&6; }
38698fi
38699
38700
38701  fi
38702
38703  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38704
38705
38706  # Publish this variable in the help.
38707
38708
38709  if [ -z "${STRIP+x}" ]; then
38710    # The variable is not set by user, try to locate tool using the code snippet
38711    for ac_prog in strip
38712do
38713  # Extract the first word of "$ac_prog", so it can be a program name with args.
38714set dummy $ac_prog; ac_word=$2
38715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38716$as_echo_n "checking for $ac_word... " >&6; }
38717if ${ac_cv_path_STRIP+:} false; then :
38718  $as_echo_n "(cached) " >&6
38719else
38720  case $STRIP in
38721  [\\/]* | ?:[\\/]*)
38722  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38723  ;;
38724  *)
38725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38726for as_dir in $PATH
38727do
38728  IFS=$as_save_IFS
38729  test -z "$as_dir" && as_dir=.
38730    for ac_exec_ext in '' $ac_executable_extensions; do
38731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38732    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38734    break 2
38735  fi
38736done
38737  done
38738IFS=$as_save_IFS
38739
38740  ;;
38741esac
38742fi
38743STRIP=$ac_cv_path_STRIP
38744if test -n "$STRIP"; then
38745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38746$as_echo "$STRIP" >&6; }
38747else
38748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38749$as_echo "no" >&6; }
38750fi
38751
38752
38753  test -n "$STRIP" && break
38754done
38755
38756  else
38757    # The variable is set, but is it from the command line or the environment?
38758
38759    # Try to remove the string !STRIP! from our list.
38760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38762      # If it failed, the variable was not from the command line. Ignore it,
38763      # but warn the user (except for BASH, which is always set by the calling BASH).
38764      if test "xSTRIP" != xBASH; then
38765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38766$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38767      fi
38768      # Try to locate tool using the code snippet
38769      for ac_prog in strip
38770do
38771  # Extract the first word of "$ac_prog", so it can be a program name with args.
38772set dummy $ac_prog; ac_word=$2
38773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38774$as_echo_n "checking for $ac_word... " >&6; }
38775if ${ac_cv_path_STRIP+:} false; then :
38776  $as_echo_n "(cached) " >&6
38777else
38778  case $STRIP in
38779  [\\/]* | ?:[\\/]*)
38780  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38781  ;;
38782  *)
38783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38784for as_dir in $PATH
38785do
38786  IFS=$as_save_IFS
38787  test -z "$as_dir" && as_dir=.
38788    for ac_exec_ext in '' $ac_executable_extensions; do
38789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38790    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38792    break 2
38793  fi
38794done
38795  done
38796IFS=$as_save_IFS
38797
38798  ;;
38799esac
38800fi
38801STRIP=$ac_cv_path_STRIP
38802if test -n "$STRIP"; then
38803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38804$as_echo "$STRIP" >&6; }
38805else
38806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38807$as_echo "no" >&6; }
38808fi
38809
38810
38811  test -n "$STRIP" && break
38812done
38813
38814    else
38815      # If it succeeded, then it was overridden by the user. We will use it
38816      # for the tool.
38817
38818      # First remove it from the list of overridden variables, so we can test
38819      # for unknown variables in the end.
38820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38821
38822      # Check if we try to supply an empty value
38823      if test "x$STRIP" = x; then
38824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38825$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38827$as_echo_n "checking for STRIP... " >&6; }
38828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38829$as_echo "disabled" >&6; }
38830      else
38831        # Check if the provided tool contains a complete path.
38832        tool_specified="$STRIP"
38833        tool_basename="${tool_specified##*/}"
38834        if test "x$tool_basename" = "x$tool_specified"; then
38835          # A command without a complete path is provided, search $PATH.
38836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38837$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38838          # Extract the first word of "$tool_basename", so it can be a program name with args.
38839set dummy $tool_basename; ac_word=$2
38840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38841$as_echo_n "checking for $ac_word... " >&6; }
38842if ${ac_cv_path_STRIP+:} false; then :
38843  $as_echo_n "(cached) " >&6
38844else
38845  case $STRIP in
38846  [\\/]* | ?:[\\/]*)
38847  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38848  ;;
38849  *)
38850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38851for as_dir in $PATH
38852do
38853  IFS=$as_save_IFS
38854  test -z "$as_dir" && as_dir=.
38855    for ac_exec_ext in '' $ac_executable_extensions; do
38856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38857    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38859    break 2
38860  fi
38861done
38862  done
38863IFS=$as_save_IFS
38864
38865  ;;
38866esac
38867fi
38868STRIP=$ac_cv_path_STRIP
38869if test -n "$STRIP"; then
38870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38871$as_echo "$STRIP" >&6; }
38872else
38873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38874$as_echo "no" >&6; }
38875fi
38876
38877
38878          if test "x$STRIP" = x; then
38879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38880          fi
38881        else
38882          # Otherwise we believe it is a complete path. Use it as it is.
38883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38884$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38886$as_echo_n "checking for STRIP... " >&6; }
38887          if test ! -x "$tool_specified"; then
38888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38889$as_echo "not found" >&6; }
38890            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38891          fi
38892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38893$as_echo "$tool_specified" >&6; }
38894        fi
38895      fi
38896    fi
38897
38898  fi
38899
38900
38901
38902  # Only process if variable expands to non-empty
38903
38904  if test "x$STRIP" != x; then
38905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38906
38907  # First separate the path from the arguments. This will split at the first
38908  # space.
38909  complete="$STRIP"
38910  path="${complete%% *}"
38911  tmp="$complete EOL"
38912  arguments="${tmp#* }"
38913
38914  # Input might be given as Windows format, start by converting to
38915  # unix format.
38916  new_path=`$CYGPATH -u "$path"`
38917
38918  # Now try to locate executable using which
38919  new_path=`$WHICH "$new_path" 2> /dev/null`
38920  # bat and cmd files are not always considered executable in cygwin causing which
38921  # to not find them
38922  if test "x$new_path" = x \
38923      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38924      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38925    new_path=`$CYGPATH -u "$path"`
38926  fi
38927  if test "x$new_path" = x; then
38928    # Oops. Which didn't find the executable.
38929    # The splitting of arguments from the executable at a space might have been incorrect,
38930    # since paths with space are more likely in Windows. Give it another try with the whole
38931    # argument.
38932    path="$complete"
38933    arguments="EOL"
38934    new_path=`$CYGPATH -u "$path"`
38935    new_path=`$WHICH "$new_path" 2> /dev/null`
38936    # bat and cmd files are not always considered executable in cygwin causing which
38937    # to not find them
38938    if test "x$new_path" = x \
38939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38941      new_path=`$CYGPATH -u "$path"`
38942    fi
38943    if test "x$new_path" = x; then
38944      # It's still not found. Now this is an unrecoverable error.
38945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38946$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38947      has_space=`$ECHO "$complete" | $GREP " "`
38948      if test "x$has_space" != x; then
38949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38951      fi
38952      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38953    fi
38954  fi
38955
38956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38959  # "foo.exe" is OK but "foo" is an error.
38960  #
38961  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38962  # It is also a way to make sure we got the proper file name for the real test later on.
38963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38964  if test "x$test_shortpath" = x; then
38965    # Short path failed, file does not exist as specified.
38966    # Try adding .exe or .cmd
38967    if test -f "${new_path}.exe"; then
38968      input_to_shortpath="${new_path}.exe"
38969    elif test -f "${new_path}.cmd"; then
38970      input_to_shortpath="${new_path}.cmd"
38971    else
38972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38973$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38976      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38977    fi
38978  else
38979    input_to_shortpath="$new_path"
38980  fi
38981
38982  # Call helper function which possibly converts this using DOS-style short mode.
38983  # If so, the updated path is stored in $new_path.
38984  new_path="$input_to_shortpath"
38985
38986  input_path="$input_to_shortpath"
38987  # Check if we need to convert this using DOS-style short mode. If the path
38988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38989  # take no chances and rewrite it.
38990  # Note: m4 eats our [], so we need to use [ and ] instead.
38991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38992  if test "x$has_forbidden_chars" != x; then
38993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38997      # Going to short mode and back again did indeed matter. Since short mode is
38998      # case insensitive, let's make it lowercase to improve readability.
38999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39000      # Now convert it back to Unix-style (cygpath)
39001      input_path=`$CYGPATH -u "$shortmode_path"`
39002      new_path="$input_path"
39003    fi
39004  fi
39005
39006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39007  if test "x$test_cygdrive_prefix" = x; then
39008    # As a simple fix, exclude /usr/bin since it's not a real path.
39009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39011      # a path prefixed by /cygdrive for fixpath to work.
39012      new_path="$CYGWIN_ROOT_PATH$input_path"
39013    fi
39014  fi
39015
39016  # remove trailing .exe if any
39017  new_path="${new_path/%.exe/}"
39018
39019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39020
39021  # First separate the path from the arguments. This will split at the first
39022  # space.
39023  complete="$STRIP"
39024  path="${complete%% *}"
39025  tmp="$complete EOL"
39026  arguments="${tmp#* }"
39027
39028  # Input might be given as Windows format, start by converting to
39029  # unix format.
39030  new_path="$path"
39031
39032  windows_path="$new_path"
39033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39034    unix_path=`$CYGPATH -u "$windows_path"`
39035    new_path="$unix_path"
39036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39038    new_path="$unix_path"
39039  fi
39040
39041
39042  # Now try to locate executable using which
39043  new_path=`$WHICH "$new_path" 2> /dev/null`
39044
39045  if test "x$new_path" = x; then
39046    # Oops. Which didn't find the executable.
39047    # The splitting of arguments from the executable at a space might have been incorrect,
39048    # since paths with space are more likely in Windows. Give it another try with the whole
39049    # argument.
39050    path="$complete"
39051    arguments="EOL"
39052    new_path="$path"
39053
39054  windows_path="$new_path"
39055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39056    unix_path=`$CYGPATH -u "$windows_path"`
39057    new_path="$unix_path"
39058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39060    new_path="$unix_path"
39061  fi
39062
39063
39064    new_path=`$WHICH "$new_path" 2> /dev/null`
39065    # bat and cmd files are not always considered executable in MSYS causing which
39066    # to not find them
39067    if test "x$new_path" = x \
39068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39070      new_path="$path"
39071
39072  windows_path="$new_path"
39073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39074    unix_path=`$CYGPATH -u "$windows_path"`
39075    new_path="$unix_path"
39076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39078    new_path="$unix_path"
39079  fi
39080
39081    fi
39082
39083    if test "x$new_path" = x; then
39084      # It's still not found. Now this is an unrecoverable error.
39085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39086$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39087      has_space=`$ECHO "$complete" | $GREP " "`
39088      if test "x$has_space" != x; then
39089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39091      fi
39092      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39093    fi
39094  fi
39095
39096  # Now new_path has a complete unix path to the binary
39097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39098    # Keep paths in /bin as-is, but remove trailing .exe if any
39099    new_path="${new_path/%.exe/}"
39100    # Do not save /bin paths to all_fixpath_prefixes!
39101  else
39102    # Not in mixed or Windows style, start by that.
39103    new_path=`cmd //c echo $new_path`
39104
39105  input_path="$new_path"
39106  # Check if we need to convert this using DOS-style short mode. If the path
39107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39108  # take no chances and rewrite it.
39109  # Note: m4 eats our [], so we need to use [ and ] instead.
39110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39111  if test "x$has_forbidden_chars" != x; then
39112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39114  fi
39115
39116    # Output is in $new_path
39117
39118  windows_path="$new_path"
39119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39120    unix_path=`$CYGPATH -u "$windows_path"`
39121    new_path="$unix_path"
39122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39124    new_path="$unix_path"
39125  fi
39126
39127    # remove trailing .exe if any
39128    new_path="${new_path/%.exe/}"
39129
39130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39132  fi
39133
39134    else
39135      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
39144      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39145      if test -z "$is_absolute_path"; then
39146        # Path to executable is not absolute. Find it.
39147        IFS_save="$IFS"
39148        IFS=:
39149        for p in $PATH; do
39150          if test -f "$p/$path" && test -x "$p/$path"; then
39151            new_path="$p/$path"
39152            break
39153          fi
39154        done
39155        IFS="$IFS_save"
39156      else
39157        # This is an absolute path, we can use it without further modifications.
39158        new_path="$path"
39159      fi
39160
39161      if test "x$new_path" = x; then
39162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39163$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39164        has_space=`$ECHO "$complete" | $GREP " "`
39165        if test "x$has_space" != x; then
39166          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39168        fi
39169        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39170      fi
39171    fi
39172
39173    # Now join together the path and the arguments once again
39174    if test "x$arguments" != xEOL; then
39175      new_complete="$new_path ${arguments% *}"
39176    else
39177      new_complete="$new_path"
39178    fi
39179
39180    if test "x$complete" != "x$new_complete"; then
39181      STRIP="$new_complete"
39182      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39183$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39184    fi
39185  fi
39186
39187
39188
39189  # Publish this variable in the help.
39190
39191
39192  if [ -z "${NM+x}" ]; then
39193    # The variable is not set by user, try to locate tool using the code snippet
39194    for ac_prog in nm
39195do
39196  # Extract the first word of "$ac_prog", so it can be a program name with args.
39197set dummy $ac_prog; ac_word=$2
39198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39199$as_echo_n "checking for $ac_word... " >&6; }
39200if ${ac_cv_path_NM+:} false; then :
39201  $as_echo_n "(cached) " >&6
39202else
39203  case $NM in
39204  [\\/]* | ?:[\\/]*)
39205  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39206  ;;
39207  *)
39208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39209for as_dir in $PATH
39210do
39211  IFS=$as_save_IFS
39212  test -z "$as_dir" && as_dir=.
39213    for ac_exec_ext in '' $ac_executable_extensions; do
39214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39215    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39217    break 2
39218  fi
39219done
39220  done
39221IFS=$as_save_IFS
39222
39223  ;;
39224esac
39225fi
39226NM=$ac_cv_path_NM
39227if test -n "$NM"; then
39228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39229$as_echo "$NM" >&6; }
39230else
39231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39232$as_echo "no" >&6; }
39233fi
39234
39235
39236  test -n "$NM" && break
39237done
39238
39239  else
39240    # The variable is set, but is it from the command line or the environment?
39241
39242    # Try to remove the string !NM! from our list.
39243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39245      # If it failed, the variable was not from the command line. Ignore it,
39246      # but warn the user (except for BASH, which is always set by the calling BASH).
39247      if test "xNM" != xBASH; then
39248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39249$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39250      fi
39251      # Try to locate tool using the code snippet
39252      for ac_prog in nm
39253do
39254  # Extract the first word of "$ac_prog", so it can be a program name with args.
39255set dummy $ac_prog; ac_word=$2
39256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39257$as_echo_n "checking for $ac_word... " >&6; }
39258if ${ac_cv_path_NM+:} false; then :
39259  $as_echo_n "(cached) " >&6
39260else
39261  case $NM in
39262  [\\/]* | ?:[\\/]*)
39263  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39264  ;;
39265  *)
39266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39267for as_dir in $PATH
39268do
39269  IFS=$as_save_IFS
39270  test -z "$as_dir" && as_dir=.
39271    for ac_exec_ext in '' $ac_executable_extensions; do
39272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39273    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39275    break 2
39276  fi
39277done
39278  done
39279IFS=$as_save_IFS
39280
39281  ;;
39282esac
39283fi
39284NM=$ac_cv_path_NM
39285if test -n "$NM"; then
39286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39287$as_echo "$NM" >&6; }
39288else
39289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39290$as_echo "no" >&6; }
39291fi
39292
39293
39294  test -n "$NM" && break
39295done
39296
39297    else
39298      # If it succeeded, then it was overridden by the user. We will use it
39299      # for the tool.
39300
39301      # First remove it from the list of overridden variables, so we can test
39302      # for unknown variables in the end.
39303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39304
39305      # Check if we try to supply an empty value
39306      if test "x$NM" = x; then
39307        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39308$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39310$as_echo_n "checking for NM... " >&6; }
39311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39312$as_echo "disabled" >&6; }
39313      else
39314        # Check if the provided tool contains a complete path.
39315        tool_specified="$NM"
39316        tool_basename="${tool_specified##*/}"
39317        if test "x$tool_basename" = "x$tool_specified"; then
39318          # A command without a complete path is provided, search $PATH.
39319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39320$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39321          # Extract the first word of "$tool_basename", so it can be a program name with args.
39322set dummy $tool_basename; ac_word=$2
39323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39324$as_echo_n "checking for $ac_word... " >&6; }
39325if ${ac_cv_path_NM+:} false; then :
39326  $as_echo_n "(cached) " >&6
39327else
39328  case $NM in
39329  [\\/]* | ?:[\\/]*)
39330  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39331  ;;
39332  *)
39333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39334for as_dir in $PATH
39335do
39336  IFS=$as_save_IFS
39337  test -z "$as_dir" && as_dir=.
39338    for ac_exec_ext in '' $ac_executable_extensions; do
39339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39340    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39342    break 2
39343  fi
39344done
39345  done
39346IFS=$as_save_IFS
39347
39348  ;;
39349esac
39350fi
39351NM=$ac_cv_path_NM
39352if test -n "$NM"; then
39353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39354$as_echo "$NM" >&6; }
39355else
39356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39357$as_echo "no" >&6; }
39358fi
39359
39360
39361          if test "x$NM" = x; then
39362            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39363          fi
39364        else
39365          # Otherwise we believe it is a complete path. Use it as it is.
39366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39367$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39369$as_echo_n "checking for NM... " >&6; }
39370          if test ! -x "$tool_specified"; then
39371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39372$as_echo "not found" >&6; }
39373            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39374          fi
39375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39376$as_echo "$tool_specified" >&6; }
39377        fi
39378      fi
39379    fi
39380
39381  fi
39382
39383
39384
39385  # Only process if variable expands to non-empty
39386
39387  if test "x$NM" != x; then
39388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39389
39390  # First separate the path from the arguments. This will split at the first
39391  # space.
39392  complete="$NM"
39393  path="${complete%% *}"
39394  tmp="$complete EOL"
39395  arguments="${tmp#* }"
39396
39397  # Input might be given as Windows format, start by converting to
39398  # unix format.
39399  new_path=`$CYGPATH -u "$path"`
39400
39401  # Now try to locate executable using which
39402  new_path=`$WHICH "$new_path" 2> /dev/null`
39403  # bat and cmd files are not always considered executable in cygwin causing which
39404  # to not find them
39405  if test "x$new_path" = x \
39406      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39407      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39408    new_path=`$CYGPATH -u "$path"`
39409  fi
39410  if test "x$new_path" = x; then
39411    # Oops. Which didn't find the executable.
39412    # The splitting of arguments from the executable at a space might have been incorrect,
39413    # since paths with space are more likely in Windows. Give it another try with the whole
39414    # argument.
39415    path="$complete"
39416    arguments="EOL"
39417    new_path=`$CYGPATH -u "$path"`
39418    new_path=`$WHICH "$new_path" 2> /dev/null`
39419    # bat and cmd files are not always considered executable in cygwin causing which
39420    # to not find them
39421    if test "x$new_path" = x \
39422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39424      new_path=`$CYGPATH -u "$path"`
39425    fi
39426    if test "x$new_path" = x; then
39427      # It's still not found. Now this is an unrecoverable error.
39428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39429$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39430      has_space=`$ECHO "$complete" | $GREP " "`
39431      if test "x$has_space" != x; then
39432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39434      fi
39435      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39436    fi
39437  fi
39438
39439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39442  # "foo.exe" is OK but "foo" is an error.
39443  #
39444  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39445  # It is also a way to make sure we got the proper file name for the real test later on.
39446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39447  if test "x$test_shortpath" = x; then
39448    # Short path failed, file does not exist as specified.
39449    # Try adding .exe or .cmd
39450    if test -f "${new_path}.exe"; then
39451      input_to_shortpath="${new_path}.exe"
39452    elif test -f "${new_path}.cmd"; then
39453      input_to_shortpath="${new_path}.cmd"
39454    else
39455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39456$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39457      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39458$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39459      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39460    fi
39461  else
39462    input_to_shortpath="$new_path"
39463  fi
39464
39465  # Call helper function which possibly converts this using DOS-style short mode.
39466  # If so, the updated path is stored in $new_path.
39467  new_path="$input_to_shortpath"
39468
39469  input_path="$input_to_shortpath"
39470  # Check if we need to convert this using DOS-style short mode. If the path
39471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39472  # take no chances and rewrite it.
39473  # Note: m4 eats our [], so we need to use [ and ] instead.
39474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39475  if test "x$has_forbidden_chars" != x; then
39476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39480      # Going to short mode and back again did indeed matter. Since short mode is
39481      # case insensitive, let's make it lowercase to improve readability.
39482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39483      # Now convert it back to Unix-style (cygpath)
39484      input_path=`$CYGPATH -u "$shortmode_path"`
39485      new_path="$input_path"
39486    fi
39487  fi
39488
39489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39490  if test "x$test_cygdrive_prefix" = x; then
39491    # As a simple fix, exclude /usr/bin since it's not a real path.
39492    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39494      # a path prefixed by /cygdrive for fixpath to work.
39495      new_path="$CYGWIN_ROOT_PATH$input_path"
39496    fi
39497  fi
39498
39499  # remove trailing .exe if any
39500  new_path="${new_path/%.exe/}"
39501
39502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39503
39504  # First separate the path from the arguments. This will split at the first
39505  # space.
39506  complete="$NM"
39507  path="${complete%% *}"
39508  tmp="$complete EOL"
39509  arguments="${tmp#* }"
39510
39511  # Input might be given as Windows format, start by converting to
39512  # unix format.
39513  new_path="$path"
39514
39515  windows_path="$new_path"
39516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39517    unix_path=`$CYGPATH -u "$windows_path"`
39518    new_path="$unix_path"
39519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39521    new_path="$unix_path"
39522  fi
39523
39524
39525  # Now try to locate executable using which
39526  new_path=`$WHICH "$new_path" 2> /dev/null`
39527
39528  if test "x$new_path" = x; then
39529    # Oops. Which didn't find the executable.
39530    # The splitting of arguments from the executable at a space might have been incorrect,
39531    # since paths with space are more likely in Windows. Give it another try with the whole
39532    # argument.
39533    path="$complete"
39534    arguments="EOL"
39535    new_path="$path"
39536
39537  windows_path="$new_path"
39538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39539    unix_path=`$CYGPATH -u "$windows_path"`
39540    new_path="$unix_path"
39541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39543    new_path="$unix_path"
39544  fi
39545
39546
39547    new_path=`$WHICH "$new_path" 2> /dev/null`
39548    # bat and cmd files are not always considered executable in MSYS causing which
39549    # to not find them
39550    if test "x$new_path" = x \
39551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39553      new_path="$path"
39554
39555  windows_path="$new_path"
39556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39557    unix_path=`$CYGPATH -u "$windows_path"`
39558    new_path="$unix_path"
39559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39561    new_path="$unix_path"
39562  fi
39563
39564    fi
39565
39566    if test "x$new_path" = x; then
39567      # It's still not found. Now this is an unrecoverable error.
39568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39569$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39570      has_space=`$ECHO "$complete" | $GREP " "`
39571      if test "x$has_space" != x; then
39572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39574      fi
39575      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39576    fi
39577  fi
39578
39579  # Now new_path has a complete unix path to the binary
39580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39581    # Keep paths in /bin as-is, but remove trailing .exe if any
39582    new_path="${new_path/%.exe/}"
39583    # Do not save /bin paths to all_fixpath_prefixes!
39584  else
39585    # Not in mixed or Windows style, start by that.
39586    new_path=`cmd //c echo $new_path`
39587
39588  input_path="$new_path"
39589  # Check if we need to convert this using DOS-style short mode. If the path
39590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39591  # take no chances and rewrite it.
39592  # Note: m4 eats our [], so we need to use [ and ] instead.
39593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39594  if test "x$has_forbidden_chars" != x; then
39595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39597  fi
39598
39599    # Output is in $new_path
39600
39601  windows_path="$new_path"
39602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39603    unix_path=`$CYGPATH -u "$windows_path"`
39604    new_path="$unix_path"
39605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39607    new_path="$unix_path"
39608  fi
39609
39610    # remove trailing .exe if any
39611    new_path="${new_path/%.exe/}"
39612
39613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39615  fi
39616
39617    else
39618      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
39627      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39628      if test -z "$is_absolute_path"; then
39629        # Path to executable is not absolute. Find it.
39630        IFS_save="$IFS"
39631        IFS=:
39632        for p in $PATH; do
39633          if test -f "$p/$path" && test -x "$p/$path"; then
39634            new_path="$p/$path"
39635            break
39636          fi
39637        done
39638        IFS="$IFS_save"
39639      else
39640        # This is an absolute path, we can use it without further modifications.
39641        new_path="$path"
39642      fi
39643
39644      if test "x$new_path" = x; then
39645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39646$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39647        has_space=`$ECHO "$complete" | $GREP " "`
39648        if test "x$has_space" != x; then
39649          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39650$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39651        fi
39652        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39653      fi
39654    fi
39655
39656    # Now join together the path and the arguments once again
39657    if test "x$arguments" != xEOL; then
39658      new_complete="$new_path ${arguments% *}"
39659    else
39660      new_complete="$new_path"
39661    fi
39662
39663    if test "x$complete" != "x$new_complete"; then
39664      NM="$new_complete"
39665      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39666$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39667    fi
39668  fi
39669
39670
39671
39672  # Publish this variable in the help.
39673
39674
39675  if [ -z "${GNM+x}" ]; then
39676    # The variable is not set by user, try to locate tool using the code snippet
39677    for ac_prog in gnm
39678do
39679  # Extract the first word of "$ac_prog", so it can be a program name with args.
39680set dummy $ac_prog; ac_word=$2
39681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39682$as_echo_n "checking for $ac_word... " >&6; }
39683if ${ac_cv_path_GNM+:} false; then :
39684  $as_echo_n "(cached) " >&6
39685else
39686  case $GNM in
39687  [\\/]* | ?:[\\/]*)
39688  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39689  ;;
39690  *)
39691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39692for as_dir in $PATH
39693do
39694  IFS=$as_save_IFS
39695  test -z "$as_dir" && as_dir=.
39696    for ac_exec_ext in '' $ac_executable_extensions; do
39697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39698    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39700    break 2
39701  fi
39702done
39703  done
39704IFS=$as_save_IFS
39705
39706  ;;
39707esac
39708fi
39709GNM=$ac_cv_path_GNM
39710if test -n "$GNM"; then
39711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39712$as_echo "$GNM" >&6; }
39713else
39714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39715$as_echo "no" >&6; }
39716fi
39717
39718
39719  test -n "$GNM" && break
39720done
39721
39722  else
39723    # The variable is set, but is it from the command line or the environment?
39724
39725    # Try to remove the string !GNM! from our list.
39726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39728      # If it failed, the variable was not from the command line. Ignore it,
39729      # but warn the user (except for BASH, which is always set by the calling BASH).
39730      if test "xGNM" != xBASH; then
39731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39732$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39733      fi
39734      # Try to locate tool using the code snippet
39735      for ac_prog in gnm
39736do
39737  # Extract the first word of "$ac_prog", so it can be a program name with args.
39738set dummy $ac_prog; ac_word=$2
39739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39740$as_echo_n "checking for $ac_word... " >&6; }
39741if ${ac_cv_path_GNM+:} false; then :
39742  $as_echo_n "(cached) " >&6
39743else
39744  case $GNM in
39745  [\\/]* | ?:[\\/]*)
39746  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39747  ;;
39748  *)
39749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39750for as_dir in $PATH
39751do
39752  IFS=$as_save_IFS
39753  test -z "$as_dir" && as_dir=.
39754    for ac_exec_ext in '' $ac_executable_extensions; do
39755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39756    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39758    break 2
39759  fi
39760done
39761  done
39762IFS=$as_save_IFS
39763
39764  ;;
39765esac
39766fi
39767GNM=$ac_cv_path_GNM
39768if test -n "$GNM"; then
39769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39770$as_echo "$GNM" >&6; }
39771else
39772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39773$as_echo "no" >&6; }
39774fi
39775
39776
39777  test -n "$GNM" && break
39778done
39779
39780    else
39781      # If it succeeded, then it was overridden by the user. We will use it
39782      # for the tool.
39783
39784      # First remove it from the list of overridden variables, so we can test
39785      # for unknown variables in the end.
39786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39787
39788      # Check if we try to supply an empty value
39789      if test "x$GNM" = x; then
39790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39791$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39793$as_echo_n "checking for GNM... " >&6; }
39794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39795$as_echo "disabled" >&6; }
39796      else
39797        # Check if the provided tool contains a complete path.
39798        tool_specified="$GNM"
39799        tool_basename="${tool_specified##*/}"
39800        if test "x$tool_basename" = "x$tool_specified"; then
39801          # A command without a complete path is provided, search $PATH.
39802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39803$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39804          # Extract the first word of "$tool_basename", so it can be a program name with args.
39805set dummy $tool_basename; ac_word=$2
39806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39807$as_echo_n "checking for $ac_word... " >&6; }
39808if ${ac_cv_path_GNM+:} false; then :
39809  $as_echo_n "(cached) " >&6
39810else
39811  case $GNM in
39812  [\\/]* | ?:[\\/]*)
39813  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39814  ;;
39815  *)
39816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39817for as_dir in $PATH
39818do
39819  IFS=$as_save_IFS
39820  test -z "$as_dir" && as_dir=.
39821    for ac_exec_ext in '' $ac_executable_extensions; do
39822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39823    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39825    break 2
39826  fi
39827done
39828  done
39829IFS=$as_save_IFS
39830
39831  ;;
39832esac
39833fi
39834GNM=$ac_cv_path_GNM
39835if test -n "$GNM"; then
39836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39837$as_echo "$GNM" >&6; }
39838else
39839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39840$as_echo "no" >&6; }
39841fi
39842
39843
39844          if test "x$GNM" = x; then
39845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39846          fi
39847        else
39848          # Otherwise we believe it is a complete path. Use it as it is.
39849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39850$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39852$as_echo_n "checking for GNM... " >&6; }
39853          if test ! -x "$tool_specified"; then
39854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39855$as_echo "not found" >&6; }
39856            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39857          fi
39858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39859$as_echo "$tool_specified" >&6; }
39860        fi
39861      fi
39862    fi
39863
39864  fi
39865
39866
39867
39868  # Only process if variable expands to non-empty
39869
39870  if test "x$GNM" != x; then
39871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39872
39873  # First separate the path from the arguments. This will split at the first
39874  # space.
39875  complete="$GNM"
39876  path="${complete%% *}"
39877  tmp="$complete EOL"
39878  arguments="${tmp#* }"
39879
39880  # Input might be given as Windows format, start by converting to
39881  # unix format.
39882  new_path=`$CYGPATH -u "$path"`
39883
39884  # Now try to locate executable using which
39885  new_path=`$WHICH "$new_path" 2> /dev/null`
39886  # bat and cmd files are not always considered executable in cygwin causing which
39887  # to not find them
39888  if test "x$new_path" = x \
39889      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39890      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39891    new_path=`$CYGPATH -u "$path"`
39892  fi
39893  if test "x$new_path" = x; then
39894    # Oops. Which didn't find the executable.
39895    # The splitting of arguments from the executable at a space might have been incorrect,
39896    # since paths with space are more likely in Windows. Give it another try with the whole
39897    # argument.
39898    path="$complete"
39899    arguments="EOL"
39900    new_path=`$CYGPATH -u "$path"`
39901    new_path=`$WHICH "$new_path" 2> /dev/null`
39902    # bat and cmd files are not always considered executable in cygwin causing which
39903    # to not find them
39904    if test "x$new_path" = x \
39905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39907      new_path=`$CYGPATH -u "$path"`
39908    fi
39909    if test "x$new_path" = x; then
39910      # It's still not found. Now this is an unrecoverable error.
39911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39912$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39913      has_space=`$ECHO "$complete" | $GREP " "`
39914      if test "x$has_space" != x; then
39915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39917      fi
39918      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39919    fi
39920  fi
39921
39922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39925  # "foo.exe" is OK but "foo" is an error.
39926  #
39927  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39928  # It is also a way to make sure we got the proper file name for the real test later on.
39929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39930  if test "x$test_shortpath" = x; then
39931    # Short path failed, file does not exist as specified.
39932    # Try adding .exe or .cmd
39933    if test -f "${new_path}.exe"; then
39934      input_to_shortpath="${new_path}.exe"
39935    elif test -f "${new_path}.cmd"; then
39936      input_to_shortpath="${new_path}.cmd"
39937    else
39938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39939$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39942      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39943    fi
39944  else
39945    input_to_shortpath="$new_path"
39946  fi
39947
39948  # Call helper function which possibly converts this using DOS-style short mode.
39949  # If so, the updated path is stored in $new_path.
39950  new_path="$input_to_shortpath"
39951
39952  input_path="$input_to_shortpath"
39953  # Check if we need to convert this using DOS-style short mode. If the path
39954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39955  # take no chances and rewrite it.
39956  # Note: m4 eats our [], so we need to use [ and ] instead.
39957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39958  if test "x$has_forbidden_chars" != x; then
39959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39963      # Going to short mode and back again did indeed matter. Since short mode is
39964      # case insensitive, let's make it lowercase to improve readability.
39965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39966      # Now convert it back to Unix-style (cygpath)
39967      input_path=`$CYGPATH -u "$shortmode_path"`
39968      new_path="$input_path"
39969    fi
39970  fi
39971
39972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39973  if test "x$test_cygdrive_prefix" = x; then
39974    # As a simple fix, exclude /usr/bin since it's not a real path.
39975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39977      # a path prefixed by /cygdrive for fixpath to work.
39978      new_path="$CYGWIN_ROOT_PATH$input_path"
39979    fi
39980  fi
39981
39982  # remove trailing .exe if any
39983  new_path="${new_path/%.exe/}"
39984
39985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39986
39987  # First separate the path from the arguments. This will split at the first
39988  # space.
39989  complete="$GNM"
39990  path="${complete%% *}"
39991  tmp="$complete EOL"
39992  arguments="${tmp#* }"
39993
39994  # Input might be given as Windows format, start by converting to
39995  # unix format.
39996  new_path="$path"
39997
39998  windows_path="$new_path"
39999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40000    unix_path=`$CYGPATH -u "$windows_path"`
40001    new_path="$unix_path"
40002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40004    new_path="$unix_path"
40005  fi
40006
40007
40008  # Now try to locate executable using which
40009  new_path=`$WHICH "$new_path" 2> /dev/null`
40010
40011  if test "x$new_path" = x; then
40012    # Oops. Which didn't find the executable.
40013    # The splitting of arguments from the executable at a space might have been incorrect,
40014    # since paths with space are more likely in Windows. Give it another try with the whole
40015    # argument.
40016    path="$complete"
40017    arguments="EOL"
40018    new_path="$path"
40019
40020  windows_path="$new_path"
40021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40022    unix_path=`$CYGPATH -u "$windows_path"`
40023    new_path="$unix_path"
40024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40026    new_path="$unix_path"
40027  fi
40028
40029
40030    new_path=`$WHICH "$new_path" 2> /dev/null`
40031    # bat and cmd files are not always considered executable in MSYS causing which
40032    # to not find them
40033    if test "x$new_path" = x \
40034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40036      new_path="$path"
40037
40038  windows_path="$new_path"
40039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40040    unix_path=`$CYGPATH -u "$windows_path"`
40041    new_path="$unix_path"
40042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40044    new_path="$unix_path"
40045  fi
40046
40047    fi
40048
40049    if test "x$new_path" = x; then
40050      # It's still not found. Now this is an unrecoverable error.
40051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40052$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40053      has_space=`$ECHO "$complete" | $GREP " "`
40054      if test "x$has_space" != x; then
40055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40057      fi
40058      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40059    fi
40060  fi
40061
40062  # Now new_path has a complete unix path to the binary
40063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40064    # Keep paths in /bin as-is, but remove trailing .exe if any
40065    new_path="${new_path/%.exe/}"
40066    # Do not save /bin paths to all_fixpath_prefixes!
40067  else
40068    # Not in mixed or Windows style, start by that.
40069    new_path=`cmd //c echo $new_path`
40070
40071  input_path="$new_path"
40072  # Check if we need to convert this using DOS-style short mode. If the path
40073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40074  # take no chances and rewrite it.
40075  # Note: m4 eats our [], so we need to use [ and ] instead.
40076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40077  if test "x$has_forbidden_chars" != x; then
40078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40080  fi
40081
40082    # Output is in $new_path
40083
40084  windows_path="$new_path"
40085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40086    unix_path=`$CYGPATH -u "$windows_path"`
40087    new_path="$unix_path"
40088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40090    new_path="$unix_path"
40091  fi
40092
40093    # remove trailing .exe if any
40094    new_path="${new_path/%.exe/}"
40095
40096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40098  fi
40099
40100    else
40101      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
40110      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40111      if test -z "$is_absolute_path"; then
40112        # Path to executable is not absolute. Find it.
40113        IFS_save="$IFS"
40114        IFS=:
40115        for p in $PATH; do
40116          if test -f "$p/$path" && test -x "$p/$path"; then
40117            new_path="$p/$path"
40118            break
40119          fi
40120        done
40121        IFS="$IFS_save"
40122      else
40123        # This is an absolute path, we can use it without further modifications.
40124        new_path="$path"
40125      fi
40126
40127      if test "x$new_path" = x; then
40128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40129$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40130        has_space=`$ECHO "$complete" | $GREP " "`
40131        if test "x$has_space" != x; then
40132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40134        fi
40135        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40136      fi
40137    fi
40138
40139    # Now join together the path and the arguments once again
40140    if test "x$arguments" != xEOL; then
40141      new_complete="$new_path ${arguments% *}"
40142    else
40143      new_complete="$new_path"
40144    fi
40145
40146    if test "x$complete" != "x$new_complete"; then
40147      GNM="$new_complete"
40148      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40149$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40150    fi
40151  fi
40152
40153  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40154    # FIXME: we should unify this with the solaris case above.
40155
40156
40157  # Publish this variable in the help.
40158
40159
40160  if [ -z "${STRIP+x}" ]; then
40161    # The variable is not set by user, try to locate tool using the code snippet
40162    if test -n "$ac_tool_prefix"; then
40163  for ac_prog in strip
40164  do
40165    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40166set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40168$as_echo_n "checking for $ac_word... " >&6; }
40169if ${ac_cv_prog_STRIP+:} false; then :
40170  $as_echo_n "(cached) " >&6
40171else
40172  if test -n "$STRIP"; then
40173  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40174else
40175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40176for as_dir in $PATH
40177do
40178  IFS=$as_save_IFS
40179  test -z "$as_dir" && as_dir=.
40180    for ac_exec_ext in '' $ac_executable_extensions; do
40181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40182    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40184    break 2
40185  fi
40186done
40187  done
40188IFS=$as_save_IFS
40189
40190fi
40191fi
40192STRIP=$ac_cv_prog_STRIP
40193if test -n "$STRIP"; then
40194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40195$as_echo "$STRIP" >&6; }
40196else
40197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40198$as_echo "no" >&6; }
40199fi
40200
40201
40202    test -n "$STRIP" && break
40203  done
40204fi
40205if test -z "$STRIP"; then
40206  ac_ct_STRIP=$STRIP
40207  for ac_prog in strip
40208do
40209  # Extract the first word of "$ac_prog", so it can be a program name with args.
40210set dummy $ac_prog; ac_word=$2
40211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40212$as_echo_n "checking for $ac_word... " >&6; }
40213if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40214  $as_echo_n "(cached) " >&6
40215else
40216  if test -n "$ac_ct_STRIP"; then
40217  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40218else
40219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40220for as_dir in $PATH
40221do
40222  IFS=$as_save_IFS
40223  test -z "$as_dir" && as_dir=.
40224    for ac_exec_ext in '' $ac_executable_extensions; do
40225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40226    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40228    break 2
40229  fi
40230done
40231  done
40232IFS=$as_save_IFS
40233
40234fi
40235fi
40236ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40237if test -n "$ac_ct_STRIP"; then
40238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40239$as_echo "$ac_ct_STRIP" >&6; }
40240else
40241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40242$as_echo "no" >&6; }
40243fi
40244
40245
40246  test -n "$ac_ct_STRIP" && break
40247done
40248
40249  if test "x$ac_ct_STRIP" = x; then
40250    STRIP=""
40251  else
40252    case $cross_compiling:$ac_tool_warned in
40253yes:)
40254{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40255$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40256ac_tool_warned=yes ;;
40257esac
40258    STRIP=$ac_ct_STRIP
40259  fi
40260fi
40261
40262  else
40263    # The variable is set, but is it from the command line or the environment?
40264
40265    # Try to remove the string !STRIP! from our list.
40266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40268      # If it failed, the variable was not from the command line. Ignore it,
40269      # but warn the user (except for BASH, which is always set by the calling BASH).
40270      if test "xSTRIP" != xBASH; then
40271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40272$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40273      fi
40274      # Try to locate tool using the code snippet
40275      if test -n "$ac_tool_prefix"; then
40276  for ac_prog in strip
40277  do
40278    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40279set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40281$as_echo_n "checking for $ac_word... " >&6; }
40282if ${ac_cv_prog_STRIP+:} false; then :
40283  $as_echo_n "(cached) " >&6
40284else
40285  if test -n "$STRIP"; then
40286  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40287else
40288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40289for as_dir in $PATH
40290do
40291  IFS=$as_save_IFS
40292  test -z "$as_dir" && as_dir=.
40293    for ac_exec_ext in '' $ac_executable_extensions; do
40294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40295    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40297    break 2
40298  fi
40299done
40300  done
40301IFS=$as_save_IFS
40302
40303fi
40304fi
40305STRIP=$ac_cv_prog_STRIP
40306if test -n "$STRIP"; then
40307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40308$as_echo "$STRIP" >&6; }
40309else
40310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40311$as_echo "no" >&6; }
40312fi
40313
40314
40315    test -n "$STRIP" && break
40316  done
40317fi
40318if test -z "$STRIP"; then
40319  ac_ct_STRIP=$STRIP
40320  for ac_prog in strip
40321do
40322  # Extract the first word of "$ac_prog", so it can be a program name with args.
40323set dummy $ac_prog; ac_word=$2
40324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40325$as_echo_n "checking for $ac_word... " >&6; }
40326if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40327  $as_echo_n "(cached) " >&6
40328else
40329  if test -n "$ac_ct_STRIP"; then
40330  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40331else
40332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40333for as_dir in $PATH
40334do
40335  IFS=$as_save_IFS
40336  test -z "$as_dir" && as_dir=.
40337    for ac_exec_ext in '' $ac_executable_extensions; do
40338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40339    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40341    break 2
40342  fi
40343done
40344  done
40345IFS=$as_save_IFS
40346
40347fi
40348fi
40349ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40350if test -n "$ac_ct_STRIP"; then
40351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40352$as_echo "$ac_ct_STRIP" >&6; }
40353else
40354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40355$as_echo "no" >&6; }
40356fi
40357
40358
40359  test -n "$ac_ct_STRIP" && break
40360done
40361
40362  if test "x$ac_ct_STRIP" = x; then
40363    STRIP=""
40364  else
40365    case $cross_compiling:$ac_tool_warned in
40366yes:)
40367{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40368$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40369ac_tool_warned=yes ;;
40370esac
40371    STRIP=$ac_ct_STRIP
40372  fi
40373fi
40374
40375    else
40376      # If it succeeded, then it was overridden by the user. We will use it
40377      # for the tool.
40378
40379      # First remove it from the list of overridden variables, so we can test
40380      # for unknown variables in the end.
40381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40382
40383      # Check if we try to supply an empty value
40384      if test "x$STRIP" = x; then
40385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40386$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40388$as_echo_n "checking for STRIP... " >&6; }
40389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40390$as_echo "disabled" >&6; }
40391      else
40392        # Check if the provided tool contains a complete path.
40393        tool_specified="$STRIP"
40394        tool_basename="${tool_specified##*/}"
40395        if test "x$tool_basename" = "x$tool_specified"; then
40396          # A command without a complete path is provided, search $PATH.
40397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40398$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40399          # Extract the first word of "$tool_basename", so it can be a program name with args.
40400set dummy $tool_basename; ac_word=$2
40401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40402$as_echo_n "checking for $ac_word... " >&6; }
40403if ${ac_cv_path_STRIP+:} false; then :
40404  $as_echo_n "(cached) " >&6
40405else
40406  case $STRIP in
40407  [\\/]* | ?:[\\/]*)
40408  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40409  ;;
40410  *)
40411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40412for as_dir in $PATH
40413do
40414  IFS=$as_save_IFS
40415  test -z "$as_dir" && as_dir=.
40416    for ac_exec_ext in '' $ac_executable_extensions; do
40417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40418    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40420    break 2
40421  fi
40422done
40423  done
40424IFS=$as_save_IFS
40425
40426  ;;
40427esac
40428fi
40429STRIP=$ac_cv_path_STRIP
40430if test -n "$STRIP"; then
40431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40432$as_echo "$STRIP" >&6; }
40433else
40434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40435$as_echo "no" >&6; }
40436fi
40437
40438
40439          if test "x$STRIP" = x; then
40440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40441          fi
40442        else
40443          # Otherwise we believe it is a complete path. Use it as it is.
40444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40445$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40447$as_echo_n "checking for STRIP... " >&6; }
40448          if test ! -x "$tool_specified"; then
40449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40450$as_echo "not found" >&6; }
40451            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40452          fi
40453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40454$as_echo "$tool_specified" >&6; }
40455        fi
40456      fi
40457    fi
40458
40459  fi
40460
40461
40462
40463  # Only process if variable expands to non-empty
40464
40465  if test "x$STRIP" != x; then
40466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40467
40468  # First separate the path from the arguments. This will split at the first
40469  # space.
40470  complete="$STRIP"
40471  path="${complete%% *}"
40472  tmp="$complete EOL"
40473  arguments="${tmp#* }"
40474
40475  # Input might be given as Windows format, start by converting to
40476  # unix format.
40477  new_path=`$CYGPATH -u "$path"`
40478
40479  # Now try to locate executable using which
40480  new_path=`$WHICH "$new_path" 2> /dev/null`
40481  # bat and cmd files are not always considered executable in cygwin causing which
40482  # to not find them
40483  if test "x$new_path" = x \
40484      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40485      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40486    new_path=`$CYGPATH -u "$path"`
40487  fi
40488  if test "x$new_path" = x; then
40489    # Oops. Which didn't find the executable.
40490    # The splitting of arguments from the executable at a space might have been incorrect,
40491    # since paths with space are more likely in Windows. Give it another try with the whole
40492    # argument.
40493    path="$complete"
40494    arguments="EOL"
40495    new_path=`$CYGPATH -u "$path"`
40496    new_path=`$WHICH "$new_path" 2> /dev/null`
40497    # bat and cmd files are not always considered executable in cygwin causing which
40498    # to not find them
40499    if test "x$new_path" = x \
40500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40502      new_path=`$CYGPATH -u "$path"`
40503    fi
40504    if test "x$new_path" = x; then
40505      # It's still not found. Now this is an unrecoverable error.
40506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40507$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40508      has_space=`$ECHO "$complete" | $GREP " "`
40509      if test "x$has_space" != x; then
40510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40512      fi
40513      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40514    fi
40515  fi
40516
40517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40520  # "foo.exe" is OK but "foo" is an error.
40521  #
40522  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40523  # It is also a way to make sure we got the proper file name for the real test later on.
40524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40525  if test "x$test_shortpath" = x; then
40526    # Short path failed, file does not exist as specified.
40527    # Try adding .exe or .cmd
40528    if test -f "${new_path}.exe"; then
40529      input_to_shortpath="${new_path}.exe"
40530    elif test -f "${new_path}.cmd"; then
40531      input_to_shortpath="${new_path}.cmd"
40532    else
40533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40534$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40535      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40536$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40537      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40538    fi
40539  else
40540    input_to_shortpath="$new_path"
40541  fi
40542
40543  # Call helper function which possibly converts this using DOS-style short mode.
40544  # If so, the updated path is stored in $new_path.
40545  new_path="$input_to_shortpath"
40546
40547  input_path="$input_to_shortpath"
40548  # Check if we need to convert this using DOS-style short mode. If the path
40549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40550  # take no chances and rewrite it.
40551  # Note: m4 eats our [], so we need to use [ and ] instead.
40552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40553  if test "x$has_forbidden_chars" != x; then
40554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40558      # Going to short mode and back again did indeed matter. Since short mode is
40559      # case insensitive, let's make it lowercase to improve readability.
40560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40561      # Now convert it back to Unix-style (cygpath)
40562      input_path=`$CYGPATH -u "$shortmode_path"`
40563      new_path="$input_path"
40564    fi
40565  fi
40566
40567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40568  if test "x$test_cygdrive_prefix" = x; then
40569    # As a simple fix, exclude /usr/bin since it's not a real path.
40570    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40572      # a path prefixed by /cygdrive for fixpath to work.
40573      new_path="$CYGWIN_ROOT_PATH$input_path"
40574    fi
40575  fi
40576
40577  # remove trailing .exe if any
40578  new_path="${new_path/%.exe/}"
40579
40580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40581
40582  # First separate the path from the arguments. This will split at the first
40583  # space.
40584  complete="$STRIP"
40585  path="${complete%% *}"
40586  tmp="$complete EOL"
40587  arguments="${tmp#* }"
40588
40589  # Input might be given as Windows format, start by converting to
40590  # unix format.
40591  new_path="$path"
40592
40593  windows_path="$new_path"
40594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40595    unix_path=`$CYGPATH -u "$windows_path"`
40596    new_path="$unix_path"
40597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40599    new_path="$unix_path"
40600  fi
40601
40602
40603  # Now try to locate executable using which
40604  new_path=`$WHICH "$new_path" 2> /dev/null`
40605
40606  if test "x$new_path" = x; then
40607    # Oops. Which didn't find the executable.
40608    # The splitting of arguments from the executable at a space might have been incorrect,
40609    # since paths with space are more likely in Windows. Give it another try with the whole
40610    # argument.
40611    path="$complete"
40612    arguments="EOL"
40613    new_path="$path"
40614
40615  windows_path="$new_path"
40616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40617    unix_path=`$CYGPATH -u "$windows_path"`
40618    new_path="$unix_path"
40619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40621    new_path="$unix_path"
40622  fi
40623
40624
40625    new_path=`$WHICH "$new_path" 2> /dev/null`
40626    # bat and cmd files are not always considered executable in MSYS causing which
40627    # to not find them
40628    if test "x$new_path" = x \
40629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40631      new_path="$path"
40632
40633  windows_path="$new_path"
40634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40635    unix_path=`$CYGPATH -u "$windows_path"`
40636    new_path="$unix_path"
40637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40639    new_path="$unix_path"
40640  fi
40641
40642    fi
40643
40644    if test "x$new_path" = x; then
40645      # It's still not found. Now this is an unrecoverable error.
40646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40647$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40648      has_space=`$ECHO "$complete" | $GREP " "`
40649      if test "x$has_space" != x; then
40650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40652      fi
40653      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40654    fi
40655  fi
40656
40657  # Now new_path has a complete unix path to the binary
40658  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40659    # Keep paths in /bin as-is, but remove trailing .exe if any
40660    new_path="${new_path/%.exe/}"
40661    # Do not save /bin paths to all_fixpath_prefixes!
40662  else
40663    # Not in mixed or Windows style, start by that.
40664    new_path=`cmd //c echo $new_path`
40665
40666  input_path="$new_path"
40667  # Check if we need to convert this using DOS-style short mode. If the path
40668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40669  # take no chances and rewrite it.
40670  # Note: m4 eats our [], so we need to use [ and ] instead.
40671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40672  if test "x$has_forbidden_chars" != x; then
40673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40675  fi
40676
40677    # Output is in $new_path
40678
40679  windows_path="$new_path"
40680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40681    unix_path=`$CYGPATH -u "$windows_path"`
40682    new_path="$unix_path"
40683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40685    new_path="$unix_path"
40686  fi
40687
40688    # remove trailing .exe if any
40689    new_path="${new_path/%.exe/}"
40690
40691    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40692    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40693  fi
40694
40695    else
40696      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
40705      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40706      if test -z "$is_absolute_path"; then
40707        # Path to executable is not absolute. Find it.
40708        IFS_save="$IFS"
40709        IFS=:
40710        for p in $PATH; do
40711          if test -f "$p/$path" && test -x "$p/$path"; then
40712            new_path="$p/$path"
40713            break
40714          fi
40715        done
40716        IFS="$IFS_save"
40717      else
40718        # This is an absolute path, we can use it without further modifications.
40719        new_path="$path"
40720      fi
40721
40722      if test "x$new_path" = x; then
40723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40724$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40725        has_space=`$ECHO "$complete" | $GREP " "`
40726        if test "x$has_space" != x; then
40727          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40728$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40729        fi
40730        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40731      fi
40732    fi
40733
40734    # Now join together the path and the arguments once again
40735    if test "x$arguments" != xEOL; then
40736      new_complete="$new_path ${arguments% *}"
40737    else
40738      new_complete="$new_path"
40739    fi
40740
40741    if test "x$complete" != "x$new_complete"; then
40742      STRIP="$new_complete"
40743      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40744$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40745    fi
40746  fi
40747
40748    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40749
40750
40751  # Publish this variable in the help.
40752
40753
40754  if [ -z "${NM+x}" ]; then
40755    # The variable is not set by user, try to locate tool using the code snippet
40756    if test -n "$ac_tool_prefix"; then
40757  for ac_prog in nm gcc-nm
40758  do
40759    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40762$as_echo_n "checking for $ac_word... " >&6; }
40763if ${ac_cv_prog_NM+:} false; then :
40764  $as_echo_n "(cached) " >&6
40765else
40766  if test -n "$NM"; then
40767  ac_cv_prog_NM="$NM" # Let the user override the test.
40768else
40769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40770for as_dir in $PATH
40771do
40772  IFS=$as_save_IFS
40773  test -z "$as_dir" && as_dir=.
40774    for ac_exec_ext in '' $ac_executable_extensions; do
40775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40776    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40778    break 2
40779  fi
40780done
40781  done
40782IFS=$as_save_IFS
40783
40784fi
40785fi
40786NM=$ac_cv_prog_NM
40787if test -n "$NM"; then
40788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40789$as_echo "$NM" >&6; }
40790else
40791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40792$as_echo "no" >&6; }
40793fi
40794
40795
40796    test -n "$NM" && break
40797  done
40798fi
40799if test -z "$NM"; then
40800  ac_ct_NM=$NM
40801  for ac_prog in nm gcc-nm
40802do
40803  # Extract the first word of "$ac_prog", so it can be a program name with args.
40804set dummy $ac_prog; ac_word=$2
40805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40806$as_echo_n "checking for $ac_word... " >&6; }
40807if ${ac_cv_prog_ac_ct_NM+:} false; then :
40808  $as_echo_n "(cached) " >&6
40809else
40810  if test -n "$ac_ct_NM"; then
40811  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40812else
40813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40814for as_dir in $PATH
40815do
40816  IFS=$as_save_IFS
40817  test -z "$as_dir" && as_dir=.
40818    for ac_exec_ext in '' $ac_executable_extensions; do
40819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40820    ac_cv_prog_ac_ct_NM="$ac_prog"
40821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40822    break 2
40823  fi
40824done
40825  done
40826IFS=$as_save_IFS
40827
40828fi
40829fi
40830ac_ct_NM=$ac_cv_prog_ac_ct_NM
40831if test -n "$ac_ct_NM"; then
40832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40833$as_echo "$ac_ct_NM" >&6; }
40834else
40835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40836$as_echo "no" >&6; }
40837fi
40838
40839
40840  test -n "$ac_ct_NM" && break
40841done
40842
40843  if test "x$ac_ct_NM" = x; then
40844    NM=""
40845  else
40846    case $cross_compiling:$ac_tool_warned in
40847yes:)
40848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40850ac_tool_warned=yes ;;
40851esac
40852    NM=$ac_ct_NM
40853  fi
40854fi
40855
40856  else
40857    # The variable is set, but is it from the command line or the environment?
40858
40859    # Try to remove the string !NM! from our list.
40860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40862      # If it failed, the variable was not from the command line. Ignore it,
40863      # but warn the user (except for BASH, which is always set by the calling BASH).
40864      if test "xNM" != xBASH; then
40865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40866$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40867      fi
40868      # Try to locate tool using the code snippet
40869      if test -n "$ac_tool_prefix"; then
40870  for ac_prog in nm gcc-nm
40871  do
40872    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40873set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40875$as_echo_n "checking for $ac_word... " >&6; }
40876if ${ac_cv_prog_NM+:} false; then :
40877  $as_echo_n "(cached) " >&6
40878else
40879  if test -n "$NM"; then
40880  ac_cv_prog_NM="$NM" # Let the user override the test.
40881else
40882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40883for as_dir in $PATH
40884do
40885  IFS=$as_save_IFS
40886  test -z "$as_dir" && as_dir=.
40887    for ac_exec_ext in '' $ac_executable_extensions; do
40888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40889    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40891    break 2
40892  fi
40893done
40894  done
40895IFS=$as_save_IFS
40896
40897fi
40898fi
40899NM=$ac_cv_prog_NM
40900if test -n "$NM"; then
40901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40902$as_echo "$NM" >&6; }
40903else
40904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40905$as_echo "no" >&6; }
40906fi
40907
40908
40909    test -n "$NM" && break
40910  done
40911fi
40912if test -z "$NM"; then
40913  ac_ct_NM=$NM
40914  for ac_prog in nm gcc-nm
40915do
40916  # Extract the first word of "$ac_prog", so it can be a program name with args.
40917set dummy $ac_prog; ac_word=$2
40918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40919$as_echo_n "checking for $ac_word... " >&6; }
40920if ${ac_cv_prog_ac_ct_NM+:} false; then :
40921  $as_echo_n "(cached) " >&6
40922else
40923  if test -n "$ac_ct_NM"; then
40924  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40925else
40926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40927for as_dir in $PATH
40928do
40929  IFS=$as_save_IFS
40930  test -z "$as_dir" && as_dir=.
40931    for ac_exec_ext in '' $ac_executable_extensions; do
40932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40933    ac_cv_prog_ac_ct_NM="$ac_prog"
40934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40935    break 2
40936  fi
40937done
40938  done
40939IFS=$as_save_IFS
40940
40941fi
40942fi
40943ac_ct_NM=$ac_cv_prog_ac_ct_NM
40944if test -n "$ac_ct_NM"; then
40945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40946$as_echo "$ac_ct_NM" >&6; }
40947else
40948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40949$as_echo "no" >&6; }
40950fi
40951
40952
40953  test -n "$ac_ct_NM" && break
40954done
40955
40956  if test "x$ac_ct_NM" = x; then
40957    NM=""
40958  else
40959    case $cross_compiling:$ac_tool_warned in
40960yes:)
40961{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40962$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40963ac_tool_warned=yes ;;
40964esac
40965    NM=$ac_ct_NM
40966  fi
40967fi
40968
40969    else
40970      # If it succeeded, then it was overridden by the user. We will use it
40971      # for the tool.
40972
40973      # First remove it from the list of overridden variables, so we can test
40974      # for unknown variables in the end.
40975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40976
40977      # Check if we try to supply an empty value
40978      if test "x$NM" = x; then
40979        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40980$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40982$as_echo_n "checking for NM... " >&6; }
40983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40984$as_echo "disabled" >&6; }
40985      else
40986        # Check if the provided tool contains a complete path.
40987        tool_specified="$NM"
40988        tool_basename="${tool_specified##*/}"
40989        if test "x$tool_basename" = "x$tool_specified"; then
40990          # A command without a complete path is provided, search $PATH.
40991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40992$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40993          # Extract the first word of "$tool_basename", so it can be a program name with args.
40994set dummy $tool_basename; ac_word=$2
40995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40996$as_echo_n "checking for $ac_word... " >&6; }
40997if ${ac_cv_path_NM+:} false; then :
40998  $as_echo_n "(cached) " >&6
40999else
41000  case $NM in
41001  [\\/]* | ?:[\\/]*)
41002  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41003  ;;
41004  *)
41005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41006for as_dir in $PATH
41007do
41008  IFS=$as_save_IFS
41009  test -z "$as_dir" && as_dir=.
41010    for ac_exec_ext in '' $ac_executable_extensions; do
41011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41012    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41014    break 2
41015  fi
41016done
41017  done
41018IFS=$as_save_IFS
41019
41020  ;;
41021esac
41022fi
41023NM=$ac_cv_path_NM
41024if test -n "$NM"; then
41025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41026$as_echo "$NM" >&6; }
41027else
41028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41029$as_echo "no" >&6; }
41030fi
41031
41032
41033          if test "x$NM" = x; then
41034            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41035          fi
41036        else
41037          # Otherwise we believe it is a complete path. Use it as it is.
41038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41039$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41040          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41041$as_echo_n "checking for NM... " >&6; }
41042          if test ! -x "$tool_specified"; then
41043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41044$as_echo "not found" >&6; }
41045            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41046          fi
41047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41048$as_echo "$tool_specified" >&6; }
41049        fi
41050      fi
41051    fi
41052
41053  fi
41054
41055
41056    else
41057
41058
41059  # Publish this variable in the help.
41060
41061
41062  if [ -z "${NM+x}" ]; then
41063    # The variable is not set by user, try to locate tool using the code snippet
41064    if test -n "$ac_tool_prefix"; then
41065  for ac_prog in nm
41066  do
41067    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41068set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41070$as_echo_n "checking for $ac_word... " >&6; }
41071if ${ac_cv_prog_NM+:} false; then :
41072  $as_echo_n "(cached) " >&6
41073else
41074  if test -n "$NM"; then
41075  ac_cv_prog_NM="$NM" # Let the user override the test.
41076else
41077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41078for as_dir in $PATH
41079do
41080  IFS=$as_save_IFS
41081  test -z "$as_dir" && as_dir=.
41082    for ac_exec_ext in '' $ac_executable_extensions; do
41083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41084    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41086    break 2
41087  fi
41088done
41089  done
41090IFS=$as_save_IFS
41091
41092fi
41093fi
41094NM=$ac_cv_prog_NM
41095if test -n "$NM"; then
41096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41097$as_echo "$NM" >&6; }
41098else
41099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41100$as_echo "no" >&6; }
41101fi
41102
41103
41104    test -n "$NM" && break
41105  done
41106fi
41107if test -z "$NM"; then
41108  ac_ct_NM=$NM
41109  for ac_prog in nm
41110do
41111  # Extract the first word of "$ac_prog", so it can be a program name with args.
41112set dummy $ac_prog; ac_word=$2
41113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41114$as_echo_n "checking for $ac_word... " >&6; }
41115if ${ac_cv_prog_ac_ct_NM+:} false; then :
41116  $as_echo_n "(cached) " >&6
41117else
41118  if test -n "$ac_ct_NM"; then
41119  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41120else
41121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41122for as_dir in $PATH
41123do
41124  IFS=$as_save_IFS
41125  test -z "$as_dir" && as_dir=.
41126    for ac_exec_ext in '' $ac_executable_extensions; do
41127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41128    ac_cv_prog_ac_ct_NM="$ac_prog"
41129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41130    break 2
41131  fi
41132done
41133  done
41134IFS=$as_save_IFS
41135
41136fi
41137fi
41138ac_ct_NM=$ac_cv_prog_ac_ct_NM
41139if test -n "$ac_ct_NM"; then
41140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41141$as_echo "$ac_ct_NM" >&6; }
41142else
41143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41144$as_echo "no" >&6; }
41145fi
41146
41147
41148  test -n "$ac_ct_NM" && break
41149done
41150
41151  if test "x$ac_ct_NM" = x; then
41152    NM=""
41153  else
41154    case $cross_compiling:$ac_tool_warned in
41155yes:)
41156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41158ac_tool_warned=yes ;;
41159esac
41160    NM=$ac_ct_NM
41161  fi
41162fi
41163
41164  else
41165    # The variable is set, but is it from the command line or the environment?
41166
41167    # Try to remove the string !NM! from our list.
41168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41170      # If it failed, the variable was not from the command line. Ignore it,
41171      # but warn the user (except for BASH, which is always set by the calling BASH).
41172      if test "xNM" != xBASH; then
41173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41174$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41175      fi
41176      # Try to locate tool using the code snippet
41177      if test -n "$ac_tool_prefix"; then
41178  for ac_prog in nm
41179  do
41180    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41181set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41183$as_echo_n "checking for $ac_word... " >&6; }
41184if ${ac_cv_prog_NM+:} false; then :
41185  $as_echo_n "(cached) " >&6
41186else
41187  if test -n "$NM"; then
41188  ac_cv_prog_NM="$NM" # Let the user override the test.
41189else
41190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41191for as_dir in $PATH
41192do
41193  IFS=$as_save_IFS
41194  test -z "$as_dir" && as_dir=.
41195    for ac_exec_ext in '' $ac_executable_extensions; do
41196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41197    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41199    break 2
41200  fi
41201done
41202  done
41203IFS=$as_save_IFS
41204
41205fi
41206fi
41207NM=$ac_cv_prog_NM
41208if test -n "$NM"; then
41209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41210$as_echo "$NM" >&6; }
41211else
41212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41213$as_echo "no" >&6; }
41214fi
41215
41216
41217    test -n "$NM" && break
41218  done
41219fi
41220if test -z "$NM"; then
41221  ac_ct_NM=$NM
41222  for ac_prog in nm
41223do
41224  # Extract the first word of "$ac_prog", so it can be a program name with args.
41225set dummy $ac_prog; ac_word=$2
41226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41227$as_echo_n "checking for $ac_word... " >&6; }
41228if ${ac_cv_prog_ac_ct_NM+:} false; then :
41229  $as_echo_n "(cached) " >&6
41230else
41231  if test -n "$ac_ct_NM"; then
41232  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41233else
41234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41235for as_dir in $PATH
41236do
41237  IFS=$as_save_IFS
41238  test -z "$as_dir" && as_dir=.
41239    for ac_exec_ext in '' $ac_executable_extensions; do
41240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41241    ac_cv_prog_ac_ct_NM="$ac_prog"
41242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41243    break 2
41244  fi
41245done
41246  done
41247IFS=$as_save_IFS
41248
41249fi
41250fi
41251ac_ct_NM=$ac_cv_prog_ac_ct_NM
41252if test -n "$ac_ct_NM"; then
41253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41254$as_echo "$ac_ct_NM" >&6; }
41255else
41256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41257$as_echo "no" >&6; }
41258fi
41259
41260
41261  test -n "$ac_ct_NM" && break
41262done
41263
41264  if test "x$ac_ct_NM" = x; then
41265    NM=""
41266  else
41267    case $cross_compiling:$ac_tool_warned in
41268yes:)
41269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41271ac_tool_warned=yes ;;
41272esac
41273    NM=$ac_ct_NM
41274  fi
41275fi
41276
41277    else
41278      # If it succeeded, then it was overridden by the user. We will use it
41279      # for the tool.
41280
41281      # First remove it from the list of overridden variables, so we can test
41282      # for unknown variables in the end.
41283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41284
41285      # Check if we try to supply an empty value
41286      if test "x$NM" = x; then
41287        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41288$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41290$as_echo_n "checking for NM... " >&6; }
41291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41292$as_echo "disabled" >&6; }
41293      else
41294        # Check if the provided tool contains a complete path.
41295        tool_specified="$NM"
41296        tool_basename="${tool_specified##*/}"
41297        if test "x$tool_basename" = "x$tool_specified"; then
41298          # A command without a complete path is provided, search $PATH.
41299          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41300$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41301          # Extract the first word of "$tool_basename", so it can be a program name with args.
41302set dummy $tool_basename; ac_word=$2
41303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41304$as_echo_n "checking for $ac_word... " >&6; }
41305if ${ac_cv_path_NM+:} false; then :
41306  $as_echo_n "(cached) " >&6
41307else
41308  case $NM in
41309  [\\/]* | ?:[\\/]*)
41310  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41311  ;;
41312  *)
41313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41314for as_dir in $PATH
41315do
41316  IFS=$as_save_IFS
41317  test -z "$as_dir" && as_dir=.
41318    for ac_exec_ext in '' $ac_executable_extensions; do
41319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41320    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41322    break 2
41323  fi
41324done
41325  done
41326IFS=$as_save_IFS
41327
41328  ;;
41329esac
41330fi
41331NM=$ac_cv_path_NM
41332if test -n "$NM"; then
41333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41334$as_echo "$NM" >&6; }
41335else
41336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41337$as_echo "no" >&6; }
41338fi
41339
41340
41341          if test "x$NM" = x; then
41342            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41343          fi
41344        else
41345          # Otherwise we believe it is a complete path. Use it as it is.
41346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41347$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41348          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41349$as_echo_n "checking for NM... " >&6; }
41350          if test ! -x "$tool_specified"; then
41351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41352$as_echo "not found" >&6; }
41353            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41354          fi
41355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41356$as_echo "$tool_specified" >&6; }
41357        fi
41358      fi
41359    fi
41360
41361  fi
41362
41363
41364    fi
41365
41366  # Only process if variable expands to non-empty
41367
41368  if test "x$NM" != x; then
41369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41370
41371  # First separate the path from the arguments. This will split at the first
41372  # space.
41373  complete="$NM"
41374  path="${complete%% *}"
41375  tmp="$complete EOL"
41376  arguments="${tmp#* }"
41377
41378  # Input might be given as Windows format, start by converting to
41379  # unix format.
41380  new_path=`$CYGPATH -u "$path"`
41381
41382  # Now try to locate executable using which
41383  new_path=`$WHICH "$new_path" 2> /dev/null`
41384  # bat and cmd files are not always considered executable in cygwin causing which
41385  # to not find them
41386  if test "x$new_path" = x \
41387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41389    new_path=`$CYGPATH -u "$path"`
41390  fi
41391  if test "x$new_path" = x; then
41392    # Oops. Which didn't find the executable.
41393    # The splitting of arguments from the executable at a space might have been incorrect,
41394    # since paths with space are more likely in Windows. Give it another try with the whole
41395    # argument.
41396    path="$complete"
41397    arguments="EOL"
41398    new_path=`$CYGPATH -u "$path"`
41399    new_path=`$WHICH "$new_path" 2> /dev/null`
41400    # bat and cmd files are not always considered executable in cygwin causing which
41401    # to not find them
41402    if test "x$new_path" = x \
41403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41405      new_path=`$CYGPATH -u "$path"`
41406    fi
41407    if test "x$new_path" = x; then
41408      # It's still not found. Now this is an unrecoverable error.
41409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41410$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41411      has_space=`$ECHO "$complete" | $GREP " "`
41412      if test "x$has_space" != x; then
41413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41415      fi
41416      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41417    fi
41418  fi
41419
41420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41423  # "foo.exe" is OK but "foo" is an error.
41424  #
41425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41426  # It is also a way to make sure we got the proper file name for the real test later on.
41427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41428  if test "x$test_shortpath" = x; then
41429    # Short path failed, file does not exist as specified.
41430    # Try adding .exe or .cmd
41431    if test -f "${new_path}.exe"; then
41432      input_to_shortpath="${new_path}.exe"
41433    elif test -f "${new_path}.cmd"; then
41434      input_to_shortpath="${new_path}.cmd"
41435    else
41436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41437$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41440      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41441    fi
41442  else
41443    input_to_shortpath="$new_path"
41444  fi
41445
41446  # Call helper function which possibly converts this using DOS-style short mode.
41447  # If so, the updated path is stored in $new_path.
41448  new_path="$input_to_shortpath"
41449
41450  input_path="$input_to_shortpath"
41451  # Check if we need to convert this using DOS-style short mode. If the path
41452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41453  # take no chances and rewrite it.
41454  # Note: m4 eats our [], so we need to use [ and ] instead.
41455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41456  if test "x$has_forbidden_chars" != x; then
41457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41461      # Going to short mode and back again did indeed matter. Since short mode is
41462      # case insensitive, let's make it lowercase to improve readability.
41463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41464      # Now convert it back to Unix-style (cygpath)
41465      input_path=`$CYGPATH -u "$shortmode_path"`
41466      new_path="$input_path"
41467    fi
41468  fi
41469
41470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41471  if test "x$test_cygdrive_prefix" = x; then
41472    # As a simple fix, exclude /usr/bin since it's not a real path.
41473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41475      # a path prefixed by /cygdrive for fixpath to work.
41476      new_path="$CYGWIN_ROOT_PATH$input_path"
41477    fi
41478  fi
41479
41480  # remove trailing .exe if any
41481  new_path="${new_path/%.exe/}"
41482
41483    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41484
41485  # First separate the path from the arguments. This will split at the first
41486  # space.
41487  complete="$NM"
41488  path="${complete%% *}"
41489  tmp="$complete EOL"
41490  arguments="${tmp#* }"
41491
41492  # Input might be given as Windows format, start by converting to
41493  # unix format.
41494  new_path="$path"
41495
41496  windows_path="$new_path"
41497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41498    unix_path=`$CYGPATH -u "$windows_path"`
41499    new_path="$unix_path"
41500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41502    new_path="$unix_path"
41503  fi
41504
41505
41506  # Now try to locate executable using which
41507  new_path=`$WHICH "$new_path" 2> /dev/null`
41508
41509  if test "x$new_path" = x; then
41510    # Oops. Which didn't find the executable.
41511    # The splitting of arguments from the executable at a space might have been incorrect,
41512    # since paths with space are more likely in Windows. Give it another try with the whole
41513    # argument.
41514    path="$complete"
41515    arguments="EOL"
41516    new_path="$path"
41517
41518  windows_path="$new_path"
41519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41520    unix_path=`$CYGPATH -u "$windows_path"`
41521    new_path="$unix_path"
41522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41524    new_path="$unix_path"
41525  fi
41526
41527
41528    new_path=`$WHICH "$new_path" 2> /dev/null`
41529    # bat and cmd files are not always considered executable in MSYS causing which
41530    # to not find them
41531    if test "x$new_path" = x \
41532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41534      new_path="$path"
41535
41536  windows_path="$new_path"
41537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41538    unix_path=`$CYGPATH -u "$windows_path"`
41539    new_path="$unix_path"
41540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41542    new_path="$unix_path"
41543  fi
41544
41545    fi
41546
41547    if test "x$new_path" = x; then
41548      # It's still not found. Now this is an unrecoverable error.
41549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41550$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41551      has_space=`$ECHO "$complete" | $GREP " "`
41552      if test "x$has_space" != x; then
41553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41555      fi
41556      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41557    fi
41558  fi
41559
41560  # Now new_path has a complete unix path to the binary
41561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41562    # Keep paths in /bin as-is, but remove trailing .exe if any
41563    new_path="${new_path/%.exe/}"
41564    # Do not save /bin paths to all_fixpath_prefixes!
41565  else
41566    # Not in mixed or Windows style, start by that.
41567    new_path=`cmd //c echo $new_path`
41568
41569  input_path="$new_path"
41570  # Check if we need to convert this using DOS-style short mode. If the path
41571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41572  # take no chances and rewrite it.
41573  # Note: m4 eats our [], so we need to use [ and ] instead.
41574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41575  if test "x$has_forbidden_chars" != x; then
41576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41578  fi
41579
41580    # Output is in $new_path
41581
41582  windows_path="$new_path"
41583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41584    unix_path=`$CYGPATH -u "$windows_path"`
41585    new_path="$unix_path"
41586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41588    new_path="$unix_path"
41589  fi
41590
41591    # remove trailing .exe if any
41592    new_path="${new_path/%.exe/}"
41593
41594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41596  fi
41597
41598    else
41599      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
41608      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41609      if test -z "$is_absolute_path"; then
41610        # Path to executable is not absolute. Find it.
41611        IFS_save="$IFS"
41612        IFS=:
41613        for p in $PATH; do
41614          if test -f "$p/$path" && test -x "$p/$path"; then
41615            new_path="$p/$path"
41616            break
41617          fi
41618        done
41619        IFS="$IFS_save"
41620      else
41621        # This is an absolute path, we can use it without further modifications.
41622        new_path="$path"
41623      fi
41624
41625      if test "x$new_path" = x; then
41626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41627$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41628        has_space=`$ECHO "$complete" | $GREP " "`
41629        if test "x$has_space" != x; then
41630          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41632        fi
41633        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41634      fi
41635    fi
41636
41637    # Now join together the path and the arguments once again
41638    if test "x$arguments" != xEOL; then
41639      new_complete="$new_path ${arguments% *}"
41640    else
41641      new_complete="$new_path"
41642    fi
41643
41644    if test "x$complete" != "x$new_complete"; then
41645      NM="$new_complete"
41646      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41647$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41648    fi
41649  fi
41650
41651    GNM="$NM"
41652
41653  fi
41654
41655  # objcopy is used for moving debug symbols to separate files when
41656  # full debug symbols are enabled.
41657  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41658
41659
41660  # Publish this variable in the help.
41661
41662
41663  if [ -z "${OBJCOPY+x}" ]; then
41664    # The variable is not set by user, try to locate tool using the code snippet
41665    if test -n "$ac_tool_prefix"; then
41666  for ac_prog in gobjcopy objcopy
41667  do
41668    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41669set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41671$as_echo_n "checking for $ac_word... " >&6; }
41672if ${ac_cv_prog_OBJCOPY+:} false; then :
41673  $as_echo_n "(cached) " >&6
41674else
41675  if test -n "$OBJCOPY"; then
41676  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41677else
41678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41679for as_dir in $PATH
41680do
41681  IFS=$as_save_IFS
41682  test -z "$as_dir" && as_dir=.
41683    for ac_exec_ext in '' $ac_executable_extensions; do
41684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41685    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41687    break 2
41688  fi
41689done
41690  done
41691IFS=$as_save_IFS
41692
41693fi
41694fi
41695OBJCOPY=$ac_cv_prog_OBJCOPY
41696if test -n "$OBJCOPY"; then
41697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41698$as_echo "$OBJCOPY" >&6; }
41699else
41700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41701$as_echo "no" >&6; }
41702fi
41703
41704
41705    test -n "$OBJCOPY" && break
41706  done
41707fi
41708if test -z "$OBJCOPY"; then
41709  ac_ct_OBJCOPY=$OBJCOPY
41710  for ac_prog in gobjcopy objcopy
41711do
41712  # Extract the first word of "$ac_prog", so it can be a program name with args.
41713set dummy $ac_prog; ac_word=$2
41714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41715$as_echo_n "checking for $ac_word... " >&6; }
41716if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41717  $as_echo_n "(cached) " >&6
41718else
41719  if test -n "$ac_ct_OBJCOPY"; then
41720  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41721else
41722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41723for as_dir in $PATH
41724do
41725  IFS=$as_save_IFS
41726  test -z "$as_dir" && as_dir=.
41727    for ac_exec_ext in '' $ac_executable_extensions; do
41728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41729    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41731    break 2
41732  fi
41733done
41734  done
41735IFS=$as_save_IFS
41736
41737fi
41738fi
41739ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41740if test -n "$ac_ct_OBJCOPY"; then
41741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41742$as_echo "$ac_ct_OBJCOPY" >&6; }
41743else
41744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41745$as_echo "no" >&6; }
41746fi
41747
41748
41749  test -n "$ac_ct_OBJCOPY" && break
41750done
41751
41752  if test "x$ac_ct_OBJCOPY" = x; then
41753    OBJCOPY=""
41754  else
41755    case $cross_compiling:$ac_tool_warned in
41756yes:)
41757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41759ac_tool_warned=yes ;;
41760esac
41761    OBJCOPY=$ac_ct_OBJCOPY
41762  fi
41763fi
41764
41765  else
41766    # The variable is set, but is it from the command line or the environment?
41767
41768    # Try to remove the string !OBJCOPY! from our list.
41769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41771      # If it failed, the variable was not from the command line. Ignore it,
41772      # but warn the user (except for BASH, which is always set by the calling BASH).
41773      if test "xOBJCOPY" != xBASH; then
41774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41775$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41776      fi
41777      # Try to locate tool using the code snippet
41778      if test -n "$ac_tool_prefix"; then
41779  for ac_prog in gobjcopy objcopy
41780  do
41781    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41782set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41784$as_echo_n "checking for $ac_word... " >&6; }
41785if ${ac_cv_prog_OBJCOPY+:} false; then :
41786  $as_echo_n "(cached) " >&6
41787else
41788  if test -n "$OBJCOPY"; then
41789  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41790else
41791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41792for as_dir in $PATH
41793do
41794  IFS=$as_save_IFS
41795  test -z "$as_dir" && as_dir=.
41796    for ac_exec_ext in '' $ac_executable_extensions; do
41797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41798    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41800    break 2
41801  fi
41802done
41803  done
41804IFS=$as_save_IFS
41805
41806fi
41807fi
41808OBJCOPY=$ac_cv_prog_OBJCOPY
41809if test -n "$OBJCOPY"; then
41810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41811$as_echo "$OBJCOPY" >&6; }
41812else
41813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41814$as_echo "no" >&6; }
41815fi
41816
41817
41818    test -n "$OBJCOPY" && break
41819  done
41820fi
41821if test -z "$OBJCOPY"; then
41822  ac_ct_OBJCOPY=$OBJCOPY
41823  for ac_prog in gobjcopy objcopy
41824do
41825  # Extract the first word of "$ac_prog", so it can be a program name with args.
41826set dummy $ac_prog; ac_word=$2
41827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41828$as_echo_n "checking for $ac_word... " >&6; }
41829if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41830  $as_echo_n "(cached) " >&6
41831else
41832  if test -n "$ac_ct_OBJCOPY"; then
41833  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41834else
41835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41836for as_dir in $PATH
41837do
41838  IFS=$as_save_IFS
41839  test -z "$as_dir" && as_dir=.
41840    for ac_exec_ext in '' $ac_executable_extensions; do
41841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41842    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41844    break 2
41845  fi
41846done
41847  done
41848IFS=$as_save_IFS
41849
41850fi
41851fi
41852ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41853if test -n "$ac_ct_OBJCOPY"; then
41854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41855$as_echo "$ac_ct_OBJCOPY" >&6; }
41856else
41857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41858$as_echo "no" >&6; }
41859fi
41860
41861
41862  test -n "$ac_ct_OBJCOPY" && break
41863done
41864
41865  if test "x$ac_ct_OBJCOPY" = x; then
41866    OBJCOPY=""
41867  else
41868    case $cross_compiling:$ac_tool_warned in
41869yes:)
41870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41872ac_tool_warned=yes ;;
41873esac
41874    OBJCOPY=$ac_ct_OBJCOPY
41875  fi
41876fi
41877
41878    else
41879      # If it succeeded, then it was overridden by the user. We will use it
41880      # for the tool.
41881
41882      # First remove it from the list of overridden variables, so we can test
41883      # for unknown variables in the end.
41884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41885
41886      # Check if we try to supply an empty value
41887      if test "x$OBJCOPY" = x; then
41888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41889$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41891$as_echo_n "checking for OBJCOPY... " >&6; }
41892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41893$as_echo "disabled" >&6; }
41894      else
41895        # Check if the provided tool contains a complete path.
41896        tool_specified="$OBJCOPY"
41897        tool_basename="${tool_specified##*/}"
41898        if test "x$tool_basename" = "x$tool_specified"; then
41899          # A command without a complete path is provided, search $PATH.
41900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41901$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41902          # Extract the first word of "$tool_basename", so it can be a program name with args.
41903set dummy $tool_basename; ac_word=$2
41904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41905$as_echo_n "checking for $ac_word... " >&6; }
41906if ${ac_cv_path_OBJCOPY+:} false; then :
41907  $as_echo_n "(cached) " >&6
41908else
41909  case $OBJCOPY in
41910  [\\/]* | ?:[\\/]*)
41911  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41912  ;;
41913  *)
41914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41915for as_dir in $PATH
41916do
41917  IFS=$as_save_IFS
41918  test -z "$as_dir" && as_dir=.
41919    for ac_exec_ext in '' $ac_executable_extensions; do
41920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41921    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41923    break 2
41924  fi
41925done
41926  done
41927IFS=$as_save_IFS
41928
41929  ;;
41930esac
41931fi
41932OBJCOPY=$ac_cv_path_OBJCOPY
41933if test -n "$OBJCOPY"; then
41934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41935$as_echo "$OBJCOPY" >&6; }
41936else
41937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41938$as_echo "no" >&6; }
41939fi
41940
41941
41942          if test "x$OBJCOPY" = x; then
41943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41944          fi
41945        else
41946          # Otherwise we believe it is a complete path. Use it as it is.
41947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41948$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41950$as_echo_n "checking for OBJCOPY... " >&6; }
41951          if test ! -x "$tool_specified"; then
41952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41953$as_echo "not found" >&6; }
41954            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41955          fi
41956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41957$as_echo "$tool_specified" >&6; }
41958        fi
41959      fi
41960    fi
41961
41962  fi
41963
41964
41965    # Only call fixup if objcopy was found.
41966    if test -n "$OBJCOPY"; then
41967
41968  # Only process if variable expands to non-empty
41969
41970  if test "x$OBJCOPY" != x; then
41971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41972
41973  # First separate the path from the arguments. This will split at the first
41974  # space.
41975  complete="$OBJCOPY"
41976  path="${complete%% *}"
41977  tmp="$complete EOL"
41978  arguments="${tmp#* }"
41979
41980  # Input might be given as Windows format, start by converting to
41981  # unix format.
41982  new_path=`$CYGPATH -u "$path"`
41983
41984  # Now try to locate executable using which
41985  new_path=`$WHICH "$new_path" 2> /dev/null`
41986  # bat and cmd files are not always considered executable in cygwin causing which
41987  # to not find them
41988  if test "x$new_path" = x \
41989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41991    new_path=`$CYGPATH -u "$path"`
41992  fi
41993  if test "x$new_path" = x; then
41994    # Oops. Which didn't find the executable.
41995    # The splitting of arguments from the executable at a space might have been incorrect,
41996    # since paths with space are more likely in Windows. Give it another try with the whole
41997    # argument.
41998    path="$complete"
41999    arguments="EOL"
42000    new_path=`$CYGPATH -u "$path"`
42001    new_path=`$WHICH "$new_path" 2> /dev/null`
42002    # bat and cmd files are not always considered executable in cygwin causing which
42003    # to not find them
42004    if test "x$new_path" = x \
42005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42007      new_path=`$CYGPATH -u "$path"`
42008    fi
42009    if test "x$new_path" = x; then
42010      # It's still not found. Now this is an unrecoverable error.
42011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42012$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42013      has_space=`$ECHO "$complete" | $GREP " "`
42014      if test "x$has_space" != x; then
42015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42017      fi
42018      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42019    fi
42020  fi
42021
42022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42025  # "foo.exe" is OK but "foo" is an error.
42026  #
42027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42028  # It is also a way to make sure we got the proper file name for the real test later on.
42029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42030  if test "x$test_shortpath" = x; then
42031    # Short path failed, file does not exist as specified.
42032    # Try adding .exe or .cmd
42033    if test -f "${new_path}.exe"; then
42034      input_to_shortpath="${new_path}.exe"
42035    elif test -f "${new_path}.cmd"; then
42036      input_to_shortpath="${new_path}.cmd"
42037    else
42038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42039$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42042      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42043    fi
42044  else
42045    input_to_shortpath="$new_path"
42046  fi
42047
42048  # Call helper function which possibly converts this using DOS-style short mode.
42049  # If so, the updated path is stored in $new_path.
42050  new_path="$input_to_shortpath"
42051
42052  input_path="$input_to_shortpath"
42053  # Check if we need to convert this using DOS-style short mode. If the path
42054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42055  # take no chances and rewrite it.
42056  # Note: m4 eats our [], so we need to use [ and ] instead.
42057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42058  if test "x$has_forbidden_chars" != x; then
42059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42063      # Going to short mode and back again did indeed matter. Since short mode is
42064      # case insensitive, let's make it lowercase to improve readability.
42065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42066      # Now convert it back to Unix-style (cygpath)
42067      input_path=`$CYGPATH -u "$shortmode_path"`
42068      new_path="$input_path"
42069    fi
42070  fi
42071
42072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42073  if test "x$test_cygdrive_prefix" = x; then
42074    # As a simple fix, exclude /usr/bin since it's not a real path.
42075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42077      # a path prefixed by /cygdrive for fixpath to work.
42078      new_path="$CYGWIN_ROOT_PATH$input_path"
42079    fi
42080  fi
42081
42082  # remove trailing .exe if any
42083  new_path="${new_path/%.exe/}"
42084
42085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42086
42087  # First separate the path from the arguments. This will split at the first
42088  # space.
42089  complete="$OBJCOPY"
42090  path="${complete%% *}"
42091  tmp="$complete EOL"
42092  arguments="${tmp#* }"
42093
42094  # Input might be given as Windows format, start by converting to
42095  # unix format.
42096  new_path="$path"
42097
42098  windows_path="$new_path"
42099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42100    unix_path=`$CYGPATH -u "$windows_path"`
42101    new_path="$unix_path"
42102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42104    new_path="$unix_path"
42105  fi
42106
42107
42108  # Now try to locate executable using which
42109  new_path=`$WHICH "$new_path" 2> /dev/null`
42110
42111  if test "x$new_path" = x; then
42112    # Oops. Which didn't find the executable.
42113    # The splitting of arguments from the executable at a space might have been incorrect,
42114    # since paths with space are more likely in Windows. Give it another try with the whole
42115    # argument.
42116    path="$complete"
42117    arguments="EOL"
42118    new_path="$path"
42119
42120  windows_path="$new_path"
42121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42122    unix_path=`$CYGPATH -u "$windows_path"`
42123    new_path="$unix_path"
42124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42126    new_path="$unix_path"
42127  fi
42128
42129
42130    new_path=`$WHICH "$new_path" 2> /dev/null`
42131    # bat and cmd files are not always considered executable in MSYS causing which
42132    # to not find them
42133    if test "x$new_path" = x \
42134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42136      new_path="$path"
42137
42138  windows_path="$new_path"
42139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42140    unix_path=`$CYGPATH -u "$windows_path"`
42141    new_path="$unix_path"
42142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42144    new_path="$unix_path"
42145  fi
42146
42147    fi
42148
42149    if test "x$new_path" = x; then
42150      # It's still not found. Now this is an unrecoverable error.
42151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42152$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42153      has_space=`$ECHO "$complete" | $GREP " "`
42154      if test "x$has_space" != x; then
42155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42157      fi
42158      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42159    fi
42160  fi
42161
42162  # Now new_path has a complete unix path to the binary
42163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42164    # Keep paths in /bin as-is, but remove trailing .exe if any
42165    new_path="${new_path/%.exe/}"
42166    # Do not save /bin paths to all_fixpath_prefixes!
42167  else
42168    # Not in mixed or Windows style, start by that.
42169    new_path=`cmd //c echo $new_path`
42170
42171  input_path="$new_path"
42172  # Check if we need to convert this using DOS-style short mode. If the path
42173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42174  # take no chances and rewrite it.
42175  # Note: m4 eats our [], so we need to use [ and ] instead.
42176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42177  if test "x$has_forbidden_chars" != x; then
42178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42180  fi
42181
42182    # Output is in $new_path
42183
42184  windows_path="$new_path"
42185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42186    unix_path=`$CYGPATH -u "$windows_path"`
42187    new_path="$unix_path"
42188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42190    new_path="$unix_path"
42191  fi
42192
42193    # remove trailing .exe if any
42194    new_path="${new_path/%.exe/}"
42195
42196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42198  fi
42199
42200    else
42201      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
42210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42211      if test -z "$is_absolute_path"; then
42212        # Path to executable is not absolute. Find it.
42213        IFS_save="$IFS"
42214        IFS=:
42215        for p in $PATH; do
42216          if test -f "$p/$path" && test -x "$p/$path"; then
42217            new_path="$p/$path"
42218            break
42219          fi
42220        done
42221        IFS="$IFS_save"
42222      else
42223        # This is an absolute path, we can use it without further modifications.
42224        new_path="$path"
42225      fi
42226
42227      if test "x$new_path" = x; then
42228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42229$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42230        has_space=`$ECHO "$complete" | $GREP " "`
42231        if test "x$has_space" != x; then
42232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42234        fi
42235        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42236      fi
42237    fi
42238
42239    # Now join together the path and the arguments once again
42240    if test "x$arguments" != xEOL; then
42241      new_complete="$new_path ${arguments% *}"
42242    else
42243      new_complete="$new_path"
42244    fi
42245
42246    if test "x$complete" != "x$new_complete"; then
42247      OBJCOPY="$new_complete"
42248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42249$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42250    fi
42251  fi
42252
42253      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42254        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42255        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42256        # - version number is last blank separate word on first line
42257        # - version number formats that have been seen:
42258        #   - <major>.<minor>
42259        #   - <major>.<minor>.<micro>
42260        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42261        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42262         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42263              -e 's/.* //' \
42264              -e '/^[01]\./b bad' \
42265              -e '/^2\./{' \
42266              -e '  s/^2\.//' \
42267              -e '  /^[0-9]$/b bad' \
42268              -e '  /^[0-9]\./b bad' \
42269              -e '  /^1[0-9]$/b bad' \
42270              -e '  /^1[0-9]\./b bad' \
42271              -e '  /^20\./b bad' \
42272              -e '  /^21\.0$/b bad' \
42273              -e '  /^21\.0\./b bad' \
42274              -e '}' \
42275              -e ':good' \
42276              -e 's/.*/VALID_VERSION/p' \
42277              -e 'q' \
42278              -e ':bad' \
42279              -e 's/.*/BAD_VERSION/p' \
42280              -e 'q'`
42281        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42282          OBJCOPY=
42283          { $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
42284$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42285          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42286$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42287          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42288$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42289          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42290$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42291          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42292$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42293        fi
42294      fi
42295    fi
42296  fi
42297
42298
42299
42300  # Publish this variable in the help.
42301
42302
42303  if [ -z "${OBJDUMP+x}" ]; then
42304    # The variable is not set by user, try to locate tool using the code snippet
42305    if test -n "$ac_tool_prefix"; then
42306  for ac_prog in gobjdump objdump
42307  do
42308    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42309set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42311$as_echo_n "checking for $ac_word... " >&6; }
42312if ${ac_cv_prog_OBJDUMP+:} false; then :
42313  $as_echo_n "(cached) " >&6
42314else
42315  if test -n "$OBJDUMP"; then
42316  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42317else
42318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42319for as_dir in $PATH
42320do
42321  IFS=$as_save_IFS
42322  test -z "$as_dir" && as_dir=.
42323    for ac_exec_ext in '' $ac_executable_extensions; do
42324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42325    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42327    break 2
42328  fi
42329done
42330  done
42331IFS=$as_save_IFS
42332
42333fi
42334fi
42335OBJDUMP=$ac_cv_prog_OBJDUMP
42336if test -n "$OBJDUMP"; then
42337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42338$as_echo "$OBJDUMP" >&6; }
42339else
42340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42341$as_echo "no" >&6; }
42342fi
42343
42344
42345    test -n "$OBJDUMP" && break
42346  done
42347fi
42348if test -z "$OBJDUMP"; then
42349  ac_ct_OBJDUMP=$OBJDUMP
42350  for ac_prog in gobjdump objdump
42351do
42352  # Extract the first word of "$ac_prog", so it can be a program name with args.
42353set dummy $ac_prog; ac_word=$2
42354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42355$as_echo_n "checking for $ac_word... " >&6; }
42356if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42357  $as_echo_n "(cached) " >&6
42358else
42359  if test -n "$ac_ct_OBJDUMP"; then
42360  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42361else
42362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42363for as_dir in $PATH
42364do
42365  IFS=$as_save_IFS
42366  test -z "$as_dir" && as_dir=.
42367    for ac_exec_ext in '' $ac_executable_extensions; do
42368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42369    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42371    break 2
42372  fi
42373done
42374  done
42375IFS=$as_save_IFS
42376
42377fi
42378fi
42379ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42380if test -n "$ac_ct_OBJDUMP"; then
42381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42382$as_echo "$ac_ct_OBJDUMP" >&6; }
42383else
42384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42385$as_echo "no" >&6; }
42386fi
42387
42388
42389  test -n "$ac_ct_OBJDUMP" && break
42390done
42391
42392  if test "x$ac_ct_OBJDUMP" = x; then
42393    OBJDUMP=""
42394  else
42395    case $cross_compiling:$ac_tool_warned in
42396yes:)
42397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42399ac_tool_warned=yes ;;
42400esac
42401    OBJDUMP=$ac_ct_OBJDUMP
42402  fi
42403fi
42404
42405  else
42406    # The variable is set, but is it from the command line or the environment?
42407
42408    # Try to remove the string !OBJDUMP! from our list.
42409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42411      # If it failed, the variable was not from the command line. Ignore it,
42412      # but warn the user (except for BASH, which is always set by the calling BASH).
42413      if test "xOBJDUMP" != xBASH; then
42414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42415$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42416      fi
42417      # Try to locate tool using the code snippet
42418      if test -n "$ac_tool_prefix"; then
42419  for ac_prog in gobjdump objdump
42420  do
42421    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42422set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42424$as_echo_n "checking for $ac_word... " >&6; }
42425if ${ac_cv_prog_OBJDUMP+:} false; then :
42426  $as_echo_n "(cached) " >&6
42427else
42428  if test -n "$OBJDUMP"; then
42429  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42430else
42431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42432for as_dir in $PATH
42433do
42434  IFS=$as_save_IFS
42435  test -z "$as_dir" && as_dir=.
42436    for ac_exec_ext in '' $ac_executable_extensions; do
42437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42438    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42440    break 2
42441  fi
42442done
42443  done
42444IFS=$as_save_IFS
42445
42446fi
42447fi
42448OBJDUMP=$ac_cv_prog_OBJDUMP
42449if test -n "$OBJDUMP"; then
42450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42451$as_echo "$OBJDUMP" >&6; }
42452else
42453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42454$as_echo "no" >&6; }
42455fi
42456
42457
42458    test -n "$OBJDUMP" && break
42459  done
42460fi
42461if test -z "$OBJDUMP"; then
42462  ac_ct_OBJDUMP=$OBJDUMP
42463  for ac_prog in gobjdump objdump
42464do
42465  # Extract the first word of "$ac_prog", so it can be a program name with args.
42466set dummy $ac_prog; ac_word=$2
42467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42468$as_echo_n "checking for $ac_word... " >&6; }
42469if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42470  $as_echo_n "(cached) " >&6
42471else
42472  if test -n "$ac_ct_OBJDUMP"; then
42473  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42474else
42475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42476for as_dir in $PATH
42477do
42478  IFS=$as_save_IFS
42479  test -z "$as_dir" && as_dir=.
42480    for ac_exec_ext in '' $ac_executable_extensions; do
42481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42482    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42484    break 2
42485  fi
42486done
42487  done
42488IFS=$as_save_IFS
42489
42490fi
42491fi
42492ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42493if test -n "$ac_ct_OBJDUMP"; then
42494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42495$as_echo "$ac_ct_OBJDUMP" >&6; }
42496else
42497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42498$as_echo "no" >&6; }
42499fi
42500
42501
42502  test -n "$ac_ct_OBJDUMP" && break
42503done
42504
42505  if test "x$ac_ct_OBJDUMP" = x; then
42506    OBJDUMP=""
42507  else
42508    case $cross_compiling:$ac_tool_warned in
42509yes:)
42510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42512ac_tool_warned=yes ;;
42513esac
42514    OBJDUMP=$ac_ct_OBJDUMP
42515  fi
42516fi
42517
42518    else
42519      # If it succeeded, then it was overridden by the user. We will use it
42520      # for the tool.
42521
42522      # First remove it from the list of overridden variables, so we can test
42523      # for unknown variables in the end.
42524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42525
42526      # Check if we try to supply an empty value
42527      if test "x$OBJDUMP" = x; then
42528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42529$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42531$as_echo_n "checking for OBJDUMP... " >&6; }
42532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42533$as_echo "disabled" >&6; }
42534      else
42535        # Check if the provided tool contains a complete path.
42536        tool_specified="$OBJDUMP"
42537        tool_basename="${tool_specified##*/}"
42538        if test "x$tool_basename" = "x$tool_specified"; then
42539          # A command without a complete path is provided, search $PATH.
42540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42541$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42542          # Extract the first word of "$tool_basename", so it can be a program name with args.
42543set dummy $tool_basename; ac_word=$2
42544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42545$as_echo_n "checking for $ac_word... " >&6; }
42546if ${ac_cv_path_OBJDUMP+:} false; then :
42547  $as_echo_n "(cached) " >&6
42548else
42549  case $OBJDUMP in
42550  [\\/]* | ?:[\\/]*)
42551  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42552  ;;
42553  *)
42554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42555for as_dir in $PATH
42556do
42557  IFS=$as_save_IFS
42558  test -z "$as_dir" && as_dir=.
42559    for ac_exec_ext in '' $ac_executable_extensions; do
42560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42561    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42563    break 2
42564  fi
42565done
42566  done
42567IFS=$as_save_IFS
42568
42569  ;;
42570esac
42571fi
42572OBJDUMP=$ac_cv_path_OBJDUMP
42573if test -n "$OBJDUMP"; then
42574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42575$as_echo "$OBJDUMP" >&6; }
42576else
42577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42578$as_echo "no" >&6; }
42579fi
42580
42581
42582          if test "x$OBJDUMP" = x; then
42583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42584          fi
42585        else
42586          # Otherwise we believe it is a complete path. Use it as it is.
42587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42588$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42590$as_echo_n "checking for OBJDUMP... " >&6; }
42591          if test ! -x "$tool_specified"; then
42592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42593$as_echo "not found" >&6; }
42594            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42595          fi
42596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42597$as_echo "$tool_specified" >&6; }
42598        fi
42599      fi
42600    fi
42601
42602  fi
42603
42604
42605  if test "x$OBJDUMP" != x; then
42606    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42607    # bails if argument is missing.
42608
42609  # Only process if variable expands to non-empty
42610
42611  if test "x$OBJDUMP" != x; then
42612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42613
42614  # First separate the path from the arguments. This will split at the first
42615  # space.
42616  complete="$OBJDUMP"
42617  path="${complete%% *}"
42618  tmp="$complete EOL"
42619  arguments="${tmp#* }"
42620
42621  # Input might be given as Windows format, start by converting to
42622  # unix format.
42623  new_path=`$CYGPATH -u "$path"`
42624
42625  # Now try to locate executable using which
42626  new_path=`$WHICH "$new_path" 2> /dev/null`
42627  # bat and cmd files are not always considered executable in cygwin causing which
42628  # to not find them
42629  if test "x$new_path" = x \
42630      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42631      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42632    new_path=`$CYGPATH -u "$path"`
42633  fi
42634  if test "x$new_path" = x; then
42635    # Oops. Which didn't find the executable.
42636    # The splitting of arguments from the executable at a space might have been incorrect,
42637    # since paths with space are more likely in Windows. Give it another try with the whole
42638    # argument.
42639    path="$complete"
42640    arguments="EOL"
42641    new_path=`$CYGPATH -u "$path"`
42642    new_path=`$WHICH "$new_path" 2> /dev/null`
42643    # bat and cmd files are not always considered executable in cygwin causing which
42644    # to not find them
42645    if test "x$new_path" = x \
42646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42648      new_path=`$CYGPATH -u "$path"`
42649    fi
42650    if test "x$new_path" = x; then
42651      # It's still not found. Now this is an unrecoverable error.
42652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42653$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42654      has_space=`$ECHO "$complete" | $GREP " "`
42655      if test "x$has_space" != x; then
42656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42658      fi
42659      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42660    fi
42661  fi
42662
42663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42666  # "foo.exe" is OK but "foo" is an error.
42667  #
42668  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42669  # It is also a way to make sure we got the proper file name for the real test later on.
42670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42671  if test "x$test_shortpath" = x; then
42672    # Short path failed, file does not exist as specified.
42673    # Try adding .exe or .cmd
42674    if test -f "${new_path}.exe"; then
42675      input_to_shortpath="${new_path}.exe"
42676    elif test -f "${new_path}.cmd"; then
42677      input_to_shortpath="${new_path}.cmd"
42678    else
42679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42680$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42683      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42684    fi
42685  else
42686    input_to_shortpath="$new_path"
42687  fi
42688
42689  # Call helper function which possibly converts this using DOS-style short mode.
42690  # If so, the updated path is stored in $new_path.
42691  new_path="$input_to_shortpath"
42692
42693  input_path="$input_to_shortpath"
42694  # Check if we need to convert this using DOS-style short mode. If the path
42695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42696  # take no chances and rewrite it.
42697  # Note: m4 eats our [], so we need to use [ and ] instead.
42698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42699  if test "x$has_forbidden_chars" != x; then
42700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42704      # Going to short mode and back again did indeed matter. Since short mode is
42705      # case insensitive, let's make it lowercase to improve readability.
42706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42707      # Now convert it back to Unix-style (cygpath)
42708      input_path=`$CYGPATH -u "$shortmode_path"`
42709      new_path="$input_path"
42710    fi
42711  fi
42712
42713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42714  if test "x$test_cygdrive_prefix" = x; then
42715    # As a simple fix, exclude /usr/bin since it's not a real path.
42716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42718      # a path prefixed by /cygdrive for fixpath to work.
42719      new_path="$CYGWIN_ROOT_PATH$input_path"
42720    fi
42721  fi
42722
42723  # remove trailing .exe if any
42724  new_path="${new_path/%.exe/}"
42725
42726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42727
42728  # First separate the path from the arguments. This will split at the first
42729  # space.
42730  complete="$OBJDUMP"
42731  path="${complete%% *}"
42732  tmp="$complete EOL"
42733  arguments="${tmp#* }"
42734
42735  # Input might be given as Windows format, start by converting to
42736  # unix format.
42737  new_path="$path"
42738
42739  windows_path="$new_path"
42740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42741    unix_path=`$CYGPATH -u "$windows_path"`
42742    new_path="$unix_path"
42743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42745    new_path="$unix_path"
42746  fi
42747
42748
42749  # Now try to locate executable using which
42750  new_path=`$WHICH "$new_path" 2> /dev/null`
42751
42752  if test "x$new_path" = x; then
42753    # Oops. Which didn't find the executable.
42754    # The splitting of arguments from the executable at a space might have been incorrect,
42755    # since paths with space are more likely in Windows. Give it another try with the whole
42756    # argument.
42757    path="$complete"
42758    arguments="EOL"
42759    new_path="$path"
42760
42761  windows_path="$new_path"
42762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42763    unix_path=`$CYGPATH -u "$windows_path"`
42764    new_path="$unix_path"
42765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42767    new_path="$unix_path"
42768  fi
42769
42770
42771    new_path=`$WHICH "$new_path" 2> /dev/null`
42772    # bat and cmd files are not always considered executable in MSYS causing which
42773    # to not find them
42774    if test "x$new_path" = x \
42775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42777      new_path="$path"
42778
42779  windows_path="$new_path"
42780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42781    unix_path=`$CYGPATH -u "$windows_path"`
42782    new_path="$unix_path"
42783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42785    new_path="$unix_path"
42786  fi
42787
42788    fi
42789
42790    if test "x$new_path" = x; then
42791      # It's still not found. Now this is an unrecoverable error.
42792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42793$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42794      has_space=`$ECHO "$complete" | $GREP " "`
42795      if test "x$has_space" != x; then
42796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42798      fi
42799      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42800    fi
42801  fi
42802
42803  # Now new_path has a complete unix path to the binary
42804  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42805    # Keep paths in /bin as-is, but remove trailing .exe if any
42806    new_path="${new_path/%.exe/}"
42807    # Do not save /bin paths to all_fixpath_prefixes!
42808  else
42809    # Not in mixed or Windows style, start by that.
42810    new_path=`cmd //c echo $new_path`
42811
42812  input_path="$new_path"
42813  # Check if we need to convert this using DOS-style short mode. If the path
42814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42815  # take no chances and rewrite it.
42816  # Note: m4 eats our [], so we need to use [ and ] instead.
42817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42818  if test "x$has_forbidden_chars" != x; then
42819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42821  fi
42822
42823    # Output is in $new_path
42824
42825  windows_path="$new_path"
42826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42827    unix_path=`$CYGPATH -u "$windows_path"`
42828    new_path="$unix_path"
42829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42831    new_path="$unix_path"
42832  fi
42833
42834    # remove trailing .exe if any
42835    new_path="${new_path/%.exe/}"
42836
42837    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42838    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42839  fi
42840
42841    else
42842      # We're on a unix platform. Hooray! :)
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      # Cannot rely on the command "which" here since it doesn't always work.
42851      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42852      if test -z "$is_absolute_path"; then
42853        # Path to executable is not absolute. Find it.
42854        IFS_save="$IFS"
42855        IFS=:
42856        for p in $PATH; do
42857          if test -f "$p/$path" && test -x "$p/$path"; then
42858            new_path="$p/$path"
42859            break
42860          fi
42861        done
42862        IFS="$IFS_save"
42863      else
42864        # This is an absolute path, we can use it without further modifications.
42865        new_path="$path"
42866      fi
42867
42868      if test "x$new_path" = x; then
42869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42870$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42871        has_space=`$ECHO "$complete" | $GREP " "`
42872        if test "x$has_space" != x; then
42873          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42875        fi
42876        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42877      fi
42878    fi
42879
42880    # Now join together the path and the arguments once again
42881    if test "x$arguments" != xEOL; then
42882      new_complete="$new_path ${arguments% *}"
42883    else
42884      new_complete="$new_path"
42885    fi
42886
42887    if test "x$complete" != "x$new_complete"; then
42888      OBJDUMP="$new_complete"
42889      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42890$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42891    fi
42892  fi
42893
42894  fi
42895
42896
42897  # Restore old path.
42898  PATH="$OLD_PATH"
42899
42900  # Restore the flags to the user specified values.
42901  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42902  CFLAGS="$ORG_CFLAGS"
42903  CXXFLAGS="$ORG_CXXFLAGS"
42904
42905
42906# Finally do some processing after the detection phase
42907
42908  if test "x$COMPILE_TYPE" = "xcross"; then
42909    # Now we need to find a C/C++ compiler that can build executables for the
42910    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42911    # used once. Also, we need to do this without adding a tools dir to the
42912    # path, otherwise we might pick up cross-compilers which don't use standard
42913    # naming.
42914
42915    OLDPATH="$PATH"
42916
42917
42918# Check whether --with-build-devkit was given.
42919if test "${with_build_devkit+set}" = set; then :
42920  withval=$with_build_devkit;
42921fi
42922
42923    if test "x$with_build_devkit" = "xyes"; then
42924      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42925    elif test -n "$with_build_devkit"; then
42926      if test ! -d "$with_build_devkit"; then
42927        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42928      else
42929
42930  # Only process if variable expands to non-empty
42931
42932  if test "x$with_build_devkit" != x; then
42933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42934
42935  # Input might be given as Windows format, start by converting to
42936  # unix format.
42937  path="$with_build_devkit"
42938  new_path=`$CYGPATH -u "$path"`
42939
42940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42943  # "foo.exe" is OK but "foo" is an error.
42944  #
42945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42946  # It is also a way to make sure we got the proper file name for the real test later on.
42947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42948  if test "x$test_shortpath" = x; then
42949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42950$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42951    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42952  fi
42953
42954  # Call helper function which possibly converts this using DOS-style short mode.
42955  # If so, the updated path is stored in $new_path.
42956
42957  input_path="$new_path"
42958  # Check if we need to convert this using DOS-style short mode. If the path
42959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42960  # take no chances and rewrite it.
42961  # Note: m4 eats our [], so we need to use [ and ] instead.
42962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42963  if test "x$has_forbidden_chars" != x; then
42964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42968      # Going to short mode and back again did indeed matter. Since short mode is
42969      # case insensitive, let's make it lowercase to improve readability.
42970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42971      # Now convert it back to Unix-style (cygpath)
42972      input_path=`$CYGPATH -u "$shortmode_path"`
42973      new_path="$input_path"
42974    fi
42975  fi
42976
42977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42978  if test "x$test_cygdrive_prefix" = x; then
42979    # As a simple fix, exclude /usr/bin since it's not a real path.
42980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42982      # a path prefixed by /cygdrive for fixpath to work.
42983      new_path="$CYGWIN_ROOT_PATH$input_path"
42984    fi
42985  fi
42986
42987
42988  if test "x$path" != "x$new_path"; then
42989    with_build_devkit="$new_path"
42990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42991$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42992  fi
42993
42994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42995
42996  path="$with_build_devkit"
42997  has_colon=`$ECHO $path | $GREP ^.:`
42998  new_path="$path"
42999  if test "x$has_colon" = x; then
43000    # Not in mixed or Windows style, start by that.
43001    new_path=`cmd //c echo $path`
43002  fi
43003
43004
43005  input_path="$new_path"
43006  # Check if we need to convert this using DOS-style short mode. If the path
43007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43008  # take no chances and rewrite it.
43009  # Note: m4 eats our [], so we need to use [ and ] instead.
43010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43011  if test "x$has_forbidden_chars" != x; then
43012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43014  fi
43015
43016
43017  windows_path="$new_path"
43018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43019    unix_path=`$CYGPATH -u "$windows_path"`
43020    new_path="$unix_path"
43021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43023    new_path="$unix_path"
43024  fi
43025
43026  if test "x$path" != "x$new_path"; then
43027    with_build_devkit="$new_path"
43028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43029$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43030  fi
43031
43032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43034
43035    else
43036      # We're on a unix platform. Hooray! :)
43037      path="$with_build_devkit"
43038      has_space=`$ECHO "$path" | $GREP " "`
43039      if test "x$has_space" != x; then
43040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43041$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43043      fi
43044
43045      # Use eval to expand a potential ~
43046      eval path="$path"
43047      if test ! -f "$path" && test ! -d "$path"; then
43048        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43049      fi
43050
43051      if test -d "$path"; then
43052        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43053      else
43054        dir="`$DIRNAME "$path"`"
43055        base="`$BASENAME "$path"`"
43056        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43057      fi
43058    fi
43059  fi
43060
43061        BUILD_DEVKIT_ROOT="$with_build_devkit"
43062        # Check for a meta data info file in the root of the devkit
43063        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43064          # Process devkit.info so that existing devkit variables are not
43065          # modified by this
43066          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43067              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43068              -e "s/\$host/\$build/g" \
43069              $BUILD_DEVKIT_ROOT/devkit.info \
43070              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43071          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43072          # This potentially sets the following:
43073          # A descriptive name of the devkit
43074
43075  if test "x$BUILD_DEVKIT_NAME" = x; then
43076    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43077  fi
43078
43079          # Corresponds to --with-extra-path
43080
43081  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43082    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43083  fi
43084
43085          # Corresponds to --with-toolchain-path
43086
43087  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43088    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43089  fi
43090
43091          # Corresponds to --with-sysroot
43092
43093  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43094    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43095  fi
43096
43097          # Skip the Window specific parts
43098        fi
43099
43100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43101$as_echo_n "checking for build platform devkit... " >&6; }
43102        if test "x$BUILD_DEVKIT_NAME" != x; then
43103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43104$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43105        else
43106          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43107$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43108        fi
43109
43110        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43111
43112  if test "x$BUILD_SYSROOT" != "x"; then
43113    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43114      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43115        # Solaris Studio does not have a concept of sysroot. Instead we must
43116        # make sure the default include and lib dirs are appended to each
43117        # compile and link command line. Must also add -I-xbuiltin to enable
43118        # inlining of system functions and intrinsics.
43119        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43120        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43121            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43122            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43123      fi
43124    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43125      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43126      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43127    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43128      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43129      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43130    fi
43131    # Propagate the sysroot args to hotspot
43132    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43133    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43134    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43135    # The global CFLAGS and LDFLAGS variables need these for configure to function
43136    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43137    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43138    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43139    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43140  fi
43141
43142  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43143    # We also need -iframework<path>/System/Library/Frameworks
43144    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43145    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43146    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43147    # set this here so it doesn't have to be peppered throughout the forest
43148    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43149    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43150  fi
43151
43152
43153
43154
43155
43156         # Fallback default of just /bin if DEVKIT_PATH is not defined
43157        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43158          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43159        fi
43160        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43161      fi
43162    fi
43163
43164    # FIXME: we should list the discovered compilers as an exclude pattern!
43165    # If we do that, we can do this detection before POST_DETECTION, and still
43166    # find the build compilers in the tools dir, if needed.
43167
43168
43169
43170  # Publish this variable in the help.
43171
43172
43173  if [ -z "${BUILD_CC+x}" ]; then
43174    # The variable is not set by user, try to locate tool using the code snippet
43175    for ac_prog in cl cc gcc
43176do
43177  # Extract the first word of "$ac_prog", so it can be a program name with args.
43178set dummy $ac_prog; ac_word=$2
43179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43180$as_echo_n "checking for $ac_word... " >&6; }
43181if ${ac_cv_path_BUILD_CC+:} false; then :
43182  $as_echo_n "(cached) " >&6
43183else
43184  case $BUILD_CC in
43185  [\\/]* | ?:[\\/]*)
43186  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43187  ;;
43188  *)
43189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43190for as_dir in $PATH
43191do
43192  IFS=$as_save_IFS
43193  test -z "$as_dir" && as_dir=.
43194    for ac_exec_ext in '' $ac_executable_extensions; do
43195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43196    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43198    break 2
43199  fi
43200done
43201  done
43202IFS=$as_save_IFS
43203
43204  ;;
43205esac
43206fi
43207BUILD_CC=$ac_cv_path_BUILD_CC
43208if test -n "$BUILD_CC"; then
43209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43210$as_echo "$BUILD_CC" >&6; }
43211else
43212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43213$as_echo "no" >&6; }
43214fi
43215
43216
43217  test -n "$BUILD_CC" && break
43218done
43219
43220  else
43221    # The variable is set, but is it from the command line or the environment?
43222
43223    # Try to remove the string !BUILD_CC! from our list.
43224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43226      # If it failed, the variable was not from the command line. Ignore it,
43227      # but warn the user (except for BASH, which is always set by the calling BASH).
43228      if test "xBUILD_CC" != xBASH; then
43229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43230$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43231      fi
43232      # Try to locate tool using the code snippet
43233      for ac_prog in cl cc gcc
43234do
43235  # Extract the first word of "$ac_prog", so it can be a program name with args.
43236set dummy $ac_prog; ac_word=$2
43237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43238$as_echo_n "checking for $ac_word... " >&6; }
43239if ${ac_cv_path_BUILD_CC+:} false; then :
43240  $as_echo_n "(cached) " >&6
43241else
43242  case $BUILD_CC in
43243  [\\/]* | ?:[\\/]*)
43244  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43245  ;;
43246  *)
43247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43248for as_dir in $PATH
43249do
43250  IFS=$as_save_IFS
43251  test -z "$as_dir" && as_dir=.
43252    for ac_exec_ext in '' $ac_executable_extensions; do
43253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43254    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43256    break 2
43257  fi
43258done
43259  done
43260IFS=$as_save_IFS
43261
43262  ;;
43263esac
43264fi
43265BUILD_CC=$ac_cv_path_BUILD_CC
43266if test -n "$BUILD_CC"; then
43267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43268$as_echo "$BUILD_CC" >&6; }
43269else
43270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43271$as_echo "no" >&6; }
43272fi
43273
43274
43275  test -n "$BUILD_CC" && break
43276done
43277
43278    else
43279      # If it succeeded, then it was overridden by the user. We will use it
43280      # for the tool.
43281
43282      # First remove it from the list of overridden variables, so we can test
43283      # for unknown variables in the end.
43284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43285
43286      # Check if we try to supply an empty value
43287      if test "x$BUILD_CC" = x; then
43288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43289$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43291$as_echo_n "checking for BUILD_CC... " >&6; }
43292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43293$as_echo "disabled" >&6; }
43294      else
43295        # Check if the provided tool contains a complete path.
43296        tool_specified="$BUILD_CC"
43297        tool_basename="${tool_specified##*/}"
43298        if test "x$tool_basename" = "x$tool_specified"; then
43299          # A command without a complete path is provided, search $PATH.
43300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43301$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43302          # Extract the first word of "$tool_basename", so it can be a program name with args.
43303set dummy $tool_basename; ac_word=$2
43304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43305$as_echo_n "checking for $ac_word... " >&6; }
43306if ${ac_cv_path_BUILD_CC+:} false; then :
43307  $as_echo_n "(cached) " >&6
43308else
43309  case $BUILD_CC in
43310  [\\/]* | ?:[\\/]*)
43311  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43312  ;;
43313  *)
43314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43315for as_dir in $PATH
43316do
43317  IFS=$as_save_IFS
43318  test -z "$as_dir" && as_dir=.
43319    for ac_exec_ext in '' $ac_executable_extensions; do
43320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43321    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43323    break 2
43324  fi
43325done
43326  done
43327IFS=$as_save_IFS
43328
43329  ;;
43330esac
43331fi
43332BUILD_CC=$ac_cv_path_BUILD_CC
43333if test -n "$BUILD_CC"; then
43334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43335$as_echo "$BUILD_CC" >&6; }
43336else
43337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43338$as_echo "no" >&6; }
43339fi
43340
43341
43342          if test "x$BUILD_CC" = x; then
43343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43344          fi
43345        else
43346          # Otherwise we believe it is a complete path. Use it as it is.
43347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43348$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43350$as_echo_n "checking for BUILD_CC... " >&6; }
43351          if test ! -x "$tool_specified"; then
43352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43353$as_echo "not found" >&6; }
43354            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43355          fi
43356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43357$as_echo "$tool_specified" >&6; }
43358        fi
43359      fi
43360    fi
43361
43362  fi
43363
43364
43365
43366  if test "x$BUILD_CC" = x; then
43367    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43368  fi
43369
43370
43371
43372  # Only process if variable expands to non-empty
43373
43374  if test "x$BUILD_CC" != x; then
43375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43376
43377  # First separate the path from the arguments. This will split at the first
43378  # space.
43379  complete="$BUILD_CC"
43380  path="${complete%% *}"
43381  tmp="$complete EOL"
43382  arguments="${tmp#* }"
43383
43384  # Input might be given as Windows format, start by converting to
43385  # unix format.
43386  new_path=`$CYGPATH -u "$path"`
43387
43388  # Now try to locate executable using which
43389  new_path=`$WHICH "$new_path" 2> /dev/null`
43390  # bat and cmd files are not always considered executable in cygwin causing which
43391  # to not find them
43392  if test "x$new_path" = x \
43393      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43394      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43395    new_path=`$CYGPATH -u "$path"`
43396  fi
43397  if test "x$new_path" = x; then
43398    # Oops. Which didn't find the executable.
43399    # The splitting of arguments from the executable at a space might have been incorrect,
43400    # since paths with space are more likely in Windows. Give it another try with the whole
43401    # argument.
43402    path="$complete"
43403    arguments="EOL"
43404    new_path=`$CYGPATH -u "$path"`
43405    new_path=`$WHICH "$new_path" 2> /dev/null`
43406    # bat and cmd files are not always considered executable in cygwin causing which
43407    # to not find them
43408    if test "x$new_path" = x \
43409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43411      new_path=`$CYGPATH -u "$path"`
43412    fi
43413    if test "x$new_path" = x; then
43414      # It's still not found. Now this is an unrecoverable error.
43415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43416$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43417      has_space=`$ECHO "$complete" | $GREP " "`
43418      if test "x$has_space" != x; then
43419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43421      fi
43422      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43423    fi
43424  fi
43425
43426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43429  # "foo.exe" is OK but "foo" is an error.
43430  #
43431  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43432  # It is also a way to make sure we got the proper file name for the real test later on.
43433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43434  if test "x$test_shortpath" = x; then
43435    # Short path failed, file does not exist as specified.
43436    # Try adding .exe or .cmd
43437    if test -f "${new_path}.exe"; then
43438      input_to_shortpath="${new_path}.exe"
43439    elif test -f "${new_path}.cmd"; then
43440      input_to_shortpath="${new_path}.cmd"
43441    else
43442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43443$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43444      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43445$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43446      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43447    fi
43448  else
43449    input_to_shortpath="$new_path"
43450  fi
43451
43452  # Call helper function which possibly converts this using DOS-style short mode.
43453  # If so, the updated path is stored in $new_path.
43454  new_path="$input_to_shortpath"
43455
43456  input_path="$input_to_shortpath"
43457  # Check if we need to convert this using DOS-style short mode. If the path
43458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43459  # take no chances and rewrite it.
43460  # Note: m4 eats our [], so we need to use [ and ] instead.
43461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43462  if test "x$has_forbidden_chars" != x; then
43463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43467      # Going to short mode and back again did indeed matter. Since short mode is
43468      # case insensitive, let's make it lowercase to improve readability.
43469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43470      # Now convert it back to Unix-style (cygpath)
43471      input_path=`$CYGPATH -u "$shortmode_path"`
43472      new_path="$input_path"
43473    fi
43474  fi
43475
43476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43477  if test "x$test_cygdrive_prefix" = x; then
43478    # As a simple fix, exclude /usr/bin since it's not a real path.
43479    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43481      # a path prefixed by /cygdrive for fixpath to work.
43482      new_path="$CYGWIN_ROOT_PATH$input_path"
43483    fi
43484  fi
43485
43486  # remove trailing .exe if any
43487  new_path="${new_path/%.exe/}"
43488
43489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; 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="$path"
43501
43502  windows_path="$new_path"
43503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43504    unix_path=`$CYGPATH -u "$windows_path"`
43505    new_path="$unix_path"
43506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43508    new_path="$unix_path"
43509  fi
43510
43511
43512  # Now try to locate executable using which
43513  new_path=`$WHICH "$new_path" 2> /dev/null`
43514
43515  if test "x$new_path" = x; then
43516    # Oops. Which didn't find the executable.
43517    # The splitting of arguments from the executable at a space might have been incorrect,
43518    # since paths with space are more likely in Windows. Give it another try with the whole
43519    # argument.
43520    path="$complete"
43521    arguments="EOL"
43522    new_path="$path"
43523
43524  windows_path="$new_path"
43525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43526    unix_path=`$CYGPATH -u "$windows_path"`
43527    new_path="$unix_path"
43528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43530    new_path="$unix_path"
43531  fi
43532
43533
43534    new_path=`$WHICH "$new_path" 2> /dev/null`
43535    # bat and cmd files are not always considered executable in MSYS causing which
43536    # to not find them
43537    if test "x$new_path" = x \
43538        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43539        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43540      new_path="$path"
43541
43542  windows_path="$new_path"
43543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43544    unix_path=`$CYGPATH -u "$windows_path"`
43545    new_path="$unix_path"
43546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43548    new_path="$unix_path"
43549  fi
43550
43551    fi
43552
43553    if test "x$new_path" = x; then
43554      # It's still not found. Now this is an unrecoverable error.
43555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43556$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43557      has_space=`$ECHO "$complete" | $GREP " "`
43558      if test "x$has_space" != x; then
43559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43561      fi
43562      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43563    fi
43564  fi
43565
43566  # Now new_path has a complete unix path to the binary
43567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43568    # Keep paths in /bin as-is, but remove trailing .exe if any
43569    new_path="${new_path/%.exe/}"
43570    # Do not save /bin paths to all_fixpath_prefixes!
43571  else
43572    # Not in mixed or Windows style, start by that.
43573    new_path=`cmd //c echo $new_path`
43574
43575  input_path="$new_path"
43576  # Check if we need to convert this using DOS-style short mode. If the path
43577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43578  # take no chances and rewrite it.
43579  # Note: m4 eats our [], so we need to use [ and ] instead.
43580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43581  if test "x$has_forbidden_chars" != x; then
43582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43584  fi
43585
43586    # Output is in $new_path
43587
43588  windows_path="$new_path"
43589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43590    unix_path=`$CYGPATH -u "$windows_path"`
43591    new_path="$unix_path"
43592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43594    new_path="$unix_path"
43595  fi
43596
43597    # remove trailing .exe if any
43598    new_path="${new_path/%.exe/}"
43599
43600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43602  fi
43603
43604    else
43605      # We're on a unix platform. Hooray! :)
43606      # First separate the path from the arguments. This will split at the first
43607      # space.
43608      complete="$BUILD_CC"
43609      path="${complete%% *}"
43610      tmp="$complete EOL"
43611      arguments="${tmp#* }"
43612
43613      # Cannot rely on the command "which" here since it doesn't always work.
43614      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43615      if test -z "$is_absolute_path"; then
43616        # Path to executable is not absolute. Find it.
43617        IFS_save="$IFS"
43618        IFS=:
43619        for p in $PATH; do
43620          if test -f "$p/$path" && test -x "$p/$path"; then
43621            new_path="$p/$path"
43622            break
43623          fi
43624        done
43625        IFS="$IFS_save"
43626      else
43627        # This is an absolute path, we can use it without further modifications.
43628        new_path="$path"
43629      fi
43630
43631      if test "x$new_path" = x; then
43632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43633$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43634        has_space=`$ECHO "$complete" | $GREP " "`
43635        if test "x$has_space" != x; then
43636          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43637$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43638        fi
43639        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43640      fi
43641    fi
43642
43643    # Now join together the path and the arguments once again
43644    if test "x$arguments" != xEOL; then
43645      new_complete="$new_path ${arguments% *}"
43646    else
43647      new_complete="$new_path"
43648    fi
43649
43650    if test "x$complete" != "x$new_complete"; then
43651      BUILD_CC="$new_complete"
43652      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43653$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43654    fi
43655  fi
43656
43657
43658
43659
43660  # Publish this variable in the help.
43661
43662
43663  if [ -z "${BUILD_CXX+x}" ]; then
43664    # The variable is not set by user, try to locate tool using the code snippet
43665    for ac_prog in cl CC g++
43666do
43667  # Extract the first word of "$ac_prog", so it can be a program name with args.
43668set dummy $ac_prog; ac_word=$2
43669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43670$as_echo_n "checking for $ac_word... " >&6; }
43671if ${ac_cv_path_BUILD_CXX+:} false; then :
43672  $as_echo_n "(cached) " >&6
43673else
43674  case $BUILD_CXX in
43675  [\\/]* | ?:[\\/]*)
43676  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43677  ;;
43678  *)
43679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43680for as_dir in $PATH
43681do
43682  IFS=$as_save_IFS
43683  test -z "$as_dir" && as_dir=.
43684    for ac_exec_ext in '' $ac_executable_extensions; do
43685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43686    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43688    break 2
43689  fi
43690done
43691  done
43692IFS=$as_save_IFS
43693
43694  ;;
43695esac
43696fi
43697BUILD_CXX=$ac_cv_path_BUILD_CXX
43698if test -n "$BUILD_CXX"; then
43699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43700$as_echo "$BUILD_CXX" >&6; }
43701else
43702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43703$as_echo "no" >&6; }
43704fi
43705
43706
43707  test -n "$BUILD_CXX" && break
43708done
43709
43710  else
43711    # The variable is set, but is it from the command line or the environment?
43712
43713    # Try to remove the string !BUILD_CXX! from our list.
43714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43716      # If it failed, the variable was not from the command line. Ignore it,
43717      # but warn the user (except for BASH, which is always set by the calling BASH).
43718      if test "xBUILD_CXX" != xBASH; then
43719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43720$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43721      fi
43722      # Try to locate tool using the code snippet
43723      for ac_prog in cl CC g++
43724do
43725  # Extract the first word of "$ac_prog", so it can be a program name with args.
43726set dummy $ac_prog; ac_word=$2
43727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43728$as_echo_n "checking for $ac_word... " >&6; }
43729if ${ac_cv_path_BUILD_CXX+:} false; then :
43730  $as_echo_n "(cached) " >&6
43731else
43732  case $BUILD_CXX in
43733  [\\/]* | ?:[\\/]*)
43734  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43735  ;;
43736  *)
43737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43738for as_dir in $PATH
43739do
43740  IFS=$as_save_IFS
43741  test -z "$as_dir" && as_dir=.
43742    for ac_exec_ext in '' $ac_executable_extensions; do
43743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43744    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43746    break 2
43747  fi
43748done
43749  done
43750IFS=$as_save_IFS
43751
43752  ;;
43753esac
43754fi
43755BUILD_CXX=$ac_cv_path_BUILD_CXX
43756if test -n "$BUILD_CXX"; then
43757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43758$as_echo "$BUILD_CXX" >&6; }
43759else
43760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43761$as_echo "no" >&6; }
43762fi
43763
43764
43765  test -n "$BUILD_CXX" && break
43766done
43767
43768    else
43769      # If it succeeded, then it was overridden by the user. We will use it
43770      # for the tool.
43771
43772      # First remove it from the list of overridden variables, so we can test
43773      # for unknown variables in the end.
43774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43775
43776      # Check if we try to supply an empty value
43777      if test "x$BUILD_CXX" = x; then
43778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43779$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43781$as_echo_n "checking for BUILD_CXX... " >&6; }
43782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43783$as_echo "disabled" >&6; }
43784      else
43785        # Check if the provided tool contains a complete path.
43786        tool_specified="$BUILD_CXX"
43787        tool_basename="${tool_specified##*/}"
43788        if test "x$tool_basename" = "x$tool_specified"; then
43789          # A command without a complete path is provided, search $PATH.
43790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43791$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43792          # Extract the first word of "$tool_basename", so it can be a program name with args.
43793set dummy $tool_basename; ac_word=$2
43794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43795$as_echo_n "checking for $ac_word... " >&6; }
43796if ${ac_cv_path_BUILD_CXX+:} false; then :
43797  $as_echo_n "(cached) " >&6
43798else
43799  case $BUILD_CXX in
43800  [\\/]* | ?:[\\/]*)
43801  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43802  ;;
43803  *)
43804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43805for as_dir in $PATH
43806do
43807  IFS=$as_save_IFS
43808  test -z "$as_dir" && as_dir=.
43809    for ac_exec_ext in '' $ac_executable_extensions; do
43810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43811    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43813    break 2
43814  fi
43815done
43816  done
43817IFS=$as_save_IFS
43818
43819  ;;
43820esac
43821fi
43822BUILD_CXX=$ac_cv_path_BUILD_CXX
43823if test -n "$BUILD_CXX"; then
43824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43825$as_echo "$BUILD_CXX" >&6; }
43826else
43827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43828$as_echo "no" >&6; }
43829fi
43830
43831
43832          if test "x$BUILD_CXX" = x; then
43833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43834          fi
43835        else
43836          # Otherwise we believe it is a complete path. Use it as it is.
43837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43838$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43840$as_echo_n "checking for BUILD_CXX... " >&6; }
43841          if test ! -x "$tool_specified"; then
43842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43843$as_echo "not found" >&6; }
43844            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43845          fi
43846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43847$as_echo "$tool_specified" >&6; }
43848        fi
43849      fi
43850    fi
43851
43852  fi
43853
43854
43855
43856  if test "x$BUILD_CXX" = x; then
43857    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43858  fi
43859
43860
43861
43862  # Only process if variable expands to non-empty
43863
43864  if test "x$BUILD_CXX" != x; then
43865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43866
43867  # First separate the path from the arguments. This will split at the first
43868  # space.
43869  complete="$BUILD_CXX"
43870  path="${complete%% *}"
43871  tmp="$complete EOL"
43872  arguments="${tmp#* }"
43873
43874  # Input might be given as Windows format, start by converting to
43875  # unix format.
43876  new_path=`$CYGPATH -u "$path"`
43877
43878  # Now try to locate executable using which
43879  new_path=`$WHICH "$new_path" 2> /dev/null`
43880  # bat and cmd files are not always considered executable in cygwin causing which
43881  # to not find them
43882  if test "x$new_path" = x \
43883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43885    new_path=`$CYGPATH -u "$path"`
43886  fi
43887  if test "x$new_path" = x; then
43888    # Oops. Which didn't find the executable.
43889    # The splitting of arguments from the executable at a space might have been incorrect,
43890    # since paths with space are more likely in Windows. Give it another try with the whole
43891    # argument.
43892    path="$complete"
43893    arguments="EOL"
43894    new_path=`$CYGPATH -u "$path"`
43895    new_path=`$WHICH "$new_path" 2> /dev/null`
43896    # bat and cmd files are not always considered executable in cygwin causing which
43897    # to not find them
43898    if test "x$new_path" = x \
43899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43901      new_path=`$CYGPATH -u "$path"`
43902    fi
43903    if test "x$new_path" = x; then
43904      # It's still not found. Now this is an unrecoverable error.
43905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43906$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43907      has_space=`$ECHO "$complete" | $GREP " "`
43908      if test "x$has_space" != x; then
43909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43911      fi
43912      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43913    fi
43914  fi
43915
43916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43919  # "foo.exe" is OK but "foo" is an error.
43920  #
43921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43922  # It is also a way to make sure we got the proper file name for the real test later on.
43923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43924  if test "x$test_shortpath" = x; then
43925    # Short path failed, file does not exist as specified.
43926    # Try adding .exe or .cmd
43927    if test -f "${new_path}.exe"; then
43928      input_to_shortpath="${new_path}.exe"
43929    elif test -f "${new_path}.cmd"; then
43930      input_to_shortpath="${new_path}.cmd"
43931    else
43932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43933$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43936      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43937    fi
43938  else
43939    input_to_shortpath="$new_path"
43940  fi
43941
43942  # Call helper function which possibly converts this using DOS-style short mode.
43943  # If so, the updated path is stored in $new_path.
43944  new_path="$input_to_shortpath"
43945
43946  input_path="$input_to_shortpath"
43947  # Check if we need to convert this using DOS-style short mode. If the path
43948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43949  # take no chances and rewrite it.
43950  # Note: m4 eats our [], so we need to use [ and ] instead.
43951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43952  if test "x$has_forbidden_chars" != x; then
43953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43957      # Going to short mode and back again did indeed matter. Since short mode is
43958      # case insensitive, let's make it lowercase to improve readability.
43959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43960      # Now convert it back to Unix-style (cygpath)
43961      input_path=`$CYGPATH -u "$shortmode_path"`
43962      new_path="$input_path"
43963    fi
43964  fi
43965
43966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43967  if test "x$test_cygdrive_prefix" = x; then
43968    # As a simple fix, exclude /usr/bin since it's not a real path.
43969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43971      # a path prefixed by /cygdrive for fixpath to work.
43972      new_path="$CYGWIN_ROOT_PATH$input_path"
43973    fi
43974  fi
43975
43976  # remove trailing .exe if any
43977  new_path="${new_path/%.exe/}"
43978
43979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; 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="$path"
43991
43992  windows_path="$new_path"
43993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43994    unix_path=`$CYGPATH -u "$windows_path"`
43995    new_path="$unix_path"
43996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43998    new_path="$unix_path"
43999  fi
44000
44001
44002  # Now try to locate executable using which
44003  new_path=`$WHICH "$new_path" 2> /dev/null`
44004
44005  if test "x$new_path" = x; then
44006    # Oops. Which didn't find the executable.
44007    # The splitting of arguments from the executable at a space might have been incorrect,
44008    # since paths with space are more likely in Windows. Give it another try with the whole
44009    # argument.
44010    path="$complete"
44011    arguments="EOL"
44012    new_path="$path"
44013
44014  windows_path="$new_path"
44015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44016    unix_path=`$CYGPATH -u "$windows_path"`
44017    new_path="$unix_path"
44018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44020    new_path="$unix_path"
44021  fi
44022
44023
44024    new_path=`$WHICH "$new_path" 2> /dev/null`
44025    # bat and cmd files are not always considered executable in MSYS causing which
44026    # to not find them
44027    if test "x$new_path" = x \
44028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44030      new_path="$path"
44031
44032  windows_path="$new_path"
44033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44034    unix_path=`$CYGPATH -u "$windows_path"`
44035    new_path="$unix_path"
44036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44038    new_path="$unix_path"
44039  fi
44040
44041    fi
44042
44043    if test "x$new_path" = x; then
44044      # It's still not found. Now this is an unrecoverable error.
44045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44046$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44047      has_space=`$ECHO "$complete" | $GREP " "`
44048      if test "x$has_space" != x; then
44049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44051      fi
44052      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44053    fi
44054  fi
44055
44056  # Now new_path has a complete unix path to the binary
44057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44058    # Keep paths in /bin as-is, but remove trailing .exe if any
44059    new_path="${new_path/%.exe/}"
44060    # Do not save /bin paths to all_fixpath_prefixes!
44061  else
44062    # Not in mixed or Windows style, start by that.
44063    new_path=`cmd //c echo $new_path`
44064
44065  input_path="$new_path"
44066  # Check if we need to convert this using DOS-style short mode. If the path
44067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44068  # take no chances and rewrite it.
44069  # Note: m4 eats our [], so we need to use [ and ] instead.
44070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44071  if test "x$has_forbidden_chars" != x; then
44072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44074  fi
44075
44076    # Output is in $new_path
44077
44078  windows_path="$new_path"
44079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44080    unix_path=`$CYGPATH -u "$windows_path"`
44081    new_path="$unix_path"
44082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44084    new_path="$unix_path"
44085  fi
44086
44087    # remove trailing .exe if any
44088    new_path="${new_path/%.exe/}"
44089
44090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44092  fi
44093
44094    else
44095      # We're on a unix platform. Hooray! :)
44096      # First separate the path from the arguments. This will split at the first
44097      # space.
44098      complete="$BUILD_CXX"
44099      path="${complete%% *}"
44100      tmp="$complete EOL"
44101      arguments="${tmp#* }"
44102
44103      # Cannot rely on the command "which" here since it doesn't always work.
44104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44105      if test -z "$is_absolute_path"; then
44106        # Path to executable is not absolute. Find it.
44107        IFS_save="$IFS"
44108        IFS=:
44109        for p in $PATH; do
44110          if test -f "$p/$path" && test -x "$p/$path"; then
44111            new_path="$p/$path"
44112            break
44113          fi
44114        done
44115        IFS="$IFS_save"
44116      else
44117        # This is an absolute path, we can use it without further modifications.
44118        new_path="$path"
44119      fi
44120
44121      if test "x$new_path" = x; then
44122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44123$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44124        has_space=`$ECHO "$complete" | $GREP " "`
44125        if test "x$has_space" != x; then
44126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44128        fi
44129        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44130      fi
44131    fi
44132
44133    # Now join together the path and the arguments once again
44134    if test "x$arguments" != xEOL; then
44135      new_complete="$new_path ${arguments% *}"
44136    else
44137      new_complete="$new_path"
44138    fi
44139
44140    if test "x$complete" != "x$new_complete"; then
44141      BUILD_CXX="$new_complete"
44142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44143$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44144    fi
44145  fi
44146
44147
44148
44149  # Publish this variable in the help.
44150
44151
44152  if [ -z "${BUILD_NM+x}" ]; then
44153    # The variable is not set by user, try to locate tool using the code snippet
44154    for ac_prog in nm gcc-nm
44155do
44156  # Extract the first word of "$ac_prog", so it can be a program name with args.
44157set dummy $ac_prog; ac_word=$2
44158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44159$as_echo_n "checking for $ac_word... " >&6; }
44160if ${ac_cv_path_BUILD_NM+:} false; then :
44161  $as_echo_n "(cached) " >&6
44162else
44163  case $BUILD_NM in
44164  [\\/]* | ?:[\\/]*)
44165  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44166  ;;
44167  *)
44168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44169for as_dir in $PATH
44170do
44171  IFS=$as_save_IFS
44172  test -z "$as_dir" && as_dir=.
44173    for ac_exec_ext in '' $ac_executable_extensions; do
44174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44175    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44177    break 2
44178  fi
44179done
44180  done
44181IFS=$as_save_IFS
44182
44183  ;;
44184esac
44185fi
44186BUILD_NM=$ac_cv_path_BUILD_NM
44187if test -n "$BUILD_NM"; then
44188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44189$as_echo "$BUILD_NM" >&6; }
44190else
44191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44192$as_echo "no" >&6; }
44193fi
44194
44195
44196  test -n "$BUILD_NM" && break
44197done
44198
44199  else
44200    # The variable is set, but is it from the command line or the environment?
44201
44202    # Try to remove the string !BUILD_NM! from our list.
44203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44205      # If it failed, the variable was not from the command line. Ignore it,
44206      # but warn the user (except for BASH, which is always set by the calling BASH).
44207      if test "xBUILD_NM" != xBASH; then
44208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44209$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44210      fi
44211      # Try to locate tool using the code snippet
44212      for ac_prog in nm gcc-nm
44213do
44214  # Extract the first word of "$ac_prog", so it can be a program name with args.
44215set dummy $ac_prog; ac_word=$2
44216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44217$as_echo_n "checking for $ac_word... " >&6; }
44218if ${ac_cv_path_BUILD_NM+:} false; then :
44219  $as_echo_n "(cached) " >&6
44220else
44221  case $BUILD_NM in
44222  [\\/]* | ?:[\\/]*)
44223  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44224  ;;
44225  *)
44226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44227for as_dir in $PATH
44228do
44229  IFS=$as_save_IFS
44230  test -z "$as_dir" && as_dir=.
44231    for ac_exec_ext in '' $ac_executable_extensions; do
44232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44233    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44235    break 2
44236  fi
44237done
44238  done
44239IFS=$as_save_IFS
44240
44241  ;;
44242esac
44243fi
44244BUILD_NM=$ac_cv_path_BUILD_NM
44245if test -n "$BUILD_NM"; then
44246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44247$as_echo "$BUILD_NM" >&6; }
44248else
44249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44250$as_echo "no" >&6; }
44251fi
44252
44253
44254  test -n "$BUILD_NM" && break
44255done
44256
44257    else
44258      # If it succeeded, then it was overridden by the user. We will use it
44259      # for the tool.
44260
44261      # First remove it from the list of overridden variables, so we can test
44262      # for unknown variables in the end.
44263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44264
44265      # Check if we try to supply an empty value
44266      if test "x$BUILD_NM" = x; then
44267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44268$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44270$as_echo_n "checking for BUILD_NM... " >&6; }
44271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44272$as_echo "disabled" >&6; }
44273      else
44274        # Check if the provided tool contains a complete path.
44275        tool_specified="$BUILD_NM"
44276        tool_basename="${tool_specified##*/}"
44277        if test "x$tool_basename" = "x$tool_specified"; then
44278          # A command without a complete path is provided, search $PATH.
44279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44280$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44281          # Extract the first word of "$tool_basename", so it can be a program name with args.
44282set dummy $tool_basename; ac_word=$2
44283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44284$as_echo_n "checking for $ac_word... " >&6; }
44285if ${ac_cv_path_BUILD_NM+:} false; then :
44286  $as_echo_n "(cached) " >&6
44287else
44288  case $BUILD_NM in
44289  [\\/]* | ?:[\\/]*)
44290  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44291  ;;
44292  *)
44293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44294for as_dir in $PATH
44295do
44296  IFS=$as_save_IFS
44297  test -z "$as_dir" && as_dir=.
44298    for ac_exec_ext in '' $ac_executable_extensions; do
44299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44300    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44302    break 2
44303  fi
44304done
44305  done
44306IFS=$as_save_IFS
44307
44308  ;;
44309esac
44310fi
44311BUILD_NM=$ac_cv_path_BUILD_NM
44312if test -n "$BUILD_NM"; then
44313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44314$as_echo "$BUILD_NM" >&6; }
44315else
44316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44317$as_echo "no" >&6; }
44318fi
44319
44320
44321          if test "x$BUILD_NM" = x; then
44322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44323          fi
44324        else
44325          # Otherwise we believe it is a complete path. Use it as it is.
44326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44327$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44329$as_echo_n "checking for BUILD_NM... " >&6; }
44330          if test ! -x "$tool_specified"; then
44331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44332$as_echo "not found" >&6; }
44333            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44334          fi
44335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44336$as_echo "$tool_specified" >&6; }
44337        fi
44338      fi
44339    fi
44340
44341  fi
44342
44343
44344
44345  # Only process if variable expands to non-empty
44346
44347  if test "x$BUILD_NM" != x; then
44348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44349
44350  # First separate the path from the arguments. This will split at the first
44351  # space.
44352  complete="$BUILD_NM"
44353  path="${complete%% *}"
44354  tmp="$complete EOL"
44355  arguments="${tmp#* }"
44356
44357  # Input might be given as Windows format, start by converting to
44358  # unix format.
44359  new_path=`$CYGPATH -u "$path"`
44360
44361  # Now try to locate executable using which
44362  new_path=`$WHICH "$new_path" 2> /dev/null`
44363  # bat and cmd files are not always considered executable in cygwin causing which
44364  # to not find them
44365  if test "x$new_path" = x \
44366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44368    new_path=`$CYGPATH -u "$path"`
44369  fi
44370  if test "x$new_path" = x; then
44371    # Oops. Which didn't find the executable.
44372    # The splitting of arguments from the executable at a space might have been incorrect,
44373    # since paths with space are more likely in Windows. Give it another try with the whole
44374    # argument.
44375    path="$complete"
44376    arguments="EOL"
44377    new_path=`$CYGPATH -u "$path"`
44378    new_path=`$WHICH "$new_path" 2> /dev/null`
44379    # bat and cmd files are not always considered executable in cygwin causing which
44380    # to not find them
44381    if test "x$new_path" = x \
44382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44384      new_path=`$CYGPATH -u "$path"`
44385    fi
44386    if test "x$new_path" = x; then
44387      # It's still not found. Now this is an unrecoverable error.
44388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44389$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44390      has_space=`$ECHO "$complete" | $GREP " "`
44391      if test "x$has_space" != x; then
44392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44394      fi
44395      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44396    fi
44397  fi
44398
44399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44402  # "foo.exe" is OK but "foo" is an error.
44403  #
44404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44405  # It is also a way to make sure we got the proper file name for the real test later on.
44406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44407  if test "x$test_shortpath" = x; then
44408    # Short path failed, file does not exist as specified.
44409    # Try adding .exe or .cmd
44410    if test -f "${new_path}.exe"; then
44411      input_to_shortpath="${new_path}.exe"
44412    elif test -f "${new_path}.cmd"; then
44413      input_to_shortpath="${new_path}.cmd"
44414    else
44415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44416$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44419      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44420    fi
44421  else
44422    input_to_shortpath="$new_path"
44423  fi
44424
44425  # Call helper function which possibly converts this using DOS-style short mode.
44426  # If so, the updated path is stored in $new_path.
44427  new_path="$input_to_shortpath"
44428
44429  input_path="$input_to_shortpath"
44430  # Check if we need to convert this using DOS-style short mode. If the path
44431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44432  # take no chances and rewrite it.
44433  # Note: m4 eats our [], so we need to use [ and ] instead.
44434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44435  if test "x$has_forbidden_chars" != x; then
44436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44440      # Going to short mode and back again did indeed matter. Since short mode is
44441      # case insensitive, let's make it lowercase to improve readability.
44442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44443      # Now convert it back to Unix-style (cygpath)
44444      input_path=`$CYGPATH -u "$shortmode_path"`
44445      new_path="$input_path"
44446    fi
44447  fi
44448
44449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44450  if test "x$test_cygdrive_prefix" = x; then
44451    # As a simple fix, exclude /usr/bin since it's not a real path.
44452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44454      # a path prefixed by /cygdrive for fixpath to work.
44455      new_path="$CYGWIN_ROOT_PATH$input_path"
44456    fi
44457  fi
44458
44459  # remove trailing .exe if any
44460  new_path="${new_path/%.exe/}"
44461
44462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; 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="$path"
44474
44475  windows_path="$new_path"
44476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44477    unix_path=`$CYGPATH -u "$windows_path"`
44478    new_path="$unix_path"
44479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44481    new_path="$unix_path"
44482  fi
44483
44484
44485  # Now try to locate executable using which
44486  new_path=`$WHICH "$new_path" 2> /dev/null`
44487
44488  if test "x$new_path" = x; then
44489    # Oops. Which didn't find the executable.
44490    # The splitting of arguments from the executable at a space might have been incorrect,
44491    # since paths with space are more likely in Windows. Give it another try with the whole
44492    # argument.
44493    path="$complete"
44494    arguments="EOL"
44495    new_path="$path"
44496
44497  windows_path="$new_path"
44498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44499    unix_path=`$CYGPATH -u "$windows_path"`
44500    new_path="$unix_path"
44501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44503    new_path="$unix_path"
44504  fi
44505
44506
44507    new_path=`$WHICH "$new_path" 2> /dev/null`
44508    # bat and cmd files are not always considered executable in MSYS causing which
44509    # to not find them
44510    if test "x$new_path" = x \
44511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44513      new_path="$path"
44514
44515  windows_path="$new_path"
44516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44517    unix_path=`$CYGPATH -u "$windows_path"`
44518    new_path="$unix_path"
44519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44521    new_path="$unix_path"
44522  fi
44523
44524    fi
44525
44526    if test "x$new_path" = x; then
44527      # It's still not found. Now this is an unrecoverable error.
44528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44529$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44530      has_space=`$ECHO "$complete" | $GREP " "`
44531      if test "x$has_space" != x; then
44532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44534      fi
44535      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44536    fi
44537  fi
44538
44539  # Now new_path has a complete unix path to the binary
44540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44541    # Keep paths in /bin as-is, but remove trailing .exe if any
44542    new_path="${new_path/%.exe/}"
44543    # Do not save /bin paths to all_fixpath_prefixes!
44544  else
44545    # Not in mixed or Windows style, start by that.
44546    new_path=`cmd //c echo $new_path`
44547
44548  input_path="$new_path"
44549  # Check if we need to convert this using DOS-style short mode. If the path
44550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44551  # take no chances and rewrite it.
44552  # Note: m4 eats our [], so we need to use [ and ] instead.
44553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44554  if test "x$has_forbidden_chars" != x; then
44555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44557  fi
44558
44559    # Output is in $new_path
44560
44561  windows_path="$new_path"
44562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44563    unix_path=`$CYGPATH -u "$windows_path"`
44564    new_path="$unix_path"
44565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44567    new_path="$unix_path"
44568  fi
44569
44570    # remove trailing .exe if any
44571    new_path="${new_path/%.exe/}"
44572
44573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44575  fi
44576
44577    else
44578      # We're on a unix platform. Hooray! :)
44579      # First separate the path from the arguments. This will split at the first
44580      # space.
44581      complete="$BUILD_NM"
44582      path="${complete%% *}"
44583      tmp="$complete EOL"
44584      arguments="${tmp#* }"
44585
44586      # Cannot rely on the command "which" here since it doesn't always work.
44587      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44588      if test -z "$is_absolute_path"; then
44589        # Path to executable is not absolute. Find it.
44590        IFS_save="$IFS"
44591        IFS=:
44592        for p in $PATH; do
44593          if test -f "$p/$path" && test -x "$p/$path"; then
44594            new_path="$p/$path"
44595            break
44596          fi
44597        done
44598        IFS="$IFS_save"
44599      else
44600        # This is an absolute path, we can use it without further modifications.
44601        new_path="$path"
44602      fi
44603
44604      if test "x$new_path" = x; then
44605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44606$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44607        has_space=`$ECHO "$complete" | $GREP " "`
44608        if test "x$has_space" != x; then
44609          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44611        fi
44612        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44613      fi
44614    fi
44615
44616    # Now join together the path and the arguments once again
44617    if test "x$arguments" != xEOL; then
44618      new_complete="$new_path ${arguments% *}"
44619    else
44620      new_complete="$new_path"
44621    fi
44622
44623    if test "x$complete" != "x$new_complete"; then
44624      BUILD_NM="$new_complete"
44625      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44626$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44627    fi
44628  fi
44629
44630
44631
44632  # Publish this variable in the help.
44633
44634
44635  if [ -z "${BUILD_AR+x}" ]; then
44636    # The variable is not set by user, try to locate tool using the code snippet
44637    for ac_prog in ar gcc-ar
44638do
44639  # Extract the first word of "$ac_prog", so it can be a program name with args.
44640set dummy $ac_prog; ac_word=$2
44641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44642$as_echo_n "checking for $ac_word... " >&6; }
44643if ${ac_cv_path_BUILD_AR+:} false; then :
44644  $as_echo_n "(cached) " >&6
44645else
44646  case $BUILD_AR in
44647  [\\/]* | ?:[\\/]*)
44648  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44649  ;;
44650  *)
44651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44652for as_dir in $PATH
44653do
44654  IFS=$as_save_IFS
44655  test -z "$as_dir" && as_dir=.
44656    for ac_exec_ext in '' $ac_executable_extensions; do
44657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44658    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44660    break 2
44661  fi
44662done
44663  done
44664IFS=$as_save_IFS
44665
44666  ;;
44667esac
44668fi
44669BUILD_AR=$ac_cv_path_BUILD_AR
44670if test -n "$BUILD_AR"; then
44671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44672$as_echo "$BUILD_AR" >&6; }
44673else
44674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44675$as_echo "no" >&6; }
44676fi
44677
44678
44679  test -n "$BUILD_AR" && break
44680done
44681
44682  else
44683    # The variable is set, but is it from the command line or the environment?
44684
44685    # Try to remove the string !BUILD_AR! from our list.
44686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44688      # If it failed, the variable was not from the command line. Ignore it,
44689      # but warn the user (except for BASH, which is always set by the calling BASH).
44690      if test "xBUILD_AR" != xBASH; then
44691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44692$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44693      fi
44694      # Try to locate tool using the code snippet
44695      for ac_prog in ar gcc-ar
44696do
44697  # Extract the first word of "$ac_prog", so it can be a program name with args.
44698set dummy $ac_prog; ac_word=$2
44699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44700$as_echo_n "checking for $ac_word... " >&6; }
44701if ${ac_cv_path_BUILD_AR+:} false; then :
44702  $as_echo_n "(cached) " >&6
44703else
44704  case $BUILD_AR in
44705  [\\/]* | ?:[\\/]*)
44706  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44707  ;;
44708  *)
44709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44710for as_dir in $PATH
44711do
44712  IFS=$as_save_IFS
44713  test -z "$as_dir" && as_dir=.
44714    for ac_exec_ext in '' $ac_executable_extensions; do
44715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44716    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44718    break 2
44719  fi
44720done
44721  done
44722IFS=$as_save_IFS
44723
44724  ;;
44725esac
44726fi
44727BUILD_AR=$ac_cv_path_BUILD_AR
44728if test -n "$BUILD_AR"; then
44729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44730$as_echo "$BUILD_AR" >&6; }
44731else
44732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44733$as_echo "no" >&6; }
44734fi
44735
44736
44737  test -n "$BUILD_AR" && break
44738done
44739
44740    else
44741      # If it succeeded, then it was overridden by the user. We will use it
44742      # for the tool.
44743
44744      # First remove it from the list of overridden variables, so we can test
44745      # for unknown variables in the end.
44746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44747
44748      # Check if we try to supply an empty value
44749      if test "x$BUILD_AR" = x; then
44750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44751$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44753$as_echo_n "checking for BUILD_AR... " >&6; }
44754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44755$as_echo "disabled" >&6; }
44756      else
44757        # Check if the provided tool contains a complete path.
44758        tool_specified="$BUILD_AR"
44759        tool_basename="${tool_specified##*/}"
44760        if test "x$tool_basename" = "x$tool_specified"; then
44761          # A command without a complete path is provided, search $PATH.
44762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44763$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44764          # Extract the first word of "$tool_basename", so it can be a program name with args.
44765set dummy $tool_basename; ac_word=$2
44766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44767$as_echo_n "checking for $ac_word... " >&6; }
44768if ${ac_cv_path_BUILD_AR+:} false; then :
44769  $as_echo_n "(cached) " >&6
44770else
44771  case $BUILD_AR in
44772  [\\/]* | ?:[\\/]*)
44773  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44774  ;;
44775  *)
44776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44777for as_dir in $PATH
44778do
44779  IFS=$as_save_IFS
44780  test -z "$as_dir" && as_dir=.
44781    for ac_exec_ext in '' $ac_executable_extensions; do
44782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44783    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44785    break 2
44786  fi
44787done
44788  done
44789IFS=$as_save_IFS
44790
44791  ;;
44792esac
44793fi
44794BUILD_AR=$ac_cv_path_BUILD_AR
44795if test -n "$BUILD_AR"; then
44796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44797$as_echo "$BUILD_AR" >&6; }
44798else
44799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44800$as_echo "no" >&6; }
44801fi
44802
44803
44804          if test "x$BUILD_AR" = x; then
44805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44806          fi
44807        else
44808          # Otherwise we believe it is a complete path. Use it as it is.
44809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44810$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44812$as_echo_n "checking for BUILD_AR... " >&6; }
44813          if test ! -x "$tool_specified"; then
44814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44815$as_echo "not found" >&6; }
44816            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44817          fi
44818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44819$as_echo "$tool_specified" >&6; }
44820        fi
44821      fi
44822    fi
44823
44824  fi
44825
44826
44827
44828  # Only process if variable expands to non-empty
44829
44830  if test "x$BUILD_AR" != x; then
44831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44832
44833  # First separate the path from the arguments. This will split at the first
44834  # space.
44835  complete="$BUILD_AR"
44836  path="${complete%% *}"
44837  tmp="$complete EOL"
44838  arguments="${tmp#* }"
44839
44840  # Input might be given as Windows format, start by converting to
44841  # unix format.
44842  new_path=`$CYGPATH -u "$path"`
44843
44844  # Now try to locate executable using which
44845  new_path=`$WHICH "$new_path" 2> /dev/null`
44846  # bat and cmd files are not always considered executable in cygwin causing which
44847  # to not find them
44848  if test "x$new_path" = x \
44849      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44850      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44851    new_path=`$CYGPATH -u "$path"`
44852  fi
44853  if test "x$new_path" = x; then
44854    # Oops. Which didn't find the executable.
44855    # The splitting of arguments from the executable at a space might have been incorrect,
44856    # since paths with space are more likely in Windows. Give it another try with the whole
44857    # argument.
44858    path="$complete"
44859    arguments="EOL"
44860    new_path=`$CYGPATH -u "$path"`
44861    new_path=`$WHICH "$new_path" 2> /dev/null`
44862    # bat and cmd files are not always considered executable in cygwin causing which
44863    # to not find them
44864    if test "x$new_path" = x \
44865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44867      new_path=`$CYGPATH -u "$path"`
44868    fi
44869    if test "x$new_path" = x; then
44870      # It's still not found. Now this is an unrecoverable error.
44871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44872$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44873      has_space=`$ECHO "$complete" | $GREP " "`
44874      if test "x$has_space" != x; then
44875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44877      fi
44878      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44879    fi
44880  fi
44881
44882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44885  # "foo.exe" is OK but "foo" is an error.
44886  #
44887  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44888  # It is also a way to make sure we got the proper file name for the real test later on.
44889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44890  if test "x$test_shortpath" = x; then
44891    # Short path failed, file does not exist as specified.
44892    # Try adding .exe or .cmd
44893    if test -f "${new_path}.exe"; then
44894      input_to_shortpath="${new_path}.exe"
44895    elif test -f "${new_path}.cmd"; then
44896      input_to_shortpath="${new_path}.cmd"
44897    else
44898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44899$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44902      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44903    fi
44904  else
44905    input_to_shortpath="$new_path"
44906  fi
44907
44908  # Call helper function which possibly converts this using DOS-style short mode.
44909  # If so, the updated path is stored in $new_path.
44910  new_path="$input_to_shortpath"
44911
44912  input_path="$input_to_shortpath"
44913  # Check if we need to convert this using DOS-style short mode. If the path
44914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44915  # take no chances and rewrite it.
44916  # Note: m4 eats our [], so we need to use [ and ] instead.
44917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44918  if test "x$has_forbidden_chars" != x; then
44919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44923      # Going to short mode and back again did indeed matter. Since short mode is
44924      # case insensitive, let's make it lowercase to improve readability.
44925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44926      # Now convert it back to Unix-style (cygpath)
44927      input_path=`$CYGPATH -u "$shortmode_path"`
44928      new_path="$input_path"
44929    fi
44930  fi
44931
44932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44933  if test "x$test_cygdrive_prefix" = x; then
44934    # As a simple fix, exclude /usr/bin since it's not a real path.
44935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44937      # a path prefixed by /cygdrive for fixpath to work.
44938      new_path="$CYGWIN_ROOT_PATH$input_path"
44939    fi
44940  fi
44941
44942  # remove trailing .exe if any
44943  new_path="${new_path/%.exe/}"
44944
44945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; 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="$path"
44957
44958  windows_path="$new_path"
44959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44960    unix_path=`$CYGPATH -u "$windows_path"`
44961    new_path="$unix_path"
44962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44964    new_path="$unix_path"
44965  fi
44966
44967
44968  # Now try to locate executable using which
44969  new_path=`$WHICH "$new_path" 2> /dev/null`
44970
44971  if test "x$new_path" = x; then
44972    # Oops. Which didn't find the executable.
44973    # The splitting of arguments from the executable at a space might have been incorrect,
44974    # since paths with space are more likely in Windows. Give it another try with the whole
44975    # argument.
44976    path="$complete"
44977    arguments="EOL"
44978    new_path="$path"
44979
44980  windows_path="$new_path"
44981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44982    unix_path=`$CYGPATH -u "$windows_path"`
44983    new_path="$unix_path"
44984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44986    new_path="$unix_path"
44987  fi
44988
44989
44990    new_path=`$WHICH "$new_path" 2> /dev/null`
44991    # bat and cmd files are not always considered executable in MSYS causing which
44992    # to not find them
44993    if test "x$new_path" = x \
44994        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44995        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44996      new_path="$path"
44997
44998  windows_path="$new_path"
44999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45000    unix_path=`$CYGPATH -u "$windows_path"`
45001    new_path="$unix_path"
45002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45004    new_path="$unix_path"
45005  fi
45006
45007    fi
45008
45009    if test "x$new_path" = x; then
45010      # It's still not found. Now this is an unrecoverable error.
45011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45012$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45013      has_space=`$ECHO "$complete" | $GREP " "`
45014      if test "x$has_space" != x; then
45015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45017      fi
45018      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45019    fi
45020  fi
45021
45022  # Now new_path has a complete unix path to the binary
45023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45024    # Keep paths in /bin as-is, but remove trailing .exe if any
45025    new_path="${new_path/%.exe/}"
45026    # Do not save /bin paths to all_fixpath_prefixes!
45027  else
45028    # Not in mixed or Windows style, start by that.
45029    new_path=`cmd //c echo $new_path`
45030
45031  input_path="$new_path"
45032  # Check if we need to convert this using DOS-style short mode. If the path
45033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45034  # take no chances and rewrite it.
45035  # Note: m4 eats our [], so we need to use [ and ] instead.
45036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45037  if test "x$has_forbidden_chars" != x; then
45038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45040  fi
45041
45042    # Output is in $new_path
45043
45044  windows_path="$new_path"
45045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45046    unix_path=`$CYGPATH -u "$windows_path"`
45047    new_path="$unix_path"
45048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45050    new_path="$unix_path"
45051  fi
45052
45053    # remove trailing .exe if any
45054    new_path="${new_path/%.exe/}"
45055
45056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45058  fi
45059
45060    else
45061      # We're on a unix platform. Hooray! :)
45062      # First separate the path from the arguments. This will split at the first
45063      # space.
45064      complete="$BUILD_AR"
45065      path="${complete%% *}"
45066      tmp="$complete EOL"
45067      arguments="${tmp#* }"
45068
45069      # Cannot rely on the command "which" here since it doesn't always work.
45070      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45071      if test -z "$is_absolute_path"; then
45072        # Path to executable is not absolute. Find it.
45073        IFS_save="$IFS"
45074        IFS=:
45075        for p in $PATH; do
45076          if test -f "$p/$path" && test -x "$p/$path"; then
45077            new_path="$p/$path"
45078            break
45079          fi
45080        done
45081        IFS="$IFS_save"
45082      else
45083        # This is an absolute path, we can use it without further modifications.
45084        new_path="$path"
45085      fi
45086
45087      if test "x$new_path" = x; then
45088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45089$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45090        has_space=`$ECHO "$complete" | $GREP " "`
45091        if test "x$has_space" != x; then
45092          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45094        fi
45095        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45096      fi
45097    fi
45098
45099    # Now join together the path and the arguments once again
45100    if test "x$arguments" != xEOL; then
45101      new_complete="$new_path ${arguments% *}"
45102    else
45103      new_complete="$new_path"
45104    fi
45105
45106    if test "x$complete" != "x$new_complete"; then
45107      BUILD_AR="$new_complete"
45108      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45109$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45110    fi
45111  fi
45112
45113
45114
45115  # Publish this variable in the help.
45116
45117
45118  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45119    # The variable is not set by user, try to locate tool using the code snippet
45120    for ac_prog in objcopy
45121do
45122  # Extract the first word of "$ac_prog", so it can be a program name with args.
45123set dummy $ac_prog; ac_word=$2
45124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45125$as_echo_n "checking for $ac_word... " >&6; }
45126if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45127  $as_echo_n "(cached) " >&6
45128else
45129  case $BUILD_OBJCOPY in
45130  [\\/]* | ?:[\\/]*)
45131  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45132  ;;
45133  *)
45134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45135for as_dir in $PATH
45136do
45137  IFS=$as_save_IFS
45138  test -z "$as_dir" && as_dir=.
45139    for ac_exec_ext in '' $ac_executable_extensions; do
45140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45141    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45143    break 2
45144  fi
45145done
45146  done
45147IFS=$as_save_IFS
45148
45149  ;;
45150esac
45151fi
45152BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45153if test -n "$BUILD_OBJCOPY"; then
45154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45155$as_echo "$BUILD_OBJCOPY" >&6; }
45156else
45157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45158$as_echo "no" >&6; }
45159fi
45160
45161
45162  test -n "$BUILD_OBJCOPY" && break
45163done
45164
45165  else
45166    # The variable is set, but is it from the command line or the environment?
45167
45168    # Try to remove the string !BUILD_OBJCOPY! from our list.
45169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45171      # If it failed, the variable was not from the command line. Ignore it,
45172      # but warn the user (except for BASH, which is always set by the calling BASH).
45173      if test "xBUILD_OBJCOPY" != xBASH; then
45174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45175$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45176      fi
45177      # Try to locate tool using the code snippet
45178      for ac_prog in objcopy
45179do
45180  # Extract the first word of "$ac_prog", so it can be a program name with args.
45181set dummy $ac_prog; ac_word=$2
45182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45183$as_echo_n "checking for $ac_word... " >&6; }
45184if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45185  $as_echo_n "(cached) " >&6
45186else
45187  case $BUILD_OBJCOPY in
45188  [\\/]* | ?:[\\/]*)
45189  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45190  ;;
45191  *)
45192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45193for as_dir in $PATH
45194do
45195  IFS=$as_save_IFS
45196  test -z "$as_dir" && as_dir=.
45197    for ac_exec_ext in '' $ac_executable_extensions; do
45198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45199    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45201    break 2
45202  fi
45203done
45204  done
45205IFS=$as_save_IFS
45206
45207  ;;
45208esac
45209fi
45210BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45211if test -n "$BUILD_OBJCOPY"; then
45212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45213$as_echo "$BUILD_OBJCOPY" >&6; }
45214else
45215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45216$as_echo "no" >&6; }
45217fi
45218
45219
45220  test -n "$BUILD_OBJCOPY" && break
45221done
45222
45223    else
45224      # If it succeeded, then it was overridden by the user. We will use it
45225      # for the tool.
45226
45227      # First remove it from the list of overridden variables, so we can test
45228      # for unknown variables in the end.
45229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45230
45231      # Check if we try to supply an empty value
45232      if test "x$BUILD_OBJCOPY" = x; then
45233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45234$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45236$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45238$as_echo "disabled" >&6; }
45239      else
45240        # Check if the provided tool contains a complete path.
45241        tool_specified="$BUILD_OBJCOPY"
45242        tool_basename="${tool_specified##*/}"
45243        if test "x$tool_basename" = "x$tool_specified"; then
45244          # A command without a complete path is provided, search $PATH.
45245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45246$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45247          # Extract the first word of "$tool_basename", so it can be a program name with args.
45248set dummy $tool_basename; ac_word=$2
45249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45250$as_echo_n "checking for $ac_word... " >&6; }
45251if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45252  $as_echo_n "(cached) " >&6
45253else
45254  case $BUILD_OBJCOPY in
45255  [\\/]* | ?:[\\/]*)
45256  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45257  ;;
45258  *)
45259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45260for as_dir in $PATH
45261do
45262  IFS=$as_save_IFS
45263  test -z "$as_dir" && as_dir=.
45264    for ac_exec_ext in '' $ac_executable_extensions; do
45265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45266    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45268    break 2
45269  fi
45270done
45271  done
45272IFS=$as_save_IFS
45273
45274  ;;
45275esac
45276fi
45277BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45278if test -n "$BUILD_OBJCOPY"; then
45279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45280$as_echo "$BUILD_OBJCOPY" >&6; }
45281else
45282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45283$as_echo "no" >&6; }
45284fi
45285
45286
45287          if test "x$BUILD_OBJCOPY" = x; then
45288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45289          fi
45290        else
45291          # Otherwise we believe it is a complete path. Use it as it is.
45292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45293$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45295$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45296          if test ! -x "$tool_specified"; then
45297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45298$as_echo "not found" >&6; }
45299            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45300          fi
45301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45302$as_echo "$tool_specified" >&6; }
45303        fi
45304      fi
45305    fi
45306
45307  fi
45308
45309
45310
45311  # Only process if variable expands to non-empty
45312
45313  if test "x$BUILD_OBJCOPY" != x; then
45314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45315
45316  # First separate the path from the arguments. This will split at the first
45317  # space.
45318  complete="$BUILD_OBJCOPY"
45319  path="${complete%% *}"
45320  tmp="$complete EOL"
45321  arguments="${tmp#* }"
45322
45323  # Input might be given as Windows format, start by converting to
45324  # unix format.
45325  new_path=`$CYGPATH -u "$path"`
45326
45327  # Now try to locate executable using which
45328  new_path=`$WHICH "$new_path" 2> /dev/null`
45329  # bat and cmd files are not always considered executable in cygwin causing which
45330  # to not find them
45331  if test "x$new_path" = x \
45332      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45333      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45334    new_path=`$CYGPATH -u "$path"`
45335  fi
45336  if test "x$new_path" = x; then
45337    # Oops. Which didn't find the executable.
45338    # The splitting of arguments from the executable at a space might have been incorrect,
45339    # since paths with space are more likely in Windows. Give it another try with the whole
45340    # argument.
45341    path="$complete"
45342    arguments="EOL"
45343    new_path=`$CYGPATH -u "$path"`
45344    new_path=`$WHICH "$new_path" 2> /dev/null`
45345    # bat and cmd files are not always considered executable in cygwin causing which
45346    # to not find them
45347    if test "x$new_path" = x \
45348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45350      new_path=`$CYGPATH -u "$path"`
45351    fi
45352    if test "x$new_path" = x; then
45353      # It's still not found. Now this is an unrecoverable error.
45354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45355$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45356      has_space=`$ECHO "$complete" | $GREP " "`
45357      if test "x$has_space" != x; then
45358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45360      fi
45361      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45362    fi
45363  fi
45364
45365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45368  # "foo.exe" is OK but "foo" is an error.
45369  #
45370  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45371  # It is also a way to make sure we got the proper file name for the real test later on.
45372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45373  if test "x$test_shortpath" = x; then
45374    # Short path failed, file does not exist as specified.
45375    # Try adding .exe or .cmd
45376    if test -f "${new_path}.exe"; then
45377      input_to_shortpath="${new_path}.exe"
45378    elif test -f "${new_path}.cmd"; then
45379      input_to_shortpath="${new_path}.cmd"
45380    else
45381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45382$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45383      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45385      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45386    fi
45387  else
45388    input_to_shortpath="$new_path"
45389  fi
45390
45391  # Call helper function which possibly converts this using DOS-style short mode.
45392  # If so, the updated path is stored in $new_path.
45393  new_path="$input_to_shortpath"
45394
45395  input_path="$input_to_shortpath"
45396  # Check if we need to convert this using DOS-style short mode. If the path
45397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45398  # take no chances and rewrite it.
45399  # Note: m4 eats our [], so we need to use [ and ] instead.
45400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45401  if test "x$has_forbidden_chars" != x; then
45402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45406      # Going to short mode and back again did indeed matter. Since short mode is
45407      # case insensitive, let's make it lowercase to improve readability.
45408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45409      # Now convert it back to Unix-style (cygpath)
45410      input_path=`$CYGPATH -u "$shortmode_path"`
45411      new_path="$input_path"
45412    fi
45413  fi
45414
45415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45416  if test "x$test_cygdrive_prefix" = x; then
45417    # As a simple fix, exclude /usr/bin since it's not a real path.
45418    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45420      # a path prefixed by /cygdrive for fixpath to work.
45421      new_path="$CYGWIN_ROOT_PATH$input_path"
45422    fi
45423  fi
45424
45425  # remove trailing .exe if any
45426  new_path="${new_path/%.exe/}"
45427
45428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45429
45430  # First separate the path from the arguments. This will split at the first
45431  # space.
45432  complete="$BUILD_OBJCOPY"
45433  path="${complete%% *}"
45434  tmp="$complete EOL"
45435  arguments="${tmp#* }"
45436
45437  # Input might be given as Windows format, start by converting to
45438  # unix format.
45439  new_path="$path"
45440
45441  windows_path="$new_path"
45442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45443    unix_path=`$CYGPATH -u "$windows_path"`
45444    new_path="$unix_path"
45445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45447    new_path="$unix_path"
45448  fi
45449
45450
45451  # Now try to locate executable using which
45452  new_path=`$WHICH "$new_path" 2> /dev/null`
45453
45454  if test "x$new_path" = x; then
45455    # Oops. Which didn't find the executable.
45456    # The splitting of arguments from the executable at a space might have been incorrect,
45457    # since paths with space are more likely in Windows. Give it another try with the whole
45458    # argument.
45459    path="$complete"
45460    arguments="EOL"
45461    new_path="$path"
45462
45463  windows_path="$new_path"
45464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45465    unix_path=`$CYGPATH -u "$windows_path"`
45466    new_path="$unix_path"
45467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45469    new_path="$unix_path"
45470  fi
45471
45472
45473    new_path=`$WHICH "$new_path" 2> /dev/null`
45474    # bat and cmd files are not always considered executable in MSYS causing which
45475    # to not find them
45476    if test "x$new_path" = x \
45477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45479      new_path="$path"
45480
45481  windows_path="$new_path"
45482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45483    unix_path=`$CYGPATH -u "$windows_path"`
45484    new_path="$unix_path"
45485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45487    new_path="$unix_path"
45488  fi
45489
45490    fi
45491
45492    if test "x$new_path" = x; then
45493      # It's still not found. Now this is an unrecoverable error.
45494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45495$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45496      has_space=`$ECHO "$complete" | $GREP " "`
45497      if test "x$has_space" != x; then
45498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45500      fi
45501      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45502    fi
45503  fi
45504
45505  # Now new_path has a complete unix path to the binary
45506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45507    # Keep paths in /bin as-is, but remove trailing .exe if any
45508    new_path="${new_path/%.exe/}"
45509    # Do not save /bin paths to all_fixpath_prefixes!
45510  else
45511    # Not in mixed or Windows style, start by that.
45512    new_path=`cmd //c echo $new_path`
45513
45514  input_path="$new_path"
45515  # Check if we need to convert this using DOS-style short mode. If the path
45516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45517  # take no chances and rewrite it.
45518  # Note: m4 eats our [], so we need to use [ and ] instead.
45519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45520  if test "x$has_forbidden_chars" != x; then
45521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45523  fi
45524
45525    # Output is in $new_path
45526
45527  windows_path="$new_path"
45528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45529    unix_path=`$CYGPATH -u "$windows_path"`
45530    new_path="$unix_path"
45531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45533    new_path="$unix_path"
45534  fi
45535
45536    # remove trailing .exe if any
45537    new_path="${new_path/%.exe/}"
45538
45539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45541  fi
45542
45543    else
45544      # We're on a unix platform. Hooray! :)
45545      # First separate the path from the arguments. This will split at the first
45546      # space.
45547      complete="$BUILD_OBJCOPY"
45548      path="${complete%% *}"
45549      tmp="$complete EOL"
45550      arguments="${tmp#* }"
45551
45552      # Cannot rely on the command "which" here since it doesn't always work.
45553      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45554      if test -z "$is_absolute_path"; then
45555        # Path to executable is not absolute. Find it.
45556        IFS_save="$IFS"
45557        IFS=:
45558        for p in $PATH; do
45559          if test -f "$p/$path" && test -x "$p/$path"; then
45560            new_path="$p/$path"
45561            break
45562          fi
45563        done
45564        IFS="$IFS_save"
45565      else
45566        # This is an absolute path, we can use it without further modifications.
45567        new_path="$path"
45568      fi
45569
45570      if test "x$new_path" = x; then
45571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45572$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45573        has_space=`$ECHO "$complete" | $GREP " "`
45574        if test "x$has_space" != x; then
45575          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45576$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45577        fi
45578        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45579      fi
45580    fi
45581
45582    # Now join together the path and the arguments once again
45583    if test "x$arguments" != xEOL; then
45584      new_complete="$new_path ${arguments% *}"
45585    else
45586      new_complete="$new_path"
45587    fi
45588
45589    if test "x$complete" != "x$new_complete"; then
45590      BUILD_OBJCOPY="$new_complete"
45591      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45592$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45593    fi
45594  fi
45595
45596
45597
45598  # Publish this variable in the help.
45599
45600
45601  if [ -z "${BUILD_STRIP+x}" ]; then
45602    # The variable is not set by user, try to locate tool using the code snippet
45603    for ac_prog in strip
45604do
45605  # Extract the first word of "$ac_prog", so it can be a program name with args.
45606set dummy $ac_prog; ac_word=$2
45607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45608$as_echo_n "checking for $ac_word... " >&6; }
45609if ${ac_cv_path_BUILD_STRIP+:} false; then :
45610  $as_echo_n "(cached) " >&6
45611else
45612  case $BUILD_STRIP in
45613  [\\/]* | ?:[\\/]*)
45614  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45615  ;;
45616  *)
45617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45618for as_dir in $PATH
45619do
45620  IFS=$as_save_IFS
45621  test -z "$as_dir" && as_dir=.
45622    for ac_exec_ext in '' $ac_executable_extensions; do
45623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45624    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45626    break 2
45627  fi
45628done
45629  done
45630IFS=$as_save_IFS
45631
45632  ;;
45633esac
45634fi
45635BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45636if test -n "$BUILD_STRIP"; then
45637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45638$as_echo "$BUILD_STRIP" >&6; }
45639else
45640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45641$as_echo "no" >&6; }
45642fi
45643
45644
45645  test -n "$BUILD_STRIP" && break
45646done
45647
45648  else
45649    # The variable is set, but is it from the command line or the environment?
45650
45651    # Try to remove the string !BUILD_STRIP! from our list.
45652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
45653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45654      # If it failed, the variable was not from the command line. Ignore it,
45655      # but warn the user (except for BASH, which is always set by the calling BASH).
45656      if test "xBUILD_STRIP" != xBASH; then
45657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
45658$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
45659      fi
45660      # Try to locate tool using the code snippet
45661      for ac_prog in strip
45662do
45663  # Extract the first word of "$ac_prog", so it can be a program name with args.
45664set dummy $ac_prog; ac_word=$2
45665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45666$as_echo_n "checking for $ac_word... " >&6; }
45667if ${ac_cv_path_BUILD_STRIP+:} false; then :
45668  $as_echo_n "(cached) " >&6
45669else
45670  case $BUILD_STRIP in
45671  [\\/]* | ?:[\\/]*)
45672  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45673  ;;
45674  *)
45675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45676for as_dir in $PATH
45677do
45678  IFS=$as_save_IFS
45679  test -z "$as_dir" && as_dir=.
45680    for ac_exec_ext in '' $ac_executable_extensions; do
45681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45682    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45684    break 2
45685  fi
45686done
45687  done
45688IFS=$as_save_IFS
45689
45690  ;;
45691esac
45692fi
45693BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45694if test -n "$BUILD_STRIP"; then
45695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45696$as_echo "$BUILD_STRIP" >&6; }
45697else
45698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45699$as_echo "no" >&6; }
45700fi
45701
45702
45703  test -n "$BUILD_STRIP" && break
45704done
45705
45706    else
45707      # If it succeeded, then it was overridden by the user. We will use it
45708      # for the tool.
45709
45710      # First remove it from the list of overridden variables, so we can test
45711      # for unknown variables in the end.
45712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45713
45714      # Check if we try to supply an empty value
45715      if test "x$BUILD_STRIP" = x; then
45716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
45717$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
45718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
45719$as_echo_n "checking for BUILD_STRIP... " >&6; }
45720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45721$as_echo "disabled" >&6; }
45722      else
45723        # Check if the provided tool contains a complete path.
45724        tool_specified="$BUILD_STRIP"
45725        tool_basename="${tool_specified##*/}"
45726        if test "x$tool_basename" = "x$tool_specified"; then
45727          # A command without a complete path is provided, search $PATH.
45728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
45729$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
45730          # Extract the first word of "$tool_basename", so it can be a program name with args.
45731set dummy $tool_basename; ac_word=$2
45732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45733$as_echo_n "checking for $ac_word... " >&6; }
45734if ${ac_cv_path_BUILD_STRIP+:} false; then :
45735  $as_echo_n "(cached) " >&6
45736else
45737  case $BUILD_STRIP in
45738  [\\/]* | ?:[\\/]*)
45739  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45740  ;;
45741  *)
45742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45743for as_dir in $PATH
45744do
45745  IFS=$as_save_IFS
45746  test -z "$as_dir" && as_dir=.
45747    for ac_exec_ext in '' $ac_executable_extensions; do
45748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45749    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45751    break 2
45752  fi
45753done
45754  done
45755IFS=$as_save_IFS
45756
45757  ;;
45758esac
45759fi
45760BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45761if test -n "$BUILD_STRIP"; then
45762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45763$as_echo "$BUILD_STRIP" >&6; }
45764else
45765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45766$as_echo "no" >&6; }
45767fi
45768
45769
45770          if test "x$BUILD_STRIP" = x; then
45771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45772          fi
45773        else
45774          # Otherwise we believe it is a complete path. Use it as it is.
45775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
45776$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
45777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
45778$as_echo_n "checking for BUILD_STRIP... " >&6; }
45779          if test ! -x "$tool_specified"; then
45780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45781$as_echo "not found" >&6; }
45782            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
45783          fi
45784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45785$as_echo "$tool_specified" >&6; }
45786        fi
45787      fi
45788    fi
45789
45790  fi
45791
45792
45793
45794  # Only process if variable expands to non-empty
45795
45796  if test "x$BUILD_STRIP" != x; then
45797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45798
45799  # First separate the path from the arguments. This will split at the first
45800  # space.
45801  complete="$BUILD_STRIP"
45802  path="${complete%% *}"
45803  tmp="$complete EOL"
45804  arguments="${tmp#* }"
45805
45806  # Input might be given as Windows format, start by converting to
45807  # unix format.
45808  new_path=`$CYGPATH -u "$path"`
45809
45810  # Now try to locate executable using which
45811  new_path=`$WHICH "$new_path" 2> /dev/null`
45812  # bat and cmd files are not always considered executable in cygwin causing which
45813  # to not find them
45814  if test "x$new_path" = x \
45815      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45816      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45817    new_path=`$CYGPATH -u "$path"`
45818  fi
45819  if test "x$new_path" = x; then
45820    # Oops. Which didn't find the executable.
45821    # The splitting of arguments from the executable at a space might have been incorrect,
45822    # since paths with space are more likely in Windows. Give it another try with the whole
45823    # argument.
45824    path="$complete"
45825    arguments="EOL"
45826    new_path=`$CYGPATH -u "$path"`
45827    new_path=`$WHICH "$new_path" 2> /dev/null`
45828    # bat and cmd files are not always considered executable in cygwin causing which
45829    # to not find them
45830    if test "x$new_path" = x \
45831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45833      new_path=`$CYGPATH -u "$path"`
45834    fi
45835    if test "x$new_path" = x; then
45836      # It's still not found. Now this is an unrecoverable error.
45837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
45838$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
45839      has_space=`$ECHO "$complete" | $GREP " "`
45840      if test "x$has_space" != x; then
45841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45843      fi
45844      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45845    fi
45846  fi
45847
45848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45851  # "foo.exe" is OK but "foo" is an error.
45852  #
45853  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45854  # It is also a way to make sure we got the proper file name for the real test later on.
45855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45856  if test "x$test_shortpath" = x; then
45857    # Short path failed, file does not exist as specified.
45858    # Try adding .exe or .cmd
45859    if test -f "${new_path}.exe"; then
45860      input_to_shortpath="${new_path}.exe"
45861    elif test -f "${new_path}.cmd"; then
45862      input_to_shortpath="${new_path}.cmd"
45863    else
45864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
45865$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
45866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45868      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45869    fi
45870  else
45871    input_to_shortpath="$new_path"
45872  fi
45873
45874  # Call helper function which possibly converts this using DOS-style short mode.
45875  # If so, the updated path is stored in $new_path.
45876  new_path="$input_to_shortpath"
45877
45878  input_path="$input_to_shortpath"
45879  # Check if we need to convert this using DOS-style short mode. If the path
45880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45881  # take no chances and rewrite it.
45882  # Note: m4 eats our [], so we need to use [ and ] instead.
45883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45884  if test "x$has_forbidden_chars" != x; then
45885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45889      # Going to short mode and back again did indeed matter. Since short mode is
45890      # case insensitive, let's make it lowercase to improve readability.
45891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45892      # Now convert it back to Unix-style (cygpath)
45893      input_path=`$CYGPATH -u "$shortmode_path"`
45894      new_path="$input_path"
45895    fi
45896  fi
45897
45898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45899  if test "x$test_cygdrive_prefix" = x; then
45900    # As a simple fix, exclude /usr/bin since it's not a real path.
45901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45903      # a path prefixed by /cygdrive for fixpath to work.
45904      new_path="$CYGWIN_ROOT_PATH$input_path"
45905    fi
45906  fi
45907
45908  # remove trailing .exe if any
45909  new_path="${new_path/%.exe/}"
45910
45911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45912
45913  # First separate the path from the arguments. This will split at the first
45914  # space.
45915  complete="$BUILD_STRIP"
45916  path="${complete%% *}"
45917  tmp="$complete EOL"
45918  arguments="${tmp#* }"
45919
45920  # Input might be given as Windows format, start by converting to
45921  # unix format.
45922  new_path="$path"
45923
45924  windows_path="$new_path"
45925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45926    unix_path=`$CYGPATH -u "$windows_path"`
45927    new_path="$unix_path"
45928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45930    new_path="$unix_path"
45931  fi
45932
45933
45934  # Now try to locate executable using which
45935  new_path=`$WHICH "$new_path" 2> /dev/null`
45936
45937  if test "x$new_path" = x; then
45938    # Oops. Which didn't find the executable.
45939    # The splitting of arguments from the executable at a space might have been incorrect,
45940    # since paths with space are more likely in Windows. Give it another try with the whole
45941    # argument.
45942    path="$complete"
45943    arguments="EOL"
45944    new_path="$path"
45945
45946  windows_path="$new_path"
45947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45948    unix_path=`$CYGPATH -u "$windows_path"`
45949    new_path="$unix_path"
45950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45952    new_path="$unix_path"
45953  fi
45954
45955
45956    new_path=`$WHICH "$new_path" 2> /dev/null`
45957    # bat and cmd files are not always considered executable in MSYS causing which
45958    # to not find them
45959    if test "x$new_path" = x \
45960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45962      new_path="$path"
45963
45964  windows_path="$new_path"
45965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45966    unix_path=`$CYGPATH -u "$windows_path"`
45967    new_path="$unix_path"
45968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45970    new_path="$unix_path"
45971  fi
45972
45973    fi
45974
45975    if test "x$new_path" = x; then
45976      # It's still not found. Now this is an unrecoverable error.
45977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
45978$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
45979      has_space=`$ECHO "$complete" | $GREP " "`
45980      if test "x$has_space" != x; then
45981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45983      fi
45984      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45985    fi
45986  fi
45987
45988  # Now new_path has a complete unix path to the binary
45989  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45990    # Keep paths in /bin as-is, but remove trailing .exe if any
45991    new_path="${new_path/%.exe/}"
45992    # Do not save /bin paths to all_fixpath_prefixes!
45993  else
45994    # Not in mixed or Windows style, start by that.
45995    new_path=`cmd //c echo $new_path`
45996
45997  input_path="$new_path"
45998  # Check if we need to convert this using DOS-style short mode. If the path
45999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46000  # take no chances and rewrite it.
46001  # Note: m4 eats our [], so we need to use [ and ] instead.
46002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46003  if test "x$has_forbidden_chars" != x; then
46004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46006  fi
46007
46008    # Output is in $new_path
46009
46010  windows_path="$new_path"
46011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46012    unix_path=`$CYGPATH -u "$windows_path"`
46013    new_path="$unix_path"
46014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46016    new_path="$unix_path"
46017  fi
46018
46019    # remove trailing .exe if any
46020    new_path="${new_path/%.exe/}"
46021
46022    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46023    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46024  fi
46025
46026    else
46027      # We're on a unix platform. Hooray! :)
46028      # First separate the path from the arguments. This will split at the first
46029      # space.
46030      complete="$BUILD_STRIP"
46031      path="${complete%% *}"
46032      tmp="$complete EOL"
46033      arguments="${tmp#* }"
46034
46035      # Cannot rely on the command "which" here since it doesn't always work.
46036      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46037      if test -z "$is_absolute_path"; then
46038        # Path to executable is not absolute. Find it.
46039        IFS_save="$IFS"
46040        IFS=:
46041        for p in $PATH; do
46042          if test -f "$p/$path" && test -x "$p/$path"; then
46043            new_path="$p/$path"
46044            break
46045          fi
46046        done
46047        IFS="$IFS_save"
46048      else
46049        # This is an absolute path, we can use it without further modifications.
46050        new_path="$path"
46051      fi
46052
46053      if test "x$new_path" = x; then
46054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46055$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46056        has_space=`$ECHO "$complete" | $GREP " "`
46057        if test "x$has_space" != x; then
46058          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46059$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46060        fi
46061        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46062      fi
46063    fi
46064
46065    # Now join together the path and the arguments once again
46066    if test "x$arguments" != xEOL; then
46067      new_complete="$new_path ${arguments% *}"
46068    else
46069      new_complete="$new_path"
46070    fi
46071
46072    if test "x$complete" != "x$new_complete"; then
46073      BUILD_STRIP="$new_complete"
46074      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46075$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46076    fi
46077  fi
46078
46079    # Assume the C compiler is the assembler
46080    BUILD_AS="$BUILD_CC -c"
46081    # Just like for the target compiler, use the compiler as linker
46082    BUILD_LD="$BUILD_CC"
46083    BUILD_LDCXX="$BUILD_CXX"
46084
46085    PATH="$OLDPATH"
46086  else
46087    # If we are not cross compiling, use the normal target compilers for
46088    # building the build platform executables.
46089    BUILD_CC="$CC"
46090    BUILD_CXX="$CXX"
46091    BUILD_LD="$LD"
46092    BUILD_LDCXX="$LDCXX"
46093    BUILD_NM="$NM"
46094    BUILD_AS="$AS"
46095    BUILD_OBJCOPY="$OBJCOPY"
46096    BUILD_STRIP="$STRIP"
46097    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46098    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46099    BUILD_AR="$AR"
46100  fi
46101
46102
46103
46104
46105
46106
46107
46108
46109
46110
46111
46112
46113  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46114    # For hotspot, we need these in Windows mixed path,
46115    # so rewrite them all. Need added .exe suffix.
46116    HOTSPOT_CXX="$CXX.exe"
46117    HOTSPOT_LD="$LD.exe"
46118    HOTSPOT_MT="$MT.exe"
46119    HOTSPOT_RC="$RC.exe"
46120
46121  unix_path="$HOTSPOT_CXX"
46122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46123    windows_path=`$CYGPATH -m "$unix_path"`
46124    HOTSPOT_CXX="$windows_path"
46125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46126    windows_path=`cmd //c echo $unix_path`
46127    HOTSPOT_CXX="$windows_path"
46128  fi
46129
46130
46131  unix_path="$HOTSPOT_LD"
46132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46133    windows_path=`$CYGPATH -m "$unix_path"`
46134    HOTSPOT_LD="$windows_path"
46135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46136    windows_path=`cmd //c echo $unix_path`
46137    HOTSPOT_LD="$windows_path"
46138  fi
46139
46140
46141  unix_path="$HOTSPOT_MT"
46142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46143    windows_path=`$CYGPATH -m "$unix_path"`
46144    HOTSPOT_MT="$windows_path"
46145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46146    windows_path=`cmd //c echo $unix_path`
46147    HOTSPOT_MT="$windows_path"
46148  fi
46149
46150
46151  unix_path="$HOTSPOT_RC"
46152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46153    windows_path=`$CYGPATH -m "$unix_path"`
46154    HOTSPOT_RC="$windows_path"
46155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46156    windows_path=`cmd //c echo $unix_path`
46157    HOTSPOT_RC="$windows_path"
46158  fi
46159
46160
46161
46162  else
46163    HOTSPOT_CXX="$CXX"
46164    HOTSPOT_LD="$LD"
46165  fi
46166
46167
46168
46169  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46170    USE_CLANG=true
46171  fi
46172
46173
46174
46175
46176
46177  # The package path is used only on macosx?
46178  # FIXME: clean this up, and/or move it elsewhere.
46179  PACKAGE_PATH=/opt/local
46180
46181
46182  # Check for extra potential brokenness.
46183  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46184    # On Windows, double-check that we got the right compiler.
46185    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46186    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46187    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46188      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46189        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
46190      fi
46191    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46192      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46193        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46194      fi
46195    fi
46196  fi
46197
46198  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46199    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46200    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46201    # This is later checked when setting flags.
46202
46203    # "-Og" suppported for GCC 4.8 and later
46204    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46205
46206
46207
46208
46209
46210
46211
46212
46213
46214
46215
46216
46217
46218
46219
46220
46221
46222
46223
46224
46225
46226
46227
46228
46229
46230
46231
46232
46233
46234
46235
46236
46237
46238
46239
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252    # Execute function body
46253
46254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46255$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46256  supports=yes
46257
46258  saved_cflags="$CFLAGS"
46259  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46260  ac_ext=c
46261ac_cpp='$CPP $CPPFLAGS'
46262ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46263ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46264ac_compiler_gnu=$ac_cv_c_compiler_gnu
46265
46266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46267/* end confdefs.h.  */
46268int i;
46269_ACEOF
46270if ac_fn_c_try_compile "$LINENO"; then :
46271
46272else
46273  supports=no
46274fi
46275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46276  ac_ext=cpp
46277ac_cpp='$CXXCPP $CPPFLAGS'
46278ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46279ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46280ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46281
46282  CFLAGS="$saved_cflags"
46283
46284  saved_cxxflags="$CXXFLAGS"
46285  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46286  ac_ext=cpp
46287ac_cpp='$CXXCPP $CPPFLAGS'
46288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46291
46292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46293/* end confdefs.h.  */
46294int i;
46295_ACEOF
46296if ac_fn_cxx_try_compile "$LINENO"; then :
46297
46298else
46299  supports=no
46300fi
46301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46302  ac_ext=cpp
46303ac_cpp='$CXXCPP $CPPFLAGS'
46304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46307
46308  CXXFLAGS="$saved_cxxflags"
46309
46310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46311$as_echo "$supports" >&6; }
46312  if test "x$supports" = "xyes" ; then
46313    :
46314    HAS_CFLAG_OPTIMIZE_DEBUG=true
46315  else
46316    :
46317    HAS_CFLAG_OPTIMIZE_DEBUG=false
46318  fi
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331
46332    # "-z relro" supported in GNU binutils 2.17 and later
46333    LINKER_RELRO_FLAG="-Wl,-z,relro"
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362
46363
46364
46365
46366
46367
46368
46369
46370
46371
46372
46373
46374
46375
46376
46377
46378
46379
46380
46381    # Execute function body
46382
46383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46384$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46385  supports=yes
46386
46387  saved_ldflags="$LDFLAGS"
46388  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46389  ac_ext=c
46390ac_cpp='$CPP $CPPFLAGS'
46391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46393ac_compiler_gnu=$ac_cv_c_compiler_gnu
46394
46395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46396/* end confdefs.h.  */
46397
46398int
46399main ()
46400{
46401
46402  ;
46403  return 0;
46404}
46405_ACEOF
46406if ac_fn_c_try_link "$LINENO"; then :
46407
46408else
46409  supports=no
46410fi
46411rm -f core conftest.err conftest.$ac_objext \
46412    conftest$ac_exeext conftest.$ac_ext
46413  ac_ext=cpp
46414ac_cpp='$CXXCPP $CPPFLAGS'
46415ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46416ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46417ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46418
46419  LDFLAGS="$saved_ldflags"
46420
46421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46422$as_echo "$supports" >&6; }
46423  if test "x$supports" = "xyes" ; then
46424    :
46425    HAS_LINKER_RELRO=true
46426  else
46427    :
46428    HAS_LINKER_RELRO=false
46429  fi
46430
46431
46432
46433
46434
46435
46436
46437
46438
46439
46440
46441
46442
46443    # "-z now" supported in GNU binutils 2.11 and later
46444    LINKER_NOW_FLAG="-Wl,-z,now"
46445
46446
46447
46448
46449
46450
46451
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476
46477
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492    # Execute function body
46493
46494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46495$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46496  supports=yes
46497
46498  saved_ldflags="$LDFLAGS"
46499  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
46500  ac_ext=c
46501ac_cpp='$CPP $CPPFLAGS'
46502ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46503ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46504ac_compiler_gnu=$ac_cv_c_compiler_gnu
46505
46506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46507/* end confdefs.h.  */
46508
46509int
46510main ()
46511{
46512
46513  ;
46514  return 0;
46515}
46516_ACEOF
46517if ac_fn_c_try_link "$LINENO"; then :
46518
46519else
46520  supports=no
46521fi
46522rm -f core conftest.err conftest.$ac_objext \
46523    conftest$ac_exeext conftest.$ac_ext
46524  ac_ext=cpp
46525ac_cpp='$CXXCPP $CPPFLAGS'
46526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46529
46530  LDFLAGS="$saved_ldflags"
46531
46532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46533$as_echo "$supports" >&6; }
46534  if test "x$supports" = "xyes" ; then
46535    :
46536    HAS_LINKER_NOW=true
46537  else
46538    :
46539    HAS_LINKER_NOW=false
46540  fi
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553  fi
46554
46555  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
46556  # in executable.'
46557  USING_BROKEN_SUSE_LD=no
46558  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
46559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
46560$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
46561    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
46562    $ECHO "int main() { }" > main.c
46563    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
46564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46565$as_echo "no" >&6; }
46566      USING_BROKEN_SUSE_LD=no
46567    else
46568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46569$as_echo "yes" >&6; }
46570      USING_BROKEN_SUSE_LD=yes
46571    fi
46572    rm -rf version-script.map main.c a.out
46573  fi
46574
46575
46576
46577# Setup the JTReg Regression Test Harness.
46578
46579
46580# Check whether --with-jtreg was given.
46581if test "${with_jtreg+set}" = set; then :
46582  withval=$with_jtreg;
46583else
46584  with_jtreg=no
46585fi
46586
46587
46588  if test "x$with_jtreg" = xno; then
46589    # jtreg disabled
46590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
46591$as_echo_n "checking for jtreg... " >&6; }
46592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46593$as_echo "no" >&6; }
46594  else
46595    if test "x$with_jtreg" != xyes; then
46596      # with path specified.
46597      JT_HOME="$with_jtreg"
46598    fi
46599
46600    if test "x$JT_HOME" != x; then
46601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
46602$as_echo_n "checking for jtreg... " >&6; }
46603
46604      # use JT_HOME enviroment var.
46605
46606  # Only process if variable expands to non-empty
46607
46608  if test "x$JT_HOME" != x; then
46609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46610
46611  # Input might be given as Windows format, start by converting to
46612  # unix format.
46613  path="$JT_HOME"
46614  new_path=`$CYGPATH -u "$path"`
46615
46616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46619  # "foo.exe" is OK but "foo" is an error.
46620  #
46621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46622  # It is also a way to make sure we got the proper file name for the real test later on.
46623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46624  if test "x$test_shortpath" = x; then
46625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
46626$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
46627    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
46628  fi
46629
46630  # Call helper function which possibly converts this using DOS-style short mode.
46631  # If so, the updated path is stored in $new_path.
46632
46633  input_path="$new_path"
46634  # Check if we need to convert this using DOS-style short mode. If the path
46635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46636  # take no chances and rewrite it.
46637  # Note: m4 eats our [], so we need to use [ and ] instead.
46638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46639  if test "x$has_forbidden_chars" != x; then
46640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46644      # Going to short mode and back again did indeed matter. Since short mode is
46645      # case insensitive, let's make it lowercase to improve readability.
46646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46647      # Now convert it back to Unix-style (cygpath)
46648      input_path=`$CYGPATH -u "$shortmode_path"`
46649      new_path="$input_path"
46650    fi
46651  fi
46652
46653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46654  if test "x$test_cygdrive_prefix" = x; then
46655    # As a simple fix, exclude /usr/bin since it's not a real path.
46656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46658      # a path prefixed by /cygdrive for fixpath to work.
46659      new_path="$CYGWIN_ROOT_PATH$input_path"
46660    fi
46661  fi
46662
46663
46664  if test "x$path" != "x$new_path"; then
46665    JT_HOME="$new_path"
46666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
46667$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
46668  fi
46669
46670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46671
46672  path="$JT_HOME"
46673  has_colon=`$ECHO $path | $GREP ^.:`
46674  new_path="$path"
46675  if test "x$has_colon" = x; then
46676    # Not in mixed or Windows style, start by that.
46677    new_path=`cmd //c echo $path`
46678  fi
46679
46680
46681  input_path="$new_path"
46682  # Check if we need to convert this using DOS-style short mode. If the path
46683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46684  # take no chances and rewrite it.
46685  # Note: m4 eats our [], so we need to use [ and ] instead.
46686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46687  if test "x$has_forbidden_chars" != x; then
46688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46690  fi
46691
46692
46693  windows_path="$new_path"
46694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46695    unix_path=`$CYGPATH -u "$windows_path"`
46696    new_path="$unix_path"
46697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46699    new_path="$unix_path"
46700  fi
46701
46702  if test "x$path" != "x$new_path"; then
46703    JT_HOME="$new_path"
46704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
46705$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
46706  fi
46707
46708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46710
46711    else
46712      # We're on a unix platform. Hooray! :)
46713      path="$JT_HOME"
46714      has_space=`$ECHO "$path" | $GREP " "`
46715      if test "x$has_space" != x; then
46716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
46717$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
46718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46719      fi
46720
46721      # Use eval to expand a potential ~
46722      eval path="$path"
46723      if test ! -f "$path" && test ! -d "$path"; then
46724        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
46725      fi
46726
46727      if test -d "$path"; then
46728        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
46729      else
46730        dir="`$DIRNAME "$path"`"
46731        base="`$BASENAME "$path"`"
46732        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
46733      fi
46734    fi
46735  fi
46736
46737
46738      # jtreg win32 script works for everybody
46739      JTREGEXE="$JT_HOME/bin/jtreg"
46740
46741      if test ! -f "$JTREGEXE"; then
46742        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
46743      fi
46744
46745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46746$as_echo "$JTREGEXE" >&6; }
46747    else
46748      # try to find jtreg on path
46749
46750
46751
46752  # Publish this variable in the help.
46753
46754
46755  if [ -z "${JTREGEXE+x}" ]; then
46756    # The variable is not set by user, try to locate tool using the code snippet
46757    for ac_prog in jtreg
46758do
46759  # Extract the first word of "$ac_prog", so it can be a program name with args.
46760set dummy $ac_prog; ac_word=$2
46761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46762$as_echo_n "checking for $ac_word... " >&6; }
46763if ${ac_cv_path_JTREGEXE+:} false; then :
46764  $as_echo_n "(cached) " >&6
46765else
46766  case $JTREGEXE in
46767  [\\/]* | ?:[\\/]*)
46768  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46769  ;;
46770  *)
46771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46772for as_dir in $PATH
46773do
46774  IFS=$as_save_IFS
46775  test -z "$as_dir" && as_dir=.
46776    for ac_exec_ext in '' $ac_executable_extensions; do
46777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46778    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46780    break 2
46781  fi
46782done
46783  done
46784IFS=$as_save_IFS
46785
46786  ;;
46787esac
46788fi
46789JTREGEXE=$ac_cv_path_JTREGEXE
46790if test -n "$JTREGEXE"; then
46791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46792$as_echo "$JTREGEXE" >&6; }
46793else
46794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46795$as_echo "no" >&6; }
46796fi
46797
46798
46799  test -n "$JTREGEXE" && break
46800done
46801
46802  else
46803    # The variable is set, but is it from the command line or the environment?
46804
46805    # Try to remove the string !JTREGEXE! from our list.
46806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
46807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46808      # If it failed, the variable was not from the command line. Ignore it,
46809      # but warn the user (except for BASH, which is always set by the calling BASH).
46810      if test "xJTREGEXE" != xBASH; then
46811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
46812$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
46813      fi
46814      # Try to locate tool using the code snippet
46815      for ac_prog in jtreg
46816do
46817  # Extract the first word of "$ac_prog", so it can be a program name with args.
46818set dummy $ac_prog; ac_word=$2
46819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46820$as_echo_n "checking for $ac_word... " >&6; }
46821if ${ac_cv_path_JTREGEXE+:} false; then :
46822  $as_echo_n "(cached) " >&6
46823else
46824  case $JTREGEXE in
46825  [\\/]* | ?:[\\/]*)
46826  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46827  ;;
46828  *)
46829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46830for as_dir in $PATH
46831do
46832  IFS=$as_save_IFS
46833  test -z "$as_dir" && as_dir=.
46834    for ac_exec_ext in '' $ac_executable_extensions; do
46835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46836    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46838    break 2
46839  fi
46840done
46841  done
46842IFS=$as_save_IFS
46843
46844  ;;
46845esac
46846fi
46847JTREGEXE=$ac_cv_path_JTREGEXE
46848if test -n "$JTREGEXE"; then
46849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46850$as_echo "$JTREGEXE" >&6; }
46851else
46852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46853$as_echo "no" >&6; }
46854fi
46855
46856
46857  test -n "$JTREGEXE" && break
46858done
46859
46860    else
46861      # If it succeeded, then it was overridden by the user. We will use it
46862      # for the tool.
46863
46864      # First remove it from the list of overridden variables, so we can test
46865      # for unknown variables in the end.
46866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46867
46868      # Check if we try to supply an empty value
46869      if test "x$JTREGEXE" = x; then
46870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
46871$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
46872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46873$as_echo_n "checking for JTREGEXE... " >&6; }
46874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46875$as_echo "disabled" >&6; }
46876      else
46877        # Check if the provided tool contains a complete path.
46878        tool_specified="$JTREGEXE"
46879        tool_basename="${tool_specified##*/}"
46880        if test "x$tool_basename" = "x$tool_specified"; then
46881          # A command without a complete path is provided, search $PATH.
46882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
46883$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
46884          # Extract the first word of "$tool_basename", so it can be a program name with args.
46885set dummy $tool_basename; ac_word=$2
46886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46887$as_echo_n "checking for $ac_word... " >&6; }
46888if ${ac_cv_path_JTREGEXE+:} false; then :
46889  $as_echo_n "(cached) " >&6
46890else
46891  case $JTREGEXE in
46892  [\\/]* | ?:[\\/]*)
46893  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46894  ;;
46895  *)
46896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46897for as_dir in $PATH
46898do
46899  IFS=$as_save_IFS
46900  test -z "$as_dir" && as_dir=.
46901    for ac_exec_ext in '' $ac_executable_extensions; do
46902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46903    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46905    break 2
46906  fi
46907done
46908  done
46909IFS=$as_save_IFS
46910
46911  ;;
46912esac
46913fi
46914JTREGEXE=$ac_cv_path_JTREGEXE
46915if test -n "$JTREGEXE"; then
46916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46917$as_echo "$JTREGEXE" >&6; }
46918else
46919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46920$as_echo "no" >&6; }
46921fi
46922
46923
46924          if test "x$JTREGEXE" = x; then
46925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46926          fi
46927        else
46928          # Otherwise we believe it is a complete path. Use it as it is.
46929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
46930$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
46931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46932$as_echo_n "checking for JTREGEXE... " >&6; }
46933          if test ! -x "$tool_specified"; then
46934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46935$as_echo "not found" >&6; }
46936            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
46937          fi
46938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46939$as_echo "$tool_specified" >&6; }
46940        fi
46941      fi
46942    fi
46943
46944  fi
46945
46946
46947
46948  if test "x$JTREGEXE" = x; then
46949    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
46950  fi
46951
46952
46953      JT_HOME="`$DIRNAME $JTREGEXE`"
46954    fi
46955  fi
46956
46957
46958
46959
46960
46961
46962  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
46963  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
46964  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
46965  #                              commands produced by the link step (currently AIX only)
46966  if test "x$TOOLCHAIN_TYPE" = xxlc; then
46967    COMPILER_TARGET_BITS_FLAG="-q"
46968    COMPILER_COMMAND_FILE_FLAG="-f"
46969    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
46970  else
46971    COMPILER_TARGET_BITS_FLAG="-m"
46972    COMPILER_COMMAND_FILE_FLAG="@"
46973    COMPILER_BINDCMD_FILE_FLAG=""
46974
46975    # The solstudio linker does not support @-files.
46976    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46977      COMPILER_COMMAND_FILE_FLAG=
46978    fi
46979
46980    # Check if @file is supported by gcc
46981    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
46983$as_echo_n "checking if @file is supported by gcc... " >&6; }
46984      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
46985      $ECHO "" "--version" > command.file
46986      if $CXX @command.file 2>&5 >&5; then
46987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46988$as_echo "yes" >&6; }
46989        COMPILER_COMMAND_FILE_FLAG="@"
46990      else
46991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46992$as_echo "no" >&6; }
46993        COMPILER_COMMAND_FILE_FLAG=
46994      fi
46995      rm -rf command.file
46996    fi
46997  fi
46998
46999
47000
47001
47002  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47003  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47004    ARFLAGS="-r"
47005  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47006    ARFLAGS="-X64"
47007  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47008    # lib.exe is used as AR to create static libraries.
47009    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47010  else
47011    ARFLAGS=""
47012  fi
47013
47014
47015  ## Setup strip.
47016  # FIXME: should this really be per platform, or should it be per toolchain type?
47017  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47018  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47019  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47020    STRIPFLAGS="-g"
47021  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47022    STRIPFLAGS="-x"
47023  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47024    STRIPFLAGS="-S"
47025  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47026    STRIPFLAGS="-X32_64"
47027  fi
47028
47029
47030
47031  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47032    CC_OUT_OPTION=-Fo
47033    EXE_OUT_OPTION=-out:
47034    LD_OUT_OPTION=-out:
47035    AR_OUT_OPTION=-out:
47036  else
47037    # The option used to specify the target .o,.a or .so file.
47038    # When compiling, how to specify the to be created object file.
47039    CC_OUT_OPTION='-o$(SPACE)'
47040    # When linking, how to specify the to be created executable.
47041    EXE_OUT_OPTION='-o$(SPACE)'
47042    # When linking, how to specify the to be created dynamically linkable library.
47043    LD_OUT_OPTION='-o$(SPACE)'
47044    # When archiving, how to specify the to be create static archive for object files.
47045    AR_OUT_OPTION='rcs$(SPACE)'
47046  fi
47047
47048
47049
47050
47051
47052  # On Windows, we need to set RC flags.
47053  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47054    RC_FLAGS="-nologo -l0x409"
47055    if test "x$DEBUG_LEVEL" = xrelease; then
47056      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47057    fi
47058
47059    # The version variables used to create RC_FLAGS may be overridden
47060    # in a custom configure script, or possibly the command line.
47061    # Let those variables be expanded at make time in spec.gmk.
47062    # The \$ are escaped to the shell, and the $(...) variables
47063    # are evaluated by make.
47064    RC_FLAGS="$RC_FLAGS \
47065        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47066        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47067        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47068        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47069        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47070        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47071        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47072  fi
47073
47074
47075  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47076    # silence copyright notice and other headers.
47077    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47078  fi
47079
47080
47081# Now we can test some aspects on the target using configure macros.
47082
47083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47084$as_echo_n "checking for ANSI C header files... " >&6; }
47085if ${ac_cv_header_stdc+:} false; then :
47086  $as_echo_n "(cached) " >&6
47087else
47088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47089/* end confdefs.h.  */
47090#include <stdlib.h>
47091#include <stdarg.h>
47092#include <string.h>
47093#include <float.h>
47094
47095int
47096main ()
47097{
47098
47099  ;
47100  return 0;
47101}
47102_ACEOF
47103if ac_fn_cxx_try_compile "$LINENO"; then :
47104  ac_cv_header_stdc=yes
47105else
47106  ac_cv_header_stdc=no
47107fi
47108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47109
47110if test $ac_cv_header_stdc = yes; then
47111  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47113/* end confdefs.h.  */
47114#include <string.h>
47115
47116_ACEOF
47117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47118  $EGREP "memchr" >/dev/null 2>&1; then :
47119
47120else
47121  ac_cv_header_stdc=no
47122fi
47123rm -f conftest*
47124
47125fi
47126
47127if test $ac_cv_header_stdc = yes; then
47128  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47130/* end confdefs.h.  */
47131#include <stdlib.h>
47132
47133_ACEOF
47134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47135  $EGREP "free" >/dev/null 2>&1; then :
47136
47137else
47138  ac_cv_header_stdc=no
47139fi
47140rm -f conftest*
47141
47142fi
47143
47144if test $ac_cv_header_stdc = yes; then
47145  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47146  if test "$cross_compiling" = yes; then :
47147  :
47148else
47149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47150/* end confdefs.h.  */
47151#include <ctype.h>
47152#include <stdlib.h>
47153#if ((' ' & 0x0FF) == 0x020)
47154# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47155# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47156#else
47157# define ISLOWER(c) \
47158		   (('a' <= (c) && (c) <= 'i') \
47159		     || ('j' <= (c) && (c) <= 'r') \
47160		     || ('s' <= (c) && (c) <= 'z'))
47161# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47162#endif
47163
47164#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47165int
47166main ()
47167{
47168  int i;
47169  for (i = 0; i < 256; i++)
47170    if (XOR (islower (i), ISLOWER (i))
47171	|| toupper (i) != TOUPPER (i))
47172      return 2;
47173  return 0;
47174}
47175_ACEOF
47176if ac_fn_cxx_try_run "$LINENO"; then :
47177
47178else
47179  ac_cv_header_stdc=no
47180fi
47181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47182  conftest.$ac_objext conftest.beam conftest.$ac_ext
47183fi
47184
47185fi
47186fi
47187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47188$as_echo "$ac_cv_header_stdc" >&6; }
47189if test $ac_cv_header_stdc = yes; then
47190
47191$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47192
47193fi
47194
47195# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47196for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47197		  inttypes.h stdint.h unistd.h
47198do :
47199  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47200ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47201"
47202if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47203  cat >>confdefs.h <<_ACEOF
47204#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47205_ACEOF
47206
47207fi
47208
47209done
47210
47211
47212
47213  ###############################################################################
47214  #
47215  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47216  # (The JVM can use 32 or 64 bit Java pointers but that decision
47217  # is made at runtime.)
47218  #
47219
47220  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47221    # Always specify -m flag on Solaris
47222    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47223
47224  # When we add flags to the "official" CFLAGS etc, we need to
47225  # keep track of these additions in ADDED_CFLAGS etc. These
47226  # will later be checked to make sure only controlled additions
47227  # have been made to CFLAGS etc.
47228  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47229  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47230  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47231
47232  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47233  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47234  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47235
47236  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47237  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47238  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47239
47240  elif test "x$COMPILE_TYPE" = xreduced; then
47241    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47242      # Specify -m if running reduced on unix platforms
47243
47244  # When we add flags to the "official" CFLAGS etc, we need to
47245  # keep track of these additions in ADDED_CFLAGS etc. These
47246  # will later be checked to make sure only controlled additions
47247  # have been made to CFLAGS etc.
47248  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47249  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47250  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47251
47252  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47253  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47254  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47255
47256  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47257  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47258  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47259
47260    fi
47261  fi
47262
47263  # Make compilation sanity check
47264  for ac_header in stdio.h
47265do :
47266  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47267if test "x$ac_cv_header_stdio_h" = xyes; then :
47268  cat >>confdefs.h <<_ACEOF
47269#define HAVE_STDIO_H 1
47270_ACEOF
47271
47272else
47273
47274    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47275$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47276    if test "x$COMPILE_TYPE" = xreduced; then
47277
47278  # Print a helpful message on how to acquire the necessary build dependency.
47279  # reduced is the help tag: freetype, cups, alsa etc
47280  MISSING_DEPENDENCY=reduced
47281
47282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47283    cygwin_help $MISSING_DEPENDENCY
47284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47285    msys_help $MISSING_DEPENDENCY
47286  else
47287    PKGHANDLER_COMMAND=
47288
47289    case $PKGHANDLER in
47290      apt-get)
47291        apt_help     $MISSING_DEPENDENCY ;;
47292      yum)
47293        yum_help     $MISSING_DEPENDENCY ;;
47294      port)
47295        port_help    $MISSING_DEPENDENCY ;;
47296      pkgutil)
47297        pkgutil_help $MISSING_DEPENDENCY ;;
47298      pkgadd)
47299        pkgadd_help  $MISSING_DEPENDENCY ;;
47300    esac
47301
47302    if test "x$PKGHANDLER_COMMAND" != x; then
47303      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47304    fi
47305  fi
47306
47307      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47308$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47309    elif test "x$COMPILE_TYPE" = xcross; then
47310      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47311$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47312    fi
47313    as_fn_error $? "Cannot continue." "$LINENO" 5
47314
47315fi
47316
47317done
47318
47319
47320  # The cast to long int works around a bug in the HP C Compiler
47321# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47322# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47323# This bug is HP SR number 8606223364.
47324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47325$as_echo_n "checking size of int *... " >&6; }
47326if ${ac_cv_sizeof_int_p+:} false; then :
47327  $as_echo_n "(cached) " >&6
47328else
47329  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47330
47331else
47332  if test "$ac_cv_type_int_p" = yes; then
47333     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47335as_fn_error 77 "cannot compute sizeof (int *)
47336See \`config.log' for more details" "$LINENO" 5; }
47337   else
47338     ac_cv_sizeof_int_p=0
47339   fi
47340fi
47341
47342fi
47343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47344$as_echo "$ac_cv_sizeof_int_p" >&6; }
47345
47346
47347
47348cat >>confdefs.h <<_ACEOF
47349#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47350_ACEOF
47351
47352
47353
47354  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47355  if test "x$ac_cv_sizeof_int_p" = x; then
47356    # The test failed, lets stick to the assumed value.
47357    { $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
47358$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47359  else
47360    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47361
47362    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47363      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47364      # Let's try to implicitely set the compilers target architecture and retry the test
47365      { $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
47366$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;}
47367      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47368$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47369
47370  # When we add flags to the "official" CFLAGS etc, we need to
47371  # keep track of these additions in ADDED_CFLAGS etc. These
47372  # will later be checked to make sure only controlled additions
47373  # have been made to CFLAGS etc.
47374  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47375  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47376  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47377
47378  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47379  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47380  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47381
47382  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47383  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47384  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47385
47386
47387      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47388      unset ac_cv_sizeof_int_p
47389      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47390      cat >>confdefs.h <<_ACEOF
47391#undef SIZEOF_INT_P
47392_ACEOF
47393
47394      # The cast to long int works around a bug in the HP C Compiler
47395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47397# This bug is HP SR number 8606223364.
47398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47399$as_echo_n "checking size of int *... " >&6; }
47400if ${ac_cv_sizeof_int_p+:} false; then :
47401  $as_echo_n "(cached) " >&6
47402else
47403  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47404
47405else
47406  if test "$ac_cv_type_int_p" = yes; then
47407     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47409as_fn_error 77 "cannot compute sizeof (int *)
47410See \`config.log' for more details" "$LINENO" 5; }
47411   else
47412     ac_cv_sizeof_int_p=0
47413   fi
47414fi
47415
47416fi
47417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47418$as_echo "$ac_cv_sizeof_int_p" >&6; }
47419
47420
47421
47422cat >>confdefs.h <<_ACEOF
47423#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47424_ACEOF
47425
47426
47427
47428      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47429
47430      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47431        { $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
47432$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;}
47433        if test "x$COMPILE_TYPE" = xreduced; then
47434
47435  # Print a helpful message on how to acquire the necessary build dependency.
47436  # reduced is the help tag: freetype, cups, alsa etc
47437  MISSING_DEPENDENCY=reduced
47438
47439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47440    cygwin_help $MISSING_DEPENDENCY
47441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47442    msys_help $MISSING_DEPENDENCY
47443  else
47444    PKGHANDLER_COMMAND=
47445
47446    case $PKGHANDLER in
47447      apt-get)
47448        apt_help     $MISSING_DEPENDENCY ;;
47449      yum)
47450        yum_help     $MISSING_DEPENDENCY ;;
47451      port)
47452        port_help    $MISSING_DEPENDENCY ;;
47453      pkgutil)
47454        pkgutil_help $MISSING_DEPENDENCY ;;
47455      pkgadd)
47456        pkgadd_help  $MISSING_DEPENDENCY ;;
47457    esac
47458
47459    if test "x$PKGHANDLER_COMMAND" != x; then
47460      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47461    fi
47462  fi
47463
47464          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47465$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47466        elif test "x$COMPILE_TYPE" = xcross; then
47467          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47468$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47469        fi
47470        as_fn_error $? "Cannot continue." "$LINENO" 5
47471      fi
47472    fi
47473  fi
47474
47475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
47476$as_echo_n "checking for target address size... " >&6; }
47477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
47478$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
47479
47480
47481  ###############################################################################
47482  #
47483  # Is the target little of big endian?
47484  #
47485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
47486$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
47487if ${ac_cv_c_bigendian+:} false; then :
47488  $as_echo_n "(cached) " >&6
47489else
47490  ac_cv_c_bigendian=unknown
47491    # See if we're dealing with a universal compiler.
47492    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47493/* end confdefs.h.  */
47494#ifndef __APPLE_CC__
47495	       not a universal capable compiler
47496	     #endif
47497	     typedef int dummy;
47498
47499_ACEOF
47500if ac_fn_cxx_try_compile "$LINENO"; then :
47501
47502	# Check for potential -arch flags.  It is not universal unless
47503	# there are at least two -arch flags with different values.
47504	ac_arch=
47505	ac_prev=
47506	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
47507	 if test -n "$ac_prev"; then
47508	   case $ac_word in
47509	     i?86 | x86_64 | ppc | ppc64)
47510	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
47511		 ac_arch=$ac_word
47512	       else
47513		 ac_cv_c_bigendian=universal
47514		 break
47515	       fi
47516	       ;;
47517	   esac
47518	   ac_prev=
47519	 elif test "x$ac_word" = "x-arch"; then
47520	   ac_prev=arch
47521	 fi
47522       done
47523fi
47524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47525    if test $ac_cv_c_bigendian = unknown; then
47526      # See if sys/param.h defines the BYTE_ORDER macro.
47527      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47528/* end confdefs.h.  */
47529#include <sys/types.h>
47530	     #include <sys/param.h>
47531
47532int
47533main ()
47534{
47535#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
47536		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
47537		     && LITTLE_ENDIAN)
47538	      bogus endian macros
47539	     #endif
47540
47541  ;
47542  return 0;
47543}
47544_ACEOF
47545if ac_fn_cxx_try_compile "$LINENO"; then :
47546  # It does; now see whether it defined to BIG_ENDIAN or not.
47547	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47548/* end confdefs.h.  */
47549#include <sys/types.h>
47550		#include <sys/param.h>
47551
47552int
47553main ()
47554{
47555#if BYTE_ORDER != BIG_ENDIAN
47556		 not big endian
47557		#endif
47558
47559  ;
47560  return 0;
47561}
47562_ACEOF
47563if ac_fn_cxx_try_compile "$LINENO"; then :
47564  ac_cv_c_bigendian=yes
47565else
47566  ac_cv_c_bigendian=no
47567fi
47568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47569fi
47570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47571    fi
47572    if test $ac_cv_c_bigendian = unknown; then
47573      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
47574      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47575/* end confdefs.h.  */
47576#include <limits.h>
47577
47578int
47579main ()
47580{
47581#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
47582	      bogus endian macros
47583	     #endif
47584
47585  ;
47586  return 0;
47587}
47588_ACEOF
47589if ac_fn_cxx_try_compile "$LINENO"; then :
47590  # It does; now see whether it defined to _BIG_ENDIAN or not.
47591	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47592/* end confdefs.h.  */
47593#include <limits.h>
47594
47595int
47596main ()
47597{
47598#ifndef _BIG_ENDIAN
47599		 not big endian
47600		#endif
47601
47602  ;
47603  return 0;
47604}
47605_ACEOF
47606if ac_fn_cxx_try_compile "$LINENO"; then :
47607  ac_cv_c_bigendian=yes
47608else
47609  ac_cv_c_bigendian=no
47610fi
47611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47612fi
47613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47614    fi
47615    if test $ac_cv_c_bigendian = unknown; then
47616      # Compile a test program.
47617      if test "$cross_compiling" = yes; then :
47618  # Try to guess by grepping values from an object file.
47619	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47620/* end confdefs.h.  */
47621short int ascii_mm[] =
47622		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
47623		short int ascii_ii[] =
47624		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
47625		int use_ascii (int i) {
47626		  return ascii_mm[i] + ascii_ii[i];
47627		}
47628		short int ebcdic_ii[] =
47629		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
47630		short int ebcdic_mm[] =
47631		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
47632		int use_ebcdic (int i) {
47633		  return ebcdic_mm[i] + ebcdic_ii[i];
47634		}
47635		extern int foo;
47636
47637int
47638main ()
47639{
47640return use_ascii (foo) == use_ebcdic (foo);
47641  ;
47642  return 0;
47643}
47644_ACEOF
47645if ac_fn_cxx_try_compile "$LINENO"; then :
47646  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
47647	      ac_cv_c_bigendian=yes
47648	    fi
47649	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
47650	      if test "$ac_cv_c_bigendian" = unknown; then
47651		ac_cv_c_bigendian=no
47652	      else
47653		# finding both strings is unlikely to happen, but who knows?
47654		ac_cv_c_bigendian=unknown
47655	      fi
47656	    fi
47657fi
47658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47659else
47660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47661/* end confdefs.h.  */
47662$ac_includes_default
47663int
47664main ()
47665{
47666
47667	     /* Are we little or big endian?  From Harbison&Steele.  */
47668	     union
47669	     {
47670	       long int l;
47671	       char c[sizeof (long int)];
47672	     } u;
47673	     u.l = 1;
47674	     return u.c[sizeof (long int) - 1] == 1;
47675
47676  ;
47677  return 0;
47678}
47679_ACEOF
47680if ac_fn_cxx_try_run "$LINENO"; then :
47681  ac_cv_c_bigendian=no
47682else
47683  ac_cv_c_bigendian=yes
47684fi
47685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47686  conftest.$ac_objext conftest.beam conftest.$ac_ext
47687fi
47688
47689    fi
47690fi
47691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
47692$as_echo "$ac_cv_c_bigendian" >&6; }
47693 case $ac_cv_c_bigendian in #(
47694   yes)
47695     ENDIAN="big";; #(
47696   no)
47697     ENDIAN="little" ;; #(
47698   universal)
47699     ENDIAN="universal_endianness"
47700     ;; #(
47701   *)
47702     ENDIAN="unknown" ;;
47703 esac
47704
47705
47706  if test "x$ENDIAN" = xuniversal_endianness; then
47707    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
47708  fi
47709  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
47710    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
47711  fi
47712
47713
47714# Configure flags for the tools
47715
47716  ###############################################################################
47717  #
47718  # How to compile shared libraries.
47719  #
47720
47721  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47722    PICFLAG="-fPIC"
47723    C_FLAG_REORDER=''
47724    CXX_FLAG_REORDER=''
47725
47726    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47727      # Linking is different on MacOSX
47728      if test "x$STATIC_BUILD" = xtrue; then
47729        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
47730      else
47731        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
47732      fi
47733      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
47734      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47735      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
47736      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
47737    else
47738      # Default works for linux, might work on other platforms as well.
47739      SHARED_LIBRARY_FLAGS='-shared'
47740      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
47741      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
47742      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
47743      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
47744    fi
47745  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47746    C_FLAG_REORDER=''
47747    CXX_FLAG_REORDER=''
47748
47749    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47750      # Linking is different on MacOSX
47751      PICFLAG=''
47752      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
47753      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
47754      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47755      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
47756      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
47757    else
47758      # Default works for linux, might work on other platforms as well.
47759      PICFLAG='-fPIC'
47760      SHARED_LIBRARY_FLAGS='-shared'
47761      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
47762      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
47763      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
47764      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
47765    fi
47766  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47767    PICFLAG="-KPIC"
47768    C_FLAG_REORDER='-xF'
47769    CXX_FLAG_REORDER='-xF'
47770    SHARED_LIBRARY_FLAGS="-G"
47771    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
47772    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47773    SET_SHARED_LIBRARY_NAME='-h $1'
47774    SET_SHARED_LIBRARY_MAPFILE='-M$1'
47775  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47776    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
47777    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
47778    # will have to patch this single instruction with a call to some out-of-order code which
47779    # does the load from the TOC. This is of course slow. But in that case we also would have
47780    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
47781    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
47782    # can be patched directly by the linker and does not require a jump to out-of-order code.
47783    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
47784    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
47785    # loads for accessing a global variable). But there are rumors that this may be seen as a
47786    # 'performance feature' because of improved code locality of the symbols used in a
47787    # compilation unit.
47788    PICFLAG="-qpic"
47789    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
47790    C_FLAG_REORDER=''
47791    CXX_FLAG_REORDER=''
47792    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
47793    SET_EXECUTABLE_ORIGIN=""
47794    SET_SHARED_LIBRARY_ORIGIN=''
47795    SET_SHARED_LIBRARY_NAME=''
47796    SET_SHARED_LIBRARY_MAPFILE=''
47797  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47798    PICFLAG=""
47799    C_FLAG_REORDER=''
47800    CXX_FLAG_REORDER=''
47801    SHARED_LIBRARY_FLAGS="-dll"
47802    SET_EXECUTABLE_ORIGIN=''
47803    SET_SHARED_LIBRARY_ORIGIN=''
47804    SET_SHARED_LIBRARY_NAME=''
47805    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
47806  fi
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47817    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
47818    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
47819    CFLAGS_JDKLIB_EXTRA='-xstrconst'
47820  fi
47821  # The (cross) compiler is now configured, we can now test capabilities
47822  # of the target platform.
47823
47824
47825
47826  ###############################################################################
47827  #
47828  # Setup the opt flags for different compilers
47829  # and different operating systems.
47830  #
47831
47832  # FIXME: this was indirectly the old default, but just inherited.
47833  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47834  #   C_FLAG_DEPS="-MMD -MF"
47835  # fi
47836
47837  # Generate make dependency files
47838  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47839    C_FLAG_DEPS="-MMD -MF"
47840  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47841    C_FLAG_DEPS="-MMD -MF"
47842  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47843    C_FLAG_DEPS="-xMMD -xMF"
47844  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47845    C_FLAG_DEPS="-qmakedep=gcc -MF"
47846  fi
47847  CXX_FLAG_DEPS="$C_FLAG_DEPS"
47848
47849
47850
47851  # Debug symbols
47852  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47853    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
47854      # reduce from default "-g2" option to save space
47855      CFLAGS_DEBUG_SYMBOLS="-g1"
47856      CXXFLAGS_DEBUG_SYMBOLS="-g1"
47857    else
47858      CFLAGS_DEBUG_SYMBOLS="-g"
47859      CXXFLAGS_DEBUG_SYMBOLS="-g"
47860    fi
47861  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47862    CFLAGS_DEBUG_SYMBOLS="-g"
47863    CXXFLAGS_DEBUG_SYMBOLS="-g"
47864  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47865    CFLAGS_DEBUG_SYMBOLS="-g -xs"
47866    # -g0 enables debug symbols without disabling inlining.
47867    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
47868  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47869    CFLAGS_DEBUG_SYMBOLS="-g"
47870    CXXFLAGS_DEBUG_SYMBOLS="-g"
47871  fi
47872
47873
47874
47875  # bounds, memory and behavior checking options
47876  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47877    case $DEBUG_LEVEL in
47878    release )
47879      # no adjustment
47880      ;;
47881    fastdebug )
47882      # no adjustment
47883      ;;
47884    slowdebug )
47885      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
47886      # get's added conditionally on whether we produce debug symbols or not.
47887      # This is most likely not really correct.
47888
47889      # Add runtime stack smashing and undefined behavior checks.
47890      # Not all versions of gcc support -fstack-protector
47891      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934    # Execute function body
47935
47936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
47937$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
47938  supports=yes
47939
47940  saved_cflags="$CFLAGS"
47941  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
47942  ac_ext=c
47943ac_cpp='$CPP $CPPFLAGS'
47944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47946ac_compiler_gnu=$ac_cv_c_compiler_gnu
47947
47948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47949/* end confdefs.h.  */
47950int i;
47951_ACEOF
47952if ac_fn_c_try_compile "$LINENO"; then :
47953
47954else
47955  supports=no
47956fi
47957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47958  ac_ext=cpp
47959ac_cpp='$CXXCPP $CPPFLAGS'
47960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47963
47964  CFLAGS="$saved_cflags"
47965
47966  saved_cxxflags="$CXXFLAGS"
47967  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
47968  ac_ext=cpp
47969ac_cpp='$CXXCPP $CPPFLAGS'
47970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47973
47974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47975/* end confdefs.h.  */
47976int i;
47977_ACEOF
47978if ac_fn_cxx_try_compile "$LINENO"; then :
47979
47980else
47981  supports=no
47982fi
47983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47984  ac_ext=cpp
47985ac_cpp='$CXXCPP $CPPFLAGS'
47986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47989
47990  CXXFLAGS="$saved_cxxflags"
47991
47992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47993$as_echo "$supports" >&6; }
47994  if test "x$supports" = "xyes" ; then
47995    :
47996
47997  else
47998    :
47999    STACK_PROTECTOR_CFLAG=""
48000  fi
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48015      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48016      ;;
48017    esac
48018  fi
48019
48020  # Optimization levels
48021  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48022    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48023
48024    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48025      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48026      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48027      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48028      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48029      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48030      C_O_FLAG_NONE="-xregs=no%frameptr"
48031      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48032      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48033      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48034      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48035      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48036      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48037        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48038        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48039      fi
48040    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48041      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48042      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48043      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48044      C_O_FLAG_DEBUG=""
48045      C_O_FLAG_NONE=""
48046      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48047      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48048      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48049      CXX_O_FLAG_DEBUG=""
48050      CXX_O_FLAG_NONE=""
48051    fi
48052  else
48053    # The remaining toolchains share opt flags between CC and CXX;
48054    # setup for C and duplicate afterwards.
48055    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48056      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48057        # On MacOSX we optimize for size, something
48058        # we should do for all platforms?
48059        C_O_FLAG_HIGHEST="-Os"
48060        C_O_FLAG_HI="-Os"
48061        C_O_FLAG_NORM="-Os"
48062      else
48063        C_O_FLAG_HIGHEST="-O3"
48064        C_O_FLAG_HI="-O3"
48065        C_O_FLAG_NORM="-O2"
48066      fi
48067      C_O_FLAG_DEBUG="-O0"
48068      C_O_FLAG_NONE="-O0"
48069    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48070      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48071        # On MacOSX we optimize for size, something
48072        # we should do for all platforms?
48073        C_O_FLAG_HIGHEST="-Os"
48074        C_O_FLAG_HI="-Os"
48075        C_O_FLAG_NORM="-Os"
48076      else
48077        C_O_FLAG_HIGHEST="-O3"
48078        C_O_FLAG_HI="-O3"
48079        C_O_FLAG_NORM="-O2"
48080      fi
48081      C_O_FLAG_DEBUG="-O0"
48082      C_O_FLAG_NONE="-O0"
48083    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48084      C_O_FLAG_HIGHEST="-O3"
48085      C_O_FLAG_HI="-O3 -qstrict"
48086      C_O_FLAG_NORM="-O2"
48087      C_O_FLAG_DEBUG="-qnoopt"
48088      C_O_FLAG_NONE="-qnoopt"
48089    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48090      C_O_FLAG_HIGHEST="-O2"
48091      C_O_FLAG_HI="-O1"
48092      C_O_FLAG_NORM="-O1"
48093      C_O_FLAG_DEBUG="-Od"
48094      C_O_FLAG_NONE="-Od"
48095    fi
48096    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48097    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48098    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48099    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48100    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48101  fi
48102
48103  # Adjust optimization flags according to debug level.
48104  case $DEBUG_LEVEL in
48105    release )
48106      # no adjustment
48107      ;;
48108    fastdebug )
48109      # Not quite so much optimization
48110      C_O_FLAG_HI="$C_O_FLAG_NORM"
48111      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48112      ;;
48113    slowdebug )
48114      # Disable optimization
48115      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48116      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48117      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48118      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48119      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48120      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48121      ;;
48122  esac
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136  # Special extras...
48137  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48138    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48139      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48140      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48141    fi
48142    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48143    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48144  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48145    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48146    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48147  fi
48148
48149  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
48150  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
48151  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
48152
48153  ###############################################################################
48154  #
48155  # Now setup the CFLAGS and LDFLAGS for the JDK build.
48156  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
48157  #
48158
48159  # Setup compiler/platform specific flags into
48160  #    CFLAGS_JDK    - C Compiler flags
48161  #    CXXFLAGS_JDK  - C++ Compiler flags
48162  #    COMMON_CCXXFLAGS_JDK - common to C and C++
48163  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48164    if test "x$OPENJDK_TARGET_CPU" = xx86; then
48165      # Force compatibility with i586 on 32 bit intel platforms.
48166      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
48167    fi
48168    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
48169        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
48170    case $OPENJDK_TARGET_CPU_ARCH in
48171      arm )
48172        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48173        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48174        ;;
48175      ppc )
48176        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48177        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48178        ;;
48179      * )
48180        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
48181        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48182        ;;
48183    esac
48184  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48185    if test "x$OPENJDK_TARGET_OS" = xlinux; then
48186      if test "x$OPENJDK_TARGET_CPU" = xx86; then
48187        # Force compatibility with i586 on 32 bit intel platforms.
48188        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
48189      fi
48190      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
48191          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
48192      case $OPENJDK_TARGET_CPU_ARCH in
48193        ppc )
48194          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48195          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48196          ;;
48197        * )
48198          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
48199          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48200          ;;
48201      esac
48202    fi
48203  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48204    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
48205    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
48206      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
48207    fi
48208
48209    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
48210    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
48211  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48212    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
48213    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
48214  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48215    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
48216        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
48217        -DWIN32_LEAN_AND_MEAN \
48218        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
48219        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
48220        -DWIN32 -DIAL"
48221    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48222      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
48223    else
48224      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
48225    fi
48226    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
48227    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
48228    # studio.
48229    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
48230      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
48231      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
48232    fi
48233  fi
48234
48235  ###############################################################################
48236
48237  # Adjust flags according to debug level.
48238  case $DEBUG_LEVEL in
48239    fastdebug | slowdebug )
48240      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
48241      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
48242      JAVAC_FLAGS="$JAVAC_FLAGS -g"
48243      ;;
48244    release )
48245      ;;
48246    * )
48247      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
48248      ;;
48249  esac
48250
48251  # Set some common defines. These works for all compilers, but assume
48252  # -D is universally accepted.
48253
48254  # Setup endianness
48255  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
48256    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
48257    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
48258    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
48259    #   Note: -Dmacro         is the same as    #define macro 1
48260    #         -Dmacro=        is the same as    #define macro
48261    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
48262      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
48263    else
48264      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
48265    fi
48266  else
48267    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
48268    # are defined in the system?
48269    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
48270      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
48271    else
48272      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
48273    fi
48274  fi
48275
48276  # Setup target OS define. Use OS target name but in upper case.
48277  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
48278  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
48279
48280  # Setup target CPU
48281  OPENJDK_TARGET_CCXXFLAGS_JDK="$OPENJDK_TARGET_CCXXFLAGS_JDK \
48282      $ADD_LP64 \
48283      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
48284  OPENJDK_BUILD_CCXXFLAGS_JDK="$OPENJDK_BUILD_CCXXFLAGS_JDK \
48285      $OPENJDK_BUILD_ADD_LP64 \
48286      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
48287
48288  # Setup debug/release defines
48289  if test "x$DEBUG_LEVEL" = xrelease; then
48290    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
48291    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
48292      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
48293    fi
48294  else
48295    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
48296  fi
48297
48298  # Set some additional per-OS defines.
48299  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48300    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
48301  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
48302    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
48303  fi
48304
48305  # Additional macosx handling
48306  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48307    # Setting these parameters makes it an error to link to macosx APIs that are
48308    # newer than the given OS version and makes the linked binaries compatible
48309    # even if built on a newer version of the OS.
48310    # The expected format is X.Y.Z
48311    MACOSX_VERSION_MIN=10.7.0
48312
48313
48314    # The macro takes the version with no dots, ex: 1070
48315    # Let the flags variables get resolved in make for easier override on make
48316    # command line.
48317    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
48318    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
48319  fi
48320
48321  # Setup some hard coded includes
48322  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
48323      -I${JDK_TOPDIR}/src/java.base/share/native/include \
48324      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
48325      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
48326      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
48327      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
48328
48329  # The shared libraries are compiled using the picflag.
48330  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
48331      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
48332  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
48333      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
48334
48335  # Executable flags
48336  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
48337      $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
48338  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
48339      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
48340
48341  # The corresponding flags for building for the build platform. This is still an
48342  # approximation, we only need something that runs on this machine when cross
48343  # compiling the product.
48344  OPENJDK_BUILD_CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
48345      $PICFLAG $CFLAGS_JDKLIB_EXTRA"
48346  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
48347      $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
48348  OPENJDK_BUILD_CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
48349  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360  # Flags for compiling test libraries
48361  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
48362  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
48363
48364  # Flags for compiling test executables
48365  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
48366  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
48367
48368
48369
48370
48371
48372
48373  # Setup LDFLAGS et al.
48374  #
48375
48376  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48377    LDFLAGS_MICROSOFT="-nologo -opt:ref"
48378    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
48379    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48380      LDFLAGS_SAFESH="-safeseh"
48381      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
48382    fi
48383    # TODO: make -debug optional "--disable-full-debug-symbols"
48384    LDFLAGS_MICROSOFT_DEBUG="-debug"
48385    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
48386  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48387    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48388    # We have previously set HAS_GNU_HASH if this is the case
48389    if test -n "$HAS_GNU_HASH"; then
48390      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
48391      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
48392    fi
48393    if test "x$OPENJDK_TARGET_OS" = xlinux; then
48394      # And since we now know that the linker is gnu, then add -z defs, to forbid
48395      # undefined symbols in object files.
48396      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
48397      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
48398      case $DEBUG_LEVEL in
48399        release )
48400          # tell linker to optimize libraries.
48401          # Should this be supplied to the OSS linker as well?
48402          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
48403          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
48404          ;;
48405        slowdebug )
48406          if test "x$HAS_LINKER_NOW" = "xtrue"; then
48407            # do relocations at load
48408            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
48409            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
48410          fi
48411          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
48412            # mark relocations read only
48413            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
48414            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
48415          fi
48416          ;;
48417        fastdebug )
48418          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
48419            # mark relocations read only
48420            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
48421            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
48422          fi
48423          ;;
48424        * )
48425          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
48426          ;;
48427        esac
48428    fi
48429  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48430    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
48431    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
48432    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
48433    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
48434  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48435    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
48436    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
48437  fi
48438
48439  # Customize LDFLAGS for executables
48440
48441  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
48442
48443  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48444    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
48445      LDFLAGS_STACK_SIZE=1048576
48446    else
48447      LDFLAGS_STACK_SIZE=327680
48448    fi
48449    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
48450  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48451    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
48452  fi
48453
48454  OPENJDK_BUILD_LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE}"
48455  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
48456
48457  # Customize LDFLAGS for libs
48458  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
48459
48460  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
48461  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48462    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
48463        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
48464    JDKLIB_LIBS=""
48465  else
48466    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
48467        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
48468
48469    # On some platforms (mac) the linker warns about non existing -L dirs.
48470    # Add server first if available. Linking aginst client does not always produce the same results.
48471    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
48472    # Default to server for other variants.
48473    if test "x$JVM_VARIANT_SERVER" = xtrue; then
48474      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
48475    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
48476      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
48477    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
48478      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
48479    else
48480      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
48481    fi
48482
48483    JDKLIB_LIBS="-ljava -ljvm"
48484    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48485      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
48486    fi
48487
48488    # When building a buildjdk, it's always only the server variant
48489    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
48490        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
48491  fi
48492
48493  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_JDKLIB}"
48494  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
48506  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
48507
48508
48509
48510
48511
48512  # Some Zero and Shark settings.
48513  # ZERO_ARCHFLAG tells the compiler which mode to build for
48514  case "${OPENJDK_TARGET_CPU}" in
48515    s390)
48516      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
48517      ;;
48518    *)
48519      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48520  esac
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563    # Execute function body
48564
48565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
48566$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
48567  supports=yes
48568
48569  saved_cflags="$CFLAGS"
48570  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
48571  ac_ext=c
48572ac_cpp='$CPP $CPPFLAGS'
48573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48575ac_compiler_gnu=$ac_cv_c_compiler_gnu
48576
48577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48578/* end confdefs.h.  */
48579int i;
48580_ACEOF
48581if ac_fn_c_try_compile "$LINENO"; then :
48582
48583else
48584  supports=no
48585fi
48586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48587  ac_ext=cpp
48588ac_cpp='$CXXCPP $CPPFLAGS'
48589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48592
48593  CFLAGS="$saved_cflags"
48594
48595  saved_cxxflags="$CXXFLAGS"
48596  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
48597  ac_ext=cpp
48598ac_cpp='$CXXCPP $CPPFLAGS'
48599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48602
48603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48604/* end confdefs.h.  */
48605int i;
48606_ACEOF
48607if ac_fn_cxx_try_compile "$LINENO"; then :
48608
48609else
48610  supports=no
48611fi
48612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48613  ac_ext=cpp
48614ac_cpp='$CXXCPP $CPPFLAGS'
48615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48618
48619  CXXFLAGS="$saved_cxxflags"
48620
48621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48622$as_echo "$supports" >&6; }
48623  if test "x$supports" = "xyes" ; then
48624    :
48625
48626  else
48627    :
48628    ZERO_ARCHFLAG=""
48629  fi
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644  # Check that the compiler supports -mX (or -qX on AIX) flags
48645  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693    # Execute function body
48694
48695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
48696$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
48697  supports=yes
48698
48699  saved_cflags="$CFLAGS"
48700  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48701  ac_ext=c
48702ac_cpp='$CPP $CPPFLAGS'
48703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48705ac_compiler_gnu=$ac_cv_c_compiler_gnu
48706
48707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48708/* end confdefs.h.  */
48709int i;
48710_ACEOF
48711if ac_fn_c_try_compile "$LINENO"; then :
48712
48713else
48714  supports=no
48715fi
48716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48717  ac_ext=cpp
48718ac_cpp='$CXXCPP $CPPFLAGS'
48719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48722
48723  CFLAGS="$saved_cflags"
48724
48725  saved_cxxflags="$CXXFLAGS"
48726  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48727  ac_ext=cpp
48728ac_cpp='$CXXCPP $CPPFLAGS'
48729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48732
48733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48734/* end confdefs.h.  */
48735int i;
48736_ACEOF
48737if ac_fn_cxx_try_compile "$LINENO"; then :
48738
48739else
48740  supports=no
48741fi
48742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48743  ac_ext=cpp
48744ac_cpp='$CXXCPP $CPPFLAGS'
48745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48748
48749  CXXFLAGS="$saved_cxxflags"
48750
48751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48752$as_echo "$supports" >&6; }
48753  if test "x$supports" = "xyes" ; then
48754    :
48755    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
48756  else
48757    :
48758    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
48759  fi
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774  # Check whether --enable-warnings-as-errors was given.
48775if test "${enable_warnings_as_errors+set}" = set; then :
48776  enableval=$enable_warnings_as_errors;
48777fi
48778
48779
48780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
48781$as_echo_n "checking if native warnings are errors... " >&6; }
48782  if test "x$enable_warnings_as_errors" = "xyes"; then
48783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
48784$as_echo "yes (explicitely set)" >&6; }
48785    WARNINGS_AS_ERRORS=true
48786  elif test "x$enable_warnings_as_errors" = "xno"; then
48787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48788$as_echo "no" >&6; }
48789    WARNINGS_AS_ERRORS=false
48790  elif test "x$enable_warnings_as_errors" = "x"; then
48791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
48792$as_echo "yes (default)" >&6; }
48793    WARNINGS_AS_ERRORS=true
48794  else
48795    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
48796  fi
48797
48798  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
48799    # Set legacy hotspot variable
48800    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
48801  else
48802    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
48803  fi
48804
48805
48806
48807
48808  case "${TOOLCHAIN_TYPE}" in
48809    microsoft)
48810      DISABLE_WARNING_PREFIX="-wd"
48811      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
48812      ;;
48813    solstudio)
48814      DISABLE_WARNING_PREFIX="-erroff="
48815      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
48816      ;;
48817    gcc)
48818      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866    # Execute function body
48867
48868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48869$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48870  supports=yes
48871
48872  saved_cflags="$CFLAGS"
48873  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48874  ac_ext=c
48875ac_cpp='$CPP $CPPFLAGS'
48876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48878ac_compiler_gnu=$ac_cv_c_compiler_gnu
48879
48880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48881/* end confdefs.h.  */
48882int i;
48883_ACEOF
48884if ac_fn_c_try_compile "$LINENO"; then :
48885
48886else
48887  supports=no
48888fi
48889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48890  ac_ext=cpp
48891ac_cpp='$CXXCPP $CPPFLAGS'
48892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48895
48896  CFLAGS="$saved_cflags"
48897
48898  saved_cxxflags="$CXXFLAGS"
48899  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48900  ac_ext=cpp
48901ac_cpp='$CXXCPP $CPPFLAGS'
48902ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48903ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48904ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48905
48906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48907/* end confdefs.h.  */
48908int i;
48909_ACEOF
48910if ac_fn_cxx_try_compile "$LINENO"; then :
48911
48912else
48913  supports=no
48914fi
48915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48916  ac_ext=cpp
48917ac_cpp='$CXXCPP $CPPFLAGS'
48918ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48919ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48920ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48921
48922  CXXFLAGS="$saved_cxxflags"
48923
48924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48925$as_echo "$supports" >&6; }
48926  if test "x$supports" = "xyes" ; then
48927    :
48928    GCC_CAN_DISABLE_WARNINGS=true
48929  else
48930    :
48931    GCC_CAN_DISABLE_WARNINGS=false
48932
48933  fi
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48947        DISABLE_WARNING_PREFIX="-Wno-"
48948      else
48949        DISABLE_WARNING_PREFIX=
48950      fi
48951      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48952      # Repeate the check for the BUILD_CC
48953      CC_OLD="$CC"
48954      CC="$BUILD_CC"
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984
48985
48986
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002    # Execute function body
49003
49004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
49005$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
49006  supports=yes
49007
49008  saved_cflags="$CFLAGS"
49009  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
49010  ac_ext=c
49011ac_cpp='$CPP $CPPFLAGS'
49012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49014ac_compiler_gnu=$ac_cv_c_compiler_gnu
49015
49016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49017/* end confdefs.h.  */
49018int i;
49019_ACEOF
49020if ac_fn_c_try_compile "$LINENO"; then :
49021
49022else
49023  supports=no
49024fi
49025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49026  ac_ext=cpp
49027ac_cpp='$CXXCPP $CPPFLAGS'
49028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49031
49032  CFLAGS="$saved_cflags"
49033
49034  saved_cxxflags="$CXXFLAGS"
49035  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
49036  ac_ext=cpp
49037ac_cpp='$CXXCPP $CPPFLAGS'
49038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49041
49042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49043/* end confdefs.h.  */
49044int i;
49045_ACEOF
49046if ac_fn_cxx_try_compile "$LINENO"; then :
49047
49048else
49049  supports=no
49050fi
49051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49052  ac_ext=cpp
49053ac_cpp='$CXXCPP $CPPFLAGS'
49054ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49055ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49056ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49057
49058  CXXFLAGS="$saved_cxxflags"
49059
49060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49061$as_echo "$supports" >&6; }
49062  if test "x$supports" = "xyes" ; then
49063    :
49064    BUILD_CC_CAN_DISABLE_WARNINGS=true
49065  else
49066    :
49067    BUILD_CC_CAN_DISABLE_WARNINGS=false
49068
49069  fi
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
49083        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
49084      else
49085        BUILD_CC_DISABLE_WARNING_PREFIX=
49086      fi
49087      CC="$CC_OLD"
49088      ;;
49089    clang)
49090      DISABLE_WARNING_PREFIX="-Wno-"
49091      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
49092      ;;
49093    xlc)
49094      DISABLE_WARNING_PREFIX="-qsuppress="
49095      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
49096      ;;
49097  esac
49098
49099
49100
49101
49102
49103# Setup debug symbols (need objcopy from the toolchain for that)
49104
49105  #
49106  # NATIVE_DEBUG_SYMBOLS
49107  # This must be done after the toolchain is setup, since we're looking at objcopy.
49108  #
49109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
49110$as_echo_n "checking what type of native debug symbols to use... " >&6; }
49111
49112# Check whether --with-native-debug-symbols was given.
49113if test "${with_native_debug_symbols+set}" = set; then :
49114  withval=$with_native_debug_symbols;
49115        if test "x$OPENJDK_TARGET_OS" = xaix; then
49116          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
49117            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
49118          fi
49119        fi
49120
49121else
49122
49123        if test "x$OPENJDK_TARGET_OS" = xaix; then
49124          # AIX doesn't support 'zipped' so use 'internal' as default
49125          with_native_debug_symbols="internal"
49126        else
49127          if test "x$STATIC_BUILD" = xtrue; then
49128            with_native_debug_symbols="none"
49129          else
49130            with_native_debug_symbols="zipped"
49131          fi
49132        fi
49133
49134fi
49135
49136  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
49137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
49138$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
49139
49140  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
49141
49142    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
49143      if test "x$OBJCOPY" = x; then
49144        # enabling of enable-debug-symbols and can't find objcopy
49145        # this is an error
49146        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
49147      fi
49148    fi
49149
49150    COMPILE_WITH_DEBUG_SYMBOLS=true
49151    COPY_DEBUG_SYMBOLS=true
49152    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
49153
49154    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
49155    DEBUG_BINARIES=false
49156    STRIP_POLICY=min_strip
49157
49158  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
49159    COMPILE_WITH_DEBUG_SYMBOLS=false
49160    COPY_DEBUG_SYMBOLS=false
49161    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
49162
49163    DEBUG_BINARIES=false
49164    STRIP_POLICY=no_strip
49165  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
49166    COMPILE_WITH_DEBUG_SYMBOLS=true
49167    COPY_DEBUG_SYMBOLS=false
49168    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
49169
49170    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
49171    DEBUG_BINARIES=true
49172    STRIP_POLICY=no_strip
49173    STRIP=""
49174
49175  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
49176
49177    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
49178      if test "x$OBJCOPY" = x; then
49179        # enabling of enable-debug-symbols and can't find objcopy
49180        # this is an error
49181        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
49182      fi
49183    fi
49184
49185    COMPILE_WITH_DEBUG_SYMBOLS=true
49186    COPY_DEBUG_SYMBOLS=true
49187    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
49188
49189    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
49190    DEBUG_BINARIES=false
49191    STRIP_POLICY=min_strip
49192  else
49193    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
49194  fi
49195
49196  # --enable-debug-symbols is deprecated.
49197  # Please use --with-native-debug-symbols=[internal,external,zipped] .
49198
49199  # Check whether --enable-debug-symbols was given.
49200if test "${enable_debug_symbols+set}" = set; then :
49201  enableval=$enable_debug_symbols;
49202fi
49203
49204  if test "x$enable_debug_symbols" != x; then
49205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
49206$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
49207
49208    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
49209      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
49210$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
49211    fi
49212
49213  fi
49214
49215
49216  # --enable-zip-debug-info is deprecated.
49217  # Please use --with-native-debug-symbols=zipped .
49218
49219  # Check whether --enable-zip-debug-info was given.
49220if test "${enable_zip_debug_info+set}" = set; then :
49221  enableval=$enable_zip_debug_info;
49222fi
49223
49224  if test "x$enable_zip_debug_info" != x; then
49225    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
49226$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
49227
49228    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
49229      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
49230$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
49231    fi
49232
49233  fi
49234
49235
49236
49237
49238
49239
49240  # Legacy values
49241
49242
49243
49244
49245  # Check whether --enable-native-coverage was given.
49246if test "${enable_native_coverage+set}" = set; then :
49247  enableval=$enable_native_coverage;
49248fi
49249
49250  GCOV_ENABLED="false"
49251  if test "x$enable_native_coverage" = "xyes"; then
49252    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
49253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
49254$as_echo_n "checking if native coverage is enabled... " >&6; }
49255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49256$as_echo "yes" >&6; }
49257      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
49258      GCOV_LDFLAGS="-fprofile-arcs"
49259      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
49260      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
49261      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
49262      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
49263      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
49264      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
49265      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
49266      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
49267      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
49268      GCOV_ENABLED="true"
49269    else
49270      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
49271    fi
49272  elif test "x$enable_native_coverage" = "xno"; then
49273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
49274$as_echo_n "checking if native coverage is enabled... " >&6; }
49275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49276$as_echo "no" >&6; }
49277  elif test "x$enable_native_coverage" != "x"; then
49278    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
49279  fi
49280
49281
49282
49283
49284###############################################################################
49285#
49286# Check dependencies for external and internal libraries.
49287#
49288###############################################################################
49289
49290# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
49291
49292  # When using cygwin or msys, we need a wrapper binary that renames
49293  # /cygdrive/c/ arguments into c:/ arguments and peeks into
49294  # @files and rewrites these too! This wrapper binary is
49295  # called fixpath.
49296  FIXPATH=
49297  if test "x$OPENJDK_BUILD_OS" = xwindows; then
49298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
49299$as_echo_n "checking if fixpath can be created... " >&6; }
49300    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
49301    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
49302    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
49303    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
49304      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
49305      FIXPATH="$FIXPATH_BIN -c"
49306    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
49307      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
49308      # @ was chosen as separator to minimize risk of other tools messing around with it
49309      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
49310          | tr ' ' '\n' | grep '^/./' | sort | uniq`
49311      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
49312      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
49313    fi
49314    FIXPATH_SRC_W="$FIXPATH_SRC"
49315    FIXPATH_BIN_W="$FIXPATH_BIN"
49316
49317  unix_path="$FIXPATH_SRC_W"
49318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49319    windows_path=`$CYGPATH -m "$unix_path"`
49320    FIXPATH_SRC_W="$windows_path"
49321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49322    windows_path=`cmd //c echo $unix_path`
49323    FIXPATH_SRC_W="$windows_path"
49324  fi
49325
49326
49327  unix_path="$FIXPATH_BIN_W"
49328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49329    windows_path=`$CYGPATH -m "$unix_path"`
49330    FIXPATH_BIN_W="$windows_path"
49331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49332    windows_path=`cmd //c echo $unix_path`
49333    FIXPATH_BIN_W="$windows_path"
49334  fi
49335
49336    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
49337    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
49338    cd $FIXPATH_DIR
49339    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
49340    cd $CURDIR
49341
49342    if test ! -x $FIXPATH_BIN; then
49343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49344$as_echo "no" >&6; }
49345      cat $FIXPATH_DIR/fixpath1.log
49346      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
49347    fi
49348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49349$as_echo "yes" >&6; }
49350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
49351$as_echo_n "checking if fixpath.exe works... " >&6; }
49352    cd $FIXPATH_DIR
49353    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
49354        > $FIXPATH_DIR/fixpath2.log 2>&1
49355    cd $CURDIR
49356    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
49357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49358$as_echo "no" >&6; }
49359      cat $FIXPATH_DIR/fixpath2.log
49360      as_fn_error $? "fixpath did not work!" "$LINENO" 5
49361    fi
49362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49363$as_echo "yes" >&6; }
49364
49365    FIXPATH_DETACH_FLAG="--detach"
49366  fi
49367
49368
49369
49370
49371
49372
49373  # Check if X11 is needed
49374  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
49375    # No X11 support on windows or macosx
49376    NEEDS_LIB_X11=false
49377  else
49378    if test "x$SUPPORT_HEADFUL" = xno; then
49379      # No X11 support if building headless-only
49380      NEEDS_LIB_X11=false
49381    else
49382      # All other instances need X11
49383      NEEDS_LIB_X11=true
49384    fi
49385  fi
49386
49387  # Check if cups is needed
49388  if test "x$OPENJDK_TARGET_OS" = xwindows; then
49389    # Windows have a separate print system
49390    NEEDS_LIB_CUPS=false
49391  else
49392    NEEDS_LIB_CUPS=true
49393  fi
49394
49395  # Check if freetype is needed
49396  if test "x$OPENJDK" = "xtrue"; then
49397    NEEDS_LIB_FREETYPE=true
49398  else
49399    NEEDS_LIB_FREETYPE=false
49400  fi
49401
49402  # Check if alsa is needed
49403  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49404    NEEDS_LIB_ALSA=true
49405  else
49406    NEEDS_LIB_ALSA=false
49407  fi
49408
49409  # Check if ffi is needed
49410  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49411    NEEDS_LIB_FFI=true
49412  else
49413    NEEDS_LIB_FFI=false
49414  fi
49415
49416
49417  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49418  # dynamic build is configured on command line.
49419
49420# Check whether --with-stdc++lib was given.
49421if test "${with_stdc__lib+set}" = set; then :
49422  withval=$with_stdc__lib;
49423        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49424                && test "x$with_stdc__lib" != xdefault; then
49425          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49426        fi
49427
49428else
49429  with_stdc__lib=default
49430
49431fi
49432
49433
49434  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49435    # Test if -lstdc++ works.
49436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49437$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49438    ac_ext=cpp
49439ac_cpp='$CXXCPP $CPPFLAGS'
49440ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49441ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49442ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49443
49444    OLD_CXXFLAGS="$CXXFLAGS"
49445    CXXFLAGS="$CXXFLAGS -lstdc++"
49446    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49447/* end confdefs.h.  */
49448
49449int
49450main ()
49451{
49452return 0;
49453  ;
49454  return 0;
49455}
49456_ACEOF
49457if ac_fn_cxx_try_link "$LINENO"; then :
49458  has_dynamic_libstdcxx=yes
49459else
49460  has_dynamic_libstdcxx=no
49461fi
49462rm -f core conftest.err conftest.$ac_objext \
49463    conftest$ac_exeext conftest.$ac_ext
49464    CXXFLAGS="$OLD_CXXFLAGS"
49465    ac_ext=cpp
49466ac_cpp='$CXXCPP $CPPFLAGS'
49467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49470
49471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49472$as_echo "$has_dynamic_libstdcxx" >&6; }
49473
49474    # Test if stdc++ can be linked statically.
49475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49476$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49477    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49478    ac_ext=cpp
49479ac_cpp='$CXXCPP $CPPFLAGS'
49480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49483
49484    OLD_LIBS="$LIBS"
49485    OLD_CXX="$CXX"
49486    LIBS="$STATIC_STDCXX_FLAGS"
49487    CXX="$CC"
49488    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49489/* end confdefs.h.  */
49490
49491int
49492main ()
49493{
49494return 0;
49495  ;
49496  return 0;
49497}
49498_ACEOF
49499if ac_fn_cxx_try_link "$LINENO"; then :
49500  has_static_libstdcxx=yes
49501else
49502  has_static_libstdcxx=no
49503fi
49504rm -f core conftest.err conftest.$ac_objext \
49505    conftest$ac_exeext conftest.$ac_ext
49506    LIBS="$OLD_LIBS"
49507    CXX="$OLD_CXX"
49508    ac_ext=cpp
49509ac_cpp='$CXXCPP $CPPFLAGS'
49510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49513
49514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49515$as_echo "$has_static_libstdcxx" >&6; }
49516
49517    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49518      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49519    fi
49520
49521    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49522      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49523    fi
49524
49525    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49526      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49527    fi
49528
49529    # If dynamic was requested, it's available since it would fail above otherwise.
49530    # If dynamic wasn't requested, go with static unless it isn't available.
49531    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49532$as_echo_n "checking how to link with libstdc++... " >&6; }
49533    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49534      LIBCXX="$LIBCXX -lstdc++"
49535      LDCXX="$CXX"
49536      STATIC_CXX_SETTING="STATIC_CXX=false"
49537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49538$as_echo "dynamic" >&6; }
49539    else
49540      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49541      LDCXX="$CC"
49542      STATIC_CXX_SETTING="STATIC_CXX=true"
49543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49544$as_echo "static" >&6; }
49545    fi
49546  fi
49547
49548
49549  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49550  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49551    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49552  fi
49553
49554  # TODO better (platform agnostic) test
49555  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49556    LIBCXX="-lstdc++"
49557  fi
49558
49559
49560  # Setup Windows runtime dlls
49561  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49562
49563
49564# Check whether --with-msvcr-dll was given.
49565if test "${with_msvcr_dll+set}" = set; then :
49566  withval=$with_msvcr_dll;
49567fi
49568
49569
49570  if test "x$with_msvcr_dll" != x; then
49571    # If given explicitely by user, do not probe. If not present, fail directly.
49572
49573  DLL_NAME="$MSVCR_NAME"
49574  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49575  METHOD="--with-msvcr-dll"
49576  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49578$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49579
49580    # Need to check if the found msvcr is correct architecture
49581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49582$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49583    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49585      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49586      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49587      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49588        CORRECT_MSVCR_ARCH="PE32 executable"
49589      else
49590        CORRECT_MSVCR_ARCH="PE32+ executable"
49591      fi
49592    else
49593      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49594        CORRECT_MSVCR_ARCH=386
49595      else
49596        CORRECT_MSVCR_ARCH=x86-64
49597      fi
49598    fi
49599    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49601$as_echo "ok" >&6; }
49602      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49603
49604  # Only process if variable expands to non-empty
49605
49606  if test "x$MSVC_DLL" != x; then
49607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49608
49609  # Input might be given as Windows format, start by converting to
49610  # unix format.
49611  path="$MSVC_DLL"
49612  new_path=`$CYGPATH -u "$path"`
49613
49614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49617  # "foo.exe" is OK but "foo" is an error.
49618  #
49619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49620  # It is also a way to make sure we got the proper file name for the real test later on.
49621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49622  if test "x$test_shortpath" = x; then
49623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49624$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49625    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49626  fi
49627
49628  # Call helper function which possibly converts this using DOS-style short mode.
49629  # If so, the updated path is stored in $new_path.
49630
49631  input_path="$new_path"
49632  # Check if we need to convert this using DOS-style short mode. If the path
49633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49634  # take no chances and rewrite it.
49635  # Note: m4 eats our [], so we need to use [ and ] instead.
49636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49637  if test "x$has_forbidden_chars" != x; then
49638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49642      # Going to short mode and back again did indeed matter. Since short mode is
49643      # case insensitive, let's make it lowercase to improve readability.
49644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49645      # Now convert it back to Unix-style (cygpath)
49646      input_path=`$CYGPATH -u "$shortmode_path"`
49647      new_path="$input_path"
49648    fi
49649  fi
49650
49651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49652  if test "x$test_cygdrive_prefix" = x; then
49653    # As a simple fix, exclude /usr/bin since it's not a real path.
49654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49656      # a path prefixed by /cygdrive for fixpath to work.
49657      new_path="$CYGWIN_ROOT_PATH$input_path"
49658    fi
49659  fi
49660
49661
49662  if test "x$path" != "x$new_path"; then
49663    MSVC_DLL="$new_path"
49664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49666  fi
49667
49668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49669
49670  path="$MSVC_DLL"
49671  has_colon=`$ECHO $path | $GREP ^.:`
49672  new_path="$path"
49673  if test "x$has_colon" = x; then
49674    # Not in mixed or Windows style, start by that.
49675    new_path=`cmd //c echo $path`
49676  fi
49677
49678
49679  input_path="$new_path"
49680  # Check if we need to convert this using DOS-style short mode. If the path
49681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49682  # take no chances and rewrite it.
49683  # Note: m4 eats our [], so we need to use [ and ] instead.
49684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49685  if test "x$has_forbidden_chars" != x; then
49686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49688  fi
49689
49690
49691  windows_path="$new_path"
49692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49693    unix_path=`$CYGPATH -u "$windows_path"`
49694    new_path="$unix_path"
49695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49697    new_path="$unix_path"
49698  fi
49699
49700  if test "x$path" != "x$new_path"; then
49701    MSVC_DLL="$new_path"
49702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49704  fi
49705
49706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49708
49709    else
49710      # We're on a unix platform. Hooray! :)
49711      path="$MSVC_DLL"
49712      has_space=`$ECHO "$path" | $GREP " "`
49713      if test "x$has_space" != x; then
49714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49715$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49717      fi
49718
49719      # Use eval to expand a potential ~
49720      eval path="$path"
49721      if test ! -f "$path" && test ! -d "$path"; then
49722        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49723      fi
49724
49725      if test -d "$path"; then
49726        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49727      else
49728        dir="`$DIRNAME "$path"`"
49729        base="`$BASENAME "$path"`"
49730        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49731      fi
49732    fi
49733  fi
49734
49735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49736$as_echo_n "checking for $DLL_NAME... " >&6; }
49737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49738$as_echo "$MSVC_DLL" >&6; }
49739    else
49740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49741$as_echo "incorrect, ignoring" >&6; }
49742      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49743$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49744    fi
49745  fi
49746
49747    if test "x$MSVC_DLL" = x; then
49748      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49749    fi
49750    MSVCR_DLL="$MSVC_DLL"
49751  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49752
49753  DLL_NAME="$MSVCR_NAME"
49754  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49755  METHOD="devkit"
49756  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49757    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49758$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49759
49760    # Need to check if the found msvcr is correct architecture
49761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49762$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49763    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49765      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49766      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49767      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49768        CORRECT_MSVCR_ARCH="PE32 executable"
49769      else
49770        CORRECT_MSVCR_ARCH="PE32+ executable"
49771      fi
49772    else
49773      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49774        CORRECT_MSVCR_ARCH=386
49775      else
49776        CORRECT_MSVCR_ARCH=x86-64
49777      fi
49778    fi
49779    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49781$as_echo "ok" >&6; }
49782      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49783
49784  # Only process if variable expands to non-empty
49785
49786  if test "x$MSVC_DLL" != x; then
49787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49788
49789  # Input might be given as Windows format, start by converting to
49790  # unix format.
49791  path="$MSVC_DLL"
49792  new_path=`$CYGPATH -u "$path"`
49793
49794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49797  # "foo.exe" is OK but "foo" is an error.
49798  #
49799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49800  # It is also a way to make sure we got the proper file name for the real test later on.
49801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49802  if test "x$test_shortpath" = x; then
49803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49804$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49805    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49806  fi
49807
49808  # Call helper function which possibly converts this using DOS-style short mode.
49809  # If so, the updated path is stored in $new_path.
49810
49811  input_path="$new_path"
49812  # Check if we need to convert this using DOS-style short mode. If the path
49813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49814  # take no chances and rewrite it.
49815  # Note: m4 eats our [], so we need to use [ and ] instead.
49816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49817  if test "x$has_forbidden_chars" != x; then
49818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49822      # Going to short mode and back again did indeed matter. Since short mode is
49823      # case insensitive, let's make it lowercase to improve readability.
49824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49825      # Now convert it back to Unix-style (cygpath)
49826      input_path=`$CYGPATH -u "$shortmode_path"`
49827      new_path="$input_path"
49828    fi
49829  fi
49830
49831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49832  if test "x$test_cygdrive_prefix" = x; then
49833    # As a simple fix, exclude /usr/bin since it's not a real path.
49834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49836      # a path prefixed by /cygdrive for fixpath to work.
49837      new_path="$CYGWIN_ROOT_PATH$input_path"
49838    fi
49839  fi
49840
49841
49842  if test "x$path" != "x$new_path"; then
49843    MSVC_DLL="$new_path"
49844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49845$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49846  fi
49847
49848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49849
49850  path="$MSVC_DLL"
49851  has_colon=`$ECHO $path | $GREP ^.:`
49852  new_path="$path"
49853  if test "x$has_colon" = x; then
49854    # Not in mixed or Windows style, start by that.
49855    new_path=`cmd //c echo $path`
49856  fi
49857
49858
49859  input_path="$new_path"
49860  # Check if we need to convert this using DOS-style short mode. If the path
49861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49862  # take no chances and rewrite it.
49863  # Note: m4 eats our [], so we need to use [ and ] instead.
49864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49865  if test "x$has_forbidden_chars" != x; then
49866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49868  fi
49869
49870
49871  windows_path="$new_path"
49872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49873    unix_path=`$CYGPATH -u "$windows_path"`
49874    new_path="$unix_path"
49875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49877    new_path="$unix_path"
49878  fi
49879
49880  if test "x$path" != "x$new_path"; then
49881    MSVC_DLL="$new_path"
49882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49883$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49884  fi
49885
49886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49888
49889    else
49890      # We're on a unix platform. Hooray! :)
49891      path="$MSVC_DLL"
49892      has_space=`$ECHO "$path" | $GREP " "`
49893      if test "x$has_space" != x; then
49894        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49895$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49896        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49897      fi
49898
49899      # Use eval to expand a potential ~
49900      eval path="$path"
49901      if test ! -f "$path" && test ! -d "$path"; then
49902        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49903      fi
49904
49905      if test -d "$path"; then
49906        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49907      else
49908        dir="`$DIRNAME "$path"`"
49909        base="`$BASENAME "$path"`"
49910        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49911      fi
49912    fi
49913  fi
49914
49915      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49916$as_echo_n "checking for $DLL_NAME... " >&6; }
49917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49918$as_echo "$MSVC_DLL" >&6; }
49919    else
49920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49921$as_echo "incorrect, ignoring" >&6; }
49922      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49923$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49924    fi
49925  fi
49926
49927    if test "x$MSVC_DLL" = x; then
49928      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49929    fi
49930    MSVCR_DLL="$MSVC_DLL"
49931  else
49932
49933  DLL_NAME="${MSVCR_NAME}"
49934  MSVC_DLL=
49935
49936  if test "x$MSVC_DLL" = x; then
49937    # Probe: Using well-known location from Visual Studio 10.0
49938    if test "x$VCINSTALLDIR" != x; then
49939      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49940
49941  windows_path="$CYGWIN_VC_INSTALL_DIR"
49942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49943    unix_path=`$CYGPATH -u "$windows_path"`
49944    CYGWIN_VC_INSTALL_DIR="$unix_path"
49945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49947    CYGWIN_VC_INSTALL_DIR="$unix_path"
49948  fi
49949
49950      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49951        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49952      else
49953        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49954      fi
49955      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49956
49957  DLL_NAME="$DLL_NAME"
49958  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49959  METHOD="well-known location in VCINSTALLDIR"
49960  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49961    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49962$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49963
49964    # Need to check if the found msvcr is correct architecture
49965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49966$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49967    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49969      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49970      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49971      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49972        CORRECT_MSVCR_ARCH="PE32 executable"
49973      else
49974        CORRECT_MSVCR_ARCH="PE32+ executable"
49975      fi
49976    else
49977      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49978        CORRECT_MSVCR_ARCH=386
49979      else
49980        CORRECT_MSVCR_ARCH=x86-64
49981      fi
49982    fi
49983    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49985$as_echo "ok" >&6; }
49986      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49987
49988  # Only process if variable expands to non-empty
49989
49990  if test "x$MSVC_DLL" != x; then
49991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49992
49993  # Input might be given as Windows format, start by converting to
49994  # unix format.
49995  path="$MSVC_DLL"
49996  new_path=`$CYGPATH -u "$path"`
49997
49998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50001  # "foo.exe" is OK but "foo" is an error.
50002  #
50003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50004  # It is also a way to make sure we got the proper file name for the real test later on.
50005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50006  if test "x$test_shortpath" = x; then
50007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50008$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50009    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50010  fi
50011
50012  # Call helper function which possibly converts this using DOS-style short mode.
50013  # If so, the updated path is stored in $new_path.
50014
50015  input_path="$new_path"
50016  # Check if we need to convert this using DOS-style short mode. If the path
50017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50018  # take no chances and rewrite it.
50019  # Note: m4 eats our [], so we need to use [ and ] instead.
50020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50021  if test "x$has_forbidden_chars" != x; then
50022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50026      # Going to short mode and back again did indeed matter. Since short mode is
50027      # case insensitive, let's make it lowercase to improve readability.
50028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50029      # Now convert it back to Unix-style (cygpath)
50030      input_path=`$CYGPATH -u "$shortmode_path"`
50031      new_path="$input_path"
50032    fi
50033  fi
50034
50035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50036  if test "x$test_cygdrive_prefix" = x; then
50037    # As a simple fix, exclude /usr/bin since it's not a real path.
50038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50040      # a path prefixed by /cygdrive for fixpath to work.
50041      new_path="$CYGWIN_ROOT_PATH$input_path"
50042    fi
50043  fi
50044
50045
50046  if test "x$path" != "x$new_path"; then
50047    MSVC_DLL="$new_path"
50048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50049$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50050  fi
50051
50052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50053
50054  path="$MSVC_DLL"
50055  has_colon=`$ECHO $path | $GREP ^.:`
50056  new_path="$path"
50057  if test "x$has_colon" = x; then
50058    # Not in mixed or Windows style, start by that.
50059    new_path=`cmd //c echo $path`
50060  fi
50061
50062
50063  input_path="$new_path"
50064  # Check if we need to convert this using DOS-style short mode. If the path
50065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50066  # take no chances and rewrite it.
50067  # Note: m4 eats our [], so we need to use [ and ] instead.
50068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50069  if test "x$has_forbidden_chars" != x; then
50070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50072  fi
50073
50074
50075  windows_path="$new_path"
50076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50077    unix_path=`$CYGPATH -u "$windows_path"`
50078    new_path="$unix_path"
50079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50081    new_path="$unix_path"
50082  fi
50083
50084  if test "x$path" != "x$new_path"; then
50085    MSVC_DLL="$new_path"
50086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50087$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50088  fi
50089
50090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50092
50093    else
50094      # We're on a unix platform. Hooray! :)
50095      path="$MSVC_DLL"
50096      has_space=`$ECHO "$path" | $GREP " "`
50097      if test "x$has_space" != x; then
50098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50099$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50101      fi
50102
50103      # Use eval to expand a potential ~
50104      eval path="$path"
50105      if test ! -f "$path" && test ! -d "$path"; then
50106        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50107      fi
50108
50109      if test -d "$path"; then
50110        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50111      else
50112        dir="`$DIRNAME "$path"`"
50113        base="`$BASENAME "$path"`"
50114        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50115      fi
50116    fi
50117  fi
50118
50119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50120$as_echo_n "checking for $DLL_NAME... " >&6; }
50121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50122$as_echo "$MSVC_DLL" >&6; }
50123    else
50124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50125$as_echo "incorrect, ignoring" >&6; }
50126      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50127$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50128    fi
50129  fi
50130
50131    fi
50132  fi
50133
50134  if test "x$MSVC_DLL" = x; then
50135    # Probe: Check in the Boot JDK directory.
50136    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50137
50138  DLL_NAME="$DLL_NAME"
50139  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50140  METHOD="well-known location in Boot JDK"
50141  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50143$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50144
50145    # Need to check if the found msvcr is correct architecture
50146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50147$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50148    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50150      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50151      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50152      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50153        CORRECT_MSVCR_ARCH="PE32 executable"
50154      else
50155        CORRECT_MSVCR_ARCH="PE32+ executable"
50156      fi
50157    else
50158      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50159        CORRECT_MSVCR_ARCH=386
50160      else
50161        CORRECT_MSVCR_ARCH=x86-64
50162      fi
50163    fi
50164    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50166$as_echo "ok" >&6; }
50167      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50168
50169  # Only process if variable expands to non-empty
50170
50171  if test "x$MSVC_DLL" != x; then
50172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50173
50174  # Input might be given as Windows format, start by converting to
50175  # unix format.
50176  path="$MSVC_DLL"
50177  new_path=`$CYGPATH -u "$path"`
50178
50179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50182  # "foo.exe" is OK but "foo" is an error.
50183  #
50184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50185  # It is also a way to make sure we got the proper file name for the real test later on.
50186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50187  if test "x$test_shortpath" = x; then
50188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50190    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50191  fi
50192
50193  # Call helper function which possibly converts this using DOS-style short mode.
50194  # If so, the updated path is stored in $new_path.
50195
50196  input_path="$new_path"
50197  # Check if we need to convert this using DOS-style short mode. If the path
50198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50199  # take no chances and rewrite it.
50200  # Note: m4 eats our [], so we need to use [ and ] instead.
50201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50202  if test "x$has_forbidden_chars" != x; then
50203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50207      # Going to short mode and back again did indeed matter. Since short mode is
50208      # case insensitive, let's make it lowercase to improve readability.
50209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50210      # Now convert it back to Unix-style (cygpath)
50211      input_path=`$CYGPATH -u "$shortmode_path"`
50212      new_path="$input_path"
50213    fi
50214  fi
50215
50216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50217  if test "x$test_cygdrive_prefix" = x; then
50218    # As a simple fix, exclude /usr/bin since it's not a real path.
50219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50221      # a path prefixed by /cygdrive for fixpath to work.
50222      new_path="$CYGWIN_ROOT_PATH$input_path"
50223    fi
50224  fi
50225
50226
50227  if test "x$path" != "x$new_path"; then
50228    MSVC_DLL="$new_path"
50229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50231  fi
50232
50233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50234
50235  path="$MSVC_DLL"
50236  has_colon=`$ECHO $path | $GREP ^.:`
50237  new_path="$path"
50238  if test "x$has_colon" = x; then
50239    # Not in mixed or Windows style, start by that.
50240    new_path=`cmd //c echo $path`
50241  fi
50242
50243
50244  input_path="$new_path"
50245  # Check if we need to convert this using DOS-style short mode. If the path
50246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50247  # take no chances and rewrite it.
50248  # Note: m4 eats our [], so we need to use [ and ] instead.
50249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50250  if test "x$has_forbidden_chars" != x; then
50251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50253  fi
50254
50255
50256  windows_path="$new_path"
50257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50258    unix_path=`$CYGPATH -u "$windows_path"`
50259    new_path="$unix_path"
50260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50262    new_path="$unix_path"
50263  fi
50264
50265  if test "x$path" != "x$new_path"; then
50266    MSVC_DLL="$new_path"
50267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50268$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50269  fi
50270
50271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50273
50274    else
50275      # We're on a unix platform. Hooray! :)
50276      path="$MSVC_DLL"
50277      has_space=`$ECHO "$path" | $GREP " "`
50278      if test "x$has_space" != x; then
50279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50280$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50282      fi
50283
50284      # Use eval to expand a potential ~
50285      eval path="$path"
50286      if test ! -f "$path" && test ! -d "$path"; then
50287        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50288      fi
50289
50290      if test -d "$path"; then
50291        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50292      else
50293        dir="`$DIRNAME "$path"`"
50294        base="`$BASENAME "$path"`"
50295        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50296      fi
50297    fi
50298  fi
50299
50300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50301$as_echo_n "checking for $DLL_NAME... " >&6; }
50302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50303$as_echo "$MSVC_DLL" >&6; }
50304    else
50305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50306$as_echo "incorrect, ignoring" >&6; }
50307      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50308$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50309    fi
50310  fi
50311
50312  fi
50313
50314  if test "x$MSVC_DLL" = x; then
50315    # Probe: Look in the Windows system32 directory
50316    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50317
50318  windows_path="$CYGWIN_SYSTEMROOT"
50319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50320    unix_path=`$CYGPATH -u "$windows_path"`
50321    CYGWIN_SYSTEMROOT="$unix_path"
50322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50324    CYGWIN_SYSTEMROOT="$unix_path"
50325  fi
50326
50327    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50328
50329  DLL_NAME="$DLL_NAME"
50330  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50331  METHOD="well-known location in SYSTEMROOT"
50332  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50334$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50335
50336    # Need to check if the found msvcr is correct architecture
50337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50338$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50339    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50341      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50342      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50343      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50344        CORRECT_MSVCR_ARCH="PE32 executable"
50345      else
50346        CORRECT_MSVCR_ARCH="PE32+ executable"
50347      fi
50348    else
50349      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50350        CORRECT_MSVCR_ARCH=386
50351      else
50352        CORRECT_MSVCR_ARCH=x86-64
50353      fi
50354    fi
50355    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50357$as_echo "ok" >&6; }
50358      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50359
50360  # Only process if variable expands to non-empty
50361
50362  if test "x$MSVC_DLL" != x; then
50363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50364
50365  # Input might be given as Windows format, start by converting to
50366  # unix format.
50367  path="$MSVC_DLL"
50368  new_path=`$CYGPATH -u "$path"`
50369
50370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50373  # "foo.exe" is OK but "foo" is an error.
50374  #
50375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50376  # It is also a way to make sure we got the proper file name for the real test later on.
50377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50378  if test "x$test_shortpath" = x; then
50379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50380$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50381    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50382  fi
50383
50384  # Call helper function which possibly converts this using DOS-style short mode.
50385  # If so, the updated path is stored in $new_path.
50386
50387  input_path="$new_path"
50388  # Check if we need to convert this using DOS-style short mode. If the path
50389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50390  # take no chances and rewrite it.
50391  # Note: m4 eats our [], so we need to use [ and ] instead.
50392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50393  if test "x$has_forbidden_chars" != x; then
50394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50398      # Going to short mode and back again did indeed matter. Since short mode is
50399      # case insensitive, let's make it lowercase to improve readability.
50400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50401      # Now convert it back to Unix-style (cygpath)
50402      input_path=`$CYGPATH -u "$shortmode_path"`
50403      new_path="$input_path"
50404    fi
50405  fi
50406
50407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50408  if test "x$test_cygdrive_prefix" = x; then
50409    # As a simple fix, exclude /usr/bin since it's not a real path.
50410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50412      # a path prefixed by /cygdrive for fixpath to work.
50413      new_path="$CYGWIN_ROOT_PATH$input_path"
50414    fi
50415  fi
50416
50417
50418  if test "x$path" != "x$new_path"; then
50419    MSVC_DLL="$new_path"
50420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50421$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50422  fi
50423
50424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50425
50426  path="$MSVC_DLL"
50427  has_colon=`$ECHO $path | $GREP ^.:`
50428  new_path="$path"
50429  if test "x$has_colon" = x; then
50430    # Not in mixed or Windows style, start by that.
50431    new_path=`cmd //c echo $path`
50432  fi
50433
50434
50435  input_path="$new_path"
50436  # Check if we need to convert this using DOS-style short mode. If the path
50437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50438  # take no chances and rewrite it.
50439  # Note: m4 eats our [], so we need to use [ and ] instead.
50440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50441  if test "x$has_forbidden_chars" != x; then
50442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50444  fi
50445
50446
50447  windows_path="$new_path"
50448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50449    unix_path=`$CYGPATH -u "$windows_path"`
50450    new_path="$unix_path"
50451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50453    new_path="$unix_path"
50454  fi
50455
50456  if test "x$path" != "x$new_path"; then
50457    MSVC_DLL="$new_path"
50458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50459$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50460  fi
50461
50462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50464
50465    else
50466      # We're on a unix platform. Hooray! :)
50467      path="$MSVC_DLL"
50468      has_space=`$ECHO "$path" | $GREP " "`
50469      if test "x$has_space" != x; then
50470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50471$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50473      fi
50474
50475      # Use eval to expand a potential ~
50476      eval path="$path"
50477      if test ! -f "$path" && test ! -d "$path"; then
50478        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50479      fi
50480
50481      if test -d "$path"; then
50482        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50483      else
50484        dir="`$DIRNAME "$path"`"
50485        base="`$BASENAME "$path"`"
50486        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50487      fi
50488    fi
50489  fi
50490
50491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50492$as_echo_n "checking for $DLL_NAME... " >&6; }
50493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50494$as_echo "$MSVC_DLL" >&6; }
50495    else
50496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50497$as_echo "incorrect, ignoring" >&6; }
50498      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50499$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50500    fi
50501  fi
50502
50503  fi
50504
50505  if test "x$MSVC_DLL" = x; then
50506    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50507    if test "x$VS100COMNTOOLS" != x; then
50508      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50509
50510  windows_path="$CYGWIN_VS_TOOLS_DIR"
50511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50512    unix_path=`$CYGPATH -u "$windows_path"`
50513    CYGWIN_VS_TOOLS_DIR="$unix_path"
50514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50516    CYGWIN_VS_TOOLS_DIR="$unix_path"
50517  fi
50518
50519      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50520        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50521	    | $GREP -i /x64/ | $HEAD --lines 1`
50522      else
50523        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50524	    | $GREP -i /x86/ | $HEAD --lines 1`
50525      fi
50526
50527  DLL_NAME="$DLL_NAME"
50528  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50529  METHOD="search of VS100COMNTOOLS"
50530  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50531    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50532$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50533
50534    # Need to check if the found msvcr is correct architecture
50535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50536$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50537    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50539      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50540      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50542        CORRECT_MSVCR_ARCH="PE32 executable"
50543      else
50544        CORRECT_MSVCR_ARCH="PE32+ executable"
50545      fi
50546    else
50547      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50548        CORRECT_MSVCR_ARCH=386
50549      else
50550        CORRECT_MSVCR_ARCH=x86-64
50551      fi
50552    fi
50553    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50555$as_echo "ok" >&6; }
50556      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50557
50558  # Only process if variable expands to non-empty
50559
50560  if test "x$MSVC_DLL" != x; then
50561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50562
50563  # Input might be given as Windows format, start by converting to
50564  # unix format.
50565  path="$MSVC_DLL"
50566  new_path=`$CYGPATH -u "$path"`
50567
50568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50571  # "foo.exe" is OK but "foo" is an error.
50572  #
50573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50574  # It is also a way to make sure we got the proper file name for the real test later on.
50575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50576  if test "x$test_shortpath" = x; then
50577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50579    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50580  fi
50581
50582  # Call helper function which possibly converts this using DOS-style short mode.
50583  # If so, the updated path is stored in $new_path.
50584
50585  input_path="$new_path"
50586  # Check if we need to convert this using DOS-style short mode. If the path
50587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50588  # take no chances and rewrite it.
50589  # Note: m4 eats our [], so we need to use [ and ] instead.
50590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50591  if test "x$has_forbidden_chars" != x; then
50592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50596      # Going to short mode and back again did indeed matter. Since short mode is
50597      # case insensitive, let's make it lowercase to improve readability.
50598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50599      # Now convert it back to Unix-style (cygpath)
50600      input_path=`$CYGPATH -u "$shortmode_path"`
50601      new_path="$input_path"
50602    fi
50603  fi
50604
50605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50606  if test "x$test_cygdrive_prefix" = x; then
50607    # As a simple fix, exclude /usr/bin since it's not a real path.
50608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50610      # a path prefixed by /cygdrive for fixpath to work.
50611      new_path="$CYGWIN_ROOT_PATH$input_path"
50612    fi
50613  fi
50614
50615
50616  if test "x$path" != "x$new_path"; then
50617    MSVC_DLL="$new_path"
50618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50619$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50620  fi
50621
50622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50623
50624  path="$MSVC_DLL"
50625  has_colon=`$ECHO $path | $GREP ^.:`
50626  new_path="$path"
50627  if test "x$has_colon" = x; then
50628    # Not in mixed or Windows style, start by that.
50629    new_path=`cmd //c echo $path`
50630  fi
50631
50632
50633  input_path="$new_path"
50634  # Check if we need to convert this using DOS-style short mode. If the path
50635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50636  # take no chances and rewrite it.
50637  # Note: m4 eats our [], so we need to use [ and ] instead.
50638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50639  if test "x$has_forbidden_chars" != x; then
50640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50642  fi
50643
50644
50645  windows_path="$new_path"
50646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50647    unix_path=`$CYGPATH -u "$windows_path"`
50648    new_path="$unix_path"
50649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50651    new_path="$unix_path"
50652  fi
50653
50654  if test "x$path" != "x$new_path"; then
50655    MSVC_DLL="$new_path"
50656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50657$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50658  fi
50659
50660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50662
50663    else
50664      # We're on a unix platform. Hooray! :)
50665      path="$MSVC_DLL"
50666      has_space=`$ECHO "$path" | $GREP " "`
50667      if test "x$has_space" != x; then
50668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50669$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50671      fi
50672
50673      # Use eval to expand a potential ~
50674      eval path="$path"
50675      if test ! -f "$path" && test ! -d "$path"; then
50676        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50677      fi
50678
50679      if test -d "$path"; then
50680        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50681      else
50682        dir="`$DIRNAME "$path"`"
50683        base="`$BASENAME "$path"`"
50684        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50685      fi
50686    fi
50687  fi
50688
50689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50690$as_echo_n "checking for $DLL_NAME... " >&6; }
50691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50692$as_echo "$MSVC_DLL" >&6; }
50693    else
50694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50695$as_echo "incorrect, ignoring" >&6; }
50696      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50697$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50698    fi
50699  fi
50700
50701    fi
50702  fi
50703
50704  if test "x$MSVC_DLL" = x; then
50705    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50706    # (This was the original behaviour; kept since it might turn something up)
50707    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50708      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50709        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50710	    | $GREP x64 | $HEAD --lines 1`
50711      else
50712        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50713	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50714        if test "x$POSSIBLE_MSVC_DLL" = x; then
50715          # We're grasping at straws now...
50716          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50717	      | $HEAD --lines 1`
50718        fi
50719      fi
50720
50721
50722  DLL_NAME="$DLL_NAME"
50723  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50724  METHOD="search of VCINSTALLDIR"
50725  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50726    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50727$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50728
50729    # Need to check if the found msvcr is correct architecture
50730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50731$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50732    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50734      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50735      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50736      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50737        CORRECT_MSVCR_ARCH="PE32 executable"
50738      else
50739        CORRECT_MSVCR_ARCH="PE32+ executable"
50740      fi
50741    else
50742      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50743        CORRECT_MSVCR_ARCH=386
50744      else
50745        CORRECT_MSVCR_ARCH=x86-64
50746      fi
50747    fi
50748    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50750$as_echo "ok" >&6; }
50751      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50752
50753  # Only process if variable expands to non-empty
50754
50755  if test "x$MSVC_DLL" != x; then
50756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50757
50758  # Input might be given as Windows format, start by converting to
50759  # unix format.
50760  path="$MSVC_DLL"
50761  new_path=`$CYGPATH -u "$path"`
50762
50763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50766  # "foo.exe" is OK but "foo" is an error.
50767  #
50768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50769  # It is also a way to make sure we got the proper file name for the real test later on.
50770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50771  if test "x$test_shortpath" = x; then
50772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50773$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50774    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50775  fi
50776
50777  # Call helper function which possibly converts this using DOS-style short mode.
50778  # If so, the updated path is stored in $new_path.
50779
50780  input_path="$new_path"
50781  # Check if we need to convert this using DOS-style short mode. If the path
50782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50783  # take no chances and rewrite it.
50784  # Note: m4 eats our [], so we need to use [ and ] instead.
50785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50786  if test "x$has_forbidden_chars" != x; then
50787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50791      # Going to short mode and back again did indeed matter. Since short mode is
50792      # case insensitive, let's make it lowercase to improve readability.
50793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50794      # Now convert it back to Unix-style (cygpath)
50795      input_path=`$CYGPATH -u "$shortmode_path"`
50796      new_path="$input_path"
50797    fi
50798  fi
50799
50800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50801  if test "x$test_cygdrive_prefix" = x; then
50802    # As a simple fix, exclude /usr/bin since it's not a real path.
50803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50805      # a path prefixed by /cygdrive for fixpath to work.
50806      new_path="$CYGWIN_ROOT_PATH$input_path"
50807    fi
50808  fi
50809
50810
50811  if test "x$path" != "x$new_path"; then
50812    MSVC_DLL="$new_path"
50813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50814$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50815  fi
50816
50817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50818
50819  path="$MSVC_DLL"
50820  has_colon=`$ECHO $path | $GREP ^.:`
50821  new_path="$path"
50822  if test "x$has_colon" = x; then
50823    # Not in mixed or Windows style, start by that.
50824    new_path=`cmd //c echo $path`
50825  fi
50826
50827
50828  input_path="$new_path"
50829  # Check if we need to convert this using DOS-style short mode. If the path
50830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50831  # take no chances and rewrite it.
50832  # Note: m4 eats our [], so we need to use [ and ] instead.
50833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50834  if test "x$has_forbidden_chars" != x; then
50835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50837  fi
50838
50839
50840  windows_path="$new_path"
50841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50842    unix_path=`$CYGPATH -u "$windows_path"`
50843    new_path="$unix_path"
50844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50846    new_path="$unix_path"
50847  fi
50848
50849  if test "x$path" != "x$new_path"; then
50850    MSVC_DLL="$new_path"
50851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50852$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50853  fi
50854
50855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50857
50858    else
50859      # We're on a unix platform. Hooray! :)
50860      path="$MSVC_DLL"
50861      has_space=`$ECHO "$path" | $GREP " "`
50862      if test "x$has_space" != x; then
50863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50864$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50865        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50866      fi
50867
50868      # Use eval to expand a potential ~
50869      eval path="$path"
50870      if test ! -f "$path" && test ! -d "$path"; then
50871        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50872      fi
50873
50874      if test -d "$path"; then
50875        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50876      else
50877        dir="`$DIRNAME "$path"`"
50878        base="`$BASENAME "$path"`"
50879        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50880      fi
50881    fi
50882  fi
50883
50884      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50885$as_echo_n "checking for $DLL_NAME... " >&6; }
50886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50887$as_echo "$MSVC_DLL" >&6; }
50888    else
50889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50890$as_echo "incorrect, ignoring" >&6; }
50891      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50892$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50893    fi
50894  fi
50895
50896    fi
50897  fi
50898
50899  if test "x$MSVC_DLL" = x; then
50900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50901$as_echo_n "checking for $DLL_NAME... " >&6; }
50902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50903$as_echo "no" >&6; }
50904    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50905  fi
50906
50907    MSVCR_DLL="$MSVC_DLL"
50908  fi
50909
50910
50911
50912# Check whether --with-msvcp-dll was given.
50913if test "${with_msvcp_dll+set}" = set; then :
50914  withval=$with_msvcp_dll;
50915fi
50916
50917
50918  if test "x$MSVCP_NAME" != "x"; then
50919    if test "x$with_msvcp_dll" != x; then
50920      # If given explicitely by user, do not probe. If not present, fail directly.
50921
50922  DLL_NAME="$MSVCP_NAME"
50923  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50924  METHOD="--with-msvcp-dll"
50925  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50926    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50927$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50928
50929    # Need to check if the found msvcr is correct architecture
50930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50931$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50932    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50934      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50935      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50936      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50937        CORRECT_MSVCR_ARCH="PE32 executable"
50938      else
50939        CORRECT_MSVCR_ARCH="PE32+ executable"
50940      fi
50941    else
50942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50943        CORRECT_MSVCR_ARCH=386
50944      else
50945        CORRECT_MSVCR_ARCH=x86-64
50946      fi
50947    fi
50948    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50950$as_echo "ok" >&6; }
50951      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50952
50953  # Only process if variable expands to non-empty
50954
50955  if test "x$MSVC_DLL" != x; then
50956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50957
50958  # Input might be given as Windows format, start by converting to
50959  # unix format.
50960  path="$MSVC_DLL"
50961  new_path=`$CYGPATH -u "$path"`
50962
50963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50966  # "foo.exe" is OK but "foo" is an error.
50967  #
50968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50969  # It is also a way to make sure we got the proper file name for the real test later on.
50970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50971  if test "x$test_shortpath" = x; then
50972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50973$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50974    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50975  fi
50976
50977  # Call helper function which possibly converts this using DOS-style short mode.
50978  # If so, the updated path is stored in $new_path.
50979
50980  input_path="$new_path"
50981  # Check if we need to convert this using DOS-style short mode. If the path
50982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50983  # take no chances and rewrite it.
50984  # Note: m4 eats our [], so we need to use [ and ] instead.
50985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50986  if test "x$has_forbidden_chars" != x; then
50987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50991      # Going to short mode and back again did indeed matter. Since short mode is
50992      # case insensitive, let's make it lowercase to improve readability.
50993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50994      # Now convert it back to Unix-style (cygpath)
50995      input_path=`$CYGPATH -u "$shortmode_path"`
50996      new_path="$input_path"
50997    fi
50998  fi
50999
51000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51001  if test "x$test_cygdrive_prefix" = x; then
51002    # As a simple fix, exclude /usr/bin since it's not a real path.
51003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51005      # a path prefixed by /cygdrive for fixpath to work.
51006      new_path="$CYGWIN_ROOT_PATH$input_path"
51007    fi
51008  fi
51009
51010
51011  if test "x$path" != "x$new_path"; then
51012    MSVC_DLL="$new_path"
51013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51015  fi
51016
51017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51018
51019  path="$MSVC_DLL"
51020  has_colon=`$ECHO $path | $GREP ^.:`
51021  new_path="$path"
51022  if test "x$has_colon" = x; then
51023    # Not in mixed or Windows style, start by that.
51024    new_path=`cmd //c echo $path`
51025  fi
51026
51027
51028  input_path="$new_path"
51029  # Check if we need to convert this using DOS-style short mode. If the path
51030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51031  # take no chances and rewrite it.
51032  # Note: m4 eats our [], so we need to use [ and ] instead.
51033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51034  if test "x$has_forbidden_chars" != x; then
51035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51037  fi
51038
51039
51040  windows_path="$new_path"
51041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51042    unix_path=`$CYGPATH -u "$windows_path"`
51043    new_path="$unix_path"
51044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51046    new_path="$unix_path"
51047  fi
51048
51049  if test "x$path" != "x$new_path"; then
51050    MSVC_DLL="$new_path"
51051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51052$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51053  fi
51054
51055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51057
51058    else
51059      # We're on a unix platform. Hooray! :)
51060      path="$MSVC_DLL"
51061      has_space=`$ECHO "$path" | $GREP " "`
51062      if test "x$has_space" != x; then
51063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51064$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51066      fi
51067
51068      # Use eval to expand a potential ~
51069      eval path="$path"
51070      if test ! -f "$path" && test ! -d "$path"; then
51071        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51072      fi
51073
51074      if test -d "$path"; then
51075        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51076      else
51077        dir="`$DIRNAME "$path"`"
51078        base="`$BASENAME "$path"`"
51079        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51080      fi
51081    fi
51082  fi
51083
51084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51085$as_echo_n "checking for $DLL_NAME... " >&6; }
51086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51087$as_echo "$MSVC_DLL" >&6; }
51088    else
51089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51090$as_echo "incorrect, ignoring" >&6; }
51091      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51092$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51093    fi
51094  fi
51095
51096      if test "x$MSVC_DLL" = x; then
51097        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51098      fi
51099      MSVCP_DLL="$MSVC_DLL"
51100    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51101
51102  DLL_NAME="$MSVCP_NAME"
51103  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51104  METHOD="devkit"
51105  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51106    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51107$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51108
51109    # Need to check if the found msvcr is correct architecture
51110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51111$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51112    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51114      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51115      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51116      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51117        CORRECT_MSVCR_ARCH="PE32 executable"
51118      else
51119        CORRECT_MSVCR_ARCH="PE32+ executable"
51120      fi
51121    else
51122      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51123        CORRECT_MSVCR_ARCH=386
51124      else
51125        CORRECT_MSVCR_ARCH=x86-64
51126      fi
51127    fi
51128    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51130$as_echo "ok" >&6; }
51131      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51132
51133  # Only process if variable expands to non-empty
51134
51135  if test "x$MSVC_DLL" != x; then
51136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51137
51138  # Input might be given as Windows format, start by converting to
51139  # unix format.
51140  path="$MSVC_DLL"
51141  new_path=`$CYGPATH -u "$path"`
51142
51143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51146  # "foo.exe" is OK but "foo" is an error.
51147  #
51148  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51149  # It is also a way to make sure we got the proper file name for the real test later on.
51150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51151  if test "x$test_shortpath" = x; then
51152    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51153$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51154    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51155  fi
51156
51157  # Call helper function which possibly converts this using DOS-style short mode.
51158  # If so, the updated path is stored in $new_path.
51159
51160  input_path="$new_path"
51161  # Check if we need to convert this using DOS-style short mode. If the path
51162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51163  # take no chances and rewrite it.
51164  # Note: m4 eats our [], so we need to use [ and ] instead.
51165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51166  if test "x$has_forbidden_chars" != x; then
51167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51171      # Going to short mode and back again did indeed matter. Since short mode is
51172      # case insensitive, let's make it lowercase to improve readability.
51173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51174      # Now convert it back to Unix-style (cygpath)
51175      input_path=`$CYGPATH -u "$shortmode_path"`
51176      new_path="$input_path"
51177    fi
51178  fi
51179
51180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51181  if test "x$test_cygdrive_prefix" = x; then
51182    # As a simple fix, exclude /usr/bin since it's not a real path.
51183    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51185      # a path prefixed by /cygdrive for fixpath to work.
51186      new_path="$CYGWIN_ROOT_PATH$input_path"
51187    fi
51188  fi
51189
51190
51191  if test "x$path" != "x$new_path"; then
51192    MSVC_DLL="$new_path"
51193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51194$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51195  fi
51196
51197    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51198
51199  path="$MSVC_DLL"
51200  has_colon=`$ECHO $path | $GREP ^.:`
51201  new_path="$path"
51202  if test "x$has_colon" = x; then
51203    # Not in mixed or Windows style, start by that.
51204    new_path=`cmd //c echo $path`
51205  fi
51206
51207
51208  input_path="$new_path"
51209  # Check if we need to convert this using DOS-style short mode. If the path
51210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51211  # take no chances and rewrite it.
51212  # Note: m4 eats our [], so we need to use [ and ] instead.
51213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51214  if test "x$has_forbidden_chars" != x; then
51215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51217  fi
51218
51219
51220  windows_path="$new_path"
51221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51222    unix_path=`$CYGPATH -u "$windows_path"`
51223    new_path="$unix_path"
51224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51226    new_path="$unix_path"
51227  fi
51228
51229  if test "x$path" != "x$new_path"; then
51230    MSVC_DLL="$new_path"
51231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51232$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51233  fi
51234
51235  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51236  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51237
51238    else
51239      # We're on a unix platform. Hooray! :)
51240      path="$MSVC_DLL"
51241      has_space=`$ECHO "$path" | $GREP " "`
51242      if test "x$has_space" != x; then
51243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51244$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51245        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51246      fi
51247
51248      # Use eval to expand a potential ~
51249      eval path="$path"
51250      if test ! -f "$path" && test ! -d "$path"; then
51251        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51252      fi
51253
51254      if test -d "$path"; then
51255        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51256      else
51257        dir="`$DIRNAME "$path"`"
51258        base="`$BASENAME "$path"`"
51259        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51260      fi
51261    fi
51262  fi
51263
51264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51265$as_echo_n "checking for $DLL_NAME... " >&6; }
51266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51267$as_echo "$MSVC_DLL" >&6; }
51268    else
51269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51270$as_echo "incorrect, ignoring" >&6; }
51271      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51272$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51273    fi
51274  fi
51275
51276      if test "x$MSVC_DLL" = x; then
51277        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51278      fi
51279      MSVCP_DLL="$MSVC_DLL"
51280    else
51281
51282  DLL_NAME="${MSVCP_NAME}"
51283  MSVC_DLL=
51284
51285  if test "x$MSVC_DLL" = x; then
51286    # Probe: Using well-known location from Visual Studio 10.0
51287    if test "x$VCINSTALLDIR" != x; then
51288      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51289
51290  windows_path="$CYGWIN_VC_INSTALL_DIR"
51291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51292    unix_path=`$CYGPATH -u "$windows_path"`
51293    CYGWIN_VC_INSTALL_DIR="$unix_path"
51294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51296    CYGWIN_VC_INSTALL_DIR="$unix_path"
51297  fi
51298
51299      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51300        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51301      else
51302        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51303      fi
51304      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51305
51306  DLL_NAME="$DLL_NAME"
51307  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51308  METHOD="well-known location in VCINSTALLDIR"
51309  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51310    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51311$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51312
51313    # Need to check if the found msvcr is correct architecture
51314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51315$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51316    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51318      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51319      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51320      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51321        CORRECT_MSVCR_ARCH="PE32 executable"
51322      else
51323        CORRECT_MSVCR_ARCH="PE32+ executable"
51324      fi
51325    else
51326      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51327        CORRECT_MSVCR_ARCH=386
51328      else
51329        CORRECT_MSVCR_ARCH=x86-64
51330      fi
51331    fi
51332    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51334$as_echo "ok" >&6; }
51335      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51336
51337  # Only process if variable expands to non-empty
51338
51339  if test "x$MSVC_DLL" != x; then
51340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51341
51342  # Input might be given as Windows format, start by converting to
51343  # unix format.
51344  path="$MSVC_DLL"
51345  new_path=`$CYGPATH -u "$path"`
51346
51347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51350  # "foo.exe" is OK but "foo" is an error.
51351  #
51352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51353  # It is also a way to make sure we got the proper file name for the real test later on.
51354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51355  if test "x$test_shortpath" = x; then
51356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51357$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51358    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51359  fi
51360
51361  # Call helper function which possibly converts this using DOS-style short mode.
51362  # If so, the updated path is stored in $new_path.
51363
51364  input_path="$new_path"
51365  # Check if we need to convert this using DOS-style short mode. If the path
51366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51367  # take no chances and rewrite it.
51368  # Note: m4 eats our [], so we need to use [ and ] instead.
51369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51370  if test "x$has_forbidden_chars" != x; then
51371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51375      # Going to short mode and back again did indeed matter. Since short mode is
51376      # case insensitive, let's make it lowercase to improve readability.
51377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51378      # Now convert it back to Unix-style (cygpath)
51379      input_path=`$CYGPATH -u "$shortmode_path"`
51380      new_path="$input_path"
51381    fi
51382  fi
51383
51384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51385  if test "x$test_cygdrive_prefix" = x; then
51386    # As a simple fix, exclude /usr/bin since it's not a real path.
51387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51389      # a path prefixed by /cygdrive for fixpath to work.
51390      new_path="$CYGWIN_ROOT_PATH$input_path"
51391    fi
51392  fi
51393
51394
51395  if test "x$path" != "x$new_path"; then
51396    MSVC_DLL="$new_path"
51397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51398$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51399  fi
51400
51401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51402
51403  path="$MSVC_DLL"
51404  has_colon=`$ECHO $path | $GREP ^.:`
51405  new_path="$path"
51406  if test "x$has_colon" = x; then
51407    # Not in mixed or Windows style, start by that.
51408    new_path=`cmd //c echo $path`
51409  fi
51410
51411
51412  input_path="$new_path"
51413  # Check if we need to convert this using DOS-style short mode. If the path
51414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51415  # take no chances and rewrite it.
51416  # Note: m4 eats our [], so we need to use [ and ] instead.
51417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51418  if test "x$has_forbidden_chars" != x; then
51419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51421  fi
51422
51423
51424  windows_path="$new_path"
51425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51426    unix_path=`$CYGPATH -u "$windows_path"`
51427    new_path="$unix_path"
51428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51430    new_path="$unix_path"
51431  fi
51432
51433  if test "x$path" != "x$new_path"; then
51434    MSVC_DLL="$new_path"
51435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51436$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51437  fi
51438
51439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51441
51442    else
51443      # We're on a unix platform. Hooray! :)
51444      path="$MSVC_DLL"
51445      has_space=`$ECHO "$path" | $GREP " "`
51446      if test "x$has_space" != x; then
51447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51448$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51449        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51450      fi
51451
51452      # Use eval to expand a potential ~
51453      eval path="$path"
51454      if test ! -f "$path" && test ! -d "$path"; then
51455        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51456      fi
51457
51458      if test -d "$path"; then
51459        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51460      else
51461        dir="`$DIRNAME "$path"`"
51462        base="`$BASENAME "$path"`"
51463        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51464      fi
51465    fi
51466  fi
51467
51468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51469$as_echo_n "checking for $DLL_NAME... " >&6; }
51470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51471$as_echo "$MSVC_DLL" >&6; }
51472    else
51473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51474$as_echo "incorrect, ignoring" >&6; }
51475      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51476$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51477    fi
51478  fi
51479
51480    fi
51481  fi
51482
51483  if test "x$MSVC_DLL" = x; then
51484    # Probe: Check in the Boot JDK directory.
51485    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51486
51487  DLL_NAME="$DLL_NAME"
51488  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51489  METHOD="well-known location in Boot JDK"
51490  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51492$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51493
51494    # Need to check if the found msvcr is correct architecture
51495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51496$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51497    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51499      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51500      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51502        CORRECT_MSVCR_ARCH="PE32 executable"
51503      else
51504        CORRECT_MSVCR_ARCH="PE32+ executable"
51505      fi
51506    else
51507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51508        CORRECT_MSVCR_ARCH=386
51509      else
51510        CORRECT_MSVCR_ARCH=x86-64
51511      fi
51512    fi
51513    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51515$as_echo "ok" >&6; }
51516      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51517
51518  # Only process if variable expands to non-empty
51519
51520  if test "x$MSVC_DLL" != x; then
51521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51522
51523  # Input might be given as Windows format, start by converting to
51524  # unix format.
51525  path="$MSVC_DLL"
51526  new_path=`$CYGPATH -u "$path"`
51527
51528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51531  # "foo.exe" is OK but "foo" is an error.
51532  #
51533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51534  # It is also a way to make sure we got the proper file name for the real test later on.
51535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51536  if test "x$test_shortpath" = x; then
51537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51538$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51539    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51540  fi
51541
51542  # Call helper function which possibly converts this using DOS-style short mode.
51543  # If so, the updated path is stored in $new_path.
51544
51545  input_path="$new_path"
51546  # Check if we need to convert this using DOS-style short mode. If the path
51547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51548  # take no chances and rewrite it.
51549  # Note: m4 eats our [], so we need to use [ and ] instead.
51550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51551  if test "x$has_forbidden_chars" != x; then
51552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51556      # Going to short mode and back again did indeed matter. Since short mode is
51557      # case insensitive, let's make it lowercase to improve readability.
51558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51559      # Now convert it back to Unix-style (cygpath)
51560      input_path=`$CYGPATH -u "$shortmode_path"`
51561      new_path="$input_path"
51562    fi
51563  fi
51564
51565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51566  if test "x$test_cygdrive_prefix" = x; then
51567    # As a simple fix, exclude /usr/bin since it's not a real path.
51568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51570      # a path prefixed by /cygdrive for fixpath to work.
51571      new_path="$CYGWIN_ROOT_PATH$input_path"
51572    fi
51573  fi
51574
51575
51576  if test "x$path" != "x$new_path"; then
51577    MSVC_DLL="$new_path"
51578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51579$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51580  fi
51581
51582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51583
51584  path="$MSVC_DLL"
51585  has_colon=`$ECHO $path | $GREP ^.:`
51586  new_path="$path"
51587  if test "x$has_colon" = x; then
51588    # Not in mixed or Windows style, start by that.
51589    new_path=`cmd //c echo $path`
51590  fi
51591
51592
51593  input_path="$new_path"
51594  # Check if we need to convert this using DOS-style short mode. If the path
51595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51596  # take no chances and rewrite it.
51597  # Note: m4 eats our [], so we need to use [ and ] instead.
51598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51599  if test "x$has_forbidden_chars" != x; then
51600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51602  fi
51603
51604
51605  windows_path="$new_path"
51606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51607    unix_path=`$CYGPATH -u "$windows_path"`
51608    new_path="$unix_path"
51609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51611    new_path="$unix_path"
51612  fi
51613
51614  if test "x$path" != "x$new_path"; then
51615    MSVC_DLL="$new_path"
51616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51617$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51618  fi
51619
51620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51622
51623    else
51624      # We're on a unix platform. Hooray! :)
51625      path="$MSVC_DLL"
51626      has_space=`$ECHO "$path" | $GREP " "`
51627      if test "x$has_space" != x; then
51628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51629$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51631      fi
51632
51633      # Use eval to expand a potential ~
51634      eval path="$path"
51635      if test ! -f "$path" && test ! -d "$path"; then
51636        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51637      fi
51638
51639      if test -d "$path"; then
51640        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51641      else
51642        dir="`$DIRNAME "$path"`"
51643        base="`$BASENAME "$path"`"
51644        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51645      fi
51646    fi
51647  fi
51648
51649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51650$as_echo_n "checking for $DLL_NAME... " >&6; }
51651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51652$as_echo "$MSVC_DLL" >&6; }
51653    else
51654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51655$as_echo "incorrect, ignoring" >&6; }
51656      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51657$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51658    fi
51659  fi
51660
51661  fi
51662
51663  if test "x$MSVC_DLL" = x; then
51664    # Probe: Look in the Windows system32 directory
51665    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51666
51667  windows_path="$CYGWIN_SYSTEMROOT"
51668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51669    unix_path=`$CYGPATH -u "$windows_path"`
51670    CYGWIN_SYSTEMROOT="$unix_path"
51671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51673    CYGWIN_SYSTEMROOT="$unix_path"
51674  fi
51675
51676    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51677
51678  DLL_NAME="$DLL_NAME"
51679  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51680  METHOD="well-known location in SYSTEMROOT"
51681  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51682    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51683$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51684
51685    # Need to check if the found msvcr is correct architecture
51686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51687$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51688    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51690      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51691      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51692      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51693        CORRECT_MSVCR_ARCH="PE32 executable"
51694      else
51695        CORRECT_MSVCR_ARCH="PE32+ executable"
51696      fi
51697    else
51698      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51699        CORRECT_MSVCR_ARCH=386
51700      else
51701        CORRECT_MSVCR_ARCH=x86-64
51702      fi
51703    fi
51704    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51706$as_echo "ok" >&6; }
51707      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51708
51709  # Only process if variable expands to non-empty
51710
51711  if test "x$MSVC_DLL" != x; then
51712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51713
51714  # Input might be given as Windows format, start by converting to
51715  # unix format.
51716  path="$MSVC_DLL"
51717  new_path=`$CYGPATH -u "$path"`
51718
51719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51722  # "foo.exe" is OK but "foo" is an error.
51723  #
51724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51725  # It is also a way to make sure we got the proper file name for the real test later on.
51726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51727  if test "x$test_shortpath" = x; then
51728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51729$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51730    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51731  fi
51732
51733  # Call helper function which possibly converts this using DOS-style short mode.
51734  # If so, the updated path is stored in $new_path.
51735
51736  input_path="$new_path"
51737  # Check if we need to convert this using DOS-style short mode. If the path
51738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51739  # take no chances and rewrite it.
51740  # Note: m4 eats our [], so we need to use [ and ] instead.
51741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51742  if test "x$has_forbidden_chars" != x; then
51743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51747      # Going to short mode and back again did indeed matter. Since short mode is
51748      # case insensitive, let's make it lowercase to improve readability.
51749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51750      # Now convert it back to Unix-style (cygpath)
51751      input_path=`$CYGPATH -u "$shortmode_path"`
51752      new_path="$input_path"
51753    fi
51754  fi
51755
51756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51757  if test "x$test_cygdrive_prefix" = x; then
51758    # As a simple fix, exclude /usr/bin since it's not a real path.
51759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51761      # a path prefixed by /cygdrive for fixpath to work.
51762      new_path="$CYGWIN_ROOT_PATH$input_path"
51763    fi
51764  fi
51765
51766
51767  if test "x$path" != "x$new_path"; then
51768    MSVC_DLL="$new_path"
51769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51770$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51771  fi
51772
51773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51774
51775  path="$MSVC_DLL"
51776  has_colon=`$ECHO $path | $GREP ^.:`
51777  new_path="$path"
51778  if test "x$has_colon" = x; then
51779    # Not in mixed or Windows style, start by that.
51780    new_path=`cmd //c echo $path`
51781  fi
51782
51783
51784  input_path="$new_path"
51785  # Check if we need to convert this using DOS-style short mode. If the path
51786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51787  # take no chances and rewrite it.
51788  # Note: m4 eats our [], so we need to use [ and ] instead.
51789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51790  if test "x$has_forbidden_chars" != x; then
51791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51793  fi
51794
51795
51796  windows_path="$new_path"
51797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51798    unix_path=`$CYGPATH -u "$windows_path"`
51799    new_path="$unix_path"
51800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51802    new_path="$unix_path"
51803  fi
51804
51805  if test "x$path" != "x$new_path"; then
51806    MSVC_DLL="$new_path"
51807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51808$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51809  fi
51810
51811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51813
51814    else
51815      # We're on a unix platform. Hooray! :)
51816      path="$MSVC_DLL"
51817      has_space=`$ECHO "$path" | $GREP " "`
51818      if test "x$has_space" != x; then
51819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51820$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51822      fi
51823
51824      # Use eval to expand a potential ~
51825      eval path="$path"
51826      if test ! -f "$path" && test ! -d "$path"; then
51827        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51828      fi
51829
51830      if test -d "$path"; then
51831        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51832      else
51833        dir="`$DIRNAME "$path"`"
51834        base="`$BASENAME "$path"`"
51835        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51836      fi
51837    fi
51838  fi
51839
51840      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51841$as_echo_n "checking for $DLL_NAME... " >&6; }
51842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51843$as_echo "$MSVC_DLL" >&6; }
51844    else
51845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51846$as_echo "incorrect, ignoring" >&6; }
51847      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51848$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51849    fi
51850  fi
51851
51852  fi
51853
51854  if test "x$MSVC_DLL" = x; then
51855    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51856    if test "x$VS100COMNTOOLS" != x; then
51857      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51858
51859  windows_path="$CYGWIN_VS_TOOLS_DIR"
51860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51861    unix_path=`$CYGPATH -u "$windows_path"`
51862    CYGWIN_VS_TOOLS_DIR="$unix_path"
51863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51865    CYGWIN_VS_TOOLS_DIR="$unix_path"
51866  fi
51867
51868      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51869        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51870	    | $GREP -i /x64/ | $HEAD --lines 1`
51871      else
51872        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51873	    | $GREP -i /x86/ | $HEAD --lines 1`
51874      fi
51875
51876  DLL_NAME="$DLL_NAME"
51877  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51878  METHOD="search of VS100COMNTOOLS"
51879  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51880    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51881$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51882
51883    # Need to check if the found msvcr is correct architecture
51884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51885$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51886    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51888      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51889      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51890      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51891        CORRECT_MSVCR_ARCH="PE32 executable"
51892      else
51893        CORRECT_MSVCR_ARCH="PE32+ executable"
51894      fi
51895    else
51896      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51897        CORRECT_MSVCR_ARCH=386
51898      else
51899        CORRECT_MSVCR_ARCH=x86-64
51900      fi
51901    fi
51902    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51904$as_echo "ok" >&6; }
51905      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51906
51907  # Only process if variable expands to non-empty
51908
51909  if test "x$MSVC_DLL" != x; then
51910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51911
51912  # Input might be given as Windows format, start by converting to
51913  # unix format.
51914  path="$MSVC_DLL"
51915  new_path=`$CYGPATH -u "$path"`
51916
51917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51920  # "foo.exe" is OK but "foo" is an error.
51921  #
51922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51923  # It is also a way to make sure we got the proper file name for the real test later on.
51924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51925  if test "x$test_shortpath" = x; then
51926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51927$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51928    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51929  fi
51930
51931  # Call helper function which possibly converts this using DOS-style short mode.
51932  # If so, the updated path is stored in $new_path.
51933
51934  input_path="$new_path"
51935  # Check if we need to convert this using DOS-style short mode. If the path
51936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51937  # take no chances and rewrite it.
51938  # Note: m4 eats our [], so we need to use [ and ] instead.
51939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51940  if test "x$has_forbidden_chars" != x; then
51941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51945      # Going to short mode and back again did indeed matter. Since short mode is
51946      # case insensitive, let's make it lowercase to improve readability.
51947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51948      # Now convert it back to Unix-style (cygpath)
51949      input_path=`$CYGPATH -u "$shortmode_path"`
51950      new_path="$input_path"
51951    fi
51952  fi
51953
51954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51955  if test "x$test_cygdrive_prefix" = x; then
51956    # As a simple fix, exclude /usr/bin since it's not a real path.
51957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51959      # a path prefixed by /cygdrive for fixpath to work.
51960      new_path="$CYGWIN_ROOT_PATH$input_path"
51961    fi
51962  fi
51963
51964
51965  if test "x$path" != "x$new_path"; then
51966    MSVC_DLL="$new_path"
51967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51968$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51969  fi
51970
51971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51972
51973  path="$MSVC_DLL"
51974  has_colon=`$ECHO $path | $GREP ^.:`
51975  new_path="$path"
51976  if test "x$has_colon" = x; then
51977    # Not in mixed or Windows style, start by that.
51978    new_path=`cmd //c echo $path`
51979  fi
51980
51981
51982  input_path="$new_path"
51983  # Check if we need to convert this using DOS-style short mode. If the path
51984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51985  # take no chances and rewrite it.
51986  # Note: m4 eats our [], so we need to use [ and ] instead.
51987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51988  if test "x$has_forbidden_chars" != x; then
51989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51991  fi
51992
51993
51994  windows_path="$new_path"
51995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51996    unix_path=`$CYGPATH -u "$windows_path"`
51997    new_path="$unix_path"
51998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52000    new_path="$unix_path"
52001  fi
52002
52003  if test "x$path" != "x$new_path"; then
52004    MSVC_DLL="$new_path"
52005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52006$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52007  fi
52008
52009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52011
52012    else
52013      # We're on a unix platform. Hooray! :)
52014      path="$MSVC_DLL"
52015      has_space=`$ECHO "$path" | $GREP " "`
52016      if test "x$has_space" != x; then
52017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52018$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52020      fi
52021
52022      # Use eval to expand a potential ~
52023      eval path="$path"
52024      if test ! -f "$path" && test ! -d "$path"; then
52025        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52026      fi
52027
52028      if test -d "$path"; then
52029        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52030      else
52031        dir="`$DIRNAME "$path"`"
52032        base="`$BASENAME "$path"`"
52033        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52034      fi
52035    fi
52036  fi
52037
52038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52039$as_echo_n "checking for $DLL_NAME... " >&6; }
52040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52041$as_echo "$MSVC_DLL" >&6; }
52042    else
52043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52044$as_echo "incorrect, ignoring" >&6; }
52045      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52046$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52047    fi
52048  fi
52049
52050    fi
52051  fi
52052
52053  if test "x$MSVC_DLL" = x; then
52054    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52055    # (This was the original behaviour; kept since it might turn something up)
52056    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52057      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52058        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52059	    | $GREP x64 | $HEAD --lines 1`
52060      else
52061        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52062	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52063        if test "x$POSSIBLE_MSVC_DLL" = x; then
52064          # We're grasping at straws now...
52065          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52066	      | $HEAD --lines 1`
52067        fi
52068      fi
52069
52070
52071  DLL_NAME="$DLL_NAME"
52072  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52073  METHOD="search of VCINSTALLDIR"
52074  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52075    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52076$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52077
52078    # Need to check if the found msvcr is correct architecture
52079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52080$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52081    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52083      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52084      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52085      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52086        CORRECT_MSVCR_ARCH="PE32 executable"
52087      else
52088        CORRECT_MSVCR_ARCH="PE32+ executable"
52089      fi
52090    else
52091      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52092        CORRECT_MSVCR_ARCH=386
52093      else
52094        CORRECT_MSVCR_ARCH=x86-64
52095      fi
52096    fi
52097    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52099$as_echo "ok" >&6; }
52100      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52101
52102  # Only process if variable expands to non-empty
52103
52104  if test "x$MSVC_DLL" != x; then
52105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52106
52107  # Input might be given as Windows format, start by converting to
52108  # unix format.
52109  path="$MSVC_DLL"
52110  new_path=`$CYGPATH -u "$path"`
52111
52112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52115  # "foo.exe" is OK but "foo" is an error.
52116  #
52117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52118  # It is also a way to make sure we got the proper file name for the real test later on.
52119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52120  if test "x$test_shortpath" = x; then
52121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52122$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52123    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52124  fi
52125
52126  # Call helper function which possibly converts this using DOS-style short mode.
52127  # If so, the updated path is stored in $new_path.
52128
52129  input_path="$new_path"
52130  # Check if we need to convert this using DOS-style short mode. If the path
52131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52132  # take no chances and rewrite it.
52133  # Note: m4 eats our [], so we need to use [ and ] instead.
52134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52135  if test "x$has_forbidden_chars" != x; then
52136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52140      # Going to short mode and back again did indeed matter. Since short mode is
52141      # case insensitive, let's make it lowercase to improve readability.
52142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52143      # Now convert it back to Unix-style (cygpath)
52144      input_path=`$CYGPATH -u "$shortmode_path"`
52145      new_path="$input_path"
52146    fi
52147  fi
52148
52149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52150  if test "x$test_cygdrive_prefix" = x; then
52151    # As a simple fix, exclude /usr/bin since it's not a real path.
52152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52154      # a path prefixed by /cygdrive for fixpath to work.
52155      new_path="$CYGWIN_ROOT_PATH$input_path"
52156    fi
52157  fi
52158
52159
52160  if test "x$path" != "x$new_path"; then
52161    MSVC_DLL="$new_path"
52162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52163$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52164  fi
52165
52166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52167
52168  path="$MSVC_DLL"
52169  has_colon=`$ECHO $path | $GREP ^.:`
52170  new_path="$path"
52171  if test "x$has_colon" = x; then
52172    # Not in mixed or Windows style, start by that.
52173    new_path=`cmd //c echo $path`
52174  fi
52175
52176
52177  input_path="$new_path"
52178  # Check if we need to convert this using DOS-style short mode. If the path
52179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52180  # take no chances and rewrite it.
52181  # Note: m4 eats our [], so we need to use [ and ] instead.
52182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52183  if test "x$has_forbidden_chars" != x; then
52184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52186  fi
52187
52188
52189  windows_path="$new_path"
52190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52191    unix_path=`$CYGPATH -u "$windows_path"`
52192    new_path="$unix_path"
52193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52195    new_path="$unix_path"
52196  fi
52197
52198  if test "x$path" != "x$new_path"; then
52199    MSVC_DLL="$new_path"
52200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52201$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52202  fi
52203
52204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52206
52207    else
52208      # We're on a unix platform. Hooray! :)
52209      path="$MSVC_DLL"
52210      has_space=`$ECHO "$path" | $GREP " "`
52211      if test "x$has_space" != x; then
52212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52213$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52215      fi
52216
52217      # Use eval to expand a potential ~
52218      eval path="$path"
52219      if test ! -f "$path" && test ! -d "$path"; then
52220        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52221      fi
52222
52223      if test -d "$path"; then
52224        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52225      else
52226        dir="`$DIRNAME "$path"`"
52227        base="`$BASENAME "$path"`"
52228        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52229      fi
52230    fi
52231  fi
52232
52233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52234$as_echo_n "checking for $DLL_NAME... " >&6; }
52235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52236$as_echo "$MSVC_DLL" >&6; }
52237    else
52238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52239$as_echo "incorrect, ignoring" >&6; }
52240      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52241$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52242    fi
52243  fi
52244
52245    fi
52246  fi
52247
52248  if test "x$MSVC_DLL" = x; then
52249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52250$as_echo_n "checking for $DLL_NAME... " >&6; }
52251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52252$as_echo "no" >&6; }
52253    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52254  fi
52255
52256      MSVCP_DLL="$MSVC_DLL"
52257    fi
52258
52259  fi
52260
52261  fi
52262
52263
52264  if test "x$NEEDS_LIB_X11" = xfalse; then
52265    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
52266      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
52267$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
52268    fi
52269    X_CFLAGS=
52270    X_LIBS=
52271  else
52272
52273    if test "x${with_x}" = xno; then
52274      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
52275    fi
52276
52277    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
52278      # The user has specified a X11 base directory. Use it for includes and
52279      # libraries, unless explicitely overridden.
52280      if test "x$x_includes" = xNONE; then
52281        x_includes="${with_x}/include"
52282      fi
52283      if test "x$x_libraries" = xNONE; then
52284        x_libraries="${with_x}/lib"
52285      fi
52286    else
52287      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
52288      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
52289      # --x-libraries for the sysroot, if that seems to be correct.
52290      if test "x$SYSROOT" != "x"; then
52291        if test "x$x_includes" = xNONE; then
52292          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
52293            x_includes="$SYSROOT/usr/X11R6/include"
52294          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
52295            x_includes="$SYSROOT/usr/include"
52296          fi
52297        fi
52298        if test "x$x_libraries" = xNONE; then
52299          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
52300            x_libraries="$SYSROOT/usr/X11R6/lib"
52301          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52302            x_libraries="$SYSROOT/usr/lib64"
52303          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
52304            x_libraries="$SYSROOT/usr/lib"
52305          fi
52306        fi
52307      fi
52308    fi
52309
52310    # Now let autoconf do it's magic
52311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
52312$as_echo_n "checking for X... " >&6; }
52313
52314
52315# Check whether --with-x was given.
52316if test "${with_x+set}" = set; then :
52317  withval=$with_x;
52318fi
52319
52320# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
52321if test "x$with_x" = xno; then
52322  # The user explicitly disabled X.
52323  have_x=disabled
52324else
52325  case $x_includes,$x_libraries in #(
52326    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
52327    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
52328  $as_echo_n "(cached) " >&6
52329else
52330  # One or both of the vars are not set, and there is no cached value.
52331ac_x_includes=no ac_x_libraries=no
52332rm -f -r conftest.dir
52333if mkdir conftest.dir; then
52334  cd conftest.dir
52335  cat >Imakefile <<'_ACEOF'
52336incroot:
52337	@echo incroot='${INCROOT}'
52338usrlibdir:
52339	@echo usrlibdir='${USRLIBDIR}'
52340libdir:
52341	@echo libdir='${LIBDIR}'
52342_ACEOF
52343  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
52344    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
52345    for ac_var in incroot usrlibdir libdir; do
52346      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
52347    done
52348    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
52349    for ac_extension in a so sl dylib la dll; do
52350      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
52351	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
52352	ac_im_usrlibdir=$ac_im_libdir; break
52353      fi
52354    done
52355    # Screen out bogus values from the imake configuration.  They are
52356    # bogus both because they are the default anyway, and because
52357    # using them would break gcc on systems where it needs fixed includes.
52358    case $ac_im_incroot in
52359	/usr/include) ac_x_includes= ;;
52360	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
52361    esac
52362    case $ac_im_usrlibdir in
52363	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
52364	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
52365    esac
52366  fi
52367  cd ..
52368  rm -f -r conftest.dir
52369fi
52370
52371# Standard set of common directories for X headers.
52372# Check X11 before X11Rn because it is often a symlink to the current release.
52373ac_x_header_dirs='
52374/usr/X11/include
52375/usr/X11R7/include
52376/usr/X11R6/include
52377/usr/X11R5/include
52378/usr/X11R4/include
52379
52380/usr/include/X11
52381/usr/include/X11R7
52382/usr/include/X11R6
52383/usr/include/X11R5
52384/usr/include/X11R4
52385
52386/usr/local/X11/include
52387/usr/local/X11R7/include
52388/usr/local/X11R6/include
52389/usr/local/X11R5/include
52390/usr/local/X11R4/include
52391
52392/usr/local/include/X11
52393/usr/local/include/X11R7
52394/usr/local/include/X11R6
52395/usr/local/include/X11R5
52396/usr/local/include/X11R4
52397
52398/usr/X386/include
52399/usr/x386/include
52400/usr/XFree86/include/X11
52401
52402/usr/include
52403/usr/local/include
52404/usr/unsupported/include
52405/usr/athena/include
52406/usr/local/x11r5/include
52407/usr/lpp/Xamples/include
52408
52409/usr/openwin/include
52410/usr/openwin/share/include'
52411
52412if test "$ac_x_includes" = no; then
52413  # Guess where to find include files, by looking for Xlib.h.
52414  # First, try using that file with no special directory specified.
52415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52416/* end confdefs.h.  */
52417#include <X11/Xlib.h>
52418_ACEOF
52419if ac_fn_cxx_try_cpp "$LINENO"; then :
52420  # We can compile using X headers with no special include directory.
52421ac_x_includes=
52422else
52423  for ac_dir in $ac_x_header_dirs; do
52424  if test -r "$ac_dir/X11/Xlib.h"; then
52425    ac_x_includes=$ac_dir
52426    break
52427  fi
52428done
52429fi
52430rm -f conftest.err conftest.i conftest.$ac_ext
52431fi # $ac_x_includes = no
52432
52433if test "$ac_x_libraries" = no; then
52434  # Check for the libraries.
52435  # See if we find them without any special options.
52436  # Don't add to $LIBS permanently.
52437  ac_save_LIBS=$LIBS
52438  LIBS="-lX11 $LIBS"
52439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52440/* end confdefs.h.  */
52441#include <X11/Xlib.h>
52442int
52443main ()
52444{
52445XrmInitialize ()
52446  ;
52447  return 0;
52448}
52449_ACEOF
52450if ac_fn_cxx_try_link "$LINENO"; then :
52451  LIBS=$ac_save_LIBS
52452# We can link X programs with no special library path.
52453ac_x_libraries=
52454else
52455  LIBS=$ac_save_LIBS
52456for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
52457do
52458  # Don't even attempt the hair of trying to link an X program!
52459  for ac_extension in a so sl dylib la dll; do
52460    if test -r "$ac_dir/libX11.$ac_extension"; then
52461      ac_x_libraries=$ac_dir
52462      break 2
52463    fi
52464  done
52465done
52466fi
52467rm -f core conftest.err conftest.$ac_objext \
52468    conftest$ac_exeext conftest.$ac_ext
52469fi # $ac_x_libraries = no
52470
52471case $ac_x_includes,$ac_x_libraries in #(
52472  no,* | *,no | *\'*)
52473    # Didn't find X, or a directory has "'" in its name.
52474    ac_cv_have_x="have_x=no";; #(
52475  *)
52476    # Record where we found X for the cache.
52477    ac_cv_have_x="have_x=yes\
52478	ac_x_includes='$ac_x_includes'\
52479	ac_x_libraries='$ac_x_libraries'"
52480esac
52481fi
52482;; #(
52483    *) have_x=yes;;
52484  esac
52485  eval "$ac_cv_have_x"
52486fi # $with_x != no
52487
52488if test "$have_x" != yes; then
52489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
52490$as_echo "$have_x" >&6; }
52491  no_x=yes
52492else
52493  # If each of the values was on the command line, it overrides each guess.
52494  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
52495  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
52496  # Update the cache value to reflect the command line values.
52497  ac_cv_have_x="have_x=yes\
52498	ac_x_includes='$x_includes'\
52499	ac_x_libraries='$x_libraries'"
52500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
52501$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
52502fi
52503
52504    if test "$no_x" = yes; then
52505  # Not all programs may use this symbol, but it does not hurt to define it.
52506
52507$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
52508
52509  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
52510else
52511  if test -n "$x_includes"; then
52512    X_CFLAGS="$X_CFLAGS -I$x_includes"
52513  fi
52514
52515  # It would also be nice to do this for all -L options, not just this one.
52516  if test -n "$x_libraries"; then
52517    X_LIBS="$X_LIBS -L$x_libraries"
52518    # For Solaris; some versions of Sun CC require a space after -R and
52519    # others require no space.  Words are not sufficient . . . .
52520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
52521$as_echo_n "checking whether -R must be followed by a space... " >&6; }
52522    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
52523    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
52524    ac_cxx_werror_flag=yes
52525    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52526/* end confdefs.h.  */
52527
52528int
52529main ()
52530{
52531
52532  ;
52533  return 0;
52534}
52535_ACEOF
52536if ac_fn_cxx_try_link "$LINENO"; then :
52537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52538$as_echo "no" >&6; }
52539       X_LIBS="$X_LIBS -R$x_libraries"
52540else
52541  LIBS="$ac_xsave_LIBS -R $x_libraries"
52542       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52543/* end confdefs.h.  */
52544
52545int
52546main ()
52547{
52548
52549  ;
52550  return 0;
52551}
52552_ACEOF
52553if ac_fn_cxx_try_link "$LINENO"; then :
52554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52555$as_echo "yes" >&6; }
52556	  X_LIBS="$X_LIBS -R $x_libraries"
52557else
52558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
52559$as_echo "neither works" >&6; }
52560fi
52561rm -f core conftest.err conftest.$ac_objext \
52562    conftest$ac_exeext conftest.$ac_ext
52563fi
52564rm -f core conftest.err conftest.$ac_objext \
52565    conftest$ac_exeext conftest.$ac_ext
52566    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
52567    LIBS=$ac_xsave_LIBS
52568  fi
52569
52570  # Check for system-dependent libraries X programs must link with.
52571  # Do this before checking for the system-independent R6 libraries
52572  # (-lICE), since we may need -lsocket or whatever for X linking.
52573
52574  if test "$ISC" = yes; then
52575    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
52576  else
52577    # Martyn Johnson says this is needed for Ultrix, if the X
52578    # libraries were built with DECnet support.  And Karl Berry says
52579    # the Alpha needs dnet_stub (dnet does not exist).
52580    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
52581    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52582/* end confdefs.h.  */
52583
52584/* Override any GCC internal prototype to avoid an error.
52585   Use char because int might match the return type of a GCC
52586   builtin and then its argument prototype would still apply.  */
52587#ifdef __cplusplus
52588extern "C"
52589#endif
52590char XOpenDisplay ();
52591int
52592main ()
52593{
52594return XOpenDisplay ();
52595  ;
52596  return 0;
52597}
52598_ACEOF
52599if ac_fn_cxx_try_link "$LINENO"; then :
52600
52601else
52602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
52603$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
52604if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
52605  $as_echo_n "(cached) " >&6
52606else
52607  ac_check_lib_save_LIBS=$LIBS
52608LIBS="-ldnet  $LIBS"
52609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52610/* end confdefs.h.  */
52611
52612/* Override any GCC internal prototype to avoid an error.
52613   Use char because int might match the return type of a GCC
52614   builtin and then its argument prototype would still apply.  */
52615#ifdef __cplusplus
52616extern "C"
52617#endif
52618char dnet_ntoa ();
52619int
52620main ()
52621{
52622return dnet_ntoa ();
52623  ;
52624  return 0;
52625}
52626_ACEOF
52627if ac_fn_cxx_try_link "$LINENO"; then :
52628  ac_cv_lib_dnet_dnet_ntoa=yes
52629else
52630  ac_cv_lib_dnet_dnet_ntoa=no
52631fi
52632rm -f core conftest.err conftest.$ac_objext \
52633    conftest$ac_exeext conftest.$ac_ext
52634LIBS=$ac_check_lib_save_LIBS
52635fi
52636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
52637$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
52638if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
52639  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
52640fi
52641
52642    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
52643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
52644$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
52645if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
52646  $as_echo_n "(cached) " >&6
52647else
52648  ac_check_lib_save_LIBS=$LIBS
52649LIBS="-ldnet_stub  $LIBS"
52650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52651/* end confdefs.h.  */
52652
52653/* Override any GCC internal prototype to avoid an error.
52654   Use char because int might match the return type of a GCC
52655   builtin and then its argument prototype would still apply.  */
52656#ifdef __cplusplus
52657extern "C"
52658#endif
52659char dnet_ntoa ();
52660int
52661main ()
52662{
52663return dnet_ntoa ();
52664  ;
52665  return 0;
52666}
52667_ACEOF
52668if ac_fn_cxx_try_link "$LINENO"; then :
52669  ac_cv_lib_dnet_stub_dnet_ntoa=yes
52670else
52671  ac_cv_lib_dnet_stub_dnet_ntoa=no
52672fi
52673rm -f core conftest.err conftest.$ac_objext \
52674    conftest$ac_exeext conftest.$ac_ext
52675LIBS=$ac_check_lib_save_LIBS
52676fi
52677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
52678$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
52679if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
52680  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
52681fi
52682
52683    fi
52684fi
52685rm -f core conftest.err conftest.$ac_objext \
52686    conftest$ac_exeext conftest.$ac_ext
52687    LIBS="$ac_xsave_LIBS"
52688
52689    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
52690    # to get the SysV transport functions.
52691    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
52692    # needs -lnsl.
52693    # The nsl library prevents programs from opening the X display
52694    # on Irix 5.2, according to T.E. Dickey.
52695    # The functions gethostbyname, getservbyname, and inet_addr are
52696    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
52697    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
52698if test "x$ac_cv_func_gethostbyname" = xyes; then :
52699
52700fi
52701
52702    if test $ac_cv_func_gethostbyname = no; then
52703      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
52704$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
52705if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
52706  $as_echo_n "(cached) " >&6
52707else
52708  ac_check_lib_save_LIBS=$LIBS
52709LIBS="-lnsl  $LIBS"
52710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52711/* end confdefs.h.  */
52712
52713/* Override any GCC internal prototype to avoid an error.
52714   Use char because int might match the return type of a GCC
52715   builtin and then its argument prototype would still apply.  */
52716#ifdef __cplusplus
52717extern "C"
52718#endif
52719char gethostbyname ();
52720int
52721main ()
52722{
52723return gethostbyname ();
52724  ;
52725  return 0;
52726}
52727_ACEOF
52728if ac_fn_cxx_try_link "$LINENO"; then :
52729  ac_cv_lib_nsl_gethostbyname=yes
52730else
52731  ac_cv_lib_nsl_gethostbyname=no
52732fi
52733rm -f core conftest.err conftest.$ac_objext \
52734    conftest$ac_exeext conftest.$ac_ext
52735LIBS=$ac_check_lib_save_LIBS
52736fi
52737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
52738$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
52739if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
52740  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
52741fi
52742
52743      if test $ac_cv_lib_nsl_gethostbyname = no; then
52744	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
52745$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
52746if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
52747  $as_echo_n "(cached) " >&6
52748else
52749  ac_check_lib_save_LIBS=$LIBS
52750LIBS="-lbsd  $LIBS"
52751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52752/* end confdefs.h.  */
52753
52754/* Override any GCC internal prototype to avoid an error.
52755   Use char because int might match the return type of a GCC
52756   builtin and then its argument prototype would still apply.  */
52757#ifdef __cplusplus
52758extern "C"
52759#endif
52760char gethostbyname ();
52761int
52762main ()
52763{
52764return gethostbyname ();
52765  ;
52766  return 0;
52767}
52768_ACEOF
52769if ac_fn_cxx_try_link "$LINENO"; then :
52770  ac_cv_lib_bsd_gethostbyname=yes
52771else
52772  ac_cv_lib_bsd_gethostbyname=no
52773fi
52774rm -f core conftest.err conftest.$ac_objext \
52775    conftest$ac_exeext conftest.$ac_ext
52776LIBS=$ac_check_lib_save_LIBS
52777fi
52778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
52779$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
52780if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
52781  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
52782fi
52783
52784      fi
52785    fi
52786
52787    # lieder@skyler.mavd.honeywell.com says without -lsocket,
52788    # socket/setsockopt and other routines are undefined under SCO ODT
52789    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
52790    # on later versions), says Simon Leinen: it contains gethostby*
52791    # variants that don't use the name server (or something).  -lsocket
52792    # must be given before -lnsl if both are needed.  We assume that
52793    # if connect needs -lnsl, so does gethostbyname.
52794    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
52795if test "x$ac_cv_func_connect" = xyes; then :
52796
52797fi
52798
52799    if test $ac_cv_func_connect = no; then
52800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
52801$as_echo_n "checking for connect in -lsocket... " >&6; }
52802if ${ac_cv_lib_socket_connect+:} false; then :
52803  $as_echo_n "(cached) " >&6
52804else
52805  ac_check_lib_save_LIBS=$LIBS
52806LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
52807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52808/* end confdefs.h.  */
52809
52810/* Override any GCC internal prototype to avoid an error.
52811   Use char because int might match the return type of a GCC
52812   builtin and then its argument prototype would still apply.  */
52813#ifdef __cplusplus
52814extern "C"
52815#endif
52816char connect ();
52817int
52818main ()
52819{
52820return connect ();
52821  ;
52822  return 0;
52823}
52824_ACEOF
52825if ac_fn_cxx_try_link "$LINENO"; then :
52826  ac_cv_lib_socket_connect=yes
52827else
52828  ac_cv_lib_socket_connect=no
52829fi
52830rm -f core conftest.err conftest.$ac_objext \
52831    conftest$ac_exeext conftest.$ac_ext
52832LIBS=$ac_check_lib_save_LIBS
52833fi
52834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
52835$as_echo "$ac_cv_lib_socket_connect" >&6; }
52836if test "x$ac_cv_lib_socket_connect" = xyes; then :
52837  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
52838fi
52839
52840    fi
52841
52842    # Guillermo Gomez says -lposix is necessary on A/UX.
52843    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
52844if test "x$ac_cv_func_remove" = xyes; then :
52845
52846fi
52847
52848    if test $ac_cv_func_remove = no; then
52849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
52850$as_echo_n "checking for remove in -lposix... " >&6; }
52851if ${ac_cv_lib_posix_remove+:} false; then :
52852  $as_echo_n "(cached) " >&6
52853else
52854  ac_check_lib_save_LIBS=$LIBS
52855LIBS="-lposix  $LIBS"
52856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52857/* end confdefs.h.  */
52858
52859/* Override any GCC internal prototype to avoid an error.
52860   Use char because int might match the return type of a GCC
52861   builtin and then its argument prototype would still apply.  */
52862#ifdef __cplusplus
52863extern "C"
52864#endif
52865char remove ();
52866int
52867main ()
52868{
52869return remove ();
52870  ;
52871  return 0;
52872}
52873_ACEOF
52874if ac_fn_cxx_try_link "$LINENO"; then :
52875  ac_cv_lib_posix_remove=yes
52876else
52877  ac_cv_lib_posix_remove=no
52878fi
52879rm -f core conftest.err conftest.$ac_objext \
52880    conftest$ac_exeext conftest.$ac_ext
52881LIBS=$ac_check_lib_save_LIBS
52882fi
52883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
52884$as_echo "$ac_cv_lib_posix_remove" >&6; }
52885if test "x$ac_cv_lib_posix_remove" = xyes; then :
52886  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
52887fi
52888
52889    fi
52890
52891    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
52892    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
52893if test "x$ac_cv_func_shmat" = xyes; then :
52894
52895fi
52896
52897    if test $ac_cv_func_shmat = no; then
52898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
52899$as_echo_n "checking for shmat in -lipc... " >&6; }
52900if ${ac_cv_lib_ipc_shmat+:} false; then :
52901  $as_echo_n "(cached) " >&6
52902else
52903  ac_check_lib_save_LIBS=$LIBS
52904LIBS="-lipc  $LIBS"
52905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52906/* end confdefs.h.  */
52907
52908/* Override any GCC internal prototype to avoid an error.
52909   Use char because int might match the return type of a GCC
52910   builtin and then its argument prototype would still apply.  */
52911#ifdef __cplusplus
52912extern "C"
52913#endif
52914char shmat ();
52915int
52916main ()
52917{
52918return shmat ();
52919  ;
52920  return 0;
52921}
52922_ACEOF
52923if ac_fn_cxx_try_link "$LINENO"; then :
52924  ac_cv_lib_ipc_shmat=yes
52925else
52926  ac_cv_lib_ipc_shmat=no
52927fi
52928rm -f core conftest.err conftest.$ac_objext \
52929    conftest$ac_exeext conftest.$ac_ext
52930LIBS=$ac_check_lib_save_LIBS
52931fi
52932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
52933$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
52934if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
52935  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
52936fi
52937
52938    fi
52939  fi
52940
52941  # Check for libraries that X11R6 Xt/Xaw programs need.
52942  ac_save_LDFLAGS=$LDFLAGS
52943  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
52944  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
52945  # check for ICE first), but we must link in the order -lSM -lICE or
52946  # we get undefined symbols.  So assume we have SM if we have ICE.
52947  # These have to be linked with before -lX11, unlike the other
52948  # libraries we check for below, so use a different variable.
52949  # John Interrante, Karl Berry
52950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
52951$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
52952if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
52953  $as_echo_n "(cached) " >&6
52954else
52955  ac_check_lib_save_LIBS=$LIBS
52956LIBS="-lICE $X_EXTRA_LIBS $LIBS"
52957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52958/* end confdefs.h.  */
52959
52960/* Override any GCC internal prototype to avoid an error.
52961   Use char because int might match the return type of a GCC
52962   builtin and then its argument prototype would still apply.  */
52963#ifdef __cplusplus
52964extern "C"
52965#endif
52966char IceConnectionNumber ();
52967int
52968main ()
52969{
52970return IceConnectionNumber ();
52971  ;
52972  return 0;
52973}
52974_ACEOF
52975if ac_fn_cxx_try_link "$LINENO"; then :
52976  ac_cv_lib_ICE_IceConnectionNumber=yes
52977else
52978  ac_cv_lib_ICE_IceConnectionNumber=no
52979fi
52980rm -f core conftest.err conftest.$ac_objext \
52981    conftest$ac_exeext conftest.$ac_ext
52982LIBS=$ac_check_lib_save_LIBS
52983fi
52984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
52985$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
52986if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
52987  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
52988fi
52989
52990  LDFLAGS=$ac_save_LDFLAGS
52991
52992fi
52993
52994
52995    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
52996    # this doesn't make sense so we remove it.
52997    if test "x$COMPILE_TYPE" = xcross; then
52998      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
52999    fi
53000
53001    if test "x$no_x" = xyes; then
53002
53003  # Print a helpful message on how to acquire the necessary build dependency.
53004  # x11 is the help tag: freetype, cups, alsa etc
53005  MISSING_DEPENDENCY=x11
53006
53007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53008    cygwin_help $MISSING_DEPENDENCY
53009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53010    msys_help $MISSING_DEPENDENCY
53011  else
53012    PKGHANDLER_COMMAND=
53013
53014    case $PKGHANDLER in
53015      apt-get)
53016        apt_help     $MISSING_DEPENDENCY ;;
53017      yum)
53018        yum_help     $MISSING_DEPENDENCY ;;
53019      port)
53020        port_help    $MISSING_DEPENDENCY ;;
53021      pkgutil)
53022        pkgutil_help $MISSING_DEPENDENCY ;;
53023      pkgadd)
53024        pkgadd_help  $MISSING_DEPENDENCY ;;
53025    esac
53026
53027    if test "x$PKGHANDLER_COMMAND" != x; then
53028      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53029    fi
53030  fi
53031
53032      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
53033    fi
53034
53035    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
53036      OPENWIN_HOME="/usr/openwin"
53037      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
53038      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
53039          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
53040          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
53041          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
53042    fi
53043
53044    ac_ext=c
53045ac_cpp='$CPP $CPPFLAGS'
53046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53048ac_compiler_gnu=$ac_cv_c_compiler_gnu
53049
53050    OLD_CFLAGS="$CFLAGS"
53051    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
53052
53053    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
53054    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
53055do :
53056  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
53057ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
53058          # include <X11/Xlib.h>
53059          # include <X11/Xutil.h>
53060
53061
53062"
53063if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
53064  cat >>confdefs.h <<_ACEOF
53065#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
53066_ACEOF
53067 X11_HEADERS_OK=yes
53068else
53069  X11_HEADERS_OK=no; break
53070fi
53071
53072done
53073
53074
53075    if test "x$X11_HEADERS_OK" = xno; then
53076
53077  # Print a helpful message on how to acquire the necessary build dependency.
53078  # x11 is the help tag: freetype, cups, alsa etc
53079  MISSING_DEPENDENCY=x11
53080
53081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53082    cygwin_help $MISSING_DEPENDENCY
53083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53084    msys_help $MISSING_DEPENDENCY
53085  else
53086    PKGHANDLER_COMMAND=
53087
53088    case $PKGHANDLER in
53089      apt-get)
53090        apt_help     $MISSING_DEPENDENCY ;;
53091      yum)
53092        yum_help     $MISSING_DEPENDENCY ;;
53093      port)
53094        port_help    $MISSING_DEPENDENCY ;;
53095      pkgutil)
53096        pkgutil_help $MISSING_DEPENDENCY ;;
53097      pkgadd)
53098        pkgadd_help  $MISSING_DEPENDENCY ;;
53099    esac
53100
53101    if test "x$PKGHANDLER_COMMAND" != x; then
53102      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53103    fi
53104  fi
53105
53106      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
53107    fi
53108
53109    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
53110    # defined in libawt_xawt.
53111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
53112$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
53113    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53114/* end confdefs.h.  */
53115#include <X11/extensions/Xrender.h>
53116int
53117main ()
53118{
53119XLinearGradient x;
53120  ;
53121  return 0;
53122}
53123_ACEOF
53124if ac_fn_c_try_compile "$LINENO"; then :
53125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53126$as_echo "yes" >&6; }
53127else
53128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53129$as_echo "no" >&6; }
53130         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
53131fi
53132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53133
53134    CFLAGS="$OLD_CFLAGS"
53135    ac_ext=cpp
53136ac_cpp='$CXXCPP $CPPFLAGS'
53137ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53138ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53139ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53140
53141  fi # NEEDS_LIB_X11
53142
53143
53144
53145
53146
53147
53148# Check whether --with-cups was given.
53149if test "${with_cups+set}" = set; then :
53150  withval=$with_cups;
53151fi
53152
53153
53154# Check whether --with-cups-include was given.
53155if test "${with_cups_include+set}" = set; then :
53156  withval=$with_cups_include;
53157fi
53158
53159
53160  if test "x$NEEDS_LIB_CUPS" = xfalse; then
53161    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
53162        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
53163      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
53164$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
53165    fi
53166    CUPS_CFLAGS=
53167  else
53168    CUPS_FOUND=no
53169
53170    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
53171      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
53172    fi
53173
53174    if test "x${with_cups}" != x; then
53175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
53176$as_echo_n "checking for cups headers... " >&6; }
53177      if test -s "${with_cups}/include/cups/cups.h"; then
53178        CUPS_CFLAGS="-I${with_cups}/include"
53179        CUPS_FOUND=yes
53180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
53181$as_echo "$CUPS_FOUND" >&6; }
53182      else
53183        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
53184      fi
53185    fi
53186    if test "x${with_cups_include}" != x; then
53187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
53188$as_echo_n "checking for cups headers... " >&6; }
53189      if test -s "${with_cups_include}/cups/cups.h"; then
53190        CUPS_CFLAGS="-I${with_cups_include}"
53191        CUPS_FOUND=yes
53192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
53193$as_echo "$CUPS_FOUND" >&6; }
53194      else
53195        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
53196      fi
53197    fi
53198    if test "x$CUPS_FOUND" = xno; then
53199      # Are the cups headers installed in the default /usr/include location?
53200      for ac_header in cups/cups.h cups/ppd.h
53201do :
53202  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
53203ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
53204if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
53205  cat >>confdefs.h <<_ACEOF
53206#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
53207_ACEOF
53208
53209          CUPS_FOUND=yes
53210          CUPS_CFLAGS=
53211          DEFAULT_CUPS=yes
53212
53213fi
53214
53215done
53216
53217    fi
53218    if test "x$CUPS_FOUND" = xno; then
53219      # Getting nervous now? Lets poke around for standard Solaris third-party
53220      # package installation locations.
53221      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
53222$as_echo_n "checking for cups headers... " >&6; }
53223      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
53224        # An SFW package seems to be installed!
53225        CUPS_FOUND=yes
53226        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
53227      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
53228        # A CSW package seems to be installed!
53229        CUPS_FOUND=yes
53230        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
53231      fi
53232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
53233$as_echo "$CUPS_FOUND" >&6; }
53234    fi
53235    if test "x$CUPS_FOUND" = xno; then
53236
53237  # Print a helpful message on how to acquire the necessary build dependency.
53238  # cups is the help tag: freetype, cups, alsa etc
53239  MISSING_DEPENDENCY=cups
53240
53241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53242    cygwin_help $MISSING_DEPENDENCY
53243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53244    msys_help $MISSING_DEPENDENCY
53245  else
53246    PKGHANDLER_COMMAND=
53247
53248    case $PKGHANDLER in
53249      apt-get)
53250        apt_help     $MISSING_DEPENDENCY ;;
53251      yum)
53252        yum_help     $MISSING_DEPENDENCY ;;
53253      port)
53254        port_help    $MISSING_DEPENDENCY ;;
53255      pkgutil)
53256        pkgutil_help $MISSING_DEPENDENCY ;;
53257      pkgadd)
53258        pkgadd_help  $MISSING_DEPENDENCY ;;
53259    esac
53260
53261    if test "x$PKGHANDLER_COMMAND" != x; then
53262      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53263    fi
53264  fi
53265
53266      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
53267    fi
53268  fi
53269
53270
53271
53272
53273
53274# Check whether --with-freetype was given.
53275if test "${with_freetype+set}" = set; then :
53276  withval=$with_freetype;
53277fi
53278
53279
53280# Check whether --with-freetype-include was given.
53281if test "${with_freetype_include+set}" = set; then :
53282  withval=$with_freetype_include;
53283fi
53284
53285
53286# Check whether --with-freetype-lib was given.
53287if test "${with_freetype_lib+set}" = set; then :
53288  withval=$with_freetype_lib;
53289fi
53290
53291
53292# Check whether --with-freetype-src was given.
53293if test "${with_freetype_src+set}" = set; then :
53294  withval=$with_freetype_src;
53295fi
53296
53297  # Check whether --enable-freetype-bundling was given.
53298if test "${enable_freetype_bundling+set}" = set; then :
53299  enableval=$enable_freetype_bundling;
53300fi
53301
53302
53303  # Need to specify explicitly since it needs to be overridden on some versions of macosx
53304  FREETYPE_BASE_NAME=freetype
53305  FREETYPE_CFLAGS=
53306  FREETYPE_LIBS=
53307  FREETYPE_BUNDLE_LIB_PATH=
53308
53309  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
53310    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
53311        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
53312        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
53313        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
53314      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
53315$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
53316    fi
53317    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
53318      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
53319$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
53320    fi
53321  else
53322    # freetype is needed to build; go get it!
53323
53324    BUNDLE_FREETYPE="$enable_freetype_bundling"
53325
53326    if  test "x$with_freetype_src" != x; then
53327      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53328        # Try to build freetype if --with-freetype-src was given on Windows
53329
53330  FREETYPE_SRC_PATH="$with_freetype_src"
53331  BUILD_FREETYPE=yes
53332
53333  # Check if the freetype sources are acessible..
53334  if ! test -d $FREETYPE_SRC_PATH; then
53335    { $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
53336$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
53337    BUILD_FREETYPE=no
53338  fi
53339  # ..and contain a vc2010 project file
53340  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
53341  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
53342    { $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
53343$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
53344    BUILD_FREETYPE=no
53345  fi
53346  # Now check if configure found a version of 'msbuild.exe'
53347  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
53348    { $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
53349$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;}
53350    BUILD_FREETYPE=no
53351  fi
53352
53353  # Ready to go..
53354  if test "x$BUILD_FREETYPE" = xyes; then
53355    # msbuild requires trailing slashes for output directories
53356    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
53357    freetype_lib_path_unix="$freetype_lib_path"
53358    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
53359
53360  unix_path="$vcxproj_path"
53361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53362    windows_path=`$CYGPATH -m "$unix_path"`
53363    vcxproj_path="$windows_path"
53364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53365    windows_path=`cmd //c echo $unix_path`
53366    vcxproj_path="$windows_path"
53367  fi
53368
53369
53370  unix_path="$freetype_lib_path"
53371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53372    windows_path=`$CYGPATH -m "$unix_path"`
53373    freetype_lib_path="$windows_path"
53374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53375    windows_path=`cmd //c echo $unix_path`
53376    freetype_lib_path="$windows_path"
53377  fi
53378
53379
53380  unix_path="$freetype_obj_path"
53381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53382    windows_path=`$CYGPATH -m "$unix_path"`
53383    freetype_obj_path="$windows_path"
53384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53385    windows_path=`cmd //c echo $unix_path`
53386    freetype_obj_path="$windows_path"
53387  fi
53388
53389    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53390      freetype_platform=x64
53391    else
53392      freetype_platform=win32
53393    fi
53394
53395    # The original freetype project file is for VS 2010 (i.e. 'v100'),
53396    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
53397    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
53398    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
53399    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
53400$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
53401
53402    # First we try to build the freetype.dll
53403    $ECHO -e "@echo off\n"\
53404        "$MSBUILD $vcxproj_path "\
53405        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53406        "/p:Configuration=\"Release Multithreaded\" "\
53407        "/p:Platform=$freetype_platform "\
53408        "/p:ConfigurationType=DynamicLibrary "\
53409        "/p:TargetName=freetype "\
53410        "/p:OutDir=\"$freetype_lib_path\" "\
53411        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
53412    cmd /c freetype.bat
53413
53414    if test -s "$freetype_lib_path_unix/freetype.dll"; then
53415      # If that succeeds we also build freetype.lib
53416      $ECHO -e "@echo off\n"\
53417          "$MSBUILD $vcxproj_path "\
53418          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53419          "/p:Configuration=\"Release Multithreaded\" "\
53420          "/p:Platform=$freetype_platform "\
53421          "/p:ConfigurationType=StaticLibrary "\
53422          "/p:TargetName=freetype "\
53423          "/p:OutDir=\"$freetype_lib_path\" "\
53424          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
53425      cmd /c freetype.bat
53426
53427      if test -s "$freetype_lib_path_unix/freetype.lib"; then
53428        # Once we build both, lib and dll, set freetype lib and include path appropriately
53429        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
53430        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
53431        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
53432$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
53433      else
53434        BUILD_FREETYPE=no
53435      fi
53436    else
53437      BUILD_FREETYPE=no
53438    fi
53439  fi
53440
53441        if test "x$BUILD_FREETYPE" = xyes; then
53442          # Okay, we built it. Check that it works.
53443
53444  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53445  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53446  METHOD="--with-freetype-src"
53447
53448  # Let's start with an optimistic view of the world :-)
53449  FOUND_FREETYPE=yes
53450
53451  # First look for the canonical freetype main include file ft2build.h.
53452  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53453    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53454    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53455    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53456      # Fail.
53457      FOUND_FREETYPE=no
53458    fi
53459  fi
53460
53461  if test "x$FOUND_FREETYPE" = xyes; then
53462    # Include file found, let's continue the sanity check.
53463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53464$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53465
53466    # Reset to default value
53467    FREETYPE_BASE_NAME=freetype
53468    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53469    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53470      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53471          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53472        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53473        # for the .6 version explicitly.
53474        FREETYPE_BASE_NAME=freetype.6
53475        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53476        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53477$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53478      else
53479        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53480$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53481        FOUND_FREETYPE=no
53482      fi
53483    else
53484      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53485        # On Windows, we will need both .lib and .dll file.
53486        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53487          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53489          FOUND_FREETYPE=no
53490        fi
53491      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53492          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53493        # Found lib in isa dir, use that instead.
53494        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53495        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53496$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53497      fi
53498    fi
53499  fi
53500
53501  if test "x$FOUND_FREETYPE" = xyes; then
53502
53503  # Only process if variable expands to non-empty
53504
53505  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53507
53508  # Input might be given as Windows format, start by converting to
53509  # unix format.
53510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53511  new_path=`$CYGPATH -u "$path"`
53512
53513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53516  # "foo.exe" is OK but "foo" is an error.
53517  #
53518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53519  # It is also a way to make sure we got the proper file name for the real test later on.
53520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53521  if test "x$test_shortpath" = x; then
53522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53525  fi
53526
53527  # Call helper function which possibly converts this using DOS-style short mode.
53528  # If so, the updated path is stored in $new_path.
53529
53530  input_path="$new_path"
53531  # Check if we need to convert this using DOS-style short mode. If the path
53532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53533  # take no chances and rewrite it.
53534  # Note: m4 eats our [], so we need to use [ and ] instead.
53535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53536  if test "x$has_forbidden_chars" != x; then
53537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53541      # Going to short mode and back again did indeed matter. Since short mode is
53542      # case insensitive, let's make it lowercase to improve readability.
53543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53544      # Now convert it back to Unix-style (cygpath)
53545      input_path=`$CYGPATH -u "$shortmode_path"`
53546      new_path="$input_path"
53547    fi
53548  fi
53549
53550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53551  if test "x$test_cygdrive_prefix" = x; then
53552    # As a simple fix, exclude /usr/bin since it's not a real path.
53553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53555      # a path prefixed by /cygdrive for fixpath to work.
53556      new_path="$CYGWIN_ROOT_PATH$input_path"
53557    fi
53558  fi
53559
53560
53561  if test "x$path" != "x$new_path"; then
53562    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53565  fi
53566
53567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53568
53569  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53570  has_colon=`$ECHO $path | $GREP ^.:`
53571  new_path="$path"
53572  if test "x$has_colon" = x; then
53573    # Not in mixed or Windows style, start by that.
53574    new_path=`cmd //c echo $path`
53575  fi
53576
53577
53578  input_path="$new_path"
53579  # Check if we need to convert this using DOS-style short mode. If the path
53580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53581  # take no chances and rewrite it.
53582  # Note: m4 eats our [], so we need to use [ and ] instead.
53583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53584  if test "x$has_forbidden_chars" != x; then
53585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53587  fi
53588
53589
53590  windows_path="$new_path"
53591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53592    unix_path=`$CYGPATH -u "$windows_path"`
53593    new_path="$unix_path"
53594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53596    new_path="$unix_path"
53597  fi
53598
53599  if test "x$path" != "x$new_path"; then
53600    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53603  fi
53604
53605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53607
53608    else
53609      # We're on a unix platform. Hooray! :)
53610      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53611      has_space=`$ECHO "$path" | $GREP " "`
53612      if test "x$has_space" != x; then
53613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53616      fi
53617
53618      # Use eval to expand a potential ~
53619      eval path="$path"
53620      if test ! -f "$path" && test ! -d "$path"; then
53621        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53622      fi
53623
53624      if test -d "$path"; then
53625        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53626      else
53627        dir="`$DIRNAME "$path"`"
53628        base="`$BASENAME "$path"`"
53629        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53630      fi
53631    fi
53632  fi
53633
53634
53635  # Only process if variable expands to non-empty
53636
53637  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53639
53640  # Input might be given as Windows format, start by converting to
53641  # unix format.
53642  path="$POTENTIAL_FREETYPE_LIB_PATH"
53643  new_path=`$CYGPATH -u "$path"`
53644
53645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53648  # "foo.exe" is OK but "foo" is an error.
53649  #
53650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53651  # It is also a way to make sure we got the proper file name for the real test later on.
53652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53653  if test "x$test_shortpath" = x; then
53654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53656    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53657  fi
53658
53659  # Call helper function which possibly converts this using DOS-style short mode.
53660  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53673      # Going to short mode and back again did indeed matter. Since short mode is
53674      # case insensitive, let's make it lowercase to improve readability.
53675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53676      # Now convert it back to Unix-style (cygpath)
53677      input_path=`$CYGPATH -u "$shortmode_path"`
53678      new_path="$input_path"
53679    fi
53680  fi
53681
53682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53683  if test "x$test_cygdrive_prefix" = x; then
53684    # As a simple fix, exclude /usr/bin since it's not a real path.
53685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53687      # a path prefixed by /cygdrive for fixpath to work.
53688      new_path="$CYGWIN_ROOT_PATH$input_path"
53689    fi
53690  fi
53691
53692
53693  if test "x$path" != "x$new_path"; then
53694    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53697  fi
53698
53699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53700
53701  path="$POTENTIAL_FREETYPE_LIB_PATH"
53702  has_colon=`$ECHO $path | $GREP ^.:`
53703  new_path="$path"
53704  if test "x$has_colon" = x; then
53705    # Not in mixed or Windows style, start by that.
53706    new_path=`cmd //c echo $path`
53707  fi
53708
53709
53710  input_path="$new_path"
53711  # Check if we need to convert this using DOS-style short mode. If the path
53712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53713  # take no chances and rewrite it.
53714  # Note: m4 eats our [], so we need to use [ and ] instead.
53715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53716  if test "x$has_forbidden_chars" != x; then
53717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53719  fi
53720
53721
53722  windows_path="$new_path"
53723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53724    unix_path=`$CYGPATH -u "$windows_path"`
53725    new_path="$unix_path"
53726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53728    new_path="$unix_path"
53729  fi
53730
53731  if test "x$path" != "x$new_path"; then
53732    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53734$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53735  fi
53736
53737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53739
53740    else
53741      # We're on a unix platform. Hooray! :)
53742      path="$POTENTIAL_FREETYPE_LIB_PATH"
53743      has_space=`$ECHO "$path" | $GREP " "`
53744      if test "x$has_space" != x; then
53745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53748      fi
53749
53750      # Use eval to expand a potential ~
53751      eval path="$path"
53752      if test ! -f "$path" && test ! -d "$path"; then
53753        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53754      fi
53755
53756      if test -d "$path"; then
53757        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53758      else
53759        dir="`$DIRNAME "$path"`"
53760        base="`$BASENAME "$path"`"
53761        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53762      fi
53763    fi
53764  fi
53765
53766
53767    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53769$as_echo_n "checking for freetype includes... " >&6; }
53770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53771$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53772    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53774$as_echo_n "checking for freetype libraries... " >&6; }
53775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53776$as_echo "$FREETYPE_LIB_PATH" >&6; }
53777  fi
53778
53779          if test "x$FOUND_FREETYPE" != xyes; then
53780            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
53781          fi
53782        else
53783          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
53784$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
53785          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
53786        fi
53787      else
53788        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
53789$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
53790      fi
53791    fi
53792
53793    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
53794      # User has specified settings
53795
53796      if test "x$BUNDLE_FREETYPE" = x; then
53797        # If not specified, default is to bundle freetype
53798        BUNDLE_FREETYPE=yes
53799      fi
53800
53801      if test "x$with_freetype" != x; then
53802        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
53803        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
53804      fi
53805
53806      # Allow --with-freetype-lib and --with-freetype-include to override
53807      if test "x$with_freetype_include" != x; then
53808        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
53809      fi
53810      if test "x$with_freetype_lib" != x; then
53811        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
53812      fi
53813
53814      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53815        # Okay, we got it. Check that it works.
53816
53817  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53818  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53819  METHOD="--with-freetype"
53820
53821  # Let's start with an optimistic view of the world :-)
53822  FOUND_FREETYPE=yes
53823
53824  # First look for the canonical freetype main include file ft2build.h.
53825  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53826    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53827    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53828    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53829      # Fail.
53830      FOUND_FREETYPE=no
53831    fi
53832  fi
53833
53834  if test "x$FOUND_FREETYPE" = xyes; then
53835    # Include file found, let's continue the sanity check.
53836    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53837$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53838
53839    # Reset to default value
53840    FREETYPE_BASE_NAME=freetype
53841    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53842    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53843      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53844          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53845        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53846        # for the .6 version explicitly.
53847        FREETYPE_BASE_NAME=freetype.6
53848        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53849        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53850$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53851      else
53852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53853$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53854        FOUND_FREETYPE=no
53855      fi
53856    else
53857      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53858        # On Windows, we will need both .lib and .dll file.
53859        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53860          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53861$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53862          FOUND_FREETYPE=no
53863        fi
53864      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53865          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53866        # Found lib in isa dir, use that instead.
53867        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53868        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53869$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53870      fi
53871    fi
53872  fi
53873
53874  if test "x$FOUND_FREETYPE" = xyes; then
53875
53876  # Only process if variable expands to non-empty
53877
53878  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53880
53881  # Input might be given as Windows format, start by converting to
53882  # unix format.
53883  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53884  new_path=`$CYGPATH -u "$path"`
53885
53886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53889  # "foo.exe" is OK but "foo" is an error.
53890  #
53891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53892  # It is also a way to make sure we got the proper file name for the real test later on.
53893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53894  if test "x$test_shortpath" = x; then
53895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53897    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53898  fi
53899
53900  # Call helper function which possibly converts this using DOS-style short mode.
53901  # If so, the updated path is stored in $new_path.
53902
53903  input_path="$new_path"
53904  # Check if we need to convert this using DOS-style short mode. If the path
53905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53906  # take no chances and rewrite it.
53907  # Note: m4 eats our [], so we need to use [ and ] instead.
53908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53909  if test "x$has_forbidden_chars" != x; then
53910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53914      # Going to short mode and back again did indeed matter. Since short mode is
53915      # case insensitive, let's make it lowercase to improve readability.
53916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53917      # Now convert it back to Unix-style (cygpath)
53918      input_path=`$CYGPATH -u "$shortmode_path"`
53919      new_path="$input_path"
53920    fi
53921  fi
53922
53923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53924  if test "x$test_cygdrive_prefix" = x; then
53925    # As a simple fix, exclude /usr/bin since it's not a real path.
53926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53928      # a path prefixed by /cygdrive for fixpath to work.
53929      new_path="$CYGWIN_ROOT_PATH$input_path"
53930    fi
53931  fi
53932
53933
53934  if test "x$path" != "x$new_path"; then
53935    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53938  fi
53939
53940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53941
53942  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53943  has_colon=`$ECHO $path | $GREP ^.:`
53944  new_path="$path"
53945  if test "x$has_colon" = x; then
53946    # Not in mixed or Windows style, start by that.
53947    new_path=`cmd //c echo $path`
53948  fi
53949
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53960  fi
53961
53962
53963  windows_path="$new_path"
53964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53965    unix_path=`$CYGPATH -u "$windows_path"`
53966    new_path="$unix_path"
53967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53969    new_path="$unix_path"
53970  fi
53971
53972  if test "x$path" != "x$new_path"; then
53973    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53976  fi
53977
53978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53980
53981    else
53982      # We're on a unix platform. Hooray! :)
53983      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53984      has_space=`$ECHO "$path" | $GREP " "`
53985      if test "x$has_space" != x; then
53986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53988        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53989      fi
53990
53991      # Use eval to expand a potential ~
53992      eval path="$path"
53993      if test ! -f "$path" && test ! -d "$path"; then
53994        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53995      fi
53996
53997      if test -d "$path"; then
53998        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53999      else
54000        dir="`$DIRNAME "$path"`"
54001        base="`$BASENAME "$path"`"
54002        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54003      fi
54004    fi
54005  fi
54006
54007
54008  # Only process if variable expands to non-empty
54009
54010  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54012
54013  # Input might be given as Windows format, start by converting to
54014  # unix format.
54015  path="$POTENTIAL_FREETYPE_LIB_PATH"
54016  new_path=`$CYGPATH -u "$path"`
54017
54018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54021  # "foo.exe" is OK but "foo" is an error.
54022  #
54023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54024  # It is also a way to make sure we got the proper file name for the real test later on.
54025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54026  if test "x$test_shortpath" = x; then
54027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54030  fi
54031
54032  # Call helper function which possibly converts this using DOS-style short mode.
54033  # If so, the updated path is stored in $new_path.
54034
54035  input_path="$new_path"
54036  # Check if we need to convert this using DOS-style short mode. If the path
54037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54038  # take no chances and rewrite it.
54039  # Note: m4 eats our [], so we need to use [ and ] instead.
54040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54041  if test "x$has_forbidden_chars" != x; then
54042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54046      # Going to short mode and back again did indeed matter. Since short mode is
54047      # case insensitive, let's make it lowercase to improve readability.
54048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54049      # Now convert it back to Unix-style (cygpath)
54050      input_path=`$CYGPATH -u "$shortmode_path"`
54051      new_path="$input_path"
54052    fi
54053  fi
54054
54055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54056  if test "x$test_cygdrive_prefix" = x; then
54057    # As a simple fix, exclude /usr/bin since it's not a real path.
54058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54060      # a path prefixed by /cygdrive for fixpath to work.
54061      new_path="$CYGWIN_ROOT_PATH$input_path"
54062    fi
54063  fi
54064
54065
54066  if test "x$path" != "x$new_path"; then
54067    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54070  fi
54071
54072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54073
54074  path="$POTENTIAL_FREETYPE_LIB_PATH"
54075  has_colon=`$ECHO $path | $GREP ^.:`
54076  new_path="$path"
54077  if test "x$has_colon" = x; then
54078    # Not in mixed or Windows style, start by that.
54079    new_path=`cmd //c echo $path`
54080  fi
54081
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54092  fi
54093
54094
54095  windows_path="$new_path"
54096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54097    unix_path=`$CYGPATH -u "$windows_path"`
54098    new_path="$unix_path"
54099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54101    new_path="$unix_path"
54102  fi
54103
54104  if test "x$path" != "x$new_path"; then
54105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54108  fi
54109
54110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54112
54113    else
54114      # We're on a unix platform. Hooray! :)
54115      path="$POTENTIAL_FREETYPE_LIB_PATH"
54116      has_space=`$ECHO "$path" | $GREP " "`
54117      if test "x$has_space" != x; then
54118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54121      fi
54122
54123      # Use eval to expand a potential ~
54124      eval path="$path"
54125      if test ! -f "$path" && test ! -d "$path"; then
54126        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54127      fi
54128
54129      if test -d "$path"; then
54130        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54131      else
54132        dir="`$DIRNAME "$path"`"
54133        base="`$BASENAME "$path"`"
54134        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54135      fi
54136    fi
54137  fi
54138
54139
54140    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54142$as_echo_n "checking for freetype includes... " >&6; }
54143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54144$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54145    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54147$as_echo_n "checking for freetype libraries... " >&6; }
54148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54149$as_echo "$FREETYPE_LIB_PATH" >&6; }
54150  fi
54151
54152        if test "x$FOUND_FREETYPE" != xyes; then
54153          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
54154        fi
54155      else
54156        # User specified only one of lib or include. This is an error.
54157        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
54158          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
54159$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
54160          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
54161        else
54162          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
54163$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
54164          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
54165        fi
54166      fi
54167    else
54168      # User did not specify settings, but we need freetype. Try to locate it.
54169
54170      if test "x$BUNDLE_FREETYPE" = x; then
54171        # If not specified, default is to bundle freetype only on windows
54172        if test "x$OPENJDK_TARGET_OS" = xwindows; then
54173          BUNDLE_FREETYPE=yes
54174        else
54175          BUNDLE_FREETYPE=no
54176        fi
54177      fi
54178
54179      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
54180      if test "x$SYSROOT" = x; then
54181        if test "x$FOUND_FREETYPE" != xyes; then
54182          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
54183          if test "x$PKG_CONFIG" != x; then
54184
54185pkg_failed=no
54186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
54187$as_echo_n "checking for FREETYPE... " >&6; }
54188
54189if test -n "$FREETYPE_CFLAGS"; then
54190    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
54191 elif test -n "$PKG_CONFIG"; then
54192    if test -n "$PKG_CONFIG" && \
54193    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
54194  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
54195  ac_status=$?
54196  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54197  test $ac_status = 0; }; then
54198  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
54199else
54200  pkg_failed=yes
54201fi
54202 else
54203    pkg_failed=untried
54204fi
54205if test -n "$FREETYPE_LIBS"; then
54206    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
54207 elif test -n "$PKG_CONFIG"; then
54208    if test -n "$PKG_CONFIG" && \
54209    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
54210  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
54211  ac_status=$?
54212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54213  test $ac_status = 0; }; then
54214  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
54215else
54216  pkg_failed=yes
54217fi
54218 else
54219    pkg_failed=untried
54220fi
54221
54222
54223
54224if test $pkg_failed = yes; then
54225
54226if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54227        _pkg_short_errors_supported=yes
54228else
54229        _pkg_short_errors_supported=no
54230fi
54231        if test $_pkg_short_errors_supported = yes; then
54232	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
54233        else
54234	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
54235        fi
54236	# Put the nasty error message in config.log where it belongs
54237	echo "$FREETYPE_PKG_ERRORS" >&5
54238
54239	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54240$as_echo "no" >&6; }
54241                FOUND_FREETYPE=no
54242elif test $pkg_failed = untried; then
54243	FOUND_FREETYPE=no
54244else
54245	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
54246	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
54247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54248$as_echo "yes" >&6; }
54249	FOUND_FREETYPE=yes
54250fi
54251            if test "x$FOUND_FREETYPE" = xyes; then
54252              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
54253              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
54254              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
54255              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
54256                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
54257              fi
54258              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
54259              if test "x$BUNDLE_FREETYPE" = xyes; then
54260                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
54261$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
54262                FOUND_FREETYPE=no
54263              else
54264                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
54265$as_echo_n "checking for freetype... " >&6; }
54266                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
54267$as_echo "yes (using pkg-config)" >&6; }
54268              fi
54269            fi
54270          fi
54271        fi
54272      fi
54273
54274      if test "x$FOUND_FREETYPE" != xyes; then
54275        # Check in well-known locations
54276        if test "x$OPENJDK_TARGET_OS" = xwindows; then
54277          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
54278
54279  windows_path="$FREETYPE_BASE_DIR"
54280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54281    unix_path=`$CYGPATH -u "$windows_path"`
54282    FREETYPE_BASE_DIR="$unix_path"
54283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54285    FREETYPE_BASE_DIR="$unix_path"
54286  fi
54287
54288
54289  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54290  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54291  METHOD="well-known location"
54292
54293  # Let's start with an optimistic view of the world :-)
54294  FOUND_FREETYPE=yes
54295
54296  # First look for the canonical freetype main include file ft2build.h.
54297  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54298    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54299    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54300    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54301      # Fail.
54302      FOUND_FREETYPE=no
54303    fi
54304  fi
54305
54306  if test "x$FOUND_FREETYPE" = xyes; then
54307    # Include file found, let's continue the sanity check.
54308    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54309$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54310
54311    # Reset to default value
54312    FREETYPE_BASE_NAME=freetype
54313    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54314    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54315      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54316          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54317        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54318        # for the .6 version explicitly.
54319        FREETYPE_BASE_NAME=freetype.6
54320        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54321        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54322$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54323      else
54324        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54325$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54326        FOUND_FREETYPE=no
54327      fi
54328    else
54329      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54330        # On Windows, we will need both .lib and .dll file.
54331        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54332          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54333$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54334          FOUND_FREETYPE=no
54335        fi
54336      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54337          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54338        # Found lib in isa dir, use that instead.
54339        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54340        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54341$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54342      fi
54343    fi
54344  fi
54345
54346  if test "x$FOUND_FREETYPE" = xyes; then
54347
54348  # Only process if variable expands to non-empty
54349
54350  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54352
54353  # Input might be given as Windows format, start by converting to
54354  # unix format.
54355  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54356  new_path=`$CYGPATH -u "$path"`
54357
54358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54361  # "foo.exe" is OK but "foo" is an error.
54362  #
54363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54364  # It is also a way to make sure we got the proper file name for the real test later on.
54365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54366  if test "x$test_shortpath" = x; then
54367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54368$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54369    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54370  fi
54371
54372  # Call helper function which possibly converts this using DOS-style short mode.
54373  # If so, the updated path is stored in $new_path.
54374
54375  input_path="$new_path"
54376  # Check if we need to convert this using DOS-style short mode. If the path
54377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54378  # take no chances and rewrite it.
54379  # Note: m4 eats our [], so we need to use [ and ] instead.
54380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54381  if test "x$has_forbidden_chars" != x; then
54382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54386      # Going to short mode and back again did indeed matter. Since short mode is
54387      # case insensitive, let's make it lowercase to improve readability.
54388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54389      # Now convert it back to Unix-style (cygpath)
54390      input_path=`$CYGPATH -u "$shortmode_path"`
54391      new_path="$input_path"
54392    fi
54393  fi
54394
54395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54396  if test "x$test_cygdrive_prefix" = x; then
54397    # As a simple fix, exclude /usr/bin since it's not a real path.
54398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54400      # a path prefixed by /cygdrive for fixpath to work.
54401      new_path="$CYGWIN_ROOT_PATH$input_path"
54402    fi
54403  fi
54404
54405
54406  if test "x$path" != "x$new_path"; then
54407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54410  fi
54411
54412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54413
54414  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54415  has_colon=`$ECHO $path | $GREP ^.:`
54416  new_path="$path"
54417  if test "x$has_colon" = x; then
54418    # Not in mixed or Windows style, start by that.
54419    new_path=`cmd //c echo $path`
54420  fi
54421
54422
54423  input_path="$new_path"
54424  # Check if we need to convert this using DOS-style short mode. If the path
54425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54426  # take no chances and rewrite it.
54427  # Note: m4 eats our [], so we need to use [ and ] instead.
54428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54429  if test "x$has_forbidden_chars" != x; then
54430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54432  fi
54433
54434
54435  windows_path="$new_path"
54436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54437    unix_path=`$CYGPATH -u "$windows_path"`
54438    new_path="$unix_path"
54439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54441    new_path="$unix_path"
54442  fi
54443
54444  if test "x$path" != "x$new_path"; then
54445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54448  fi
54449
54450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54452
54453    else
54454      # We're on a unix platform. Hooray! :)
54455      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54456      has_space=`$ECHO "$path" | $GREP " "`
54457      if test "x$has_space" != x; then
54458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54461      fi
54462
54463      # Use eval to expand a potential ~
54464      eval path="$path"
54465      if test ! -f "$path" && test ! -d "$path"; then
54466        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54467      fi
54468
54469      if test -d "$path"; then
54470        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54471      else
54472        dir="`$DIRNAME "$path"`"
54473        base="`$BASENAME "$path"`"
54474        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54475      fi
54476    fi
54477  fi
54478
54479
54480  # Only process if variable expands to non-empty
54481
54482  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54484
54485  # Input might be given as Windows format, start by converting to
54486  # unix format.
54487  path="$POTENTIAL_FREETYPE_LIB_PATH"
54488  new_path=`$CYGPATH -u "$path"`
54489
54490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54493  # "foo.exe" is OK but "foo" is an error.
54494  #
54495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54496  # It is also a way to make sure we got the proper file name for the real test later on.
54497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54498  if test "x$test_shortpath" = x; then
54499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54501    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54502  fi
54503
54504  # Call helper function which possibly converts this using DOS-style short mode.
54505  # If so, the updated path is stored in $new_path.
54506
54507  input_path="$new_path"
54508  # Check if we need to convert this using DOS-style short mode. If the path
54509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54510  # take no chances and rewrite it.
54511  # Note: m4 eats our [], so we need to use [ and ] instead.
54512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54513  if test "x$has_forbidden_chars" != x; then
54514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54518      # Going to short mode and back again did indeed matter. Since short mode is
54519      # case insensitive, let's make it lowercase to improve readability.
54520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54521      # Now convert it back to Unix-style (cygpath)
54522      input_path=`$CYGPATH -u "$shortmode_path"`
54523      new_path="$input_path"
54524    fi
54525  fi
54526
54527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54528  if test "x$test_cygdrive_prefix" = x; then
54529    # As a simple fix, exclude /usr/bin since it's not a real path.
54530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54532      # a path prefixed by /cygdrive for fixpath to work.
54533      new_path="$CYGWIN_ROOT_PATH$input_path"
54534    fi
54535  fi
54536
54537
54538  if test "x$path" != "x$new_path"; then
54539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54542  fi
54543
54544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54545
54546  path="$POTENTIAL_FREETYPE_LIB_PATH"
54547  has_colon=`$ECHO $path | $GREP ^.:`
54548  new_path="$path"
54549  if test "x$has_colon" = x; then
54550    # Not in mixed or Windows style, start by that.
54551    new_path=`cmd //c echo $path`
54552  fi
54553
54554
54555  input_path="$new_path"
54556  # Check if we need to convert this using DOS-style short mode. If the path
54557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54558  # take no chances and rewrite it.
54559  # Note: m4 eats our [], so we need to use [ and ] instead.
54560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54561  if test "x$has_forbidden_chars" != x; then
54562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54564  fi
54565
54566
54567  windows_path="$new_path"
54568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54569    unix_path=`$CYGPATH -u "$windows_path"`
54570    new_path="$unix_path"
54571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54573    new_path="$unix_path"
54574  fi
54575
54576  if test "x$path" != "x$new_path"; then
54577    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54580  fi
54581
54582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54584
54585    else
54586      # We're on a unix platform. Hooray! :)
54587      path="$POTENTIAL_FREETYPE_LIB_PATH"
54588      has_space=`$ECHO "$path" | $GREP " "`
54589      if test "x$has_space" != x; then
54590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54593      fi
54594
54595      # Use eval to expand a potential ~
54596      eval path="$path"
54597      if test ! -f "$path" && test ! -d "$path"; then
54598        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54599      fi
54600
54601      if test -d "$path"; then
54602        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54603      else
54604        dir="`$DIRNAME "$path"`"
54605        base="`$BASENAME "$path"`"
54606        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54607      fi
54608    fi
54609  fi
54610
54611
54612    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54614$as_echo_n "checking for freetype includes... " >&6; }
54615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54616$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54617    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54619$as_echo_n "checking for freetype libraries... " >&6; }
54620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54621$as_echo "$FREETYPE_LIB_PATH" >&6; }
54622  fi
54623
54624          if test "x$FOUND_FREETYPE" != xyes; then
54625            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
54626
54627  windows_path="$FREETYPE_BASE_DIR"
54628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54629    unix_path=`$CYGPATH -u "$windows_path"`
54630    FREETYPE_BASE_DIR="$unix_path"
54631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54633    FREETYPE_BASE_DIR="$unix_path"
54634  fi
54635
54636
54637  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54638  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54639  METHOD="well-known location"
54640
54641  # Let's start with an optimistic view of the world :-)
54642  FOUND_FREETYPE=yes
54643
54644  # First look for the canonical freetype main include file ft2build.h.
54645  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54646    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54647    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54648    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54649      # Fail.
54650      FOUND_FREETYPE=no
54651    fi
54652  fi
54653
54654  if test "x$FOUND_FREETYPE" = xyes; then
54655    # Include file found, let's continue the sanity check.
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54657$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54658
54659    # Reset to default value
54660    FREETYPE_BASE_NAME=freetype
54661    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54662    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54663      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54664          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54665        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54666        # for the .6 version explicitly.
54667        FREETYPE_BASE_NAME=freetype.6
54668        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54669        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54670$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54671      else
54672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54673$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54674        FOUND_FREETYPE=no
54675      fi
54676    else
54677      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54678        # On Windows, we will need both .lib and .dll file.
54679        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54680          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54681$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54682          FOUND_FREETYPE=no
54683        fi
54684      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54685          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54686        # Found lib in isa dir, use that instead.
54687        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54688        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54689$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54690      fi
54691    fi
54692  fi
54693
54694  if test "x$FOUND_FREETYPE" = xyes; then
54695
54696  # Only process if variable expands to non-empty
54697
54698  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54700
54701  # Input might be given as Windows format, start by converting to
54702  # unix format.
54703  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54704  new_path=`$CYGPATH -u "$path"`
54705
54706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54709  # "foo.exe" is OK but "foo" is an error.
54710  #
54711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54712  # It is also a way to make sure we got the proper file name for the real test later on.
54713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54714  if test "x$test_shortpath" = x; then
54715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54717    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54718  fi
54719
54720  # Call helper function which possibly converts this using DOS-style short mode.
54721  # If so, the updated path is stored in $new_path.
54722
54723  input_path="$new_path"
54724  # Check if we need to convert this using DOS-style short mode. If the path
54725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54726  # take no chances and rewrite it.
54727  # Note: m4 eats our [], so we need to use [ and ] instead.
54728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54729  if test "x$has_forbidden_chars" != x; then
54730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54734      # Going to short mode and back again did indeed matter. Since short mode is
54735      # case insensitive, let's make it lowercase to improve readability.
54736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54737      # Now convert it back to Unix-style (cygpath)
54738      input_path=`$CYGPATH -u "$shortmode_path"`
54739      new_path="$input_path"
54740    fi
54741  fi
54742
54743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54744  if test "x$test_cygdrive_prefix" = x; then
54745    # As a simple fix, exclude /usr/bin since it's not a real path.
54746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54748      # a path prefixed by /cygdrive for fixpath to work.
54749      new_path="$CYGWIN_ROOT_PATH$input_path"
54750    fi
54751  fi
54752
54753
54754  if test "x$path" != "x$new_path"; then
54755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54758  fi
54759
54760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54761
54762  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54763  has_colon=`$ECHO $path | $GREP ^.:`
54764  new_path="$path"
54765  if test "x$has_colon" = x; then
54766    # Not in mixed or Windows style, start by that.
54767    new_path=`cmd //c echo $path`
54768  fi
54769
54770
54771  input_path="$new_path"
54772  # Check if we need to convert this using DOS-style short mode. If the path
54773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54774  # take no chances and rewrite it.
54775  # Note: m4 eats our [], so we need to use [ and ] instead.
54776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54777  if test "x$has_forbidden_chars" != x; then
54778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54780  fi
54781
54782
54783  windows_path="$new_path"
54784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54785    unix_path=`$CYGPATH -u "$windows_path"`
54786    new_path="$unix_path"
54787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54789    new_path="$unix_path"
54790  fi
54791
54792  if test "x$path" != "x$new_path"; then
54793    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54796  fi
54797
54798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54800
54801    else
54802      # We're on a unix platform. Hooray! :)
54803      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54804      has_space=`$ECHO "$path" | $GREP " "`
54805      if test "x$has_space" != x; then
54806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54809      fi
54810
54811      # Use eval to expand a potential ~
54812      eval path="$path"
54813      if test ! -f "$path" && test ! -d "$path"; then
54814        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54815      fi
54816
54817      if test -d "$path"; then
54818        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54819      else
54820        dir="`$DIRNAME "$path"`"
54821        base="`$BASENAME "$path"`"
54822        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54823      fi
54824    fi
54825  fi
54826
54827
54828  # Only process if variable expands to non-empty
54829
54830  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54832
54833  # Input might be given as Windows format, start by converting to
54834  # unix format.
54835  path="$POTENTIAL_FREETYPE_LIB_PATH"
54836  new_path=`$CYGPATH -u "$path"`
54837
54838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54841  # "foo.exe" is OK but "foo" is an error.
54842  #
54843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54844  # It is also a way to make sure we got the proper file name for the real test later on.
54845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54846  if test "x$test_shortpath" = x; then
54847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54850  fi
54851
54852  # Call helper function which possibly converts this using DOS-style short mode.
54853  # If so, the updated path is stored in $new_path.
54854
54855  input_path="$new_path"
54856  # Check if we need to convert this using DOS-style short mode. If the path
54857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54858  # take no chances and rewrite it.
54859  # Note: m4 eats our [], so we need to use [ and ] instead.
54860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54861  if test "x$has_forbidden_chars" != x; then
54862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54866      # Going to short mode and back again did indeed matter. Since short mode is
54867      # case insensitive, let's make it lowercase to improve readability.
54868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54869      # Now convert it back to Unix-style (cygpath)
54870      input_path=`$CYGPATH -u "$shortmode_path"`
54871      new_path="$input_path"
54872    fi
54873  fi
54874
54875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54876  if test "x$test_cygdrive_prefix" = x; then
54877    # As a simple fix, exclude /usr/bin since it's not a real path.
54878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54880      # a path prefixed by /cygdrive for fixpath to work.
54881      new_path="$CYGWIN_ROOT_PATH$input_path"
54882    fi
54883  fi
54884
54885
54886  if test "x$path" != "x$new_path"; then
54887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54890  fi
54891
54892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54893
54894  path="$POTENTIAL_FREETYPE_LIB_PATH"
54895  has_colon=`$ECHO $path | $GREP ^.:`
54896  new_path="$path"
54897  if test "x$has_colon" = x; then
54898    # Not in mixed or Windows style, start by that.
54899    new_path=`cmd //c echo $path`
54900  fi
54901
54902
54903  input_path="$new_path"
54904  # Check if we need to convert this using DOS-style short mode. If the path
54905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54906  # take no chances and rewrite it.
54907  # Note: m4 eats our [], so we need to use [ and ] instead.
54908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54909  if test "x$has_forbidden_chars" != x; then
54910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54912  fi
54913
54914
54915  windows_path="$new_path"
54916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54917    unix_path=`$CYGPATH -u "$windows_path"`
54918    new_path="$unix_path"
54919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54921    new_path="$unix_path"
54922  fi
54923
54924  if test "x$path" != "x$new_path"; then
54925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54928  fi
54929
54930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54932
54933    else
54934      # We're on a unix platform. Hooray! :)
54935      path="$POTENTIAL_FREETYPE_LIB_PATH"
54936      has_space=`$ECHO "$path" | $GREP " "`
54937      if test "x$has_space" != x; then
54938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54941      fi
54942
54943      # Use eval to expand a potential ~
54944      eval path="$path"
54945      if test ! -f "$path" && test ! -d "$path"; then
54946        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54947      fi
54948
54949      if test -d "$path"; then
54950        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54951      else
54952        dir="`$DIRNAME "$path"`"
54953        base="`$BASENAME "$path"`"
54954        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54955      fi
54956    fi
54957  fi
54958
54959
54960    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54962$as_echo_n "checking for freetype includes... " >&6; }
54963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54964$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54965    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54967$as_echo_n "checking for freetype libraries... " >&6; }
54968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54969$as_echo "$FREETYPE_LIB_PATH" >&6; }
54970  fi
54971
54972          fi
54973          if test "x$FOUND_FREETYPE" != xyes; then
54974            FREETYPE_BASE_DIR="$HOME/freetype"
54975
54976  windows_path="$FREETYPE_BASE_DIR"
54977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54978    unix_path=`$CYGPATH -u "$windows_path"`
54979    FREETYPE_BASE_DIR="$unix_path"
54980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54982    FREETYPE_BASE_DIR="$unix_path"
54983  fi
54984
54985            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54986
54987  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54988  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54989  METHOD="well-known location"
54990
54991  # Let's start with an optimistic view of the world :-)
54992  FOUND_FREETYPE=yes
54993
54994  # First look for the canonical freetype main include file ft2build.h.
54995  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54996    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54997    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54998    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54999      # Fail.
55000      FOUND_FREETYPE=no
55001    fi
55002  fi
55003
55004  if test "x$FOUND_FREETYPE" = xyes; then
55005    # Include file found, let's continue the sanity check.
55006    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55007$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55008
55009    # Reset to default value
55010    FREETYPE_BASE_NAME=freetype
55011    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55012    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55013      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55014          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55015        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55016        # for the .6 version explicitly.
55017        FREETYPE_BASE_NAME=freetype.6
55018        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55019        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55020$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55021      else
55022        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55023$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55024        FOUND_FREETYPE=no
55025      fi
55026    else
55027      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55028        # On Windows, we will need both .lib and .dll file.
55029        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55030          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55031$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55032          FOUND_FREETYPE=no
55033        fi
55034      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55035          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55036        # Found lib in isa dir, use that instead.
55037        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55038        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55039$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55040      fi
55041    fi
55042  fi
55043
55044  if test "x$FOUND_FREETYPE" = xyes; then
55045
55046  # Only process if variable expands to non-empty
55047
55048  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55050
55051  # Input might be given as Windows format, start by converting to
55052  # unix format.
55053  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55054  new_path=`$CYGPATH -u "$path"`
55055
55056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55059  # "foo.exe" is OK but "foo" is an error.
55060  #
55061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55062  # It is also a way to make sure we got the proper file name for the real test later on.
55063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55064  if test "x$test_shortpath" = x; then
55065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55067    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55068  fi
55069
55070  # Call helper function which possibly converts this using DOS-style short mode.
55071  # If so, the updated path is stored in $new_path.
55072
55073  input_path="$new_path"
55074  # Check if we need to convert this using DOS-style short mode. If the path
55075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55076  # take no chances and rewrite it.
55077  # Note: m4 eats our [], so we need to use [ and ] instead.
55078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55079  if test "x$has_forbidden_chars" != x; then
55080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55084      # Going to short mode and back again did indeed matter. Since short mode is
55085      # case insensitive, let's make it lowercase to improve readability.
55086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55087      # Now convert it back to Unix-style (cygpath)
55088      input_path=`$CYGPATH -u "$shortmode_path"`
55089      new_path="$input_path"
55090    fi
55091  fi
55092
55093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55094  if test "x$test_cygdrive_prefix" = x; then
55095    # As a simple fix, exclude /usr/bin since it's not a real path.
55096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55098      # a path prefixed by /cygdrive for fixpath to work.
55099      new_path="$CYGWIN_ROOT_PATH$input_path"
55100    fi
55101  fi
55102
55103
55104  if test "x$path" != "x$new_path"; then
55105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55108  fi
55109
55110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55111
55112  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55113  has_colon=`$ECHO $path | $GREP ^.:`
55114  new_path="$path"
55115  if test "x$has_colon" = x; then
55116    # Not in mixed or Windows style, start by that.
55117    new_path=`cmd //c echo $path`
55118  fi
55119
55120
55121  input_path="$new_path"
55122  # Check if we need to convert this using DOS-style short mode. If the path
55123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55124  # take no chances and rewrite it.
55125  # Note: m4 eats our [], so we need to use [ and ] instead.
55126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55127  if test "x$has_forbidden_chars" != x; then
55128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55130  fi
55131
55132
55133  windows_path="$new_path"
55134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55135    unix_path=`$CYGPATH -u "$windows_path"`
55136    new_path="$unix_path"
55137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55139    new_path="$unix_path"
55140  fi
55141
55142  if test "x$path" != "x$new_path"; then
55143    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55146  fi
55147
55148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55150
55151    else
55152      # We're on a unix platform. Hooray! :)
55153      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55154      has_space=`$ECHO "$path" | $GREP " "`
55155      if test "x$has_space" != x; then
55156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55159      fi
55160
55161      # Use eval to expand a potential ~
55162      eval path="$path"
55163      if test ! -f "$path" && test ! -d "$path"; then
55164        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55165      fi
55166
55167      if test -d "$path"; then
55168        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55169      else
55170        dir="`$DIRNAME "$path"`"
55171        base="`$BASENAME "$path"`"
55172        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55173      fi
55174    fi
55175  fi
55176
55177
55178  # Only process if variable expands to non-empty
55179
55180  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55182
55183  # Input might be given as Windows format, start by converting to
55184  # unix format.
55185  path="$POTENTIAL_FREETYPE_LIB_PATH"
55186  new_path=`$CYGPATH -u "$path"`
55187
55188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55191  # "foo.exe" is OK but "foo" is an error.
55192  #
55193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55194  # It is also a way to make sure we got the proper file name for the real test later on.
55195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55196  if test "x$test_shortpath" = x; then
55197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55199    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55200  fi
55201
55202  # Call helper function which possibly converts this using DOS-style short mode.
55203  # If so, the updated path is stored in $new_path.
55204
55205  input_path="$new_path"
55206  # Check if we need to convert this using DOS-style short mode. If the path
55207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55208  # take no chances and rewrite it.
55209  # Note: m4 eats our [], so we need to use [ and ] instead.
55210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55211  if test "x$has_forbidden_chars" != x; then
55212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55216      # Going to short mode and back again did indeed matter. Since short mode is
55217      # case insensitive, let's make it lowercase to improve readability.
55218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55219      # Now convert it back to Unix-style (cygpath)
55220      input_path=`$CYGPATH -u "$shortmode_path"`
55221      new_path="$input_path"
55222    fi
55223  fi
55224
55225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55226  if test "x$test_cygdrive_prefix" = x; then
55227    # As a simple fix, exclude /usr/bin since it's not a real path.
55228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55230      # a path prefixed by /cygdrive for fixpath to work.
55231      new_path="$CYGWIN_ROOT_PATH$input_path"
55232    fi
55233  fi
55234
55235
55236  if test "x$path" != "x$new_path"; then
55237    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55240  fi
55241
55242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55243
55244  path="$POTENTIAL_FREETYPE_LIB_PATH"
55245  has_colon=`$ECHO $path | $GREP ^.:`
55246  new_path="$path"
55247  if test "x$has_colon" = x; then
55248    # Not in mixed or Windows style, start by that.
55249    new_path=`cmd //c echo $path`
55250  fi
55251
55252
55253  input_path="$new_path"
55254  # Check if we need to convert this using DOS-style short mode. If the path
55255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55256  # take no chances and rewrite it.
55257  # Note: m4 eats our [], so we need to use [ and ] instead.
55258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55259  if test "x$has_forbidden_chars" != x; then
55260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55262  fi
55263
55264
55265  windows_path="$new_path"
55266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55267    unix_path=`$CYGPATH -u "$windows_path"`
55268    new_path="$unix_path"
55269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55271    new_path="$unix_path"
55272  fi
55273
55274  if test "x$path" != "x$new_path"; then
55275    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55278  fi
55279
55280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55282
55283    else
55284      # We're on a unix platform. Hooray! :)
55285      path="$POTENTIAL_FREETYPE_LIB_PATH"
55286      has_space=`$ECHO "$path" | $GREP " "`
55287      if test "x$has_space" != x; then
55288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55291      fi
55292
55293      # Use eval to expand a potential ~
55294      eval path="$path"
55295      if test ! -f "$path" && test ! -d "$path"; then
55296        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55297      fi
55298
55299      if test -d "$path"; then
55300        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55301      else
55302        dir="`$DIRNAME "$path"`"
55303        base="`$BASENAME "$path"`"
55304        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55305      fi
55306    fi
55307  fi
55308
55309
55310    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55312$as_echo_n "checking for freetype includes... " >&6; }
55313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55314$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55315    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55317$as_echo_n "checking for freetype libraries... " >&6; }
55318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55319$as_echo "$FREETYPE_LIB_PATH" >&6; }
55320  fi
55321
55322            else
55323
55324  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55325  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55326  METHOD="well-known location"
55327
55328  # Let's start with an optimistic view of the world :-)
55329  FOUND_FREETYPE=yes
55330
55331  # First look for the canonical freetype main include file ft2build.h.
55332  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55333    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55334    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55335    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55336      # Fail.
55337      FOUND_FREETYPE=no
55338    fi
55339  fi
55340
55341  if test "x$FOUND_FREETYPE" = xyes; then
55342    # Include file found, let's continue the sanity check.
55343    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55344$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55345
55346    # Reset to default value
55347    FREETYPE_BASE_NAME=freetype
55348    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55349    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55350      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55351          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55352        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55353        # for the .6 version explicitly.
55354        FREETYPE_BASE_NAME=freetype.6
55355        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55356        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55357$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55358      else
55359        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55360$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55361        FOUND_FREETYPE=no
55362      fi
55363    else
55364      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55365        # On Windows, we will need both .lib and .dll file.
55366        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55367          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55368$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55369          FOUND_FREETYPE=no
55370        fi
55371      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55372          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55373        # Found lib in isa dir, use that instead.
55374        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55375        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55376$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55377      fi
55378    fi
55379  fi
55380
55381  if test "x$FOUND_FREETYPE" = xyes; then
55382
55383  # Only process if variable expands to non-empty
55384
55385  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55387
55388  # Input might be given as Windows format, start by converting to
55389  # unix format.
55390  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55391  new_path=`$CYGPATH -u "$path"`
55392
55393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55396  # "foo.exe" is OK but "foo" is an error.
55397  #
55398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55399  # It is also a way to make sure we got the proper file name for the real test later on.
55400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55401  if test "x$test_shortpath" = x; then
55402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55405  fi
55406
55407  # Call helper function which possibly converts this using DOS-style short mode.
55408  # If so, the updated path is stored in $new_path.
55409
55410  input_path="$new_path"
55411  # Check if we need to convert this using DOS-style short mode. If the path
55412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55413  # take no chances and rewrite it.
55414  # Note: m4 eats our [], so we need to use [ and ] instead.
55415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55416  if test "x$has_forbidden_chars" != x; then
55417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55421      # Going to short mode and back again did indeed matter. Since short mode is
55422      # case insensitive, let's make it lowercase to improve readability.
55423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55424      # Now convert it back to Unix-style (cygpath)
55425      input_path=`$CYGPATH -u "$shortmode_path"`
55426      new_path="$input_path"
55427    fi
55428  fi
55429
55430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55431  if test "x$test_cygdrive_prefix" = x; then
55432    # As a simple fix, exclude /usr/bin since it's not a real path.
55433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55435      # a path prefixed by /cygdrive for fixpath to work.
55436      new_path="$CYGWIN_ROOT_PATH$input_path"
55437    fi
55438  fi
55439
55440
55441  if test "x$path" != "x$new_path"; then
55442    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55445  fi
55446
55447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55448
55449  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55450  has_colon=`$ECHO $path | $GREP ^.:`
55451  new_path="$path"
55452  if test "x$has_colon" = x; then
55453    # Not in mixed or Windows style, start by that.
55454    new_path=`cmd //c echo $path`
55455  fi
55456
55457
55458  input_path="$new_path"
55459  # Check if we need to convert this using DOS-style short mode. If the path
55460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55461  # take no chances and rewrite it.
55462  # Note: m4 eats our [], so we need to use [ and ] instead.
55463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55464  if test "x$has_forbidden_chars" != x; then
55465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55467  fi
55468
55469
55470  windows_path="$new_path"
55471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55472    unix_path=`$CYGPATH -u "$windows_path"`
55473    new_path="$unix_path"
55474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55476    new_path="$unix_path"
55477  fi
55478
55479  if test "x$path" != "x$new_path"; then
55480    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55483  fi
55484
55485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55487
55488    else
55489      # We're on a unix platform. Hooray! :)
55490      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55491      has_space=`$ECHO "$path" | $GREP " "`
55492      if test "x$has_space" != x; then
55493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55496      fi
55497
55498      # Use eval to expand a potential ~
55499      eval path="$path"
55500      if test ! -f "$path" && test ! -d "$path"; then
55501        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55502      fi
55503
55504      if test -d "$path"; then
55505        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55506      else
55507        dir="`$DIRNAME "$path"`"
55508        base="`$BASENAME "$path"`"
55509        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55510      fi
55511    fi
55512  fi
55513
55514
55515  # Only process if variable expands to non-empty
55516
55517  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55519
55520  # Input might be given as Windows format, start by converting to
55521  # unix format.
55522  path="$POTENTIAL_FREETYPE_LIB_PATH"
55523  new_path=`$CYGPATH -u "$path"`
55524
55525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55528  # "foo.exe" is OK but "foo" is an error.
55529  #
55530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55531  # It is also a way to make sure we got the proper file name for the real test later on.
55532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55533  if test "x$test_shortpath" = x; then
55534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55537  fi
55538
55539  # Call helper function which possibly converts this using DOS-style short mode.
55540  # If so, the updated path is stored in $new_path.
55541
55542  input_path="$new_path"
55543  # Check if we need to convert this using DOS-style short mode. If the path
55544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55545  # take no chances and rewrite it.
55546  # Note: m4 eats our [], so we need to use [ and ] instead.
55547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55548  if test "x$has_forbidden_chars" != x; then
55549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55553      # Going to short mode and back again did indeed matter. Since short mode is
55554      # case insensitive, let's make it lowercase to improve readability.
55555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55556      # Now convert it back to Unix-style (cygpath)
55557      input_path=`$CYGPATH -u "$shortmode_path"`
55558      new_path="$input_path"
55559    fi
55560  fi
55561
55562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55563  if test "x$test_cygdrive_prefix" = x; then
55564    # As a simple fix, exclude /usr/bin since it's not a real path.
55565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55567      # a path prefixed by /cygdrive for fixpath to work.
55568      new_path="$CYGWIN_ROOT_PATH$input_path"
55569    fi
55570  fi
55571
55572
55573  if test "x$path" != "x$new_path"; then
55574    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55577  fi
55578
55579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55580
55581  path="$POTENTIAL_FREETYPE_LIB_PATH"
55582  has_colon=`$ECHO $path | $GREP ^.:`
55583  new_path="$path"
55584  if test "x$has_colon" = x; then
55585    # Not in mixed or Windows style, start by that.
55586    new_path=`cmd //c echo $path`
55587  fi
55588
55589
55590  input_path="$new_path"
55591  # Check if we need to convert this using DOS-style short mode. If the path
55592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55593  # take no chances and rewrite it.
55594  # Note: m4 eats our [], so we need to use [ and ] instead.
55595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55596  if test "x$has_forbidden_chars" != x; then
55597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55599  fi
55600
55601
55602  windows_path="$new_path"
55603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55604    unix_path=`$CYGPATH -u "$windows_path"`
55605    new_path="$unix_path"
55606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55608    new_path="$unix_path"
55609  fi
55610
55611  if test "x$path" != "x$new_path"; then
55612    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55615  fi
55616
55617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55619
55620    else
55621      # We're on a unix platform. Hooray! :)
55622      path="$POTENTIAL_FREETYPE_LIB_PATH"
55623      has_space=`$ECHO "$path" | $GREP " "`
55624      if test "x$has_space" != x; then
55625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55628      fi
55629
55630      # Use eval to expand a potential ~
55631      eval path="$path"
55632      if test ! -f "$path" && test ! -d "$path"; then
55633        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55634      fi
55635
55636      if test -d "$path"; then
55637        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55638      else
55639        dir="`$DIRNAME "$path"`"
55640        base="`$BASENAME "$path"`"
55641        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55642      fi
55643    fi
55644  fi
55645
55646
55647    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55649$as_echo_n "checking for freetype includes... " >&6; }
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55651$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55652    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55654$as_echo_n "checking for freetype libraries... " >&6; }
55655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55656$as_echo "$FREETYPE_LIB_PATH" >&6; }
55657  fi
55658
55659            fi
55660            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
55661                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
55662              # Source is available, as a last resort try to build freetype in default location
55663
55664  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
55665  BUILD_FREETYPE=yes
55666
55667  # Check if the freetype sources are acessible..
55668  if ! test -d $FREETYPE_SRC_PATH; then
55669    { $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
55670$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
55671    BUILD_FREETYPE=no
55672  fi
55673  # ..and contain a vc2010 project file
55674  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
55675  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
55676    { $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
55677$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
55678    BUILD_FREETYPE=no
55679  fi
55680  # Now check if configure found a version of 'msbuild.exe'
55681  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
55682    { $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
55683$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;}
55684    BUILD_FREETYPE=no
55685  fi
55686
55687  # Ready to go..
55688  if test "x$BUILD_FREETYPE" = xyes; then
55689    # msbuild requires trailing slashes for output directories
55690    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
55691    freetype_lib_path_unix="$freetype_lib_path"
55692    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
55693
55694  unix_path="$vcxproj_path"
55695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55696    windows_path=`$CYGPATH -m "$unix_path"`
55697    vcxproj_path="$windows_path"
55698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55699    windows_path=`cmd //c echo $unix_path`
55700    vcxproj_path="$windows_path"
55701  fi
55702
55703
55704  unix_path="$freetype_lib_path"
55705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55706    windows_path=`$CYGPATH -m "$unix_path"`
55707    freetype_lib_path="$windows_path"
55708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55709    windows_path=`cmd //c echo $unix_path`
55710    freetype_lib_path="$windows_path"
55711  fi
55712
55713
55714  unix_path="$freetype_obj_path"
55715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55716    windows_path=`$CYGPATH -m "$unix_path"`
55717    freetype_obj_path="$windows_path"
55718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55719    windows_path=`cmd //c echo $unix_path`
55720    freetype_obj_path="$windows_path"
55721  fi
55722
55723    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55724      freetype_platform=x64
55725    else
55726      freetype_platform=win32
55727    fi
55728
55729    # The original freetype project file is for VS 2010 (i.e. 'v100'),
55730    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
55731    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
55732    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
55733    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
55734$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
55735
55736    # First we try to build the freetype.dll
55737    $ECHO -e "@echo off\n"\
55738        "$MSBUILD $vcxproj_path "\
55739        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55740        "/p:Configuration=\"Release Multithreaded\" "\
55741        "/p:Platform=$freetype_platform "\
55742        "/p:ConfigurationType=DynamicLibrary "\
55743        "/p:TargetName=freetype "\
55744        "/p:OutDir=\"$freetype_lib_path\" "\
55745        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
55746    cmd /c freetype.bat
55747
55748    if test -s "$freetype_lib_path_unix/freetype.dll"; then
55749      # If that succeeds we also build freetype.lib
55750      $ECHO -e "@echo off\n"\
55751          "$MSBUILD $vcxproj_path "\
55752          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55753          "/p:Configuration=\"Release Multithreaded\" "\
55754          "/p:Platform=$freetype_platform "\
55755          "/p:ConfigurationType=StaticLibrary "\
55756          "/p:TargetName=freetype "\
55757          "/p:OutDir=\"$freetype_lib_path\" "\
55758          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
55759      cmd /c freetype.bat
55760
55761      if test -s "$freetype_lib_path_unix/freetype.lib"; then
55762        # Once we build both, lib and dll, set freetype lib and include path appropriately
55763        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
55764        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
55765        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
55766$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
55767      else
55768        BUILD_FREETYPE=no
55769      fi
55770    else
55771      BUILD_FREETYPE=no
55772    fi
55773  fi
55774
55775              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55776
55777  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55778  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
55779  METHOD="well-known location"
55780
55781  # Let's start with an optimistic view of the world :-)
55782  FOUND_FREETYPE=yes
55783
55784  # First look for the canonical freetype main include file ft2build.h.
55785  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55786    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55787    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55788    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55789      # Fail.
55790      FOUND_FREETYPE=no
55791    fi
55792  fi
55793
55794  if test "x$FOUND_FREETYPE" = xyes; then
55795    # Include file found, let's continue the sanity check.
55796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55797$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55798
55799    # Reset to default value
55800    FREETYPE_BASE_NAME=freetype
55801    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55802    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55803      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55805        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55806        # for the .6 version explicitly.
55807        FREETYPE_BASE_NAME=freetype.6
55808        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55809        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55810$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55811      else
55812        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55813$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55814        FOUND_FREETYPE=no
55815      fi
55816    else
55817      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55818        # On Windows, we will need both .lib and .dll file.
55819        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55820          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55822          FOUND_FREETYPE=no
55823        fi
55824      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55825          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55826        # Found lib in isa dir, use that instead.
55827        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55828        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55829$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55830      fi
55831    fi
55832  fi
55833
55834  if test "x$FOUND_FREETYPE" = xyes; then
55835
55836  # Only process if variable expands to non-empty
55837
55838  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55840
55841  # Input might be given as Windows format, start by converting to
55842  # unix format.
55843  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55844  new_path=`$CYGPATH -u "$path"`
55845
55846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55849  # "foo.exe" is OK but "foo" is an error.
55850  #
55851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55852  # It is also a way to make sure we got the proper file name for the real test later on.
55853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55854  if test "x$test_shortpath" = x; then
55855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55858  fi
55859
55860  # Call helper function which possibly converts this using DOS-style short mode.
55861  # If so, the updated path is stored in $new_path.
55862
55863  input_path="$new_path"
55864  # Check if we need to convert this using DOS-style short mode. If the path
55865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55866  # take no chances and rewrite it.
55867  # Note: m4 eats our [], so we need to use [ and ] instead.
55868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55869  if test "x$has_forbidden_chars" != x; then
55870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55874      # Going to short mode and back again did indeed matter. Since short mode is
55875      # case insensitive, let's make it lowercase to improve readability.
55876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55877      # Now convert it back to Unix-style (cygpath)
55878      input_path=`$CYGPATH -u "$shortmode_path"`
55879      new_path="$input_path"
55880    fi
55881  fi
55882
55883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55884  if test "x$test_cygdrive_prefix" = x; then
55885    # As a simple fix, exclude /usr/bin since it's not a real path.
55886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55888      # a path prefixed by /cygdrive for fixpath to work.
55889      new_path="$CYGWIN_ROOT_PATH$input_path"
55890    fi
55891  fi
55892
55893
55894  if test "x$path" != "x$new_path"; then
55895    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55898  fi
55899
55900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55901
55902  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55903  has_colon=`$ECHO $path | $GREP ^.:`
55904  new_path="$path"
55905  if test "x$has_colon" = x; then
55906    # Not in mixed or Windows style, start by that.
55907    new_path=`cmd //c echo $path`
55908  fi
55909
55910
55911  input_path="$new_path"
55912  # Check if we need to convert this using DOS-style short mode. If the path
55913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55914  # take no chances and rewrite it.
55915  # Note: m4 eats our [], so we need to use [ and ] instead.
55916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55917  if test "x$has_forbidden_chars" != x; then
55918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55920  fi
55921
55922
55923  windows_path="$new_path"
55924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55925    unix_path=`$CYGPATH -u "$windows_path"`
55926    new_path="$unix_path"
55927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55929    new_path="$unix_path"
55930  fi
55931
55932  if test "x$path" != "x$new_path"; then
55933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55936  fi
55937
55938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55940
55941    else
55942      # We're on a unix platform. Hooray! :)
55943      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55944      has_space=`$ECHO "$path" | $GREP " "`
55945      if test "x$has_space" != x; then
55946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55949      fi
55950
55951      # Use eval to expand a potential ~
55952      eval path="$path"
55953      if test ! -f "$path" && test ! -d "$path"; then
55954        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55955      fi
55956
55957      if test -d "$path"; then
55958        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55959      else
55960        dir="`$DIRNAME "$path"`"
55961        base="`$BASENAME "$path"`"
55962        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55963      fi
55964    fi
55965  fi
55966
55967
55968  # Only process if variable expands to non-empty
55969
55970  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55972
55973  # Input might be given as Windows format, start by converting to
55974  # unix format.
55975  path="$POTENTIAL_FREETYPE_LIB_PATH"
55976  new_path=`$CYGPATH -u "$path"`
55977
55978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55981  # "foo.exe" is OK but "foo" is an error.
55982  #
55983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55984  # It is also a way to make sure we got the proper file name for the real test later on.
55985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55986  if test "x$test_shortpath" = x; then
55987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55989    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55990  fi
55991
55992  # Call helper function which possibly converts this using DOS-style short mode.
55993  # If so, the updated path is stored in $new_path.
55994
55995  input_path="$new_path"
55996  # Check if we need to convert this using DOS-style short mode. If the path
55997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55998  # take no chances and rewrite it.
55999  # Note: m4 eats our [], so we need to use [ and ] instead.
56000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56001  if test "x$has_forbidden_chars" != x; then
56002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56006      # Going to short mode and back again did indeed matter. Since short mode is
56007      # case insensitive, let's make it lowercase to improve readability.
56008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56009      # Now convert it back to Unix-style (cygpath)
56010      input_path=`$CYGPATH -u "$shortmode_path"`
56011      new_path="$input_path"
56012    fi
56013  fi
56014
56015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56016  if test "x$test_cygdrive_prefix" = x; then
56017    # As a simple fix, exclude /usr/bin since it's not a real path.
56018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56020      # a path prefixed by /cygdrive for fixpath to work.
56021      new_path="$CYGWIN_ROOT_PATH$input_path"
56022    fi
56023  fi
56024
56025
56026  if test "x$path" != "x$new_path"; then
56027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56030  fi
56031
56032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56033
56034  path="$POTENTIAL_FREETYPE_LIB_PATH"
56035  has_colon=`$ECHO $path | $GREP ^.:`
56036  new_path="$path"
56037  if test "x$has_colon" = x; then
56038    # Not in mixed or Windows style, start by that.
56039    new_path=`cmd //c echo $path`
56040  fi
56041
56042
56043  input_path="$new_path"
56044  # Check if we need to convert this using DOS-style short mode. If the path
56045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56046  # take no chances and rewrite it.
56047  # Note: m4 eats our [], so we need to use [ and ] instead.
56048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56049  if test "x$has_forbidden_chars" != x; then
56050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56052  fi
56053
56054
56055  windows_path="$new_path"
56056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56057    unix_path=`$CYGPATH -u "$windows_path"`
56058    new_path="$unix_path"
56059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56061    new_path="$unix_path"
56062  fi
56063
56064  if test "x$path" != "x$new_path"; then
56065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56068  fi
56069
56070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56072
56073    else
56074      # We're on a unix platform. Hooray! :)
56075      path="$POTENTIAL_FREETYPE_LIB_PATH"
56076      has_space=`$ECHO "$path" | $GREP " "`
56077      if test "x$has_space" != x; then
56078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56081      fi
56082
56083      # Use eval to expand a potential ~
56084      eval path="$path"
56085      if test ! -f "$path" && test ! -d "$path"; then
56086        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56087      fi
56088
56089      if test -d "$path"; then
56090        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56091      else
56092        dir="`$DIRNAME "$path"`"
56093        base="`$BASENAME "$path"`"
56094        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56095      fi
56096    fi
56097  fi
56098
56099
56100    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56102$as_echo_n "checking for freetype includes... " >&6; }
56103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56104$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56105    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56107$as_echo_n "checking for freetype libraries... " >&6; }
56108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56109$as_echo "$FREETYPE_LIB_PATH" >&6; }
56110  fi
56111
56112              else
56113
56114  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56115  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56116  METHOD="well-known location"
56117
56118  # Let's start with an optimistic view of the world :-)
56119  FOUND_FREETYPE=yes
56120
56121  # First look for the canonical freetype main include file ft2build.h.
56122  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56123    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56124    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56125    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56126      # Fail.
56127      FOUND_FREETYPE=no
56128    fi
56129  fi
56130
56131  if test "x$FOUND_FREETYPE" = xyes; then
56132    # Include file found, let's continue the sanity check.
56133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56134$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56135
56136    # Reset to default value
56137    FREETYPE_BASE_NAME=freetype
56138    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56139    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56140      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56141          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56142        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56143        # for the .6 version explicitly.
56144        FREETYPE_BASE_NAME=freetype.6
56145        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56146        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56147$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56148      else
56149        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56150$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56151        FOUND_FREETYPE=no
56152      fi
56153    else
56154      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56155        # On Windows, we will need both .lib and .dll file.
56156        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56157          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56159          FOUND_FREETYPE=no
56160        fi
56161      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56162          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56163        # Found lib in isa dir, use that instead.
56164        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56165        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56166$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56167      fi
56168    fi
56169  fi
56170
56171  if test "x$FOUND_FREETYPE" = xyes; then
56172
56173  # Only process if variable expands to non-empty
56174
56175  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56177
56178  # Input might be given as Windows format, start by converting to
56179  # unix format.
56180  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56181  new_path=`$CYGPATH -u "$path"`
56182
56183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56186  # "foo.exe" is OK but "foo" is an error.
56187  #
56188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56189  # It is also a way to make sure we got the proper file name for the real test later on.
56190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56191  if test "x$test_shortpath" = x; then
56192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56193$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56194    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56195  fi
56196
56197  # Call helper function which possibly converts this using DOS-style short mode.
56198  # If so, the updated path is stored in $new_path.
56199
56200  input_path="$new_path"
56201  # Check if we need to convert this using DOS-style short mode. If the path
56202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56203  # take no chances and rewrite it.
56204  # Note: m4 eats our [], so we need to use [ and ] instead.
56205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56206  if test "x$has_forbidden_chars" != x; then
56207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56211      # Going to short mode and back again did indeed matter. Since short mode is
56212      # case insensitive, let's make it lowercase to improve readability.
56213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56214      # Now convert it back to Unix-style (cygpath)
56215      input_path=`$CYGPATH -u "$shortmode_path"`
56216      new_path="$input_path"
56217    fi
56218  fi
56219
56220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56221  if test "x$test_cygdrive_prefix" = x; then
56222    # As a simple fix, exclude /usr/bin since it's not a real path.
56223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56225      # a path prefixed by /cygdrive for fixpath to work.
56226      new_path="$CYGWIN_ROOT_PATH$input_path"
56227    fi
56228  fi
56229
56230
56231  if test "x$path" != "x$new_path"; then
56232    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56234$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56235  fi
56236
56237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56238
56239  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56240  has_colon=`$ECHO $path | $GREP ^.:`
56241  new_path="$path"
56242  if test "x$has_colon" = x; then
56243    # Not in mixed or Windows style, start by that.
56244    new_path=`cmd //c echo $path`
56245  fi
56246
56247
56248  input_path="$new_path"
56249  # Check if we need to convert this using DOS-style short mode. If the path
56250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56251  # take no chances and rewrite it.
56252  # Note: m4 eats our [], so we need to use [ and ] instead.
56253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56254  if test "x$has_forbidden_chars" != x; then
56255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56257  fi
56258
56259
56260  windows_path="$new_path"
56261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56262    unix_path=`$CYGPATH -u "$windows_path"`
56263    new_path="$unix_path"
56264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56266    new_path="$unix_path"
56267  fi
56268
56269  if test "x$path" != "x$new_path"; then
56270    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56273  fi
56274
56275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56277
56278    else
56279      # We're on a unix platform. Hooray! :)
56280      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56281      has_space=`$ECHO "$path" | $GREP " "`
56282      if test "x$has_space" != x; then
56283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56286      fi
56287
56288      # Use eval to expand a potential ~
56289      eval path="$path"
56290      if test ! -f "$path" && test ! -d "$path"; then
56291        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56292      fi
56293
56294      if test -d "$path"; then
56295        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56296      else
56297        dir="`$DIRNAME "$path"`"
56298        base="`$BASENAME "$path"`"
56299        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56300      fi
56301    fi
56302  fi
56303
56304
56305  # Only process if variable expands to non-empty
56306
56307  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56309
56310  # Input might be given as Windows format, start by converting to
56311  # unix format.
56312  path="$POTENTIAL_FREETYPE_LIB_PATH"
56313  new_path=`$CYGPATH -u "$path"`
56314
56315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56318  # "foo.exe" is OK but "foo" is an error.
56319  #
56320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56321  # It is also a way to make sure we got the proper file name for the real test later on.
56322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56323  if test "x$test_shortpath" = x; then
56324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56327  fi
56328
56329  # Call helper function which possibly converts this using DOS-style short mode.
56330  # If so, the updated path is stored in $new_path.
56331
56332  input_path="$new_path"
56333  # Check if we need to convert this using DOS-style short mode. If the path
56334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56335  # take no chances and rewrite it.
56336  # Note: m4 eats our [], so we need to use [ and ] instead.
56337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56338  if test "x$has_forbidden_chars" != x; then
56339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56343      # Going to short mode and back again did indeed matter. Since short mode is
56344      # case insensitive, let's make it lowercase to improve readability.
56345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56346      # Now convert it back to Unix-style (cygpath)
56347      input_path=`$CYGPATH -u "$shortmode_path"`
56348      new_path="$input_path"
56349    fi
56350  fi
56351
56352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56353  if test "x$test_cygdrive_prefix" = x; then
56354    # As a simple fix, exclude /usr/bin since it's not a real path.
56355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56357      # a path prefixed by /cygdrive for fixpath to work.
56358      new_path="$CYGWIN_ROOT_PATH$input_path"
56359    fi
56360  fi
56361
56362
56363  if test "x$path" != "x$new_path"; then
56364    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56367  fi
56368
56369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56370
56371  path="$POTENTIAL_FREETYPE_LIB_PATH"
56372  has_colon=`$ECHO $path | $GREP ^.:`
56373  new_path="$path"
56374  if test "x$has_colon" = x; then
56375    # Not in mixed or Windows style, start by that.
56376    new_path=`cmd //c echo $path`
56377  fi
56378
56379
56380  input_path="$new_path"
56381  # Check if we need to convert this using DOS-style short mode. If the path
56382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56383  # take no chances and rewrite it.
56384  # Note: m4 eats our [], so we need to use [ and ] instead.
56385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56386  if test "x$has_forbidden_chars" != x; then
56387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56389  fi
56390
56391
56392  windows_path="$new_path"
56393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56394    unix_path=`$CYGPATH -u "$windows_path"`
56395    new_path="$unix_path"
56396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56398    new_path="$unix_path"
56399  fi
56400
56401  if test "x$path" != "x$new_path"; then
56402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56405  fi
56406
56407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56409
56410    else
56411      # We're on a unix platform. Hooray! :)
56412      path="$POTENTIAL_FREETYPE_LIB_PATH"
56413      has_space=`$ECHO "$path" | $GREP " "`
56414      if test "x$has_space" != x; then
56415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56418      fi
56419
56420      # Use eval to expand a potential ~
56421      eval path="$path"
56422      if test ! -f "$path" && test ! -d "$path"; then
56423        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56424      fi
56425
56426      if test -d "$path"; then
56427        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56428      else
56429        dir="`$DIRNAME "$path"`"
56430        base="`$BASENAME "$path"`"
56431        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56432      fi
56433    fi
56434  fi
56435
56436
56437    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56439$as_echo_n "checking for freetype includes... " >&6; }
56440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56441$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56442    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56444$as_echo_n "checking for freetype libraries... " >&6; }
56445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56446$as_echo "$FREETYPE_LIB_PATH" >&6; }
56447  fi
56448
56449              fi
56450            fi
56451          fi
56452        else
56453          FREETYPE_BASE_DIR="$SYSROOT/usr"
56454
56455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56457  METHOD="well-known location"
56458
56459  # Let's start with an optimistic view of the world :-)
56460  FOUND_FREETYPE=yes
56461
56462  # First look for the canonical freetype main include file ft2build.h.
56463  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56464    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56465    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56466    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56467      # Fail.
56468      FOUND_FREETYPE=no
56469    fi
56470  fi
56471
56472  if test "x$FOUND_FREETYPE" = xyes; then
56473    # Include file found, let's continue the sanity check.
56474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56476
56477    # Reset to default value
56478    FREETYPE_BASE_NAME=freetype
56479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56481      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56483        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56484        # for the .6 version explicitly.
56485        FREETYPE_BASE_NAME=freetype.6
56486        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56487        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56488$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56489      else
56490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56492        FOUND_FREETYPE=no
56493      fi
56494    else
56495      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56496        # On Windows, we will need both .lib and .dll file.
56497        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56498          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56500          FOUND_FREETYPE=no
56501        fi
56502      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56504        # Found lib in isa dir, use that instead.
56505        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56506        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56507$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56508      fi
56509    fi
56510  fi
56511
56512  if test "x$FOUND_FREETYPE" = xyes; then
56513
56514  # Only process if variable expands to non-empty
56515
56516  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56518
56519  # Input might be given as Windows format, start by converting to
56520  # unix format.
56521  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56522  new_path=`$CYGPATH -u "$path"`
56523
56524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56527  # "foo.exe" is OK but "foo" is an error.
56528  #
56529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56530  # It is also a way to make sure we got the proper file name for the real test later on.
56531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56532  if test "x$test_shortpath" = x; then
56533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56535    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56536  fi
56537
56538  # Call helper function which possibly converts this using DOS-style short mode.
56539  # If so, the updated path is stored in $new_path.
56540
56541  input_path="$new_path"
56542  # Check if we need to convert this using DOS-style short mode. If the path
56543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56544  # take no chances and rewrite it.
56545  # Note: m4 eats our [], so we need to use [ and ] instead.
56546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56547  if test "x$has_forbidden_chars" != x; then
56548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56552      # Going to short mode and back again did indeed matter. Since short mode is
56553      # case insensitive, let's make it lowercase to improve readability.
56554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56555      # Now convert it back to Unix-style (cygpath)
56556      input_path=`$CYGPATH -u "$shortmode_path"`
56557      new_path="$input_path"
56558    fi
56559  fi
56560
56561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56562  if test "x$test_cygdrive_prefix" = x; then
56563    # As a simple fix, exclude /usr/bin since it's not a real path.
56564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56566      # a path prefixed by /cygdrive for fixpath to work.
56567      new_path="$CYGWIN_ROOT_PATH$input_path"
56568    fi
56569  fi
56570
56571
56572  if test "x$path" != "x$new_path"; then
56573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56576  fi
56577
56578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56579
56580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56581  has_colon=`$ECHO $path | $GREP ^.:`
56582  new_path="$path"
56583  if test "x$has_colon" = x; then
56584    # Not in mixed or Windows style, start by that.
56585    new_path=`cmd //c echo $path`
56586  fi
56587
56588
56589  input_path="$new_path"
56590  # Check if we need to convert this using DOS-style short mode. If the path
56591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56592  # take no chances and rewrite it.
56593  # Note: m4 eats our [], so we need to use [ and ] instead.
56594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56595  if test "x$has_forbidden_chars" != x; then
56596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56598  fi
56599
56600
56601  windows_path="$new_path"
56602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56603    unix_path=`$CYGPATH -u "$windows_path"`
56604    new_path="$unix_path"
56605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56607    new_path="$unix_path"
56608  fi
56609
56610  if test "x$path" != "x$new_path"; then
56611    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56614  fi
56615
56616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56618
56619    else
56620      # We're on a unix platform. Hooray! :)
56621      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56622      has_space=`$ECHO "$path" | $GREP " "`
56623      if test "x$has_space" != x; then
56624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56627      fi
56628
56629      # Use eval to expand a potential ~
56630      eval path="$path"
56631      if test ! -f "$path" && test ! -d "$path"; then
56632        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56633      fi
56634
56635      if test -d "$path"; then
56636        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56637      else
56638        dir="`$DIRNAME "$path"`"
56639        base="`$BASENAME "$path"`"
56640        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56641      fi
56642    fi
56643  fi
56644
56645
56646  # Only process if variable expands to non-empty
56647
56648  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56650
56651  # Input might be given as Windows format, start by converting to
56652  # unix format.
56653  path="$POTENTIAL_FREETYPE_LIB_PATH"
56654  new_path=`$CYGPATH -u "$path"`
56655
56656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56659  # "foo.exe" is OK but "foo" is an error.
56660  #
56661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56662  # It is also a way to make sure we got the proper file name for the real test later on.
56663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56664  if test "x$test_shortpath" = x; then
56665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56667    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56668  fi
56669
56670  # Call helper function which possibly converts this using DOS-style short mode.
56671  # If so, the updated path is stored in $new_path.
56672
56673  input_path="$new_path"
56674  # Check if we need to convert this using DOS-style short mode. If the path
56675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56676  # take no chances and rewrite it.
56677  # Note: m4 eats our [], so we need to use [ and ] instead.
56678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56679  if test "x$has_forbidden_chars" != x; then
56680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56684      # Going to short mode and back again did indeed matter. Since short mode is
56685      # case insensitive, let's make it lowercase to improve readability.
56686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56687      # Now convert it back to Unix-style (cygpath)
56688      input_path=`$CYGPATH -u "$shortmode_path"`
56689      new_path="$input_path"
56690    fi
56691  fi
56692
56693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56694  if test "x$test_cygdrive_prefix" = x; then
56695    # As a simple fix, exclude /usr/bin since it's not a real path.
56696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56698      # a path prefixed by /cygdrive for fixpath to work.
56699      new_path="$CYGWIN_ROOT_PATH$input_path"
56700    fi
56701  fi
56702
56703
56704  if test "x$path" != "x$new_path"; then
56705    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56708  fi
56709
56710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56711
56712  path="$POTENTIAL_FREETYPE_LIB_PATH"
56713  has_colon=`$ECHO $path | $GREP ^.:`
56714  new_path="$path"
56715  if test "x$has_colon" = x; then
56716    # Not in mixed or Windows style, start by that.
56717    new_path=`cmd //c echo $path`
56718  fi
56719
56720
56721  input_path="$new_path"
56722  # Check if we need to convert this using DOS-style short mode. If the path
56723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56724  # take no chances and rewrite it.
56725  # Note: m4 eats our [], so we need to use [ and ] instead.
56726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56727  if test "x$has_forbidden_chars" != x; then
56728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56730  fi
56731
56732
56733  windows_path="$new_path"
56734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56735    unix_path=`$CYGPATH -u "$windows_path"`
56736    new_path="$unix_path"
56737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56739    new_path="$unix_path"
56740  fi
56741
56742  if test "x$path" != "x$new_path"; then
56743    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56746  fi
56747
56748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56750
56751    else
56752      # We're on a unix platform. Hooray! :)
56753      path="$POTENTIAL_FREETYPE_LIB_PATH"
56754      has_space=`$ECHO "$path" | $GREP " "`
56755      if test "x$has_space" != x; then
56756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56759      fi
56760
56761      # Use eval to expand a potential ~
56762      eval path="$path"
56763      if test ! -f "$path" && test ! -d "$path"; then
56764        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56765      fi
56766
56767      if test -d "$path"; then
56768        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56769      else
56770        dir="`$DIRNAME "$path"`"
56771        base="`$BASENAME "$path"`"
56772        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56773      fi
56774    fi
56775  fi
56776
56777
56778    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56780$as_echo_n "checking for freetype includes... " >&6; }
56781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56782$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56783    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56785$as_echo_n "checking for freetype libraries... " >&6; }
56786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56787$as_echo "$FREETYPE_LIB_PATH" >&6; }
56788  fi
56789
56790
56791          if test "x$FOUND_FREETYPE" != xyes; then
56792            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
56793
56794  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56795  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56796  METHOD="well-known location"
56797
56798  # Let's start with an optimistic view of the world :-)
56799  FOUND_FREETYPE=yes
56800
56801  # First look for the canonical freetype main include file ft2build.h.
56802  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56803    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56804    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56805    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56806      # Fail.
56807      FOUND_FREETYPE=no
56808    fi
56809  fi
56810
56811  if test "x$FOUND_FREETYPE" = xyes; then
56812    # Include file found, let's continue the sanity check.
56813    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56814$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56815
56816    # Reset to default value
56817    FREETYPE_BASE_NAME=freetype
56818    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56819    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56820      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56821          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56822        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56823        # for the .6 version explicitly.
56824        FREETYPE_BASE_NAME=freetype.6
56825        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56826        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56827$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56828      else
56829        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56830$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56831        FOUND_FREETYPE=no
56832      fi
56833    else
56834      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56835        # On Windows, we will need both .lib and .dll file.
56836        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56837          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56838$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56839          FOUND_FREETYPE=no
56840        fi
56841      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56842          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56843        # Found lib in isa dir, use that instead.
56844        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56845        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56846$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56847      fi
56848    fi
56849  fi
56850
56851  if test "x$FOUND_FREETYPE" = xyes; then
56852
56853  # Only process if variable expands to non-empty
56854
56855  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56857
56858  # Input might be given as Windows format, start by converting to
56859  # unix format.
56860  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56861  new_path=`$CYGPATH -u "$path"`
56862
56863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56866  # "foo.exe" is OK but "foo" is an error.
56867  #
56868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56869  # It is also a way to make sure we got the proper file name for the real test later on.
56870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56871  if test "x$test_shortpath" = x; then
56872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56875  fi
56876
56877  # Call helper function which possibly converts this using DOS-style short mode.
56878  # If so, the updated path is stored in $new_path.
56879
56880  input_path="$new_path"
56881  # Check if we need to convert this using DOS-style short mode. If the path
56882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56883  # take no chances and rewrite it.
56884  # Note: m4 eats our [], so we need to use [ and ] instead.
56885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56886  if test "x$has_forbidden_chars" != x; then
56887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56891      # Going to short mode and back again did indeed matter. Since short mode is
56892      # case insensitive, let's make it lowercase to improve readability.
56893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56894      # Now convert it back to Unix-style (cygpath)
56895      input_path=`$CYGPATH -u "$shortmode_path"`
56896      new_path="$input_path"
56897    fi
56898  fi
56899
56900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56901  if test "x$test_cygdrive_prefix" = x; then
56902    # As a simple fix, exclude /usr/bin since it's not a real path.
56903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56905      # a path prefixed by /cygdrive for fixpath to work.
56906      new_path="$CYGWIN_ROOT_PATH$input_path"
56907    fi
56908  fi
56909
56910
56911  if test "x$path" != "x$new_path"; then
56912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56915  fi
56916
56917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56918
56919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56920  has_colon=`$ECHO $path | $GREP ^.:`
56921  new_path="$path"
56922  if test "x$has_colon" = x; then
56923    # Not in mixed or Windows style, start by that.
56924    new_path=`cmd //c echo $path`
56925  fi
56926
56927
56928  input_path="$new_path"
56929  # Check if we need to convert this using DOS-style short mode. If the path
56930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56931  # take no chances and rewrite it.
56932  # Note: m4 eats our [], so we need to use [ and ] instead.
56933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56934  if test "x$has_forbidden_chars" != x; then
56935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56937  fi
56938
56939
56940  windows_path="$new_path"
56941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56942    unix_path=`$CYGPATH -u "$windows_path"`
56943    new_path="$unix_path"
56944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56946    new_path="$unix_path"
56947  fi
56948
56949  if test "x$path" != "x$new_path"; then
56950    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56953  fi
56954
56955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56957
56958    else
56959      # We're on a unix platform. Hooray! :)
56960      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56961      has_space=`$ECHO "$path" | $GREP " "`
56962      if test "x$has_space" != x; then
56963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56966      fi
56967
56968      # Use eval to expand a potential ~
56969      eval path="$path"
56970      if test ! -f "$path" && test ! -d "$path"; then
56971        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56972      fi
56973
56974      if test -d "$path"; then
56975        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56976      else
56977        dir="`$DIRNAME "$path"`"
56978        base="`$BASENAME "$path"`"
56979        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56980      fi
56981    fi
56982  fi
56983
56984
56985  # Only process if variable expands to non-empty
56986
56987  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56989
56990  # Input might be given as Windows format, start by converting to
56991  # unix format.
56992  path="$POTENTIAL_FREETYPE_LIB_PATH"
56993  new_path=`$CYGPATH -u "$path"`
56994
56995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56998  # "foo.exe" is OK but "foo" is an error.
56999  #
57000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57001  # It is also a way to make sure we got the proper file name for the real test later on.
57002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57003  if test "x$test_shortpath" = x; then
57004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57005$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57006    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57007  fi
57008
57009  # Call helper function which possibly converts this using DOS-style short mode.
57010  # If so, the updated path is stored in $new_path.
57011
57012  input_path="$new_path"
57013  # Check if we need to convert this using DOS-style short mode. If the path
57014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57015  # take no chances and rewrite it.
57016  # Note: m4 eats our [], so we need to use [ and ] instead.
57017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57018  if test "x$has_forbidden_chars" != x; then
57019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57023      # Going to short mode and back again did indeed matter. Since short mode is
57024      # case insensitive, let's make it lowercase to improve readability.
57025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57026      # Now convert it back to Unix-style (cygpath)
57027      input_path=`$CYGPATH -u "$shortmode_path"`
57028      new_path="$input_path"
57029    fi
57030  fi
57031
57032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57033  if test "x$test_cygdrive_prefix" = x; then
57034    # As a simple fix, exclude /usr/bin since it's not a real path.
57035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57037      # a path prefixed by /cygdrive for fixpath to work.
57038      new_path="$CYGWIN_ROOT_PATH$input_path"
57039    fi
57040  fi
57041
57042
57043  if test "x$path" != "x$new_path"; then
57044    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57046$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57047  fi
57048
57049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57050
57051  path="$POTENTIAL_FREETYPE_LIB_PATH"
57052  has_colon=`$ECHO $path | $GREP ^.:`
57053  new_path="$path"
57054  if test "x$has_colon" = x; then
57055    # Not in mixed or Windows style, start by that.
57056    new_path=`cmd //c echo $path`
57057  fi
57058
57059
57060  input_path="$new_path"
57061  # Check if we need to convert this using DOS-style short mode. If the path
57062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57063  # take no chances and rewrite it.
57064  # Note: m4 eats our [], so we need to use [ and ] instead.
57065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57066  if test "x$has_forbidden_chars" != x; then
57067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57069  fi
57070
57071
57072  windows_path="$new_path"
57073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57074    unix_path=`$CYGPATH -u "$windows_path"`
57075    new_path="$unix_path"
57076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57078    new_path="$unix_path"
57079  fi
57080
57081  if test "x$path" != "x$new_path"; then
57082    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57085  fi
57086
57087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57089
57090    else
57091      # We're on a unix platform. Hooray! :)
57092      path="$POTENTIAL_FREETYPE_LIB_PATH"
57093      has_space=`$ECHO "$path" | $GREP " "`
57094      if test "x$has_space" != x; then
57095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57098      fi
57099
57100      # Use eval to expand a potential ~
57101      eval path="$path"
57102      if test ! -f "$path" && test ! -d "$path"; then
57103        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57104      fi
57105
57106      if test -d "$path"; then
57107        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57108      else
57109        dir="`$DIRNAME "$path"`"
57110        base="`$BASENAME "$path"`"
57111        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57112      fi
57113    fi
57114  fi
57115
57116
57117    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57119$as_echo_n "checking for freetype includes... " >&6; }
57120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57121$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57122    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57124$as_echo_n "checking for freetype libraries... " >&6; }
57125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57126$as_echo "$FREETYPE_LIB_PATH" >&6; }
57127  fi
57128
57129          fi
57130
57131          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
57132            if test "x$FOUND_FREETYPE" != xyes; then
57133              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
57134              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
57135
57136  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57137  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57138  METHOD="well-known location"
57139
57140  # Let's start with an optimistic view of the world :-)
57141  FOUND_FREETYPE=yes
57142
57143  # First look for the canonical freetype main include file ft2build.h.
57144  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57145    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57146    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57147    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57148      # Fail.
57149      FOUND_FREETYPE=no
57150    fi
57151  fi
57152
57153  if test "x$FOUND_FREETYPE" = xyes; then
57154    # Include file found, let's continue the sanity check.
57155    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57156$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57157
57158    # Reset to default value
57159    FREETYPE_BASE_NAME=freetype
57160    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57161    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57162      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57163          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57164        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57165        # for the .6 version explicitly.
57166        FREETYPE_BASE_NAME=freetype.6
57167        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57168        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57169$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57170      else
57171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57172$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57173        FOUND_FREETYPE=no
57174      fi
57175    else
57176      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57177        # On Windows, we will need both .lib and .dll file.
57178        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57179          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57180$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57181          FOUND_FREETYPE=no
57182        fi
57183      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57184          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57185        # Found lib in isa dir, use that instead.
57186        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57187        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57188$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57189      fi
57190    fi
57191  fi
57192
57193  if test "x$FOUND_FREETYPE" = xyes; then
57194
57195  # Only process if variable expands to non-empty
57196
57197  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57199
57200  # Input might be given as Windows format, start by converting to
57201  # unix format.
57202  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57203  new_path=`$CYGPATH -u "$path"`
57204
57205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57208  # "foo.exe" is OK but "foo" is an error.
57209  #
57210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57211  # It is also a way to make sure we got the proper file name for the real test later on.
57212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57213  if test "x$test_shortpath" = x; then
57214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57217  fi
57218
57219  # Call helper function which possibly converts this using DOS-style short mode.
57220  # If so, the updated path is stored in $new_path.
57221
57222  input_path="$new_path"
57223  # Check if we need to convert this using DOS-style short mode. If the path
57224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57225  # take no chances and rewrite it.
57226  # Note: m4 eats our [], so we need to use [ and ] instead.
57227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57228  if test "x$has_forbidden_chars" != x; then
57229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57233      # Going to short mode and back again did indeed matter. Since short mode is
57234      # case insensitive, let's make it lowercase to improve readability.
57235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57236      # Now convert it back to Unix-style (cygpath)
57237      input_path=`$CYGPATH -u "$shortmode_path"`
57238      new_path="$input_path"
57239    fi
57240  fi
57241
57242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57243  if test "x$test_cygdrive_prefix" = x; then
57244    # As a simple fix, exclude /usr/bin since it's not a real path.
57245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57247      # a path prefixed by /cygdrive for fixpath to work.
57248      new_path="$CYGWIN_ROOT_PATH$input_path"
57249    fi
57250  fi
57251
57252
57253  if test "x$path" != "x$new_path"; then
57254    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57257  fi
57258
57259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57260
57261  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57262  has_colon=`$ECHO $path | $GREP ^.:`
57263  new_path="$path"
57264  if test "x$has_colon" = x; then
57265    # Not in mixed or Windows style, start by that.
57266    new_path=`cmd //c echo $path`
57267  fi
57268
57269
57270  input_path="$new_path"
57271  # Check if we need to convert this using DOS-style short mode. If the path
57272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57273  # take no chances and rewrite it.
57274  # Note: m4 eats our [], so we need to use [ and ] instead.
57275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57276  if test "x$has_forbidden_chars" != x; then
57277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57279  fi
57280
57281
57282  windows_path="$new_path"
57283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57284    unix_path=`$CYGPATH -u "$windows_path"`
57285    new_path="$unix_path"
57286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57288    new_path="$unix_path"
57289  fi
57290
57291  if test "x$path" != "x$new_path"; then
57292    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57295  fi
57296
57297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57299
57300    else
57301      # We're on a unix platform. Hooray! :)
57302      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57303      has_space=`$ECHO "$path" | $GREP " "`
57304      if test "x$has_space" != x; then
57305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57308      fi
57309
57310      # Use eval to expand a potential ~
57311      eval path="$path"
57312      if test ! -f "$path" && test ! -d "$path"; then
57313        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57314      fi
57315
57316      if test -d "$path"; then
57317        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57318      else
57319        dir="`$DIRNAME "$path"`"
57320        base="`$BASENAME "$path"`"
57321        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57322      fi
57323    fi
57324  fi
57325
57326
57327  # Only process if variable expands to non-empty
57328
57329  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57331
57332  # Input might be given as Windows format, start by converting to
57333  # unix format.
57334  path="$POTENTIAL_FREETYPE_LIB_PATH"
57335  new_path=`$CYGPATH -u "$path"`
57336
57337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57340  # "foo.exe" is OK but "foo" is an error.
57341  #
57342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57343  # It is also a way to make sure we got the proper file name for the real test later on.
57344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57345  if test "x$test_shortpath" = x; then
57346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57347$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57348    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57349  fi
57350
57351  # Call helper function which possibly converts this using DOS-style short mode.
57352  # If so, the updated path is stored in $new_path.
57353
57354  input_path="$new_path"
57355  # Check if we need to convert this using DOS-style short mode. If the path
57356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57357  # take no chances and rewrite it.
57358  # Note: m4 eats our [], so we need to use [ and ] instead.
57359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57360  if test "x$has_forbidden_chars" != x; then
57361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57365      # Going to short mode and back again did indeed matter. Since short mode is
57366      # case insensitive, let's make it lowercase to improve readability.
57367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57368      # Now convert it back to Unix-style (cygpath)
57369      input_path=`$CYGPATH -u "$shortmode_path"`
57370      new_path="$input_path"
57371    fi
57372  fi
57373
57374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57375  if test "x$test_cygdrive_prefix" = x; then
57376    # As a simple fix, exclude /usr/bin since it's not a real path.
57377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57379      # a path prefixed by /cygdrive for fixpath to work.
57380      new_path="$CYGWIN_ROOT_PATH$input_path"
57381    fi
57382  fi
57383
57384
57385  if test "x$path" != "x$new_path"; then
57386    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57389  fi
57390
57391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57392
57393  path="$POTENTIAL_FREETYPE_LIB_PATH"
57394  has_colon=`$ECHO $path | $GREP ^.:`
57395  new_path="$path"
57396  if test "x$has_colon" = x; then
57397    # Not in mixed or Windows style, start by that.
57398    new_path=`cmd //c echo $path`
57399  fi
57400
57401
57402  input_path="$new_path"
57403  # Check if we need to convert this using DOS-style short mode. If the path
57404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57405  # take no chances and rewrite it.
57406  # Note: m4 eats our [], so we need to use [ and ] instead.
57407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57408  if test "x$has_forbidden_chars" != x; then
57409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57411  fi
57412
57413
57414  windows_path="$new_path"
57415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57416    unix_path=`$CYGPATH -u "$windows_path"`
57417    new_path="$unix_path"
57418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57420    new_path="$unix_path"
57421  fi
57422
57423  if test "x$path" != "x$new_path"; then
57424    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57426$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57427  fi
57428
57429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57431
57432    else
57433      # We're on a unix platform. Hooray! :)
57434      path="$POTENTIAL_FREETYPE_LIB_PATH"
57435      has_space=`$ECHO "$path" | $GREP " "`
57436      if test "x$has_space" != x; then
57437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57438$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57440      fi
57441
57442      # Use eval to expand a potential ~
57443      eval path="$path"
57444      if test ! -f "$path" && test ! -d "$path"; then
57445        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57446      fi
57447
57448      if test -d "$path"; then
57449        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57450      else
57451        dir="`$DIRNAME "$path"`"
57452        base="`$BASENAME "$path"`"
57453        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57454      fi
57455    fi
57456  fi
57457
57458
57459    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57461$as_echo_n "checking for freetype includes... " >&6; }
57462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57463$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57464    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57466$as_echo_n "checking for freetype libraries... " >&6; }
57467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57468$as_echo "$FREETYPE_LIB_PATH" >&6; }
57469  fi
57470
57471            fi
57472          fi
57473
57474          if test "x$FOUND_FREETYPE" != xyes; then
57475            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
57476
57477  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57478  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57479  METHOD="well-known location"
57480
57481  # Let's start with an optimistic view of the world :-)
57482  FOUND_FREETYPE=yes
57483
57484  # First look for the canonical freetype main include file ft2build.h.
57485  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57486    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57487    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57488    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57489      # Fail.
57490      FOUND_FREETYPE=no
57491    fi
57492  fi
57493
57494  if test "x$FOUND_FREETYPE" = xyes; then
57495    # Include file found, let's continue the sanity check.
57496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57497$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57498
57499    # Reset to default value
57500    FREETYPE_BASE_NAME=freetype
57501    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57502    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57503      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57504          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57505        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57506        # for the .6 version explicitly.
57507        FREETYPE_BASE_NAME=freetype.6
57508        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57509        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57510$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57511      else
57512        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57513$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57514        FOUND_FREETYPE=no
57515      fi
57516    else
57517      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57518        # On Windows, we will need both .lib and .dll file.
57519        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57520          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57521$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57522          FOUND_FREETYPE=no
57523        fi
57524      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57525          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57526        # Found lib in isa dir, use that instead.
57527        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57528        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57529$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57530      fi
57531    fi
57532  fi
57533
57534  if test "x$FOUND_FREETYPE" = xyes; then
57535
57536  # Only process if variable expands to non-empty
57537
57538  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57540
57541  # Input might be given as Windows format, start by converting to
57542  # unix format.
57543  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57544  new_path=`$CYGPATH -u "$path"`
57545
57546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57549  # "foo.exe" is OK but "foo" is an error.
57550  #
57551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57552  # It is also a way to make sure we got the proper file name for the real test later on.
57553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57554  if test "x$test_shortpath" = x; then
57555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57557    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57558  fi
57559
57560  # Call helper function which possibly converts this using DOS-style short mode.
57561  # If so, the updated path is stored in $new_path.
57562
57563  input_path="$new_path"
57564  # Check if we need to convert this using DOS-style short mode. If the path
57565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57566  # take no chances and rewrite it.
57567  # Note: m4 eats our [], so we need to use [ and ] instead.
57568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57569  if test "x$has_forbidden_chars" != x; then
57570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57574      # Going to short mode and back again did indeed matter. Since short mode is
57575      # case insensitive, let's make it lowercase to improve readability.
57576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57577      # Now convert it back to Unix-style (cygpath)
57578      input_path=`$CYGPATH -u "$shortmode_path"`
57579      new_path="$input_path"
57580    fi
57581  fi
57582
57583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57584  if test "x$test_cygdrive_prefix" = x; then
57585    # As a simple fix, exclude /usr/bin since it's not a real path.
57586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57588      # a path prefixed by /cygdrive for fixpath to work.
57589      new_path="$CYGWIN_ROOT_PATH$input_path"
57590    fi
57591  fi
57592
57593
57594  if test "x$path" != "x$new_path"; then
57595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57598  fi
57599
57600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57601
57602  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57603  has_colon=`$ECHO $path | $GREP ^.:`
57604  new_path="$path"
57605  if test "x$has_colon" = x; then
57606    # Not in mixed or Windows style, start by that.
57607    new_path=`cmd //c echo $path`
57608  fi
57609
57610
57611  input_path="$new_path"
57612  # Check if we need to convert this using DOS-style short mode. If the path
57613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57614  # take no chances and rewrite it.
57615  # Note: m4 eats our [], so we need to use [ and ] instead.
57616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57617  if test "x$has_forbidden_chars" != x; then
57618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57620  fi
57621
57622
57623  windows_path="$new_path"
57624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57625    unix_path=`$CYGPATH -u "$windows_path"`
57626    new_path="$unix_path"
57627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57629    new_path="$unix_path"
57630  fi
57631
57632  if test "x$path" != "x$new_path"; then
57633    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57636  fi
57637
57638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57640
57641    else
57642      # We're on a unix platform. Hooray! :)
57643      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57644      has_space=`$ECHO "$path" | $GREP " "`
57645      if test "x$has_space" != x; then
57646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57649      fi
57650
57651      # Use eval to expand a potential ~
57652      eval path="$path"
57653      if test ! -f "$path" && test ! -d "$path"; then
57654        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57655      fi
57656
57657      if test -d "$path"; then
57658        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57659      else
57660        dir="`$DIRNAME "$path"`"
57661        base="`$BASENAME "$path"`"
57662        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57663      fi
57664    fi
57665  fi
57666
57667
57668  # Only process if variable expands to non-empty
57669
57670  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57672
57673  # Input might be given as Windows format, start by converting to
57674  # unix format.
57675  path="$POTENTIAL_FREETYPE_LIB_PATH"
57676  new_path=`$CYGPATH -u "$path"`
57677
57678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57681  # "foo.exe" is OK but "foo" is an error.
57682  #
57683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57684  # It is also a way to make sure we got the proper file name for the real test later on.
57685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57686  if test "x$test_shortpath" = x; then
57687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57689    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57690  fi
57691
57692  # Call helper function which possibly converts this using DOS-style short mode.
57693  # If so, the updated path is stored in $new_path.
57694
57695  input_path="$new_path"
57696  # Check if we need to convert this using DOS-style short mode. If the path
57697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57698  # take no chances and rewrite it.
57699  # Note: m4 eats our [], so we need to use [ and ] instead.
57700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57701  if test "x$has_forbidden_chars" != x; then
57702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57706      # Going to short mode and back again did indeed matter. Since short mode is
57707      # case insensitive, let's make it lowercase to improve readability.
57708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57709      # Now convert it back to Unix-style (cygpath)
57710      input_path=`$CYGPATH -u "$shortmode_path"`
57711      new_path="$input_path"
57712    fi
57713  fi
57714
57715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57716  if test "x$test_cygdrive_prefix" = x; then
57717    # As a simple fix, exclude /usr/bin since it's not a real path.
57718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57720      # a path prefixed by /cygdrive for fixpath to work.
57721      new_path="$CYGWIN_ROOT_PATH$input_path"
57722    fi
57723  fi
57724
57725
57726  if test "x$path" != "x$new_path"; then
57727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57730  fi
57731
57732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57733
57734  path="$POTENTIAL_FREETYPE_LIB_PATH"
57735  has_colon=`$ECHO $path | $GREP ^.:`
57736  new_path="$path"
57737  if test "x$has_colon" = x; then
57738    # Not in mixed or Windows style, start by that.
57739    new_path=`cmd //c echo $path`
57740  fi
57741
57742
57743  input_path="$new_path"
57744  # Check if we need to convert this using DOS-style short mode. If the path
57745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57746  # take no chances and rewrite it.
57747  # Note: m4 eats our [], so we need to use [ and ] instead.
57748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57749  if test "x$has_forbidden_chars" != x; then
57750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57752  fi
57753
57754
57755  windows_path="$new_path"
57756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57757    unix_path=`$CYGPATH -u "$windows_path"`
57758    new_path="$unix_path"
57759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57761    new_path="$unix_path"
57762  fi
57763
57764  if test "x$path" != "x$new_path"; then
57765    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57768  fi
57769
57770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57772
57773    else
57774      # We're on a unix platform. Hooray! :)
57775      path="$POTENTIAL_FREETYPE_LIB_PATH"
57776      has_space=`$ECHO "$path" | $GREP " "`
57777      if test "x$has_space" != x; then
57778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57781      fi
57782
57783      # Use eval to expand a potential ~
57784      eval path="$path"
57785      if test ! -f "$path" && test ! -d "$path"; then
57786        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57787      fi
57788
57789      if test -d "$path"; then
57790        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57791      else
57792        dir="`$DIRNAME "$path"`"
57793        base="`$BASENAME "$path"`"
57794        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57795      fi
57796    fi
57797  fi
57798
57799
57800    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57802$as_echo_n "checking for freetype includes... " >&6; }
57803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57804$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57805    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57807$as_echo_n "checking for freetype libraries... " >&6; }
57808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57809$as_echo "$FREETYPE_LIB_PATH" >&6; }
57810  fi
57811
57812          fi
57813
57814          if test "x$FOUND_FREETYPE" != xyes; then
57815            FREETYPE_BASE_DIR="$SYSROOT/usr"
57816            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57817
57818  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57819  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
57820  METHOD="well-known location"
57821
57822  # Let's start with an optimistic view of the world :-)
57823  FOUND_FREETYPE=yes
57824
57825  # First look for the canonical freetype main include file ft2build.h.
57826  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57827    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57828    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57829    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57830      # Fail.
57831      FOUND_FREETYPE=no
57832    fi
57833  fi
57834
57835  if test "x$FOUND_FREETYPE" = xyes; then
57836    # Include file found, let's continue the sanity check.
57837    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57838$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57839
57840    # Reset to default value
57841    FREETYPE_BASE_NAME=freetype
57842    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57843    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57844      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57845          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57846        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57847        # for the .6 version explicitly.
57848        FREETYPE_BASE_NAME=freetype.6
57849        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57850        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57851$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57852      else
57853        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57854$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57855        FOUND_FREETYPE=no
57856      fi
57857    else
57858      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57859        # On Windows, we will need both .lib and .dll file.
57860        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57861          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57863          FOUND_FREETYPE=no
57864        fi
57865      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57866          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57867        # Found lib in isa dir, use that instead.
57868        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57869        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57870$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57871      fi
57872    fi
57873  fi
57874
57875  if test "x$FOUND_FREETYPE" = xyes; then
57876
57877  # Only process if variable expands to non-empty
57878
57879  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57881
57882  # Input might be given as Windows format, start by converting to
57883  # unix format.
57884  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57885  new_path=`$CYGPATH -u "$path"`
57886
57887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57890  # "foo.exe" is OK but "foo" is an error.
57891  #
57892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57893  # It is also a way to make sure we got the proper file name for the real test later on.
57894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57895  if test "x$test_shortpath" = x; then
57896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57898    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57899  fi
57900
57901  # Call helper function which possibly converts this using DOS-style short mode.
57902  # If so, the updated path is stored in $new_path.
57903
57904  input_path="$new_path"
57905  # Check if we need to convert this using DOS-style short mode. If the path
57906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57907  # take no chances and rewrite it.
57908  # Note: m4 eats our [], so we need to use [ and ] instead.
57909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57910  if test "x$has_forbidden_chars" != x; then
57911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57915      # Going to short mode and back again did indeed matter. Since short mode is
57916      # case insensitive, let's make it lowercase to improve readability.
57917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57918      # Now convert it back to Unix-style (cygpath)
57919      input_path=`$CYGPATH -u "$shortmode_path"`
57920      new_path="$input_path"
57921    fi
57922  fi
57923
57924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57925  if test "x$test_cygdrive_prefix" = x; then
57926    # As a simple fix, exclude /usr/bin since it's not a real path.
57927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57929      # a path prefixed by /cygdrive for fixpath to work.
57930      new_path="$CYGWIN_ROOT_PATH$input_path"
57931    fi
57932  fi
57933
57934
57935  if test "x$path" != "x$new_path"; then
57936    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57939  fi
57940
57941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57942
57943  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57944  has_colon=`$ECHO $path | $GREP ^.:`
57945  new_path="$path"
57946  if test "x$has_colon" = x; then
57947    # Not in mixed or Windows style, start by that.
57948    new_path=`cmd //c echo $path`
57949  fi
57950
57951
57952  input_path="$new_path"
57953  # Check if we need to convert this using DOS-style short mode. If the path
57954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57955  # take no chances and rewrite it.
57956  # Note: m4 eats our [], so we need to use [ and ] instead.
57957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57958  if test "x$has_forbidden_chars" != x; then
57959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57961  fi
57962
57963
57964  windows_path="$new_path"
57965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57966    unix_path=`$CYGPATH -u "$windows_path"`
57967    new_path="$unix_path"
57968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57970    new_path="$unix_path"
57971  fi
57972
57973  if test "x$path" != "x$new_path"; then
57974    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57977  fi
57978
57979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57981
57982    else
57983      # We're on a unix platform. Hooray! :)
57984      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57985      has_space=`$ECHO "$path" | $GREP " "`
57986      if test "x$has_space" != x; then
57987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57990      fi
57991
57992      # Use eval to expand a potential ~
57993      eval path="$path"
57994      if test ! -f "$path" && test ! -d "$path"; then
57995        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57996      fi
57997
57998      if test -d "$path"; then
57999        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58000      else
58001        dir="`$DIRNAME "$path"`"
58002        base="`$BASENAME "$path"`"
58003        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58004      fi
58005    fi
58006  fi
58007
58008
58009  # Only process if variable expands to non-empty
58010
58011  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58013
58014  # Input might be given as Windows format, start by converting to
58015  # unix format.
58016  path="$POTENTIAL_FREETYPE_LIB_PATH"
58017  new_path=`$CYGPATH -u "$path"`
58018
58019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58022  # "foo.exe" is OK but "foo" is an error.
58023  #
58024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58025  # It is also a way to make sure we got the proper file name for the real test later on.
58026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58027  if test "x$test_shortpath" = x; then
58028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58030    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58031  fi
58032
58033  # Call helper function which possibly converts this using DOS-style short mode.
58034  # If so, the updated path is stored in $new_path.
58035
58036  input_path="$new_path"
58037  # Check if we need to convert this using DOS-style short mode. If the path
58038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58039  # take no chances and rewrite it.
58040  # Note: m4 eats our [], so we need to use [ and ] instead.
58041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58042  if test "x$has_forbidden_chars" != x; then
58043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58047      # Going to short mode and back again did indeed matter. Since short mode is
58048      # case insensitive, let's make it lowercase to improve readability.
58049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58050      # Now convert it back to Unix-style (cygpath)
58051      input_path=`$CYGPATH -u "$shortmode_path"`
58052      new_path="$input_path"
58053    fi
58054  fi
58055
58056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58057  if test "x$test_cygdrive_prefix" = x; then
58058    # As a simple fix, exclude /usr/bin since it's not a real path.
58059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58061      # a path prefixed by /cygdrive for fixpath to work.
58062      new_path="$CYGWIN_ROOT_PATH$input_path"
58063    fi
58064  fi
58065
58066
58067  if test "x$path" != "x$new_path"; then
58068    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58070$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58071  fi
58072
58073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58074
58075  path="$POTENTIAL_FREETYPE_LIB_PATH"
58076  has_colon=`$ECHO $path | $GREP ^.:`
58077  new_path="$path"
58078  if test "x$has_colon" = x; then
58079    # Not in mixed or Windows style, start by that.
58080    new_path=`cmd //c echo $path`
58081  fi
58082
58083
58084  input_path="$new_path"
58085  # Check if we need to convert this using DOS-style short mode. If the path
58086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58087  # take no chances and rewrite it.
58088  # Note: m4 eats our [], so we need to use [ and ] instead.
58089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58090  if test "x$has_forbidden_chars" != x; then
58091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58093  fi
58094
58095
58096  windows_path="$new_path"
58097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58098    unix_path=`$CYGPATH -u "$windows_path"`
58099    new_path="$unix_path"
58100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58102    new_path="$unix_path"
58103  fi
58104
58105  if test "x$path" != "x$new_path"; then
58106    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58108$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58109  fi
58110
58111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58113
58114    else
58115      # We're on a unix platform. Hooray! :)
58116      path="$POTENTIAL_FREETYPE_LIB_PATH"
58117      has_space=`$ECHO "$path" | $GREP " "`
58118      if test "x$has_space" != x; then
58119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58120$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58122      fi
58123
58124      # Use eval to expand a potential ~
58125      eval path="$path"
58126      if test ! -f "$path" && test ! -d "$path"; then
58127        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58128      fi
58129
58130      if test -d "$path"; then
58131        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58132      else
58133        dir="`$DIRNAME "$path"`"
58134        base="`$BASENAME "$path"`"
58135        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58136      fi
58137    fi
58138  fi
58139
58140
58141    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58143$as_echo_n "checking for freetype includes... " >&6; }
58144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58145$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58146    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58148$as_echo_n "checking for freetype libraries... " >&6; }
58149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58150$as_echo "$FREETYPE_LIB_PATH" >&6; }
58151  fi
58152
58153            else
58154
58155  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58156  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
58157  METHOD="well-known location"
58158
58159  # Let's start with an optimistic view of the world :-)
58160  FOUND_FREETYPE=yes
58161
58162  # First look for the canonical freetype main include file ft2build.h.
58163  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58164    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58165    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58166    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58167      # Fail.
58168      FOUND_FREETYPE=no
58169    fi
58170  fi
58171
58172  if test "x$FOUND_FREETYPE" = xyes; then
58173    # Include file found, let's continue the sanity check.
58174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58175$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58176
58177    # Reset to default value
58178    FREETYPE_BASE_NAME=freetype
58179    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58180    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58181      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58183        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58184        # for the .6 version explicitly.
58185        FREETYPE_BASE_NAME=freetype.6
58186        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58187        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58188$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58189      else
58190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58192        FOUND_FREETYPE=no
58193      fi
58194    else
58195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58196        # On Windows, we will need both .lib and .dll file.
58197        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58200          FOUND_FREETYPE=no
58201        fi
58202      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58204        # Found lib in isa dir, use that instead.
58205        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58206        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58207$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58208      fi
58209    fi
58210  fi
58211
58212  if test "x$FOUND_FREETYPE" = xyes; then
58213
58214  # Only process if variable expands to non-empty
58215
58216  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58218
58219  # Input might be given as Windows format, start by converting to
58220  # unix format.
58221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58222  new_path=`$CYGPATH -u "$path"`
58223
58224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58227  # "foo.exe" is OK but "foo" is an error.
58228  #
58229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58230  # It is also a way to make sure we got the proper file name for the real test later on.
58231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58232  if test "x$test_shortpath" = x; then
58233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58236  fi
58237
58238  # Call helper function which possibly converts this using DOS-style short mode.
58239  # If so, the updated path is stored in $new_path.
58240
58241  input_path="$new_path"
58242  # Check if we need to convert this using DOS-style short mode. If the path
58243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58244  # take no chances and rewrite it.
58245  # Note: m4 eats our [], so we need to use [ and ] instead.
58246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58247  if test "x$has_forbidden_chars" != x; then
58248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58252      # Going to short mode and back again did indeed matter. Since short mode is
58253      # case insensitive, let's make it lowercase to improve readability.
58254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58255      # Now convert it back to Unix-style (cygpath)
58256      input_path=`$CYGPATH -u "$shortmode_path"`
58257      new_path="$input_path"
58258    fi
58259  fi
58260
58261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58262  if test "x$test_cygdrive_prefix" = x; then
58263    # As a simple fix, exclude /usr/bin since it's not a real path.
58264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58266      # a path prefixed by /cygdrive for fixpath to work.
58267      new_path="$CYGWIN_ROOT_PATH$input_path"
58268    fi
58269  fi
58270
58271
58272  if test "x$path" != "x$new_path"; then
58273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58276  fi
58277
58278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58279
58280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58281  has_colon=`$ECHO $path | $GREP ^.:`
58282  new_path="$path"
58283  if test "x$has_colon" = x; then
58284    # Not in mixed or Windows style, start by that.
58285    new_path=`cmd //c echo $path`
58286  fi
58287
58288
58289  input_path="$new_path"
58290  # Check if we need to convert this using DOS-style short mode. If the path
58291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58292  # take no chances and rewrite it.
58293  # Note: m4 eats our [], so we need to use [ and ] instead.
58294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58295  if test "x$has_forbidden_chars" != x; then
58296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58298  fi
58299
58300
58301  windows_path="$new_path"
58302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58303    unix_path=`$CYGPATH -u "$windows_path"`
58304    new_path="$unix_path"
58305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58307    new_path="$unix_path"
58308  fi
58309
58310  if test "x$path" != "x$new_path"; then
58311    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58314  fi
58315
58316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58318
58319    else
58320      # We're on a unix platform. Hooray! :)
58321      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58322      has_space=`$ECHO "$path" | $GREP " "`
58323      if test "x$has_space" != x; then
58324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58327      fi
58328
58329      # Use eval to expand a potential ~
58330      eval path="$path"
58331      if test ! -f "$path" && test ! -d "$path"; then
58332        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58333      fi
58334
58335      if test -d "$path"; then
58336        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58337      else
58338        dir="`$DIRNAME "$path"`"
58339        base="`$BASENAME "$path"`"
58340        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58341      fi
58342    fi
58343  fi
58344
58345
58346  # Only process if variable expands to non-empty
58347
58348  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58350
58351  # Input might be given as Windows format, start by converting to
58352  # unix format.
58353  path="$POTENTIAL_FREETYPE_LIB_PATH"
58354  new_path=`$CYGPATH -u "$path"`
58355
58356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58359  # "foo.exe" is OK but "foo" is an error.
58360  #
58361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58362  # It is also a way to make sure we got the proper file name for the real test later on.
58363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58364  if test "x$test_shortpath" = x; then
58365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58367    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58368  fi
58369
58370  # Call helper function which possibly converts this using DOS-style short mode.
58371  # If so, the updated path is stored in $new_path.
58372
58373  input_path="$new_path"
58374  # Check if we need to convert this using DOS-style short mode. If the path
58375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58376  # take no chances and rewrite it.
58377  # Note: m4 eats our [], so we need to use [ and ] instead.
58378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58379  if test "x$has_forbidden_chars" != x; then
58380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58384      # Going to short mode and back again did indeed matter. Since short mode is
58385      # case insensitive, let's make it lowercase to improve readability.
58386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58387      # Now convert it back to Unix-style (cygpath)
58388      input_path=`$CYGPATH -u "$shortmode_path"`
58389      new_path="$input_path"
58390    fi
58391  fi
58392
58393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58394  if test "x$test_cygdrive_prefix" = x; then
58395    # As a simple fix, exclude /usr/bin since it's not a real path.
58396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58398      # a path prefixed by /cygdrive for fixpath to work.
58399      new_path="$CYGWIN_ROOT_PATH$input_path"
58400    fi
58401  fi
58402
58403
58404  if test "x$path" != "x$new_path"; then
58405    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58408  fi
58409
58410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58411
58412  path="$POTENTIAL_FREETYPE_LIB_PATH"
58413  has_colon=`$ECHO $path | $GREP ^.:`
58414  new_path="$path"
58415  if test "x$has_colon" = x; then
58416    # Not in mixed or Windows style, start by that.
58417    new_path=`cmd //c echo $path`
58418  fi
58419
58420
58421  input_path="$new_path"
58422  # Check if we need to convert this using DOS-style short mode. If the path
58423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58424  # take no chances and rewrite it.
58425  # Note: m4 eats our [], so we need to use [ and ] instead.
58426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58427  if test "x$has_forbidden_chars" != x; then
58428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58430  fi
58431
58432
58433  windows_path="$new_path"
58434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58435    unix_path=`$CYGPATH -u "$windows_path"`
58436    new_path="$unix_path"
58437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58439    new_path="$unix_path"
58440  fi
58441
58442  if test "x$path" != "x$new_path"; then
58443    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58446  fi
58447
58448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58450
58451    else
58452      # We're on a unix platform. Hooray! :)
58453      path="$POTENTIAL_FREETYPE_LIB_PATH"
58454      has_space=`$ECHO "$path" | $GREP " "`
58455      if test "x$has_space" != x; then
58456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58459      fi
58460
58461      # Use eval to expand a potential ~
58462      eval path="$path"
58463      if test ! -f "$path" && test ! -d "$path"; then
58464        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58465      fi
58466
58467      if test -d "$path"; then
58468        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58469      else
58470        dir="`$DIRNAME "$path"`"
58471        base="`$BASENAME "$path"`"
58472        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58473      fi
58474    fi
58475  fi
58476
58477
58478    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58480$as_echo_n "checking for freetype includes... " >&6; }
58481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58482$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58483    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58485$as_echo_n "checking for freetype libraries... " >&6; }
58486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58487$as_echo "$FREETYPE_LIB_PATH" >&6; }
58488  fi
58489
58490              if test "x$FOUND_FREETYPE" != xyes; then
58491
58492  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58493  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58494  METHOD="well-known location"
58495
58496  # Let's start with an optimistic view of the world :-)
58497  FOUND_FREETYPE=yes
58498
58499  # First look for the canonical freetype main include file ft2build.h.
58500  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58501    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58502    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58503    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58504      # Fail.
58505      FOUND_FREETYPE=no
58506    fi
58507  fi
58508
58509  if test "x$FOUND_FREETYPE" = xyes; then
58510    # Include file found, let's continue the sanity check.
58511    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58512$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58513
58514    # Reset to default value
58515    FREETYPE_BASE_NAME=freetype
58516    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58517    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58518      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58519          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58520        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58521        # for the .6 version explicitly.
58522        FREETYPE_BASE_NAME=freetype.6
58523        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58524        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58525$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58526      else
58527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58528$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58529        FOUND_FREETYPE=no
58530      fi
58531    else
58532      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58533        # On Windows, we will need both .lib and .dll file.
58534        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58535          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58536$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58537          FOUND_FREETYPE=no
58538        fi
58539      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58540          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58541        # Found lib in isa dir, use that instead.
58542        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58543        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58544$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58545      fi
58546    fi
58547  fi
58548
58549  if test "x$FOUND_FREETYPE" = xyes; then
58550
58551  # Only process if variable expands to non-empty
58552
58553  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58555
58556  # Input might be given as Windows format, start by converting to
58557  # unix format.
58558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58559  new_path=`$CYGPATH -u "$path"`
58560
58561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58564  # "foo.exe" is OK but "foo" is an error.
58565  #
58566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58567  # It is also a way to make sure we got the proper file name for the real test later on.
58568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58569  if test "x$test_shortpath" = x; then
58570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58571$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58572    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58573  fi
58574
58575  # Call helper function which possibly converts this using DOS-style short mode.
58576  # If so, the updated path is stored in $new_path.
58577
58578  input_path="$new_path"
58579  # Check if we need to convert this using DOS-style short mode. If the path
58580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58581  # take no chances and rewrite it.
58582  # Note: m4 eats our [], so we need to use [ and ] instead.
58583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58584  if test "x$has_forbidden_chars" != x; then
58585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58589      # Going to short mode and back again did indeed matter. Since short mode is
58590      # case insensitive, let's make it lowercase to improve readability.
58591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58592      # Now convert it back to Unix-style (cygpath)
58593      input_path=`$CYGPATH -u "$shortmode_path"`
58594      new_path="$input_path"
58595    fi
58596  fi
58597
58598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58599  if test "x$test_cygdrive_prefix" = x; then
58600    # As a simple fix, exclude /usr/bin since it's not a real path.
58601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58603      # a path prefixed by /cygdrive for fixpath to work.
58604      new_path="$CYGWIN_ROOT_PATH$input_path"
58605    fi
58606  fi
58607
58608
58609  if test "x$path" != "x$new_path"; then
58610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58613  fi
58614
58615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58616
58617  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58618  has_colon=`$ECHO $path | $GREP ^.:`
58619  new_path="$path"
58620  if test "x$has_colon" = x; then
58621    # Not in mixed or Windows style, start by that.
58622    new_path=`cmd //c echo $path`
58623  fi
58624
58625
58626  input_path="$new_path"
58627  # Check if we need to convert this using DOS-style short mode. If the path
58628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58629  # take no chances and rewrite it.
58630  # Note: m4 eats our [], so we need to use [ and ] instead.
58631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58632  if test "x$has_forbidden_chars" != x; then
58633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58635  fi
58636
58637
58638  windows_path="$new_path"
58639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58640    unix_path=`$CYGPATH -u "$windows_path"`
58641    new_path="$unix_path"
58642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58644    new_path="$unix_path"
58645  fi
58646
58647  if test "x$path" != "x$new_path"; then
58648    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58650$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58651  fi
58652
58653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58655
58656    else
58657      # We're on a unix platform. Hooray! :)
58658      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58659      has_space=`$ECHO "$path" | $GREP " "`
58660      if test "x$has_space" != x; then
58661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58662$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58664      fi
58665
58666      # Use eval to expand a potential ~
58667      eval path="$path"
58668      if test ! -f "$path" && test ! -d "$path"; then
58669        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58670      fi
58671
58672      if test -d "$path"; then
58673        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58674      else
58675        dir="`$DIRNAME "$path"`"
58676        base="`$BASENAME "$path"`"
58677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58678      fi
58679    fi
58680  fi
58681
58682
58683  # Only process if variable expands to non-empty
58684
58685  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58687
58688  # Input might be given as Windows format, start by converting to
58689  # unix format.
58690  path="$POTENTIAL_FREETYPE_LIB_PATH"
58691  new_path=`$CYGPATH -u "$path"`
58692
58693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58696  # "foo.exe" is OK but "foo" is an error.
58697  #
58698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58699  # It is also a way to make sure we got the proper file name for the real test later on.
58700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58701  if test "x$test_shortpath" = x; then
58702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58705  fi
58706
58707  # Call helper function which possibly converts this using DOS-style short mode.
58708  # If so, the updated path is stored in $new_path.
58709
58710  input_path="$new_path"
58711  # Check if we need to convert this using DOS-style short mode. If the path
58712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58713  # take no chances and rewrite it.
58714  # Note: m4 eats our [], so we need to use [ and ] instead.
58715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58716  if test "x$has_forbidden_chars" != x; then
58717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58721      # Going to short mode and back again did indeed matter. Since short mode is
58722      # case insensitive, let's make it lowercase to improve readability.
58723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58724      # Now convert it back to Unix-style (cygpath)
58725      input_path=`$CYGPATH -u "$shortmode_path"`
58726      new_path="$input_path"
58727    fi
58728  fi
58729
58730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58731  if test "x$test_cygdrive_prefix" = x; then
58732    # As a simple fix, exclude /usr/bin since it's not a real path.
58733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58735      # a path prefixed by /cygdrive for fixpath to work.
58736      new_path="$CYGWIN_ROOT_PATH$input_path"
58737    fi
58738  fi
58739
58740
58741  if test "x$path" != "x$new_path"; then
58742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58745  fi
58746
58747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58748
58749  path="$POTENTIAL_FREETYPE_LIB_PATH"
58750  has_colon=`$ECHO $path | $GREP ^.:`
58751  new_path="$path"
58752  if test "x$has_colon" = x; then
58753    # Not in mixed or Windows style, start by that.
58754    new_path=`cmd //c echo $path`
58755  fi
58756
58757
58758  input_path="$new_path"
58759  # Check if we need to convert this using DOS-style short mode. If the path
58760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58761  # take no chances and rewrite it.
58762  # Note: m4 eats our [], so we need to use [ and ] instead.
58763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58764  if test "x$has_forbidden_chars" != x; then
58765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58767  fi
58768
58769
58770  windows_path="$new_path"
58771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58772    unix_path=`$CYGPATH -u "$windows_path"`
58773    new_path="$unix_path"
58774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58776    new_path="$unix_path"
58777  fi
58778
58779  if test "x$path" != "x$new_path"; then
58780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58783  fi
58784
58785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58787
58788    else
58789      # We're on a unix platform. Hooray! :)
58790      path="$POTENTIAL_FREETYPE_LIB_PATH"
58791      has_space=`$ECHO "$path" | $GREP " "`
58792      if test "x$has_space" != x; then
58793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58796      fi
58797
58798      # Use eval to expand a potential ~
58799      eval path="$path"
58800      if test ! -f "$path" && test ! -d "$path"; then
58801        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58802      fi
58803
58804      if test -d "$path"; then
58805        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58806      else
58807        dir="`$DIRNAME "$path"`"
58808        base="`$BASENAME "$path"`"
58809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58810      fi
58811    fi
58812  fi
58813
58814
58815    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58817$as_echo_n "checking for freetype includes... " >&6; }
58818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58819$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58820    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58822$as_echo_n "checking for freetype libraries... " >&6; }
58823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58824$as_echo "$FREETYPE_LIB_PATH" >&6; }
58825  fi
58826
58827              fi
58828            fi
58829          fi
58830        fi
58831      fi # end check in well-known locations
58832
58833      if test "x$FOUND_FREETYPE" != xyes; then
58834
58835  # Print a helpful message on how to acquire the necessary build dependency.
58836  # freetype is the help tag: freetype, cups, alsa etc
58837  MISSING_DEPENDENCY=freetype
58838
58839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58840    cygwin_help $MISSING_DEPENDENCY
58841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58842    msys_help $MISSING_DEPENDENCY
58843  else
58844    PKGHANDLER_COMMAND=
58845
58846    case $PKGHANDLER in
58847      apt-get)
58848        apt_help     $MISSING_DEPENDENCY ;;
58849      yum)
58850        yum_help     $MISSING_DEPENDENCY ;;
58851      port)
58852        port_help    $MISSING_DEPENDENCY ;;
58853      pkgutil)
58854        pkgutil_help $MISSING_DEPENDENCY ;;
58855      pkgadd)
58856        pkgadd_help  $MISSING_DEPENDENCY ;;
58857    esac
58858
58859    if test "x$PKGHANDLER_COMMAND" != x; then
58860      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58861    fi
58862  fi
58863
58864        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
58865      fi
58866    fi # end user specified settings
58867
58868    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
58869    if test "x$FREETYPE_CFLAGS" = x; then
58870
58871  # Only process if variable expands to non-empty
58872
58873  if test "x$FREETYPE_INCLUDE_PATH" != x; then
58874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58875
58876  # Input might be given as Windows format, start by converting to
58877  # unix format.
58878  path="$FREETYPE_INCLUDE_PATH"
58879  new_path=`$CYGPATH -u "$path"`
58880
58881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58884  # "foo.exe" is OK but "foo" is an error.
58885  #
58886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58887  # It is also a way to make sure we got the proper file name for the real test later on.
58888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58889  if test "x$test_shortpath" = x; then
58890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58891$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58892    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
58893  fi
58894
58895  # Call helper function which possibly converts this using DOS-style short mode.
58896  # If so, the updated path is stored in $new_path.
58897
58898  input_path="$new_path"
58899  # Check if we need to convert this using DOS-style short mode. If the path
58900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58901  # take no chances and rewrite it.
58902  # Note: m4 eats our [], so we need to use [ and ] instead.
58903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58904  if test "x$has_forbidden_chars" != x; then
58905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58909      # Going to short mode and back again did indeed matter. Since short mode is
58910      # case insensitive, let's make it lowercase to improve readability.
58911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58912      # Now convert it back to Unix-style (cygpath)
58913      input_path=`$CYGPATH -u "$shortmode_path"`
58914      new_path="$input_path"
58915    fi
58916  fi
58917
58918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58919  if test "x$test_cygdrive_prefix" = x; then
58920    # As a simple fix, exclude /usr/bin since it's not a real path.
58921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58923      # a path prefixed by /cygdrive for fixpath to work.
58924      new_path="$CYGWIN_ROOT_PATH$input_path"
58925    fi
58926  fi
58927
58928
58929  if test "x$path" != "x$new_path"; then
58930    FREETYPE_INCLUDE_PATH="$new_path"
58931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58932$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58933  fi
58934
58935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58936
58937  path="$FREETYPE_INCLUDE_PATH"
58938  has_colon=`$ECHO $path | $GREP ^.:`
58939  new_path="$path"
58940  if test "x$has_colon" = x; then
58941    # Not in mixed or Windows style, start by that.
58942    new_path=`cmd //c echo $path`
58943  fi
58944
58945
58946  input_path="$new_path"
58947  # Check if we need to convert this using DOS-style short mode. If the path
58948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58949  # take no chances and rewrite it.
58950  # Note: m4 eats our [], so we need to use [ and ] instead.
58951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58952  if test "x$has_forbidden_chars" != x; then
58953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58955  fi
58956
58957
58958  windows_path="$new_path"
58959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58960    unix_path=`$CYGPATH -u "$windows_path"`
58961    new_path="$unix_path"
58962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58964    new_path="$unix_path"
58965  fi
58966
58967  if test "x$path" != "x$new_path"; then
58968    FREETYPE_INCLUDE_PATH="$new_path"
58969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58970$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58971  fi
58972
58973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58975
58976    else
58977      # We're on a unix platform. Hooray! :)
58978      path="$FREETYPE_INCLUDE_PATH"
58979      has_space=`$ECHO "$path" | $GREP " "`
58980      if test "x$has_space" != x; then
58981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58982$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58984      fi
58985
58986      # Use eval to expand a potential ~
58987      eval path="$path"
58988      if test ! -f "$path" && test ! -d "$path"; then
58989        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58990      fi
58991
58992      if test -d "$path"; then
58993        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58994      else
58995        dir="`$DIRNAME "$path"`"
58996        base="`$BASENAME "$path"`"
58997        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58998      fi
58999    fi
59000  fi
59001
59002      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
59003        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
59004      else
59005        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
59006      fi
59007    fi
59008
59009    if test "x$FREETYPE_LIBS" = x; then
59010
59011  # Only process if variable expands to non-empty
59012
59013  if test "x$FREETYPE_LIB_PATH" != x; then
59014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59015
59016  # Input might be given as Windows format, start by converting to
59017  # unix format.
59018  path="$FREETYPE_LIB_PATH"
59019  new_path=`$CYGPATH -u "$path"`
59020
59021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59024  # "foo.exe" is OK but "foo" is an error.
59025  #
59026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59027  # It is also a way to make sure we got the proper file name for the real test later on.
59028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59029  if test "x$test_shortpath" = x; then
59030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59031$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59032    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
59033  fi
59034
59035  # Call helper function which possibly converts this using DOS-style short mode.
59036  # If so, the updated path is stored in $new_path.
59037
59038  input_path="$new_path"
59039  # Check if we need to convert this using DOS-style short mode. If the path
59040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59041  # take no chances and rewrite it.
59042  # Note: m4 eats our [], so we need to use [ and ] instead.
59043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59044  if test "x$has_forbidden_chars" != x; then
59045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59049      # Going to short mode and back again did indeed matter. Since short mode is
59050      # case insensitive, let's make it lowercase to improve readability.
59051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59052      # Now convert it back to Unix-style (cygpath)
59053      input_path=`$CYGPATH -u "$shortmode_path"`
59054      new_path="$input_path"
59055    fi
59056  fi
59057
59058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59059  if test "x$test_cygdrive_prefix" = x; then
59060    # As a simple fix, exclude /usr/bin since it's not a real path.
59061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59063      # a path prefixed by /cygdrive for fixpath to work.
59064      new_path="$CYGWIN_ROOT_PATH$input_path"
59065    fi
59066  fi
59067
59068
59069  if test "x$path" != "x$new_path"; then
59070    FREETYPE_LIB_PATH="$new_path"
59071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
59072$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59073  fi
59074
59075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59076
59077  path="$FREETYPE_LIB_PATH"
59078  has_colon=`$ECHO $path | $GREP ^.:`
59079  new_path="$path"
59080  if test "x$has_colon" = x; then
59081    # Not in mixed or Windows style, start by that.
59082    new_path=`cmd //c echo $path`
59083  fi
59084
59085
59086  input_path="$new_path"
59087  # Check if we need to convert this using DOS-style short mode. If the path
59088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59089  # take no chances and rewrite it.
59090  # Note: m4 eats our [], so we need to use [ and ] instead.
59091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59092  if test "x$has_forbidden_chars" != x; then
59093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59095  fi
59096
59097
59098  windows_path="$new_path"
59099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59100    unix_path=`$CYGPATH -u "$windows_path"`
59101    new_path="$unix_path"
59102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59104    new_path="$unix_path"
59105  fi
59106
59107  if test "x$path" != "x$new_path"; then
59108    FREETYPE_LIB_PATH="$new_path"
59109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
59110$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59111  fi
59112
59113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59115
59116    else
59117      # We're on a unix platform. Hooray! :)
59118      path="$FREETYPE_LIB_PATH"
59119      has_space=`$ECHO "$path" | $GREP " "`
59120      if test "x$has_space" != x; then
59121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59122$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59124      fi
59125
59126      # Use eval to expand a potential ~
59127      eval path="$path"
59128      if test ! -f "$path" && test ! -d "$path"; then
59129        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59130      fi
59131
59132      if test -d "$path"; then
59133        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59134      else
59135        dir="`$DIRNAME "$path"`"
59136        base="`$BASENAME "$path"`"
59137        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59138      fi
59139    fi
59140  fi
59141
59142      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59143        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
59144      else
59145        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
59146      fi
59147    fi
59148
59149    # Try to compile it
59150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
59151$as_echo_n "checking if we can compile and link with freetype... " >&6; }
59152    ac_ext=cpp
59153ac_cpp='$CXXCPP $CPPFLAGS'
59154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59157
59158    PREV_CXXCFLAGS="$CXXFLAGS"
59159    PREV_LIBS="$LIBS"
59160    PREV_CXX="$CXX"
59161    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
59162    LIBS="$LIBS $FREETYPE_LIBS"
59163    CXX="$FIXPATH $CXX"
59164    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59165/* end confdefs.h.  */
59166
59167          #include<ft2build.h>
59168          #include FT_FREETYPE_H
59169          int main () {
59170            FT_Init_FreeType(NULL);
59171            return 0;
59172          }
59173
59174_ACEOF
59175if ac_fn_cxx_try_link "$LINENO"; then :
59176
59177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59178$as_echo "yes" >&6; }
59179
59180else
59181
59182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59183$as_echo "no" >&6; }
59184          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
59185$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
59186          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
59187$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
59188
59189
59190  # Print a helpful message on how to acquire the necessary build dependency.
59191  # freetype is the help tag: freetype, cups, alsa etc
59192  MISSING_DEPENDENCY=freetype
59193
59194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59195    cygwin_help $MISSING_DEPENDENCY
59196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59197    msys_help $MISSING_DEPENDENCY
59198  else
59199    PKGHANDLER_COMMAND=
59200
59201    case $PKGHANDLER in
59202      apt-get)
59203        apt_help     $MISSING_DEPENDENCY ;;
59204      yum)
59205        yum_help     $MISSING_DEPENDENCY ;;
59206      port)
59207        port_help    $MISSING_DEPENDENCY ;;
59208      pkgutil)
59209        pkgutil_help $MISSING_DEPENDENCY ;;
59210      pkgadd)
59211        pkgadd_help  $MISSING_DEPENDENCY ;;
59212    esac
59213
59214    if test "x$PKGHANDLER_COMMAND" != x; then
59215      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59216    fi
59217  fi
59218
59219
59220          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
59221
59222
59223fi
59224rm -f core conftest.err conftest.$ac_objext \
59225    conftest$ac_exeext conftest.$ac_ext
59226    CXXCFLAGS="$PREV_CXXFLAGS"
59227    LIBS="$PREV_LIBS"
59228    CXX="$PREV_CXX"
59229    ac_ext=cpp
59230ac_cpp='$CXXCPP $CPPFLAGS'
59231ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59232ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59233ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59234
59235
59236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
59237$as_echo_n "checking if we should bundle freetype... " >&6; }
59238    if test "x$BUNDLE_FREETYPE" = xyes; then
59239      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
59240    fi
59241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
59242$as_echo "$BUNDLE_FREETYPE" >&6; }
59243
59244  fi # end freetype needed
59245
59246
59247
59248
59249
59250
59251
59252# Check whether --with-alsa was given.
59253if test "${with_alsa+set}" = set; then :
59254  withval=$with_alsa;
59255fi
59256
59257
59258# Check whether --with-alsa-include was given.
59259if test "${with_alsa_include+set}" = set; then :
59260  withval=$with_alsa_include;
59261fi
59262
59263
59264# Check whether --with-alsa-lib was given.
59265if test "${with_alsa_lib+set}" = set; then :
59266  withval=$with_alsa_lib;
59267fi
59268
59269
59270  if test "x$NEEDS_LIB_ALSA" = xfalse; then
59271    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
59272        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
59273        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
59274      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
59275$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
59276    fi
59277    ALSA_CFLAGS=
59278    ALSA_LIBS=
59279  else
59280    ALSA_FOUND=no
59281
59282    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
59283      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
59284    fi
59285
59286    if test "x${with_alsa}" != x; then
59287      ALSA_LIBS="-L${with_alsa}/lib -lasound"
59288      ALSA_CFLAGS="-I${with_alsa}/include"
59289      ALSA_FOUND=yes
59290    fi
59291    if test "x${with_alsa_include}" != x; then
59292      ALSA_CFLAGS="-I${with_alsa_include}"
59293      ALSA_FOUND=yes
59294    fi
59295    if test "x${with_alsa_lib}" != x; then
59296      ALSA_LIBS="-L${with_alsa_lib} -lasound"
59297      ALSA_FOUND=yes
59298    fi
59299    # Do not try pkg-config if we have a sysroot set.
59300    if test "x$SYSROOT" = x; then
59301      if test "x$ALSA_FOUND" = xno; then
59302
59303pkg_failed=no
59304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
59305$as_echo_n "checking for ALSA... " >&6; }
59306
59307if test -n "$ALSA_CFLAGS"; then
59308    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
59309 elif test -n "$PKG_CONFIG"; then
59310    if test -n "$PKG_CONFIG" && \
59311    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
59312  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
59313  ac_status=$?
59314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59315  test $ac_status = 0; }; then
59316  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
59317else
59318  pkg_failed=yes
59319fi
59320 else
59321    pkg_failed=untried
59322fi
59323if test -n "$ALSA_LIBS"; then
59324    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
59325 elif test -n "$PKG_CONFIG"; then
59326    if test -n "$PKG_CONFIG" && \
59327    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
59328  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
59329  ac_status=$?
59330  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59331  test $ac_status = 0; }; then
59332  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
59333else
59334  pkg_failed=yes
59335fi
59336 else
59337    pkg_failed=untried
59338fi
59339
59340
59341
59342if test $pkg_failed = yes; then
59343
59344if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59345        _pkg_short_errors_supported=yes
59346else
59347        _pkg_short_errors_supported=no
59348fi
59349        if test $_pkg_short_errors_supported = yes; then
59350	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
59351        else
59352	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
59353        fi
59354	# Put the nasty error message in config.log where it belongs
59355	echo "$ALSA_PKG_ERRORS" >&5
59356
59357	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59358$as_echo "no" >&6; }
59359                ALSA_FOUND=no
59360elif test $pkg_failed = untried; then
59361	ALSA_FOUND=no
59362else
59363	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
59364	ALSA_LIBS=$pkg_cv_ALSA_LIBS
59365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59366$as_echo "yes" >&6; }
59367	ALSA_FOUND=yes
59368fi
59369      fi
59370    fi
59371    if test "x$ALSA_FOUND" = xno; then
59372      for ac_header in alsa/asoundlib.h
59373do :
59374  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
59375if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
59376  cat >>confdefs.h <<_ACEOF
59377#define HAVE_ALSA_ASOUNDLIB_H 1
59378_ACEOF
59379
59380            ALSA_FOUND=yes
59381            ALSA_CFLAGS=-Iignoreme
59382            ALSA_LIBS=-lasound
59383            DEFAULT_ALSA=yes
59384
59385else
59386  ALSA_FOUND=no
59387
59388fi
59389
59390done
59391
59392    fi
59393    if test "x$ALSA_FOUND" = xno; then
59394
59395  # Print a helpful message on how to acquire the necessary build dependency.
59396  # alsa is the help tag: freetype, cups, alsa etc
59397  MISSING_DEPENDENCY=alsa
59398
59399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59400    cygwin_help $MISSING_DEPENDENCY
59401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59402    msys_help $MISSING_DEPENDENCY
59403  else
59404    PKGHANDLER_COMMAND=
59405
59406    case $PKGHANDLER in
59407      apt-get)
59408        apt_help     $MISSING_DEPENDENCY ;;
59409      yum)
59410        yum_help     $MISSING_DEPENDENCY ;;
59411      port)
59412        port_help    $MISSING_DEPENDENCY ;;
59413      pkgutil)
59414        pkgutil_help $MISSING_DEPENDENCY ;;
59415      pkgadd)
59416        pkgadd_help  $MISSING_DEPENDENCY ;;
59417    esac
59418
59419    if test "x$PKGHANDLER_COMMAND" != x; then
59420      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59421    fi
59422  fi
59423
59424      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
59425    fi
59426  fi
59427
59428
59429
59430
59431
59432
59433# Check whether --with-libffi was given.
59434if test "${with_libffi+set}" = set; then :
59435  withval=$with_libffi;
59436fi
59437
59438
59439# Check whether --with-libffi-include was given.
59440if test "${with_libffi_include+set}" = set; then :
59441  withval=$with_libffi_include;
59442fi
59443
59444
59445# Check whether --with-libffi-lib was given.
59446if test "${with_libffi_lib+set}" = set; then :
59447  withval=$with_libffi_lib;
59448fi
59449
59450
59451  if test "x$NEEDS_LIB_FFI" = xfalse; then
59452    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
59453        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
59454        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
59455      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
59456$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
59457    fi
59458    LIBFFI_CFLAGS=
59459    LIBFFI_LIBS=
59460  else
59461    LIBFFI_FOUND=no
59462
59463    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
59464      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
59465    fi
59466
59467    if test "x${with_libffi}" != x; then
59468      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
59469      LIBFFI_CFLAGS="-I${with_libffi}/include"
59470      LIBFFI_FOUND=yes
59471    fi
59472    if test "x${with_libffi_include}" != x; then
59473      LIBFFI_CFLAGS="-I${with_libffi_include}"
59474      LIBFFI_FOUND=yes
59475    fi
59476    if test "x${with_libffi_lib}" != x; then
59477      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
59478      LIBFFI_FOUND=yes
59479    fi
59480    # Do not try pkg-config if we have a sysroot set.
59481    if test "x$SYSROOT" = x; then
59482      if test "x$LIBFFI_FOUND" = xno; then
59483        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
59484
59485pkg_failed=no
59486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
59487$as_echo_n "checking for LIBFFI... " >&6; }
59488
59489if test -n "$LIBFFI_CFLAGS"; then
59490    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
59491 elif test -n "$PKG_CONFIG"; then
59492    if test -n "$PKG_CONFIG" && \
59493    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
59494  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
59495  ac_status=$?
59496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59497  test $ac_status = 0; }; then
59498  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
59499else
59500  pkg_failed=yes
59501fi
59502 else
59503    pkg_failed=untried
59504fi
59505if test -n "$LIBFFI_LIBS"; then
59506    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
59507 elif test -n "$PKG_CONFIG"; then
59508    if test -n "$PKG_CONFIG" && \
59509    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
59510  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
59511  ac_status=$?
59512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59513  test $ac_status = 0; }; then
59514  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
59515else
59516  pkg_failed=yes
59517fi
59518 else
59519    pkg_failed=untried
59520fi
59521
59522
59523
59524if test $pkg_failed = yes; then
59525
59526if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59527        _pkg_short_errors_supported=yes
59528else
59529        _pkg_short_errors_supported=no
59530fi
59531        if test $_pkg_short_errors_supported = yes; then
59532	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
59533        else
59534	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
59535        fi
59536	# Put the nasty error message in config.log where it belongs
59537	echo "$LIBFFI_PKG_ERRORS" >&5
59538
59539	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59540$as_echo "no" >&6; }
59541                LIBFFI_FOUND=no
59542elif test $pkg_failed = untried; then
59543	LIBFFI_FOUND=no
59544else
59545	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
59546	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
59547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59548$as_echo "yes" >&6; }
59549	LIBFFI_FOUND=yes
59550fi
59551      fi
59552    fi
59553    if test "x$LIBFFI_FOUND" = xno; then
59554      for ac_header in ffi.h
59555do :
59556  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
59557if test "x$ac_cv_header_ffi_h" = xyes; then :
59558  cat >>confdefs.h <<_ACEOF
59559#define HAVE_FFI_H 1
59560_ACEOF
59561
59562            LIBFFI_FOUND=yes
59563            LIBFFI_CFLAGS=
59564            LIBFFI_LIBS=-lffi
59565
59566else
59567  LIBFFI_FOUND=no
59568
59569fi
59570
59571done
59572
59573    fi
59574    if test "x$LIBFFI_FOUND" = xno; then
59575
59576  # Print a helpful message on how to acquire the necessary build dependency.
59577  # ffi is the help tag: freetype, cups, alsa etc
59578  MISSING_DEPENDENCY=ffi
59579
59580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59581    cygwin_help $MISSING_DEPENDENCY
59582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59583    msys_help $MISSING_DEPENDENCY
59584  else
59585    PKGHANDLER_COMMAND=
59586
59587    case $PKGHANDLER in
59588      apt-get)
59589        apt_help     $MISSING_DEPENDENCY ;;
59590      yum)
59591        yum_help     $MISSING_DEPENDENCY ;;
59592      port)
59593        port_help    $MISSING_DEPENDENCY ;;
59594      pkgutil)
59595        pkgutil_help $MISSING_DEPENDENCY ;;
59596      pkgadd)
59597        pkgadd_help  $MISSING_DEPENDENCY ;;
59598    esac
59599
59600    if test "x$PKGHANDLER_COMMAND" != x; then
59601      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59602    fi
59603  fi
59604
59605      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
59606    fi
59607
59608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
59609$as_echo_n "checking if libffi works... " >&6; }
59610    ac_ext=c
59611ac_cpp='$CPP $CPPFLAGS'
59612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59614ac_compiler_gnu=$ac_cv_c_compiler_gnu
59615
59616    OLD_CFLAGS="$CFLAGS"
59617    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
59618    OLD_LIBS="$LIBS"
59619    LIBS="$LIBS $LIBFFI_LIBS"
59620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59621/* end confdefs.h.  */
59622#include <ffi.h>
59623int
59624main ()
59625{
59626
59627          ffi_call(NULL, NULL, NULL, NULL);
59628          return 0;
59629
59630  ;
59631  return 0;
59632}
59633_ACEOF
59634if ac_fn_c_try_link "$LINENO"; then :
59635  LIBFFI_WORKS=yes
59636else
59637  LIBFFI_WORKS=no
59638
59639fi
59640rm -f core conftest.err conftest.$ac_objext \
59641    conftest$ac_exeext conftest.$ac_ext
59642    CFLAGS="$OLD_CFLAGS"
59643    LIBS="$OLD_LIBS"
59644    ac_ext=cpp
59645ac_cpp='$CXXCPP $CPPFLAGS'
59646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59647ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59649
59650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
59651$as_echo "$LIBFFI_WORKS" >&6; }
59652
59653    if test "x$LIBFFI_WORKS" = xno; then
59654
59655  # Print a helpful message on how to acquire the necessary build dependency.
59656  # ffi is the help tag: freetype, cups, alsa etc
59657  MISSING_DEPENDENCY=ffi
59658
59659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59660    cygwin_help $MISSING_DEPENDENCY
59661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59662    msys_help $MISSING_DEPENDENCY
59663  else
59664    PKGHANDLER_COMMAND=
59665
59666    case $PKGHANDLER in
59667      apt-get)
59668        apt_help     $MISSING_DEPENDENCY ;;
59669      yum)
59670        yum_help     $MISSING_DEPENDENCY ;;
59671      port)
59672        port_help    $MISSING_DEPENDENCY ;;
59673      pkgutil)
59674        pkgutil_help $MISSING_DEPENDENCY ;;
59675      pkgadd)
59676        pkgadd_help  $MISSING_DEPENDENCY ;;
59677    esac
59678
59679    if test "x$PKGHANDLER_COMMAND" != x; then
59680      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59681    fi
59682  fi
59683
59684      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
59685    fi
59686  fi
59687
59688
59689
59690
59691
59692  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
59693    # Extract the first word of "llvm-config", so it can be a program name with args.
59694set dummy llvm-config; ac_word=$2
59695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59696$as_echo_n "checking for $ac_word... " >&6; }
59697if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
59698  $as_echo_n "(cached) " >&6
59699else
59700  if test -n "$LLVM_CONFIG"; then
59701  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
59702else
59703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59704for as_dir in $PATH
59705do
59706  IFS=$as_save_IFS
59707  test -z "$as_dir" && as_dir=.
59708    for ac_exec_ext in '' $ac_executable_extensions; do
59709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59710    ac_cv_prog_LLVM_CONFIG="llvm-config"
59711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59712    break 2
59713  fi
59714done
59715  done
59716IFS=$as_save_IFS
59717
59718fi
59719fi
59720LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
59721if test -n "$LLVM_CONFIG"; then
59722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
59723$as_echo "$LLVM_CONFIG" >&6; }
59724else
59725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59726$as_echo "no" >&6; }
59727fi
59728
59729
59730
59731    if test "x$LLVM_CONFIG" != xllvm-config; then
59732      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
59733    fi
59734
59735    llvm_components="jit mcjit engine nativecodegen native"
59736    unset LLVM_CFLAGS
59737    for flag in $("$LLVM_CONFIG" --cxxflags); do
59738      if echo "${flag}" | grep -q '^-[ID]'; then
59739        if test "${flag}" != "-D_DEBUG" ; then
59740          if test "${LLVM_CFLAGS}" != "" ; then
59741            LLVM_CFLAGS="${LLVM_CFLAGS} "
59742          fi
59743          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
59744        fi
59745      fi
59746    done
59747    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
59748    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
59749
59750    unset LLVM_LDFLAGS
59751    for flag in $("${LLVM_CONFIG}" --ldflags); do
59752      if echo "${flag}" | grep -q '^-L'; then
59753        if test "${LLVM_LDFLAGS}" != ""; then
59754          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
59755        fi
59756        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
59757      fi
59758    done
59759
59760    unset LLVM_LIBS
59761    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
59762      if echo "${flag}" | grep -q '^-l'; then
59763        if test "${LLVM_LIBS}" != ""; then
59764          LLVM_LIBS="${LLVM_LIBS} "
59765        fi
59766        LLVM_LIBS="${LLVM_LIBS}${flag}"
59767      fi
59768    done
59769
59770    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
59771    # always properly detect -ltinfo
59772    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
59773
59774
59775
59776
59777  fi
59778
59779
59780
59781# Check whether --with-libjpeg was given.
59782if test "${with_libjpeg+set}" = set; then :
59783  withval=$with_libjpeg;
59784fi
59785
59786
59787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
59788$as_echo_n "checking for which libjpeg to use... " >&6; }
59789  # default is bundled
59790  DEFAULT_LIBJPEG=bundled
59791  # if user didn't specify, use DEFAULT_LIBJPEG
59792  if test "x${with_libjpeg}" = "x"; then
59793    with_libjpeg=${DEFAULT_LIBJPEG}
59794  fi
59795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
59796$as_echo "${with_libjpeg}" >&6; }
59797
59798  if test "x${with_libjpeg}" = "xbundled"; then
59799    USE_EXTERNAL_LIBJPEG=false
59800  elif test "x${with_libjpeg}" = "xsystem"; then
59801    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
59802if test "x$ac_cv_header_jpeglib_h" = xyes; then :
59803
59804else
59805   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
59806fi
59807
59808
59809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
59810$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
59811if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
59812  $as_echo_n "(cached) " >&6
59813else
59814  ac_check_lib_save_LIBS=$LIBS
59815LIBS="-ljpeg  $LIBS"
59816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59817/* end confdefs.h.  */
59818
59819/* Override any GCC internal prototype to avoid an error.
59820   Use char because int might match the return type of a GCC
59821   builtin and then its argument prototype would still apply.  */
59822#ifdef __cplusplus
59823extern "C"
59824#endif
59825char jpeg_CreateDecompress ();
59826int
59827main ()
59828{
59829return jpeg_CreateDecompress ();
59830  ;
59831  return 0;
59832}
59833_ACEOF
59834if ac_fn_cxx_try_link "$LINENO"; then :
59835  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
59836else
59837  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
59838fi
59839rm -f core conftest.err conftest.$ac_objext \
59840    conftest$ac_exeext conftest.$ac_ext
59841LIBS=$ac_check_lib_save_LIBS
59842fi
59843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
59844$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
59845if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
59846  cat >>confdefs.h <<_ACEOF
59847#define HAVE_LIBJPEG 1
59848_ACEOF
59849
59850  LIBS="-ljpeg $LIBS"
59851
59852else
59853   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
59854fi
59855
59856
59857    USE_EXTERNAL_LIBJPEG=true
59858  else
59859    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
59860  fi
59861
59862
59863
59864
59865
59866# Check whether --with-giflib was given.
59867if test "${with_giflib+set}" = set; then :
59868  withval=$with_giflib;
59869fi
59870
59871
59872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
59873$as_echo_n "checking for which giflib to use... " >&6; }
59874  # default is bundled
59875  DEFAULT_GIFLIB=bundled
59876  # if user didn't specify, use DEFAULT_GIFLIB
59877  if test "x${with_giflib}" = "x"; then
59878    with_giflib=${DEFAULT_GIFLIB}
59879  fi
59880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
59881$as_echo "${with_giflib}" >&6; }
59882
59883  if test "x${with_giflib}" = "xbundled"; then
59884    USE_EXTERNAL_LIBGIF=false
59885  elif test "x${with_giflib}" = "xsystem"; then
59886    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
59887if test "x$ac_cv_header_gif_lib_h" = xyes; then :
59888
59889else
59890   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
59891fi
59892
59893
59894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
59895$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
59896if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
59897  $as_echo_n "(cached) " >&6
59898else
59899  ac_check_lib_save_LIBS=$LIBS
59900LIBS="-lgif  $LIBS"
59901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59902/* end confdefs.h.  */
59903
59904/* Override any GCC internal prototype to avoid an error.
59905   Use char because int might match the return type of a GCC
59906   builtin and then its argument prototype would still apply.  */
59907#ifdef __cplusplus
59908extern "C"
59909#endif
59910char DGifGetCode ();
59911int
59912main ()
59913{
59914return DGifGetCode ();
59915  ;
59916  return 0;
59917}
59918_ACEOF
59919if ac_fn_cxx_try_link "$LINENO"; then :
59920  ac_cv_lib_gif_DGifGetCode=yes
59921else
59922  ac_cv_lib_gif_DGifGetCode=no
59923fi
59924rm -f core conftest.err conftest.$ac_objext \
59925    conftest$ac_exeext conftest.$ac_ext
59926LIBS=$ac_check_lib_save_LIBS
59927fi
59928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
59929$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
59930if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
59931  cat >>confdefs.h <<_ACEOF
59932#define HAVE_LIBGIF 1
59933_ACEOF
59934
59935  LIBS="-lgif $LIBS"
59936
59937else
59938   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
59939fi
59940
59941
59942    USE_EXTERNAL_LIBGIF=true
59943  else
59944    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
59945  fi
59946
59947
59948
59949
59950
59951# Check whether --with-libpng was given.
59952if test "${with_libpng+set}" = set; then :
59953  withval=$with_libpng;
59954fi
59955
59956
59957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
59958$as_echo_n "checking for which libpng to use... " >&6; }
59959
59960  # default is bundled
59961  DEFAULT_LIBPNG=bundled
59962  # if user didn't specify, use DEFAULT_LIBPNG
59963  if test "x${with_libpng}" = "x"; then
59964      with_libpng=${DEFAULT_LIBPNG}
59965  fi
59966
59967  if test "x${with_libpng}" = "xbundled"; then
59968      USE_EXTERNAL_LIBPNG=false
59969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
59970$as_echo "bundled" >&6; }
59971  elif test "x${with_libpng}" = "xsystem"; then
59972
59973pkg_failed=no
59974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
59975$as_echo_n "checking for PNG... " >&6; }
59976
59977if test -n "$PNG_CFLAGS"; then
59978    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
59979 elif test -n "$PKG_CONFIG"; then
59980    if test -n "$PKG_CONFIG" && \
59981    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
59982  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
59983  ac_status=$?
59984  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59985  test $ac_status = 0; }; then
59986  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
59987else
59988  pkg_failed=yes
59989fi
59990 else
59991    pkg_failed=untried
59992fi
59993if test -n "$PNG_LIBS"; then
59994    pkg_cv_PNG_LIBS="$PNG_LIBS"
59995 elif test -n "$PKG_CONFIG"; then
59996    if test -n "$PKG_CONFIG" && \
59997    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
59998  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
59999  ac_status=$?
60000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60001  test $ac_status = 0; }; then
60002  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
60003else
60004  pkg_failed=yes
60005fi
60006 else
60007    pkg_failed=untried
60008fi
60009
60010
60011
60012if test $pkg_failed = yes; then
60013
60014if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60015        _pkg_short_errors_supported=yes
60016else
60017        _pkg_short_errors_supported=no
60018fi
60019        if test $_pkg_short_errors_supported = yes; then
60020	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
60021        else
60022	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
60023        fi
60024	# Put the nasty error message in config.log where it belongs
60025	echo "$PNG_PKG_ERRORS" >&5
60026
60027	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60028$as_echo "no" >&6; }
60029                 LIBPNG_FOUND=no
60030elif test $pkg_failed = untried; then
60031	 LIBPNG_FOUND=no
60032else
60033	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
60034	PNG_LIBS=$pkg_cv_PNG_LIBS
60035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60036$as_echo "yes" >&6; }
60037	 LIBPNG_FOUND=yes
60038fi
60039      if test "x${LIBPNG_FOUND}" = "xyes"; then
60040          USE_EXTERNAL_LIBPNG=true
60041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
60042$as_echo "system" >&6; }
60043      else
60044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
60045$as_echo "system not found" >&6; }
60046          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
60047      fi
60048  else
60049      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
60050  fi
60051
60052
60053
60054
60055
60056# Check whether --with-zlib was given.
60057if test "${with_zlib+set}" = set; then :
60058  withval=$with_zlib;
60059fi
60060
60061
60062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
60063$as_echo_n "checking for compress in -lz... " >&6; }
60064if ${ac_cv_lib_z_compress+:} false; then :
60065  $as_echo_n "(cached) " >&6
60066else
60067  ac_check_lib_save_LIBS=$LIBS
60068LIBS="-lz  $LIBS"
60069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60070/* end confdefs.h.  */
60071
60072/* Override any GCC internal prototype to avoid an error.
60073   Use char because int might match the return type of a GCC
60074   builtin and then its argument prototype would still apply.  */
60075#ifdef __cplusplus
60076extern "C"
60077#endif
60078char compress ();
60079int
60080main ()
60081{
60082return compress ();
60083  ;
60084  return 0;
60085}
60086_ACEOF
60087if ac_fn_cxx_try_link "$LINENO"; then :
60088  ac_cv_lib_z_compress=yes
60089else
60090  ac_cv_lib_z_compress=no
60091fi
60092rm -f core conftest.err conftest.$ac_objext \
60093    conftest$ac_exeext conftest.$ac_ext
60094LIBS=$ac_check_lib_save_LIBS
60095fi
60096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
60097$as_echo "$ac_cv_lib_z_compress" >&6; }
60098if test "x$ac_cv_lib_z_compress" = xyes; then :
60099   ZLIB_FOUND=yes
60100else
60101   ZLIB_FOUND=no
60102fi
60103
60104
60105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
60106$as_echo_n "checking for which zlib to use... " >&6; }
60107
60108  DEFAULT_ZLIB=bundled
60109  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60110    # On macosx default is system...on others default is bundled
60111    DEFAULT_ZLIB=system
60112  fi
60113
60114  if test "x${ZLIB_FOUND}" != "xyes"; then
60115    # If we don't find any system...set default to bundled
60116    DEFAULT_ZLIB=bundled
60117  fi
60118
60119  # If user didn't specify, use DEFAULT_ZLIB
60120  if test "x${with_zlib}" = "x"; then
60121    with_zlib=${DEFAULT_ZLIB}
60122  fi
60123
60124  if test "x${with_zlib}" = "xbundled"; then
60125    USE_EXTERNAL_LIBZ=false
60126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
60127$as_echo "bundled" >&6; }
60128  elif test "x${with_zlib}" = "xsystem"; then
60129    if test "x${ZLIB_FOUND}" = "xyes"; then
60130      USE_EXTERNAL_LIBZ=true
60131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
60132$as_echo "system" >&6; }
60133    else
60134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
60135$as_echo "system not found" >&6; }
60136      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
60137    fi
60138  else
60139    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
60140  fi
60141
60142
60143
60144
60145
60146# Check whether --with-lcms was given.
60147if test "${with_lcms+set}" = set; then :
60148  withval=$with_lcms;
60149fi
60150
60151
60152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
60153$as_echo_n "checking for which lcms to use... " >&6; }
60154
60155  DEFAULT_LCMS=bundled
60156  # If user didn't specify, use DEFAULT_LCMS
60157  if test "x${with_lcms}" = "x"; then
60158      with_lcms=${DEFAULT_LCMS}
60159  fi
60160
60161  if test "x${with_lcms}" = "xbundled"; then
60162    USE_EXTERNAL_LCMS=false
60163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
60164$as_echo "bundled" >&6; }
60165  elif test "x${with_lcms}" = "xsystem"; then
60166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
60167$as_echo "system" >&6; }
60168
60169pkg_failed=no
60170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
60171$as_echo_n "checking for LCMS... " >&6; }
60172
60173if test -n "$LCMS_CFLAGS"; then
60174    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
60175 elif test -n "$PKG_CONFIG"; then
60176    if test -n "$PKG_CONFIG" && \
60177    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
60178  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
60179  ac_status=$?
60180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60181  test $ac_status = 0; }; then
60182  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
60183else
60184  pkg_failed=yes
60185fi
60186 else
60187    pkg_failed=untried
60188fi
60189if test -n "$LCMS_LIBS"; then
60190    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
60191 elif test -n "$PKG_CONFIG"; then
60192    if test -n "$PKG_CONFIG" && \
60193    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
60194  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
60195  ac_status=$?
60196  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60197  test $ac_status = 0; }; then
60198  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
60199else
60200  pkg_failed=yes
60201fi
60202 else
60203    pkg_failed=untried
60204fi
60205
60206
60207
60208if test $pkg_failed = yes; then
60209
60210if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60211        _pkg_short_errors_supported=yes
60212else
60213        _pkg_short_errors_supported=no
60214fi
60215        if test $_pkg_short_errors_supported = yes; then
60216	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
60217        else
60218	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
60219        fi
60220	# Put the nasty error message in config.log where it belongs
60221	echo "$LCMS_PKG_ERRORS" >&5
60222
60223	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60224$as_echo "no" >&6; }
60225                LCMS_FOUND=no
60226elif test $pkg_failed = untried; then
60227	LCMS_FOUND=no
60228else
60229	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
60230	LCMS_LIBS=$pkg_cv_LCMS_LIBS
60231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60232$as_echo "yes" >&6; }
60233	LCMS_FOUND=yes
60234fi
60235    if test "x${LCMS_FOUND}" = "xyes"; then
60236      USE_EXTERNAL_LCMS=true
60237    else
60238      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
60239    fi
60240  else
60241    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
60242  fi
60243
60244
60245
60246
60247
60248
60249
60250
60251
60252
60253
60254  # Setup libm (the maths library)
60255  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
60256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
60257$as_echo_n "checking for cos in -lm... " >&6; }
60258if ${ac_cv_lib_m_cos+:} false; then :
60259  $as_echo_n "(cached) " >&6
60260else
60261  ac_check_lib_save_LIBS=$LIBS
60262LIBS="-lm  $LIBS"
60263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60264/* end confdefs.h.  */
60265
60266/* Override any GCC internal prototype to avoid an error.
60267   Use char because int might match the return type of a GCC
60268   builtin and then its argument prototype would still apply.  */
60269#ifdef __cplusplus
60270extern "C"
60271#endif
60272char cos ();
60273int
60274main ()
60275{
60276return cos ();
60277  ;
60278  return 0;
60279}
60280_ACEOF
60281if ac_fn_cxx_try_link "$LINENO"; then :
60282  ac_cv_lib_m_cos=yes
60283else
60284  ac_cv_lib_m_cos=no
60285fi
60286rm -f core conftest.err conftest.$ac_objext \
60287    conftest$ac_exeext conftest.$ac_ext
60288LIBS=$ac_check_lib_save_LIBS
60289fi
60290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
60291$as_echo "$ac_cv_lib_m_cos" >&6; }
60292if test "x$ac_cv_lib_m_cos" = xyes; then :
60293  cat >>confdefs.h <<_ACEOF
60294#define HAVE_LIBM 1
60295_ACEOF
60296
60297  LIBS="-lm $LIBS"
60298
60299else
60300
60301        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
60302$as_echo "$as_me: Maths library was not found" >&6;}
60303
60304fi
60305
60306    LIBM="-lm"
60307  else
60308    LIBM=""
60309  fi
60310
60311
60312  # Setup libdl (for dynamic library loading)
60313  save_LIBS="$LIBS"
60314  LIBS=""
60315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
60316$as_echo_n "checking for dlopen in -ldl... " >&6; }
60317if ${ac_cv_lib_dl_dlopen+:} false; then :
60318  $as_echo_n "(cached) " >&6
60319else
60320  ac_check_lib_save_LIBS=$LIBS
60321LIBS="-ldl  $LIBS"
60322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60323/* end confdefs.h.  */
60324
60325/* Override any GCC internal prototype to avoid an error.
60326   Use char because int might match the return type of a GCC
60327   builtin and then its argument prototype would still apply.  */
60328#ifdef __cplusplus
60329extern "C"
60330#endif
60331char dlopen ();
60332int
60333main ()
60334{
60335return dlopen ();
60336  ;
60337  return 0;
60338}
60339_ACEOF
60340if ac_fn_cxx_try_link "$LINENO"; then :
60341  ac_cv_lib_dl_dlopen=yes
60342else
60343  ac_cv_lib_dl_dlopen=no
60344fi
60345rm -f core conftest.err conftest.$ac_objext \
60346    conftest$ac_exeext conftest.$ac_ext
60347LIBS=$ac_check_lib_save_LIBS
60348fi
60349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
60350$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
60351if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
60352  cat >>confdefs.h <<_ACEOF
60353#define HAVE_LIBDL 1
60354_ACEOF
60355
60356  LIBS="-ldl $LIBS"
60357
60358fi
60359
60360  LIBDL="$LIBS"
60361
60362  LIBS="$save_LIBS"
60363
60364  # Deprecated libraries, keep the flags for backwards compatibility
60365  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
60366
60367
60368# Check whether --with-dxsdk was given.
60369if test "${with_dxsdk+set}" = set; then :
60370  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
60371$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
60372fi
60373
60374
60375
60376
60377# Check whether --with-dxsdk-lib was given.
60378if test "${with_dxsdk_lib+set}" = set; then :
60379  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
60380$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
60381fi
60382
60383
60384
60385
60386# Check whether --with-dxsdk-include was given.
60387if test "${with_dxsdk_include+set}" = set; then :
60388  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
60389$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
60390fi
60391
60392
60393  fi
60394
60395  # Control if libzip can use mmap. Available for purposes of overriding.
60396  LIBZIP_CAN_USE_MMAP=true
60397
60398
60399
60400
60401
60402
60403
60404
60405
60406
60407
60408
60409
60410
60411###############################################################################
60412#
60413# We need to do some final tweaking, when everything else is done.
60414#
60415###############################################################################
60416
60417
60418  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
60419
60420
60421
60422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
60423$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
60424
60425  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
60426    ENABLE_INTREE_EC=yes
60427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60428$as_echo "yes" >&6; }
60429  else
60430    ENABLE_INTREE_EC=no
60431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60432$as_echo "no" >&6; }
60433  fi
60434
60435
60436
60437
60438###############################################################################
60439#
60440# Configure parts of the build that only affect the build performance,
60441# not the result.
60442#
60443###############################################################################
60444
60445
60446  # How many cores do we have on this build system?
60447
60448# Check whether --with-num-cores was given.
60449if test "${with_num_cores+set}" = set; then :
60450  withval=$with_num_cores;
60451fi
60452
60453  if test "x$with_num_cores" = x; then
60454    # The number of cores were not specified, try to probe them.
60455
60456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
60457$as_echo_n "checking for number of cores... " >&6; }
60458  NUM_CORES=1
60459  FOUND_CORES=no
60460
60461  if test -f /proc/cpuinfo; then
60462    # Looks like a Linux (or cygwin) system
60463    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
60464    FOUND_CORES=yes
60465  elif test -x /usr/sbin/psrinfo; then
60466    # Looks like a Solaris system
60467    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
60468    FOUND_CORES=yes
60469  elif test -x /usr/sbin/sysctl; then
60470    # Looks like a MacOSX system
60471    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
60472    FOUND_CORES=yes
60473  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
60474    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
60475    FOUND_CORES=yes
60476  elif test -n "$NUMBER_OF_PROCESSORS"; then
60477    # On windows, look in the env
60478    NUM_CORES=$NUMBER_OF_PROCESSORS
60479    FOUND_CORES=yes
60480  fi
60481
60482  if test "x$FOUND_CORES" = xyes; then
60483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
60484$as_echo "$NUM_CORES" >&6; }
60485  else
60486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
60487$as_echo "could not detect number of cores, defaulting to 1" >&6; }
60488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
60489$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
60490  fi
60491
60492  else
60493    NUM_CORES=$with_num_cores
60494  fi
60495
60496
60497
60498  # How much memory do we have on this build system?
60499
60500# Check whether --with-memory-size was given.
60501if test "${with_memory_size+set}" = set; then :
60502  withval=$with_memory_size;
60503fi
60504
60505  if test "x$with_memory_size" = x; then
60506    # The memory size was not specified, try to probe it.
60507
60508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
60509$as_echo_n "checking for memory size... " >&6; }
60510  # Default to 1024 MB
60511  MEMORY_SIZE=1024
60512  FOUND_MEM=no
60513
60514  if test -f /proc/meminfo; then
60515    # Looks like a Linux (or cygwin) system
60516    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
60517    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
60518    FOUND_MEM=yes
60519  elif test -x /usr/sbin/prtconf; then
60520    # Looks like a Solaris or AIX system
60521    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
60522    FOUND_MEM=yes
60523  elif test -x /usr/sbin/sysctl; then
60524    # Looks like a MacOSX system
60525    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
60526    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
60527    FOUND_MEM=yes
60528  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
60529    # Windows, but without cygwin
60530    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
60531    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
60532    FOUND_MEM=yes
60533  fi
60534
60535  if test "x$FOUND_MEM" = xyes; then
60536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
60537$as_echo "$MEMORY_SIZE MB" >&6; }
60538  else
60539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
60540$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
60541    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
60542$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
60543  fi
60544
60545  else
60546    MEMORY_SIZE=$with_memory_size
60547  fi
60548
60549
60550
60551  # Provide a decent default number of parallel jobs for make depending on
60552  # number of cores, amount of memory and machine architecture.
60553
60554# Check whether --with-jobs was given.
60555if test "${with_jobs+set}" = set; then :
60556  withval=$with_jobs;
60557fi
60558
60559  if test "x$with_jobs" = x; then
60560    # Number of jobs was not specified, calculate.
60561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
60562$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
60563    # Approximate memory in GB.
60564    memory_gb=`expr $MEMORY_SIZE / 1024`
60565    # Pick the lowest of memory in gb and number of cores.
60566    if test "$memory_gb" -lt "$NUM_CORES"; then
60567      JOBS="$memory_gb"
60568    else
60569      JOBS="$NUM_CORES"
60570    fi
60571    if test "$JOBS" -eq "0"; then
60572      JOBS=1
60573    fi
60574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
60575$as_echo "$JOBS" >&6; }
60576  else
60577    JOBS=$with_jobs
60578  fi
60579
60580
60581
60582  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
60583
60584# Check whether --with-test-jobs was given.
60585if test "${with_test_jobs+set}" = set; then :
60586  withval=$with_test_jobs;
60587fi
60588
60589  if test "x$with_test_jobs" = x; then
60590      TEST_JOBS=0
60591  else
60592      TEST_JOBS=$with_test_jobs
60593  fi
60594
60595
60596
60597# Setup arguments for the boot jdk (after cores and memory have been setup)
60598
60599  ##############################################################################
60600  #
60601  # Specify jvm options for anything that is run with the Boot JDK.
60602  # Not all JVM:s accept the same arguments on the command line.
60603  #
60604
60605# Check whether --with-boot-jdk-jvmargs was given.
60606if test "${with_boot_jdk_jvmargs+set}" = set; then :
60607  withval=$with_boot_jdk_jvmargs;
60608fi
60609
60610
60611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
60612$as_echo_n "checking flags for boot jdk java command ... " >&6; }
60613
60614  # Disable special log output when a debug build is used as Boot JDK...
60615
60616  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
60617  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
60618  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
60619  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60620  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60621  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60622    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
60623    JVM_ARG_OK=true
60624  else
60625    $ECHO "Arg failed:" >&5
60626    $ECHO "$OUTPUT" >&5
60627    JVM_ARG_OK=false
60628  fi
60629
60630
60631  # Apply user provided options.
60632
60633  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
60634  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
60635  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
60636  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60637  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60638  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60639    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
60640    JVM_ARG_OK=true
60641  else
60642    $ECHO "Arg failed:" >&5
60643    $ECHO "$OUTPUT" >&5
60644    JVM_ARG_OK=false
60645  fi
60646
60647
60648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
60649$as_echo "$boot_jdk_jvmargs" >&6; }
60650
60651  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
60652  JAVA_FLAGS=$boot_jdk_jvmargs
60653
60654
60655
60656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
60657$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
60658
60659  # Starting amount of heap memory.
60660
60661  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
60662  $ECHO "Command: $JAVA -Xms64M -version" >&5
60663  OUTPUT=`$JAVA -Xms64M -version 2>&1`
60664  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60665  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60666  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60667    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
60668    JVM_ARG_OK=true
60669  else
60670    $ECHO "Arg failed:" >&5
60671    $ECHO "$OUTPUT" >&5
60672    JVM_ARG_OK=false
60673  fi
60674
60675
60676  # Maximum amount of heap memory.
60677  # Maximum stack size.
60678  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
60679  if test "x$BOOT_JDK_BITS" = "x32"; then
60680    if test "$JVM_MAX_HEAP" -gt "1100"; then
60681      JVM_MAX_HEAP=1100
60682    elif test "$JVM_MAX_HEAP" -lt "512"; then
60683      JVM_MAX_HEAP=512
60684    fi
60685    STACK_SIZE=768
60686  else
60687    # Running a 64 bit JVM allows for and requires a bigger heap
60688    if test "$JVM_MAX_HEAP" -gt "1600"; then
60689      JVM_MAX_HEAP=1600
60690    elif test "$JVM_MAX_HEAP" -lt "512"; then
60691      JVM_MAX_HEAP=512
60692    fi
60693    STACK_SIZE=1536
60694  fi
60695
60696  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
60697  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
60698  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
60699  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60700  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60701  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60702    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
60703    JVM_ARG_OK=true
60704  else
60705    $ECHO "Arg failed:" >&5
60706    $ECHO "$OUTPUT" >&5
60707    JVM_ARG_OK=false
60708  fi
60709
60710
60711  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
60712  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
60713  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
60714  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60715  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60716  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60717    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
60718    JVM_ARG_OK=true
60719  else
60720    $ECHO "Arg failed:" >&5
60721    $ECHO "$OUTPUT" >&5
60722    JVM_ARG_OK=false
60723  fi
60724
60725
60726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
60727$as_echo "$boot_jdk_jvmargs_big" >&6; }
60728
60729  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
60730
60731
60732  # By default, the main javac compilations use big
60733  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
60734
60735
60736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
60737$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
60738
60739  # Use serial gc for small short lived tools if possible
60740
60741  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
60742  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
60743  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
60744  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60745  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60746  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60747    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
60748    JVM_ARG_OK=true
60749  else
60750    $ECHO "Arg failed:" >&5
60751    $ECHO "$OUTPUT" >&5
60752    JVM_ARG_OK=false
60753  fi
60754
60755
60756  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
60757  $ECHO "Command: $JAVA -Xms32M -version" >&5
60758  OUTPUT=`$JAVA -Xms32M -version 2>&1`
60759  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60760  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60761  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60762    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
60763    JVM_ARG_OK=true
60764  else
60765    $ECHO "Arg failed:" >&5
60766    $ECHO "$OUTPUT" >&5
60767    JVM_ARG_OK=false
60768  fi
60769
60770
60771  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
60772  $ECHO "Command: $JAVA -Xmx512M -version" >&5
60773  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
60774  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60775  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60776  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60777    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
60778    JVM_ARG_OK=true
60779  else
60780    $ECHO "Arg failed:" >&5
60781    $ECHO "$OUTPUT" >&5
60782    JVM_ARG_OK=false
60783  fi
60784
60785
60786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
60787$as_echo "$boot_jdk_jvmargs_small" >&6; }
60788
60789  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
60790
60791
60792  JAVA_TOOL_FLAGS_SMALL=""
60793  for f in $JAVA_FLAGS_SMALL; do
60794    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
60795  done
60796
60797
60798
60799# Setup smart javac (after cores and memory have been setup)
60800
60801
60802# Check whether --with-sjavac-server-java was given.
60803if test "${with_sjavac_server_java+set}" = set; then :
60804  withval=$with_sjavac_server_java;
60805fi
60806
60807
60808  if test "x$with_sjavac_server_java" != x; then
60809    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
60810    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
60811    if test "x$FOUND_VERSION" = x; then
60812      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
60813    fi
60814  else
60815    SJAVAC_SERVER_JAVA="$JAVA"
60816  fi
60817
60818
60819  if test "$MEMORY_SIZE" -gt "3000"; then
60820
60821  $ECHO "Check if jvm arg is ok: -d64" >&5
60822  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
60823  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
60824  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60825  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60826  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60827    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
60828    JVM_ARG_OK=true
60829  else
60830    $ECHO "Arg failed:" >&5
60831    $ECHO "$OUTPUT" >&5
60832    JVM_ARG_OK=false
60833  fi
60834
60835    if test "$JVM_ARG_OK" = true; then
60836      JVM_64BIT=true
60837      JVM_ARG_OK=false
60838    fi
60839  fi
60840
60841  MX_VALUE=`expr $MEMORY_SIZE / 2`
60842  if test "$JVM_64BIT" = true; then
60843    # Set ms lower than mx since more than one instance of the server might
60844    # get launched at the same time before they figure out which instance won.
60845    MS_VALUE=512
60846    if test "$MX_VALUE" -gt "2048"; then
60847      MX_VALUE=2048
60848    fi
60849  else
60850    MS_VALUE=256
60851    if test "$MX_VALUE" -gt "1500"; then
60852      MX_VALUE=1500
60853    fi
60854  fi
60855  if test "$MX_VALUE" -lt "512"; then
60856    MX_VALUE=512
60857  fi
60858
60859  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
60860  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
60861  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
60862  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60863  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60864  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60865    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
60866    JVM_ARG_OK=true
60867  else
60868    $ECHO "Arg failed:" >&5
60869    $ECHO "$OUTPUT" >&5
60870    JVM_ARG_OK=false
60871  fi
60872
60873
60874
60875  # Check whether --enable-sjavac was given.
60876if test "${enable_sjavac+set}" = set; then :
60877  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
60878else
60879  ENABLE_SJAVAC="no"
60880fi
60881
60882  if test "x$JVM_ARG_OK" = "xfalse"; then
60883    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
60884$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
60885    ENABLE_SJAVAC="no"
60886  fi
60887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
60888$as_echo_n "checking whether to use sjavac... " >&6; }
60889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
60890$as_echo "$ENABLE_SJAVAC" >&6; }
60891
60892
60893  # Check whether --enable-javac-server was given.
60894if test "${enable_javac_server+set}" = set; then :
60895  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
60896else
60897  ENABLE_JAVAC_SERVER="yes"
60898fi
60899
60900  if test "x$JVM_ARG_OK" = "xfalse"; then
60901    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
60902$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
60903    ENABLE_JAVAC_SERVER="no"
60904  fi
60905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
60906$as_echo_n "checking whether to use javac server... " >&6; }
60907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
60908$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
60909
60910
60911  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
60912    # When using a server javac, the small client instances do not need much
60913    # resources.
60914    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
60915  fi
60916
60917
60918# Setup use of icecc if requested
60919
60920  # Check whether --enable-icecc was given.
60921if test "${enable_icecc+set}" = set; then :
60922  enableval=$enable_icecc;
60923fi
60924
60925
60926  if test "x${enable_icecc}" = "xyes"; then
60927
60928
60929
60930  # Publish this variable in the help.
60931
60932
60933  if [ -z "${ICECC_CMD+x}" ]; then
60934    # The variable is not set by user, try to locate tool using the code snippet
60935    for ac_prog in icecc
60936do
60937  # Extract the first word of "$ac_prog", so it can be a program name with args.
60938set dummy $ac_prog; ac_word=$2
60939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60940$as_echo_n "checking for $ac_word... " >&6; }
60941if ${ac_cv_path_ICECC_CMD+:} false; then :
60942  $as_echo_n "(cached) " >&6
60943else
60944  case $ICECC_CMD in
60945  [\\/]* | ?:[\\/]*)
60946  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
60947  ;;
60948  *)
60949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60950for as_dir in $PATH
60951do
60952  IFS=$as_save_IFS
60953  test -z "$as_dir" && as_dir=.
60954    for ac_exec_ext in '' $ac_executable_extensions; do
60955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60956    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
60957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60958    break 2
60959  fi
60960done
60961  done
60962IFS=$as_save_IFS
60963
60964  ;;
60965esac
60966fi
60967ICECC_CMD=$ac_cv_path_ICECC_CMD
60968if test -n "$ICECC_CMD"; then
60969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
60970$as_echo "$ICECC_CMD" >&6; }
60971else
60972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60973$as_echo "no" >&6; }
60974fi
60975
60976
60977  test -n "$ICECC_CMD" && break
60978done
60979
60980  else
60981    # The variable is set, but is it from the command line or the environment?
60982
60983    # Try to remove the string !ICECC_CMD! from our list.
60984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
60985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60986      # If it failed, the variable was not from the command line. Ignore it,
60987      # but warn the user (except for BASH, which is always set by the calling BASH).
60988      if test "xICECC_CMD" != xBASH; then
60989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
60990$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
60991      fi
60992      # Try to locate tool using the code snippet
60993      for ac_prog in icecc
60994do
60995  # Extract the first word of "$ac_prog", so it can be a program name with args.
60996set dummy $ac_prog; ac_word=$2
60997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60998$as_echo_n "checking for $ac_word... " >&6; }
60999if ${ac_cv_path_ICECC_CMD+:} false; then :
61000  $as_echo_n "(cached) " >&6
61001else
61002  case $ICECC_CMD in
61003  [\\/]* | ?:[\\/]*)
61004  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
61005  ;;
61006  *)
61007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61008for as_dir in $PATH
61009do
61010  IFS=$as_save_IFS
61011  test -z "$as_dir" && as_dir=.
61012    for ac_exec_ext in '' $ac_executable_extensions; do
61013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61014    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
61015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61016    break 2
61017  fi
61018done
61019  done
61020IFS=$as_save_IFS
61021
61022  ;;
61023esac
61024fi
61025ICECC_CMD=$ac_cv_path_ICECC_CMD
61026if test -n "$ICECC_CMD"; then
61027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
61028$as_echo "$ICECC_CMD" >&6; }
61029else
61030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61031$as_echo "no" >&6; }
61032fi
61033
61034
61035  test -n "$ICECC_CMD" && break
61036done
61037
61038    else
61039      # If it succeeded, then it was overridden by the user. We will use it
61040      # for the tool.
61041
61042      # First remove it from the list of overridden variables, so we can test
61043      # for unknown variables in the end.
61044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61045
61046      # Check if we try to supply an empty value
61047      if test "x$ICECC_CMD" = x; then
61048        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
61049$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
61050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
61051$as_echo_n "checking for ICECC_CMD... " >&6; }
61052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61053$as_echo "disabled" >&6; }
61054      else
61055        # Check if the provided tool contains a complete path.
61056        tool_specified="$ICECC_CMD"
61057        tool_basename="${tool_specified##*/}"
61058        if test "x$tool_basename" = "x$tool_specified"; then
61059          # A command without a complete path is provided, search $PATH.
61060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
61061$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
61062          # Extract the first word of "$tool_basename", so it can be a program name with args.
61063set dummy $tool_basename; ac_word=$2
61064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61065$as_echo_n "checking for $ac_word... " >&6; }
61066if ${ac_cv_path_ICECC_CMD+:} false; then :
61067  $as_echo_n "(cached) " >&6
61068else
61069  case $ICECC_CMD in
61070  [\\/]* | ?:[\\/]*)
61071  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
61072  ;;
61073  *)
61074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61075for as_dir in $PATH
61076do
61077  IFS=$as_save_IFS
61078  test -z "$as_dir" && as_dir=.
61079    for ac_exec_ext in '' $ac_executable_extensions; do
61080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61081    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
61082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61083    break 2
61084  fi
61085done
61086  done
61087IFS=$as_save_IFS
61088
61089  ;;
61090esac
61091fi
61092ICECC_CMD=$ac_cv_path_ICECC_CMD
61093if test -n "$ICECC_CMD"; then
61094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
61095$as_echo "$ICECC_CMD" >&6; }
61096else
61097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61098$as_echo "no" >&6; }
61099fi
61100
61101
61102          if test "x$ICECC_CMD" = x; then
61103            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61104          fi
61105        else
61106          # Otherwise we believe it is a complete path. Use it as it is.
61107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
61108$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
61109          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
61110$as_echo_n "checking for ICECC_CMD... " >&6; }
61111          if test ! -x "$tool_specified"; then
61112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61113$as_echo "not found" >&6; }
61114            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
61115          fi
61116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61117$as_echo "$tool_specified" >&6; }
61118        fi
61119      fi
61120    fi
61121
61122  fi
61123
61124
61125
61126  if test "x$ICECC_CMD" = x; then
61127    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
61128  fi
61129
61130
61131    old_path="$PATH"
61132
61133    # Look for icecc-create-env in some known places
61134    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
61135
61136
61137
61138  # Publish this variable in the help.
61139
61140
61141  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
61142    # The variable is not set by user, try to locate tool using the code snippet
61143    for ac_prog in icecc-create-env
61144do
61145  # Extract the first word of "$ac_prog", so it can be a program name with args.
61146set dummy $ac_prog; ac_word=$2
61147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61148$as_echo_n "checking for $ac_word... " >&6; }
61149if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
61150  $as_echo_n "(cached) " >&6
61151else
61152  case $ICECC_CREATE_ENV in
61153  [\\/]* | ?:[\\/]*)
61154  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
61155  ;;
61156  *)
61157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61158for as_dir in $PATH
61159do
61160  IFS=$as_save_IFS
61161  test -z "$as_dir" && as_dir=.
61162    for ac_exec_ext in '' $ac_executable_extensions; do
61163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61164    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
61165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61166    break 2
61167  fi
61168done
61169  done
61170IFS=$as_save_IFS
61171
61172  ;;
61173esac
61174fi
61175ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
61176if test -n "$ICECC_CREATE_ENV"; then
61177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
61178$as_echo "$ICECC_CREATE_ENV" >&6; }
61179else
61180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61181$as_echo "no" >&6; }
61182fi
61183
61184
61185  test -n "$ICECC_CREATE_ENV" && break
61186done
61187
61188  else
61189    # The variable is set, but is it from the command line or the environment?
61190
61191    # Try to remove the string !ICECC_CREATE_ENV! from our list.
61192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
61193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
61194      # If it failed, the variable was not from the command line. Ignore it,
61195      # but warn the user (except for BASH, which is always set by the calling BASH).
61196      if test "xICECC_CREATE_ENV" != xBASH; then
61197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
61198$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
61199      fi
61200      # Try to locate tool using the code snippet
61201      for ac_prog in icecc-create-env
61202do
61203  # Extract the first word of "$ac_prog", so it can be a program name with args.
61204set dummy $ac_prog; ac_word=$2
61205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61206$as_echo_n "checking for $ac_word... " >&6; }
61207if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
61208  $as_echo_n "(cached) " >&6
61209else
61210  case $ICECC_CREATE_ENV in
61211  [\\/]* | ?:[\\/]*)
61212  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
61213  ;;
61214  *)
61215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61216for as_dir in $PATH
61217do
61218  IFS=$as_save_IFS
61219  test -z "$as_dir" && as_dir=.
61220    for ac_exec_ext in '' $ac_executable_extensions; do
61221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61222    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
61223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61224    break 2
61225  fi
61226done
61227  done
61228IFS=$as_save_IFS
61229
61230  ;;
61231esac
61232fi
61233ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
61234if test -n "$ICECC_CREATE_ENV"; then
61235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
61236$as_echo "$ICECC_CREATE_ENV" >&6; }
61237else
61238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61239$as_echo "no" >&6; }
61240fi
61241
61242
61243  test -n "$ICECC_CREATE_ENV" && break
61244done
61245
61246    else
61247      # If it succeeded, then it was overridden by the user. We will use it
61248      # for the tool.
61249
61250      # First remove it from the list of overridden variables, so we can test
61251      # for unknown variables in the end.
61252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61253
61254      # Check if we try to supply an empty value
61255      if test "x$ICECC_CREATE_ENV" = x; then
61256        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
61257$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
61258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
61259$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
61260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61261$as_echo "disabled" >&6; }
61262      else
61263        # Check if the provided tool contains a complete path.
61264        tool_specified="$ICECC_CREATE_ENV"
61265        tool_basename="${tool_specified##*/}"
61266        if test "x$tool_basename" = "x$tool_specified"; then
61267          # A command without a complete path is provided, search $PATH.
61268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
61269$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
61270          # Extract the first word of "$tool_basename", so it can be a program name with args.
61271set dummy $tool_basename; ac_word=$2
61272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61273$as_echo_n "checking for $ac_word... " >&6; }
61274if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
61275  $as_echo_n "(cached) " >&6
61276else
61277  case $ICECC_CREATE_ENV in
61278  [\\/]* | ?:[\\/]*)
61279  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
61280  ;;
61281  *)
61282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61283for as_dir in $PATH
61284do
61285  IFS=$as_save_IFS
61286  test -z "$as_dir" && as_dir=.
61287    for ac_exec_ext in '' $ac_executable_extensions; do
61288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61289    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
61290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61291    break 2
61292  fi
61293done
61294  done
61295IFS=$as_save_IFS
61296
61297  ;;
61298esac
61299fi
61300ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
61301if test -n "$ICECC_CREATE_ENV"; then
61302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
61303$as_echo "$ICECC_CREATE_ENV" >&6; }
61304else
61305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61306$as_echo "no" >&6; }
61307fi
61308
61309
61310          if test "x$ICECC_CREATE_ENV" = x; then
61311            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61312          fi
61313        else
61314          # Otherwise we believe it is a complete path. Use it as it is.
61315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
61316$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
61317          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
61318$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
61319          if test ! -x "$tool_specified"; then
61320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61321$as_echo "not found" >&6; }
61322            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
61323          fi
61324          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61325$as_echo "$tool_specified" >&6; }
61326        fi
61327      fi
61328    fi
61329
61330  fi
61331
61332
61333
61334  if test "x$ICECC_CREATE_ENV" = x; then
61335    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
61336  fi
61337
61338
61339    # Use icecc-create-env to create a minimal compilation environment that can
61340    # be sent to the other hosts in the icecream cluster.
61341    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
61342    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
61343    # Older versions of icecc does not have the --gcc parameter
61344    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
61345      icecc_gcc_arg="--gcc"
61346    fi
61347    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
61348
61349  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61350      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
61351          ${icecc_create_env_log} 2>&1 )
61352  if test "$?" != "0"; then
61353    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61354$as_echo "$as_me: icecc-create-env output:" >&6;}
61355    cat \
61356          ${icecc_create_env_log}
61357    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61358  fi
61359
61360    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
61361      # For clang, the icecc compilerwrapper is needed. It usually resides next
61362      # to icecc-create-env.
61363
61364
61365
61366  # Publish this variable in the help.
61367
61368
61369  if [ -z "${ICECC_WRAPPER+x}" ]; then
61370    # The variable is not set by user, try to locate tool using the code snippet
61371    for ac_prog in compilerwrapper
61372do
61373  # Extract the first word of "$ac_prog", so it can be a program name with args.
61374set dummy $ac_prog; ac_word=$2
61375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61376$as_echo_n "checking for $ac_word... " >&6; }
61377if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
61378  $as_echo_n "(cached) " >&6
61379else
61380  case $ICECC_WRAPPER in
61381  [\\/]* | ?:[\\/]*)
61382  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
61383  ;;
61384  *)
61385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61386for as_dir in $PATH
61387do
61388  IFS=$as_save_IFS
61389  test -z "$as_dir" && as_dir=.
61390    for ac_exec_ext in '' $ac_executable_extensions; do
61391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61392    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
61393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61394    break 2
61395  fi
61396done
61397  done
61398IFS=$as_save_IFS
61399
61400  ;;
61401esac
61402fi
61403ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
61404if test -n "$ICECC_WRAPPER"; then
61405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
61406$as_echo "$ICECC_WRAPPER" >&6; }
61407else
61408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61409$as_echo "no" >&6; }
61410fi
61411
61412
61413  test -n "$ICECC_WRAPPER" && break
61414done
61415
61416  else
61417    # The variable is set, but is it from the command line or the environment?
61418
61419    # Try to remove the string !ICECC_WRAPPER! from our list.
61420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
61421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
61422      # If it failed, the variable was not from the command line. Ignore it,
61423      # but warn the user (except for BASH, which is always set by the calling BASH).
61424      if test "xICECC_WRAPPER" != xBASH; then
61425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
61426$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
61427      fi
61428      # Try to locate tool using the code snippet
61429      for ac_prog in compilerwrapper
61430do
61431  # Extract the first word of "$ac_prog", so it can be a program name with args.
61432set dummy $ac_prog; ac_word=$2
61433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61434$as_echo_n "checking for $ac_word... " >&6; }
61435if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
61436  $as_echo_n "(cached) " >&6
61437else
61438  case $ICECC_WRAPPER in
61439  [\\/]* | ?:[\\/]*)
61440  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
61441  ;;
61442  *)
61443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61444for as_dir in $PATH
61445do
61446  IFS=$as_save_IFS
61447  test -z "$as_dir" && as_dir=.
61448    for ac_exec_ext in '' $ac_executable_extensions; do
61449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61450    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
61451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61452    break 2
61453  fi
61454done
61455  done
61456IFS=$as_save_IFS
61457
61458  ;;
61459esac
61460fi
61461ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
61462if test -n "$ICECC_WRAPPER"; then
61463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
61464$as_echo "$ICECC_WRAPPER" >&6; }
61465else
61466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61467$as_echo "no" >&6; }
61468fi
61469
61470
61471  test -n "$ICECC_WRAPPER" && break
61472done
61473
61474    else
61475      # If it succeeded, then it was overridden by the user. We will use it
61476      # for the tool.
61477
61478      # First remove it from the list of overridden variables, so we can test
61479      # for unknown variables in the end.
61480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61481
61482      # Check if we try to supply an empty value
61483      if test "x$ICECC_WRAPPER" = x; then
61484        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
61485$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
61486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
61487$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
61488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61489$as_echo "disabled" >&6; }
61490      else
61491        # Check if the provided tool contains a complete path.
61492        tool_specified="$ICECC_WRAPPER"
61493        tool_basename="${tool_specified##*/}"
61494        if test "x$tool_basename" = "x$tool_specified"; then
61495          # A command without a complete path is provided, search $PATH.
61496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
61497$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
61498          # Extract the first word of "$tool_basename", so it can be a program name with args.
61499set dummy $tool_basename; ac_word=$2
61500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61501$as_echo_n "checking for $ac_word... " >&6; }
61502if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
61503  $as_echo_n "(cached) " >&6
61504else
61505  case $ICECC_WRAPPER in
61506  [\\/]* | ?:[\\/]*)
61507  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
61508  ;;
61509  *)
61510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61511for as_dir in $PATH
61512do
61513  IFS=$as_save_IFS
61514  test -z "$as_dir" && as_dir=.
61515    for ac_exec_ext in '' $ac_executable_extensions; do
61516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61517    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
61518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61519    break 2
61520  fi
61521done
61522  done
61523IFS=$as_save_IFS
61524
61525  ;;
61526esac
61527fi
61528ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
61529if test -n "$ICECC_WRAPPER"; then
61530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
61531$as_echo "$ICECC_WRAPPER" >&6; }
61532else
61533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61534$as_echo "no" >&6; }
61535fi
61536
61537
61538          if test "x$ICECC_WRAPPER" = x; then
61539            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61540          fi
61541        else
61542          # Otherwise we believe it is a complete path. Use it as it is.
61543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
61544$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
61545          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
61546$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
61547          if test ! -x "$tool_specified"; then
61548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61549$as_echo "not found" >&6; }
61550            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
61551          fi
61552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61553$as_echo "$tool_specified" >&6; }
61554        fi
61555      fi
61556    fi
61557
61558  fi
61559
61560
61561
61562  if test "x$ICECC_WRAPPER" = x; then
61563    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
61564  fi
61565
61566
61567
61568  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61569      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
61570  if test "$?" != "0"; then
61571    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61572$as_echo "$as_me: icecc-create-env output:" >&6;}
61573    cat ${icecc_create_env_log}
61574    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61575  fi
61576
61577    else
61578      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
61579    fi
61580    PATH="$old_path"
61581    # The bundle with the compiler gets a name based on checksums. Parse log file
61582    # to find it.
61583    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
61584    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
61585    if test ! -f ${ICECC_ENV_BUNDLE}; then
61586      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
61587    fi
61588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
61589$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
61590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
61591$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
61592    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
61593
61594    if test "x${COMPILE_TYPE}" = "xcross"; then
61595      # If cross compiling, create a separate env package for the build compiler
61596      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
61597      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
61598      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
61599
61600  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61601      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
61602            ${icecc_create_env_log_build} 2>&1 )
61603  if test "$?" != "0"; then
61604    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61605$as_echo "$as_me: icecc-create-env output:" >&6;}
61606    cat \
61607            ${icecc_create_env_log_build}
61608    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61609  fi
61610
61611      elif test "x${BUILD_CC##*/}" = "xclang"; then
61612
61613  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61614      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
61615  if test "$?" != "0"; then
61616    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61617$as_echo "$as_me: icecc-create-env output:" >&6;}
61618    cat ${icecc_create_env_log_build}
61619    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61620  fi
61621
61622      else
61623        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
61624      fi
61625      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
61626      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
61627      if test ! -f ${ICECC_ENV_BUNDLE}; then
61628        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
61629      fi
61630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
61631$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
61632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
61633$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
61634      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
61635          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
61636    else
61637      BUILD_ICECC="${ICECC}"
61638    fi
61639
61640
61641  fi
61642
61643
61644# Can the C/C++ compiler use precompiled headers?
61645
61646
61647  ###############################################################################
61648  #
61649  # Can the C/C++ compiler use precompiled headers?
61650  #
61651  # Check whether --enable-precompiled-headers was given.
61652if test "${enable_precompiled_headers+set}" = set; then :
61653  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
61654else
61655  ENABLE_PRECOMPH=yes
61656fi
61657
61658
61659  USE_PRECOMPILED_HEADER=1
61660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
61661$as_echo_n "checking If precompiled header is enabled... " >&6; }
61662  if test "x$ENABLE_PRECOMPH" = xno; then
61663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
61664$as_echo "no, forced" >&6; }
61665    USE_PRECOMPILED_HEADER=0
61666  elif test "x$ICECC" != "x"; then
61667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
61668$as_echo "no, does not work effectively with icecc" >&6; }
61669    USE_PRECOMPILED_HEADER=0
61670  else
61671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61672$as_echo "yes" >&6; }
61673  fi
61674
61675  if test "x$ENABLE_PRECOMPH" = xyes; then
61676    # Check that the compiler actually supports precomp headers.
61677    if test "x$TOOLCHAIN_TYPE" = xgcc; then
61678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
61679$as_echo_n "checking that precompiled headers work... " >&6; }
61680      echo "int alfa();" > conftest.h
61681      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
61682      if test ! -f conftest.hpp.gch; then
61683        USE_PRECOMPILED_HEADER=0
61684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61685$as_echo "no" >&6; }
61686      else
61687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61688$as_echo "yes" >&6; }
61689      fi
61690      rm -f conftest.h conftest.hpp.gch
61691    fi
61692  fi
61693
61694
61695
61696
61697# Setup use of ccache, if available
61698
61699  # Check whether --enable-ccache was given.
61700if test "${enable_ccache+set}" = set; then :
61701  enableval=$enable_ccache;
61702fi
61703
61704
61705  CCACHE=
61706  CCACHE_STATUS=
61707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
61708$as_echo_n "checking is ccache enabled... " >&6; }
61709  if test "x$enable_ccache" = xyes; then
61710    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
61711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61712$as_echo "yes" >&6; }
61713      OLD_PATH="$PATH"
61714      if test "x$TOOLCHAIN_PATH" != x; then
61715        PATH=$TOOLCHAIN_PATH:$PATH
61716      fi
61717
61718
61719
61720  # Publish this variable in the help.
61721
61722
61723  if [ -z "${CCACHE+x}" ]; then
61724    # The variable is not set by user, try to locate tool using the code snippet
61725    for ac_prog in ccache
61726do
61727  # Extract the first word of "$ac_prog", so it can be a program name with args.
61728set dummy $ac_prog; ac_word=$2
61729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61730$as_echo_n "checking for $ac_word... " >&6; }
61731if ${ac_cv_path_CCACHE+:} false; then :
61732  $as_echo_n "(cached) " >&6
61733else
61734  case $CCACHE in
61735  [\\/]* | ?:[\\/]*)
61736  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
61737  ;;
61738  *)
61739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61740for as_dir in $PATH
61741do
61742  IFS=$as_save_IFS
61743  test -z "$as_dir" && as_dir=.
61744    for ac_exec_ext in '' $ac_executable_extensions; do
61745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61746    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
61747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61748    break 2
61749  fi
61750done
61751  done
61752IFS=$as_save_IFS
61753
61754  ;;
61755esac
61756fi
61757CCACHE=$ac_cv_path_CCACHE
61758if test -n "$CCACHE"; then
61759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
61760$as_echo "$CCACHE" >&6; }
61761else
61762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61763$as_echo "no" >&6; }
61764fi
61765
61766
61767  test -n "$CCACHE" && break
61768done
61769
61770  else
61771    # The variable is set, but is it from the command line or the environment?
61772
61773    # Try to remove the string !CCACHE! from our list.
61774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
61775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
61776      # If it failed, the variable was not from the command line. Ignore it,
61777      # but warn the user (except for BASH, which is always set by the calling BASH).
61778      if test "xCCACHE" != xBASH; then
61779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
61780$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
61781      fi
61782      # Try to locate tool using the code snippet
61783      for ac_prog in ccache
61784do
61785  # Extract the first word of "$ac_prog", so it can be a program name with args.
61786set dummy $ac_prog; ac_word=$2
61787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61788$as_echo_n "checking for $ac_word... " >&6; }
61789if ${ac_cv_path_CCACHE+:} false; then :
61790  $as_echo_n "(cached) " >&6
61791else
61792  case $CCACHE in
61793  [\\/]* | ?:[\\/]*)
61794  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
61795  ;;
61796  *)
61797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61798for as_dir in $PATH
61799do
61800  IFS=$as_save_IFS
61801  test -z "$as_dir" && as_dir=.
61802    for ac_exec_ext in '' $ac_executable_extensions; do
61803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61804    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
61805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61806    break 2
61807  fi
61808done
61809  done
61810IFS=$as_save_IFS
61811
61812  ;;
61813esac
61814fi
61815CCACHE=$ac_cv_path_CCACHE
61816if test -n "$CCACHE"; then
61817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
61818$as_echo "$CCACHE" >&6; }
61819else
61820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61821$as_echo "no" >&6; }
61822fi
61823
61824
61825  test -n "$CCACHE" && break
61826done
61827
61828    else
61829      # If it succeeded, then it was overridden by the user. We will use it
61830      # for the tool.
61831
61832      # First remove it from the list of overridden variables, so we can test
61833      # for unknown variables in the end.
61834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61835
61836      # Check if we try to supply an empty value
61837      if test "x$CCACHE" = x; then
61838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
61839$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
61840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
61841$as_echo_n "checking for CCACHE... " >&6; }
61842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61843$as_echo "disabled" >&6; }
61844      else
61845        # Check if the provided tool contains a complete path.
61846        tool_specified="$CCACHE"
61847        tool_basename="${tool_specified##*/}"
61848        if test "x$tool_basename" = "x$tool_specified"; then
61849          # A command without a complete path is provided, search $PATH.
61850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
61851$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
61852          # Extract the first word of "$tool_basename", so it can be a program name with args.
61853set dummy $tool_basename; ac_word=$2
61854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61855$as_echo_n "checking for $ac_word... " >&6; }
61856if ${ac_cv_path_CCACHE+:} false; then :
61857  $as_echo_n "(cached) " >&6
61858else
61859  case $CCACHE in
61860  [\\/]* | ?:[\\/]*)
61861  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
61862  ;;
61863  *)
61864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61865for as_dir in $PATH
61866do
61867  IFS=$as_save_IFS
61868  test -z "$as_dir" && as_dir=.
61869    for ac_exec_ext in '' $ac_executable_extensions; do
61870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61871    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
61872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61873    break 2
61874  fi
61875done
61876  done
61877IFS=$as_save_IFS
61878
61879  ;;
61880esac
61881fi
61882CCACHE=$ac_cv_path_CCACHE
61883if test -n "$CCACHE"; then
61884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
61885$as_echo "$CCACHE" >&6; }
61886else
61887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61888$as_echo "no" >&6; }
61889fi
61890
61891
61892          if test "x$CCACHE" = x; then
61893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61894          fi
61895        else
61896          # Otherwise we believe it is a complete path. Use it as it is.
61897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
61898$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
61899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
61900$as_echo_n "checking for CCACHE... " >&6; }
61901          if test ! -x "$tool_specified"; then
61902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61903$as_echo "not found" >&6; }
61904            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
61905          fi
61906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61907$as_echo "$tool_specified" >&6; }
61908        fi
61909      fi
61910    fi
61911
61912  fi
61913
61914
61915
61916  if test "x$CCACHE" = x; then
61917    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
61918  fi
61919
61920
61921      PATH="$OLD_PATH"
61922      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
61923      CCACHE_STATUS="Active ($CCACHE_VERSION)"
61924    else
61925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61926$as_echo "no" >&6; }
61927      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
61928$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
61929    fi
61930  elif test "x$enable_ccache" = xno; then
61931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
61932$as_echo "no, explicitly disabled" >&6; }
61933    CCACHE_STATUS="Disabled"
61934  elif test "x$enable_ccache" = x; then
61935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61936$as_echo "no" >&6; }
61937  else
61938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
61939$as_echo "unknown" >&6; }
61940    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
61941  fi
61942
61943
61944
61945# Check whether --with-ccache-dir was given.
61946if test "${with_ccache_dir+set}" = set; then :
61947  withval=$with_ccache_dir;
61948fi
61949
61950
61951  if test "x$with_ccache_dir" != x; then
61952    # When using a non home ccache directory, assume the use is to share ccache files
61953    # with other users. Thus change the umask.
61954    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
61955    if test "x$CCACHE" = x; then
61956      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
61957$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
61958    fi
61959  fi
61960
61961  if test "x$CCACHE" != x; then
61962
61963  if test "x$CCACHE" != x; then
61964    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
61965      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
61966          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
61967      if test "x$HAS_BAD_CCACHE" != "x"; then
61968        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
61969      fi
61970      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
61971$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
61972      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
61973      PUSHED_FLAGS="$CXXFLAGS"
61974      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
61975      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61976/* end confdefs.h.  */
61977
61978int
61979main ()
61980{
61981
61982  ;
61983  return 0;
61984}
61985_ACEOF
61986if ac_fn_cxx_try_compile "$LINENO"; then :
61987  CC_KNOWS_CCACHE_TRICK=yes
61988else
61989  CC_KNOWS_CCACHE_TRICK=no
61990fi
61991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61992      CXXFLAGS="$PUSHED_FLAGS"
61993      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
61994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61995$as_echo "yes" >&6; }
61996        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
61997
61998        CCACHE_SLOPPINESS=pch_defines,time_macros
61999      else
62000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62001$as_echo "no" >&6; }
62002        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
62003      fi
62004    fi
62005
62006    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
62007        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
62008
62009    if test "x$SET_CCACHE_DIR" != x; then
62010      mkdir -p $CCACHE_DIR > /dev/null 2>&1
62011      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
62012    fi
62013  fi
62014
62015  fi
62016
62017
62018###############################################################################
62019#
62020# And now the finish...
62021#
62022###############################################################################
62023
62024# Check for some common pitfalls
62025
62026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62027    file_to_test="$SRC_ROOT/LICENSE"
62028    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
62029      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
62030    fi
62031  fi
62032
62033
62034  # Did user specify any unknown variables?
62035
62036  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
62037    # Replace the separating ! with spaces before presenting for end user.
62038    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
62039    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
62040$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
62041  fi
62042
62043
62044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
62045$as_echo_n "checking if build directory is on local disk... " >&6; }
62046
62047  # df -l lists only local disks; if the given directory is not found then
62048  # a non-zero exit code is given
62049  if test "x$DF" = x; then
62050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62051      # msys does not have df; use Windows "net use" instead.
62052      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
62053      if test "x$IS_NETWORK_DISK" = x; then
62054        OUTPUT_DIR_IS_LOCAL="yes"
62055      else
62056        OUTPUT_DIR_IS_LOCAL="no"
62057      fi
62058    else
62059      # No df here, say it's local
62060      OUTPUT_DIR_IS_LOCAL="yes"
62061    fi
62062  else
62063    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
62064      OUTPUT_DIR_IS_LOCAL="yes"
62065    else
62066      OUTPUT_DIR_IS_LOCAL="no"
62067    fi
62068  fi
62069
62070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
62071$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
62072
62073
62074
62075  # Check if the user has any old-style ALT_ variables set.
62076  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
62077
62078  # Before generating output files, test if they exist. If they do, this is a reconfigure.
62079  # Since we can't properly handle the dependencies for this, warn the user about the situation
62080  if test -e $OUTPUT_ROOT/spec.gmk; then
62081    IS_RECONFIGURE=yes
62082  else
62083    IS_RECONFIGURE=no
62084  fi
62085
62086
62087# At the end, call the custom hook. (Dummy macro if no custom sources available)
62088
62089
62090# We're messing a bit with internal autoconf variables to put the config.status
62091# in the output directory instead of the current directory.
62092CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
62093
62094# Create the actual output files. Now the main work of configure is done.
62095cat >confcache <<\_ACEOF
62096# This file is a shell script that caches the results of configure
62097# tests run on this system so they can be shared between configure
62098# scripts and configure runs, see configure's option --config-cache.
62099# It is not useful on other systems.  If it contains results you don't
62100# want to keep, you may remove or edit it.
62101#
62102# config.status only pays attention to the cache file if you give it
62103# the --recheck option to rerun configure.
62104#
62105# `ac_cv_env_foo' variables (set or unset) will be overridden when
62106# loading this file, other *unset* `ac_cv_foo' will be assigned the
62107# following values.
62108
62109_ACEOF
62110
62111# The following way of writing the cache mishandles newlines in values,
62112# but we know of no workaround that is simple, portable, and efficient.
62113# So, we kill variables containing newlines.
62114# Ultrix sh set writes to stderr and can't be redirected directly,
62115# and sets the high bit in the cache file unless we assign to the vars.
62116(
62117  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
62118    eval ac_val=\$$ac_var
62119    case $ac_val in #(
62120    *${as_nl}*)
62121      case $ac_var in #(
62122      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
62123$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
62124      esac
62125      case $ac_var in #(
62126      _ | IFS | as_nl) ;; #(
62127      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
62128      *) { eval $ac_var=; unset $ac_var;} ;;
62129      esac ;;
62130    esac
62131  done
62132
62133  (set) 2>&1 |
62134    case $as_nl`(ac_space=' '; set) 2>&1` in #(
62135    *${as_nl}ac_space=\ *)
62136      # `set' does not quote correctly, so add quotes: double-quote
62137      # substitution turns \\\\ into \\, and sed turns \\ into \.
62138      sed -n \
62139	"s/'/'\\\\''/g;
62140	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
62141      ;; #(
62142    *)
62143      # `set' quotes correctly as required by POSIX, so do not add quotes.
62144      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
62145      ;;
62146    esac |
62147    sort
62148) |
62149  sed '
62150     /^ac_cv_env_/b end
62151     t clear
62152     :clear
62153     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
62154     t end
62155     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
62156     :end' >>confcache
62157if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
62158  if test -w "$cache_file"; then
62159    if test "x$cache_file" != "x/dev/null"; then
62160      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
62161$as_echo "$as_me: updating cache $cache_file" >&6;}
62162      if test ! -f "$cache_file" || test -h "$cache_file"; then
62163	cat confcache >"$cache_file"
62164      else
62165        case $cache_file in #(
62166        */* | ?:*)
62167	  mv -f confcache "$cache_file"$$ &&
62168	  mv -f "$cache_file"$$ "$cache_file" ;; #(
62169        *)
62170	  mv -f confcache "$cache_file" ;;
62171	esac
62172      fi
62173    fi
62174  else
62175    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
62176$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
62177  fi
62178fi
62179rm -f confcache
62180
62181test "x$prefix" = xNONE && prefix=$ac_default_prefix
62182# Let make expand exec_prefix.
62183test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
62184
62185# Transform confdefs.h into DEFS.
62186# Protect against shell expansion while executing Makefile rules.
62187# Protect against Makefile macro expansion.
62188#
62189# If the first sed substitution is executed (which looks for macros that
62190# take arguments), then branch to the quote section.  Otherwise,
62191# look for a macro that doesn't take arguments.
62192ac_script='
62193:mline
62194/\\$/{
62195 N
62196 s,\\\n,,
62197 b mline
62198}
62199t clear
62200:clear
62201s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
62202t quote
62203s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
62204t quote
62205b any
62206:quote
62207s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
62208s/\[/\\&/g
62209s/\]/\\&/g
62210s/\$/$$/g
62211H
62212:any
62213${
62214	g
62215	s/^\n//
62216	s/\n/ /g
62217	p
62218}
62219'
62220DEFS=`sed -n "$ac_script" confdefs.h`
62221
62222
62223ac_libobjs=
62224ac_ltlibobjs=
62225U=
62226for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
62227  # 1. Remove the extension, and $U if already installed.
62228  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
62229  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
62230  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
62231  #    will be set to the directory where LIBOBJS objects are built.
62232  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
62233  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
62234done
62235LIBOBJS=$ac_libobjs
62236
62237LTLIBOBJS=$ac_ltlibobjs
62238
62239
62240
62241: "${CONFIG_STATUS=./config.status}"
62242ac_write_fail=0
62243ac_clean_files_save=$ac_clean_files
62244ac_clean_files="$ac_clean_files $CONFIG_STATUS"
62245{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
62246$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
62247as_write_fail=0
62248cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
62249#! $SHELL
62250# Generated by $as_me.
62251# Run this file to recreate the current configuration.
62252# Compiler output produced by configure, useful for debugging
62253# configure, is in config.log if it exists.
62254
62255debug=false
62256ac_cs_recheck=false
62257ac_cs_silent=false
62258
62259SHELL=\${CONFIG_SHELL-$SHELL}
62260export SHELL
62261_ASEOF
62262cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
62263## -------------------- ##
62264## M4sh Initialization. ##
62265## -------------------- ##
62266
62267# Be more Bourne compatible
62268DUALCASE=1; export DUALCASE # for MKS sh
62269if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
62270  emulate sh
62271  NULLCMD=:
62272  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
62273  # is contrary to our usage.  Disable this feature.
62274  alias -g '${1+"$@"}'='"$@"'
62275  setopt NO_GLOB_SUBST
62276else
62277  case `(set -o) 2>/dev/null` in #(
62278  *posix*) :
62279    set -o posix ;; #(
62280  *) :
62281     ;;
62282esac
62283fi
62284
62285
62286as_nl='
62287'
62288export as_nl
62289# Printing a long string crashes Solaris 7 /usr/bin/printf.
62290as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
62291as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
62292as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
62293# Prefer a ksh shell builtin over an external printf program on Solaris,
62294# but without wasting forks for bash or zsh.
62295if test -z "$BASH_VERSION$ZSH_VERSION" \
62296    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
62297  as_echo='print -r --'
62298  as_echo_n='print -rn --'
62299elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
62300  as_echo='printf %s\n'
62301  as_echo_n='printf %s'
62302else
62303  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
62304    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
62305    as_echo_n='/usr/ucb/echo -n'
62306  else
62307    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62308    as_echo_n_body='eval
62309      arg=$1;
62310      case $arg in #(
62311      *"$as_nl"*)
62312	expr "X$arg" : "X\\(.*\\)$as_nl";
62313	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62314      esac;
62315      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
62316    '
62317    export as_echo_n_body
62318    as_echo_n='sh -c $as_echo_n_body as_echo'
62319  fi
62320  export as_echo_body
62321  as_echo='sh -c $as_echo_body as_echo'
62322fi
62323
62324# The user is always right.
62325if test "${PATH_SEPARATOR+set}" != set; then
62326  PATH_SEPARATOR=:
62327  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
62328    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
62329      PATH_SEPARATOR=';'
62330  }
62331fi
62332
62333
62334# IFS
62335# We need space, tab and new line, in precisely that order.  Quoting is
62336# there to prevent editors from complaining about space-tab.
62337# (If _AS_PATH_WALK were called with IFS unset, it would disable word
62338# splitting by setting IFS to empty value.)
62339IFS=" ""	$as_nl"
62340
62341# Find who we are.  Look in the path if we contain no directory separator.
62342as_myself=
62343case $0 in #((
62344  *[\\/]* ) as_myself=$0 ;;
62345  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62346for as_dir in $PATH
62347do
62348  IFS=$as_save_IFS
62349  test -z "$as_dir" && as_dir=.
62350    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
62351  done
62352IFS=$as_save_IFS
62353
62354     ;;
62355esac
62356# We did not find ourselves, most probably we were run as `sh COMMAND'
62357# in which case we are not to be found in the path.
62358if test "x$as_myself" = x; then
62359  as_myself=$0
62360fi
62361if test ! -f "$as_myself"; then
62362  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
62363  exit 1
62364fi
62365
62366# Unset variables that we do not need and which cause bugs (e.g. in
62367# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
62368# suppresses any "Segmentation fault" message there.  '((' could
62369# trigger a bug in pdksh 5.2.14.
62370for as_var in BASH_ENV ENV MAIL MAILPATH
62371do eval test x\${$as_var+set} = xset \
62372  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
62373done
62374PS1='$ '
62375PS2='> '
62376PS4='+ '
62377
62378# NLS nuisances.
62379LC_ALL=C
62380export LC_ALL
62381LANGUAGE=C
62382export LANGUAGE
62383
62384# CDPATH.
62385(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
62386
62387
62388# as_fn_error STATUS ERROR [LINENO LOG_FD]
62389# ----------------------------------------
62390# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
62391# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
62392# script with STATUS, using 1 if that was 0.
62393as_fn_error ()
62394{
62395  as_status=$1; test $as_status -eq 0 && as_status=1
62396  if test "$4"; then
62397    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
62398    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
62399  fi
62400  $as_echo "$as_me: error: $2" >&2
62401  as_fn_exit $as_status
62402} # as_fn_error
62403
62404
62405# as_fn_set_status STATUS
62406# -----------------------
62407# Set $? to STATUS, without forking.
62408as_fn_set_status ()
62409{
62410  return $1
62411} # as_fn_set_status
62412
62413# as_fn_exit STATUS
62414# -----------------
62415# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
62416as_fn_exit ()
62417{
62418  set +e
62419  as_fn_set_status $1
62420  exit $1
62421} # as_fn_exit
62422
62423# as_fn_unset VAR
62424# ---------------
62425# Portably unset VAR.
62426as_fn_unset ()
62427{
62428  { eval $1=; unset $1;}
62429}
62430as_unset=as_fn_unset
62431# as_fn_append VAR VALUE
62432# ----------------------
62433# Append the text in VALUE to the end of the definition contained in VAR. Take
62434# advantage of any shell optimizations that allow amortized linear growth over
62435# repeated appends, instead of the typical quadratic growth present in naive
62436# implementations.
62437if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
62438  eval 'as_fn_append ()
62439  {
62440    eval $1+=\$2
62441  }'
62442else
62443  as_fn_append ()
62444  {
62445    eval $1=\$$1\$2
62446  }
62447fi # as_fn_append
62448
62449# as_fn_arith ARG...
62450# ------------------
62451# Perform arithmetic evaluation on the ARGs, and store the result in the
62452# global $as_val. Take advantage of shells that can avoid forks. The arguments
62453# must be portable across $(()) and expr.
62454if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
62455  eval 'as_fn_arith ()
62456  {
62457    as_val=$(( $* ))
62458  }'
62459else
62460  as_fn_arith ()
62461  {
62462    as_val=`expr "$@" || test $? -eq 1`
62463  }
62464fi # as_fn_arith
62465
62466
62467if expr a : '\(a\)' >/dev/null 2>&1 &&
62468   test "X`expr 00001 : '.*\(...\)'`" = X001; then
62469  as_expr=expr
62470else
62471  as_expr=false
62472fi
62473
62474if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
62475  as_basename=basename
62476else
62477  as_basename=false
62478fi
62479
62480if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
62481  as_dirname=dirname
62482else
62483  as_dirname=false
62484fi
62485
62486as_me=`$as_basename -- "$0" ||
62487$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
62488	 X"$0" : 'X\(//\)$' \| \
62489	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
62490$as_echo X/"$0" |
62491    sed '/^.*\/\([^/][^/]*\)\/*$/{
62492	    s//\1/
62493	    q
62494	  }
62495	  /^X\/\(\/\/\)$/{
62496	    s//\1/
62497	    q
62498	  }
62499	  /^X\/\(\/\).*/{
62500	    s//\1/
62501	    q
62502	  }
62503	  s/.*/./; q'`
62504
62505# Avoid depending upon Character Ranges.
62506as_cr_letters='abcdefghijklmnopqrstuvwxyz'
62507as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
62508as_cr_Letters=$as_cr_letters$as_cr_LETTERS
62509as_cr_digits='0123456789'
62510as_cr_alnum=$as_cr_Letters$as_cr_digits
62511
62512ECHO_C= ECHO_N= ECHO_T=
62513case `echo -n x` in #(((((
62514-n*)
62515  case `echo 'xy\c'` in
62516  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
62517  xy)  ECHO_C='\c';;
62518  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
62519       ECHO_T='	';;
62520  esac;;
62521*)
62522  ECHO_N='-n';;
62523esac
62524
62525rm -f conf$$ conf$$.exe conf$$.file
62526if test -d conf$$.dir; then
62527  rm -f conf$$.dir/conf$$.file
62528else
62529  rm -f conf$$.dir
62530  mkdir conf$$.dir 2>/dev/null
62531fi
62532if (echo >conf$$.file) 2>/dev/null; then
62533  if ln -s conf$$.file conf$$ 2>/dev/null; then
62534    as_ln_s='ln -s'
62535    # ... but there are two gotchas:
62536    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
62537    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
62538    # In both cases, we have to default to `cp -pR'.
62539    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
62540      as_ln_s='cp -pR'
62541  elif ln conf$$.file conf$$ 2>/dev/null; then
62542    as_ln_s=ln
62543  else
62544    as_ln_s='cp -pR'
62545  fi
62546else
62547  as_ln_s='cp -pR'
62548fi
62549rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
62550rmdir conf$$.dir 2>/dev/null
62551
62552
62553# as_fn_mkdir_p
62554# -------------
62555# Create "$as_dir" as a directory, including parents if necessary.
62556as_fn_mkdir_p ()
62557{
62558
62559  case $as_dir in #(
62560  -*) as_dir=./$as_dir;;
62561  esac
62562  test -d "$as_dir" || eval $as_mkdir_p || {
62563    as_dirs=
62564    while :; do
62565      case $as_dir in #(
62566      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
62567      *) as_qdir=$as_dir;;
62568      esac
62569      as_dirs="'$as_qdir' $as_dirs"
62570      as_dir=`$as_dirname -- "$as_dir" ||
62571$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62572	 X"$as_dir" : 'X\(//\)[^/]' \| \
62573	 X"$as_dir" : 'X\(//\)$' \| \
62574	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
62575$as_echo X"$as_dir" |
62576    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62577	    s//\1/
62578	    q
62579	  }
62580	  /^X\(\/\/\)[^/].*/{
62581	    s//\1/
62582	    q
62583	  }
62584	  /^X\(\/\/\)$/{
62585	    s//\1/
62586	    q
62587	  }
62588	  /^X\(\/\).*/{
62589	    s//\1/
62590	    q
62591	  }
62592	  s/.*/./; q'`
62593      test -d "$as_dir" && break
62594    done
62595    test -z "$as_dirs" || eval "mkdir $as_dirs"
62596  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
62597
62598
62599} # as_fn_mkdir_p
62600if mkdir -p . 2>/dev/null; then
62601  as_mkdir_p='mkdir -p "$as_dir"'
62602else
62603  test -d ./-p && rmdir ./-p
62604  as_mkdir_p=false
62605fi
62606
62607
62608# as_fn_executable_p FILE
62609# -----------------------
62610# Test if FILE is an executable regular file.
62611as_fn_executable_p ()
62612{
62613  test -f "$1" && test -x "$1"
62614} # as_fn_executable_p
62615as_test_x='test -x'
62616as_executable_p=as_fn_executable_p
62617
62618# Sed expression to map a string onto a valid CPP name.
62619as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
62620
62621# Sed expression to map a string onto a valid variable name.
62622as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
62623
62624
62625exec 6>&1
62626## ----------------------------------- ##
62627## Main body of $CONFIG_STATUS script. ##
62628## ----------------------------------- ##
62629_ASEOF
62630test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
62631
62632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62633# Save the log message, to keep $0 and so on meaningful, and to
62634# report actual input values of CONFIG_FILES etc. instead of their
62635# values after options handling.
62636ac_log="
62637This file was extended by OpenJDK $as_me jdk9, which was
62638generated by GNU Autoconf 2.69.  Invocation command line was
62639
62640  CONFIG_FILES    = $CONFIG_FILES
62641  CONFIG_HEADERS  = $CONFIG_HEADERS
62642  CONFIG_LINKS    = $CONFIG_LINKS
62643  CONFIG_COMMANDS = $CONFIG_COMMANDS
62644  $ $0 $@
62645
62646on `(hostname || uname -n) 2>/dev/null | sed 1q`
62647"
62648
62649_ACEOF
62650
62651case $ac_config_files in *"
62652"*) set x $ac_config_files; shift; ac_config_files=$*;;
62653esac
62654
62655
62656
62657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62658# Files that config.status was made for.
62659config_files="$ac_config_files"
62660
62661_ACEOF
62662
62663cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62664ac_cs_usage="\
62665\`$as_me' instantiates files and other configuration actions
62666from templates according to the current configuration.  Unless the files
62667and actions are specified as TAGs, all are instantiated by default.
62668
62669Usage: $0 [OPTION]... [TAG]...
62670
62671  -h, --help       print this help, then exit
62672  -V, --version    print version number and configuration settings, then exit
62673      --config     print configuration, then exit
62674  -q, --quiet, --silent
62675                   do not print progress messages
62676  -d, --debug      don't remove temporary files
62677      --recheck    update $as_me by reconfiguring in the same conditions
62678      --file=FILE[:TEMPLATE]
62679                   instantiate the configuration file FILE
62680
62681Configuration files:
62682$config_files
62683
62684Report bugs to <build-dev@openjdk.java.net>.
62685OpenJDK home page: <http://openjdk.java.net>."
62686
62687_ACEOF
62688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62689ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
62690ac_cs_version="\\
62691OpenJDK config.status jdk9
62692configured by $0, generated by GNU Autoconf 2.69,
62693  with options \\"\$ac_cs_config\\"
62694
62695Copyright (C) 2012 Free Software Foundation, Inc.
62696This config.status script is free software; the Free Software Foundation
62697gives unlimited permission to copy, distribute and modify it."
62698
62699ac_pwd='$ac_pwd'
62700srcdir='$srcdir'
62701AWK='$AWK'
62702test -n "\$AWK" || AWK=awk
62703_ACEOF
62704
62705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62706# The default lists apply if the user does not specify any file.
62707ac_need_defaults=:
62708while test $# != 0
62709do
62710  case $1 in
62711  --*=?*)
62712    ac_option=`expr "X$1" : 'X\([^=]*\)='`
62713    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
62714    ac_shift=:
62715    ;;
62716  --*=)
62717    ac_option=`expr "X$1" : 'X\([^=]*\)='`
62718    ac_optarg=
62719    ac_shift=:
62720    ;;
62721  *)
62722    ac_option=$1
62723    ac_optarg=$2
62724    ac_shift=shift
62725    ;;
62726  esac
62727
62728  case $ac_option in
62729  # Handling of the options.
62730  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
62731    ac_cs_recheck=: ;;
62732  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
62733    $as_echo "$ac_cs_version"; exit ;;
62734  --config | --confi | --conf | --con | --co | --c )
62735    $as_echo "$ac_cs_config"; exit ;;
62736  --debug | --debu | --deb | --de | --d | -d )
62737    debug=: ;;
62738  --file | --fil | --fi | --f )
62739    $ac_shift
62740    case $ac_optarg in
62741    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
62742    '') as_fn_error $? "missing file argument" ;;
62743    esac
62744    as_fn_append CONFIG_FILES " '$ac_optarg'"
62745    ac_need_defaults=false;;
62746  --he | --h |  --help | --hel | -h )
62747    $as_echo "$ac_cs_usage"; exit ;;
62748  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
62749  | -silent | --silent | --silen | --sile | --sil | --si | --s)
62750    ac_cs_silent=: ;;
62751
62752  # This is an error.
62753  -*) as_fn_error $? "unrecognized option: \`$1'
62754Try \`$0 --help' for more information." ;;
62755
62756  *) as_fn_append ac_config_targets " $1"
62757     ac_need_defaults=false ;;
62758
62759  esac
62760  shift
62761done
62762
62763ac_configure_extra_args=
62764
62765if $ac_cs_silent; then
62766  exec 6>/dev/null
62767  ac_configure_extra_args="$ac_configure_extra_args --silent"
62768fi
62769
62770_ACEOF
62771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62772if \$ac_cs_recheck; then
62773  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
62774  shift
62775  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
62776  CONFIG_SHELL='$SHELL'
62777  export CONFIG_SHELL
62778  exec "\$@"
62779fi
62780
62781_ACEOF
62782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62783exec 5>>config.log
62784{
62785  echo
62786  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
62787## Running $as_me. ##
62788_ASBOX
62789  $as_echo "$ac_log"
62790} >&5
62791
62792_ACEOF
62793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62794_ACEOF
62795
62796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62797
62798# Handling of arguments.
62799for ac_config_target in $ac_config_targets
62800do
62801  case $ac_config_target in
62802    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
62803    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
62804    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
62805    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
62806    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
62807    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
62808
62809  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
62810  esac
62811done
62812
62813
62814# If the user did not use the arguments to specify the items to instantiate,
62815# then the envvar interface is used.  Set only those that are not.
62816# We use the long form for the default assignment because of an extremely
62817# bizarre bug on SunOS 4.1.3.
62818if $ac_need_defaults; then
62819  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
62820fi
62821
62822# Have a temporary directory for convenience.  Make it in the build tree
62823# simply because there is no reason against having it here, and in addition,
62824# creating and moving files from /tmp can sometimes cause problems.
62825# Hook for its removal unless debugging.
62826# Note that there is a small window in which the directory will not be cleaned:
62827# after its creation but before its name has been assigned to `$tmp'.
62828$debug ||
62829{
62830  tmp= ac_tmp=
62831  trap 'exit_status=$?
62832  : "${ac_tmp:=$tmp}"
62833  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
62834' 0
62835  trap 'as_fn_exit 1' 1 2 13 15
62836}
62837# Create a (secure) tmp directory for tmp files.
62838
62839{
62840  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
62841  test -d "$tmp"
62842}  ||
62843{
62844  tmp=./conf$$-$RANDOM
62845  (umask 077 && mkdir "$tmp")
62846} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
62847ac_tmp=$tmp
62848
62849# Set up the scripts for CONFIG_FILES section.
62850# No need to generate them if there are no CONFIG_FILES.
62851# This happens for instance with `./config.status config.h'.
62852if test -n "$CONFIG_FILES"; then
62853
62854
62855ac_cr=`echo X | tr X '\015'`
62856# On cygwin, bash can eat \r inside `` if the user requested igncr.
62857# But we know of no other shell where ac_cr would be empty at this
62858# point, so we can use a bashism as a fallback.
62859if test "x$ac_cr" = x; then
62860  eval ac_cr=\$\'\\r\'
62861fi
62862ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
62863if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
62864  ac_cs_awk_cr='\\r'
62865else
62866  ac_cs_awk_cr=$ac_cr
62867fi
62868
62869echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
62870_ACEOF
62871
62872
62873{
62874  echo "cat >conf$$subs.awk <<_ACEOF" &&
62875  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
62876  echo "_ACEOF"
62877} >conf$$subs.sh ||
62878  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62879ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
62880ac_delim='%!_!# '
62881for ac_last_try in false false false false false :; do
62882  . ./conf$$subs.sh ||
62883    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62884
62885  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
62886  if test $ac_delim_n = $ac_delim_num; then
62887    break
62888  elif $ac_last_try; then
62889    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62890  else
62891    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
62892  fi
62893done
62894rm -f conf$$subs.sh
62895
62896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62897cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
62898_ACEOF
62899sed -n '
62900h
62901s/^/S["/; s/!.*/"]=/
62902p
62903g
62904s/^[^!]*!//
62905:repl
62906t repl
62907s/'"$ac_delim"'$//
62908t delim
62909:nl
62910h
62911s/\(.\{148\}\)..*/\1/
62912t more1
62913s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
62914p
62915n
62916b repl
62917:more1
62918s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62919p
62920g
62921s/.\{148\}//
62922t nl
62923:delim
62924h
62925s/\(.\{148\}\)..*/\1/
62926t more2
62927s/["\\]/\\&/g; s/^/"/; s/$/"/
62928p
62929b
62930:more2
62931s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62932p
62933g
62934s/.\{148\}//
62935t delim
62936' <conf$$subs.awk | sed '
62937/^[^""]/{
62938  N
62939  s/\n//
62940}
62941' >>$CONFIG_STATUS || ac_write_fail=1
62942rm -f conf$$subs.awk
62943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62944_ACAWK
62945cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
62946  for (key in S) S_is_set[key] = 1
62947  FS = ""
62948
62949}
62950{
62951  line = $ 0
62952  nfields = split(line, field, "@")
62953  substed = 0
62954  len = length(field[1])
62955  for (i = 2; i < nfields; i++) {
62956    key = field[i]
62957    keylen = length(key)
62958    if (S_is_set[key]) {
62959      value = S[key]
62960      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
62961      len += length(value) + length(field[++i])
62962      substed = 1
62963    } else
62964      len += 1 + keylen
62965  }
62966
62967  print line
62968}
62969
62970_ACAWK
62971_ACEOF
62972cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62973if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
62974  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
62975else
62976  cat
62977fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
62978  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
62979_ACEOF
62980
62981# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
62982# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
62983# trailing colons and then remove the whole line if VPATH becomes empty
62984# (actually we leave an empty line to preserve line numbers).
62985if test "x$srcdir" = x.; then
62986  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
62987h
62988s///
62989s/^/:/
62990s/[	 ]*$/:/
62991s/:\$(srcdir):/:/g
62992s/:\${srcdir}:/:/g
62993s/:@srcdir@:/:/g
62994s/^:*//
62995s/:*$//
62996x
62997s/\(=[	 ]*\).*/\1/
62998G
62999s/\n//
63000s/^[^=]*=[	 ]*$//
63001}'
63002fi
63003
63004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63005fi # test -n "$CONFIG_FILES"
63006
63007
63008eval set X "  :F $CONFIG_FILES      "
63009shift
63010for ac_tag
63011do
63012  case $ac_tag in
63013  :[FHLC]) ac_mode=$ac_tag; continue;;
63014  esac
63015  case $ac_mode$ac_tag in
63016  :[FHL]*:*);;
63017  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
63018  :[FH]-) ac_tag=-:-;;
63019  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
63020  esac
63021  ac_save_IFS=$IFS
63022  IFS=:
63023  set x $ac_tag
63024  IFS=$ac_save_IFS
63025  shift
63026  ac_file=$1
63027  shift
63028
63029  case $ac_mode in
63030  :L) ac_source=$1;;
63031  :[FH])
63032    ac_file_inputs=
63033    for ac_f
63034    do
63035      case $ac_f in
63036      -) ac_f="$ac_tmp/stdin";;
63037      *) # Look for the file first in the build tree, then in the source tree
63038	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
63039	 # because $ac_f cannot contain `:'.
63040	 test -f "$ac_f" ||
63041	   case $ac_f in
63042	   [\\/$]*) false;;
63043	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
63044	   esac ||
63045	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
63046      esac
63047      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
63048      as_fn_append ac_file_inputs " '$ac_f'"
63049    done
63050
63051    # Let's still pretend it is `configure' which instantiates (i.e., don't
63052    # use $as_me), people would be surprised to read:
63053    #    /* config.h.  Generated by config.status.  */
63054    configure_input='Generated from '`
63055	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
63056	`' by configure.'
63057    if test x"$ac_file" != x-; then
63058      configure_input="$ac_file.  $configure_input"
63059      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
63060$as_echo "$as_me: creating $ac_file" >&6;}
63061    fi
63062    # Neutralize special characters interpreted by sed in replacement strings.
63063    case $configure_input in #(
63064    *\&* | *\|* | *\\* )
63065       ac_sed_conf_input=`$as_echo "$configure_input" |
63066       sed 's/[\\\\&|]/\\\\&/g'`;; #(
63067    *) ac_sed_conf_input=$configure_input;;
63068    esac
63069
63070    case $ac_tag in
63071    *:-:* | *:-) cat >"$ac_tmp/stdin" \
63072      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
63073    esac
63074    ;;
63075  esac
63076
63077  ac_dir=`$as_dirname -- "$ac_file" ||
63078$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
63079	 X"$ac_file" : 'X\(//\)[^/]' \| \
63080	 X"$ac_file" : 'X\(//\)$' \| \
63081	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
63082$as_echo X"$ac_file" |
63083    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
63084	    s//\1/
63085	    q
63086	  }
63087	  /^X\(\/\/\)[^/].*/{
63088	    s//\1/
63089	    q
63090	  }
63091	  /^X\(\/\/\)$/{
63092	    s//\1/
63093	    q
63094	  }
63095	  /^X\(\/\).*/{
63096	    s//\1/
63097	    q
63098	  }
63099	  s/.*/./; q'`
63100  as_dir="$ac_dir"; as_fn_mkdir_p
63101  ac_builddir=.
63102
63103case "$ac_dir" in
63104.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
63105*)
63106  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
63107  # A ".." for each directory in $ac_dir_suffix.
63108  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
63109  case $ac_top_builddir_sub in
63110  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
63111  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
63112  esac ;;
63113esac
63114ac_abs_top_builddir=$ac_pwd
63115ac_abs_builddir=$ac_pwd$ac_dir_suffix
63116# for backward compatibility:
63117ac_top_builddir=$ac_top_build_prefix
63118
63119case $srcdir in
63120  .)  # We are building in place.
63121    ac_srcdir=.
63122    ac_top_srcdir=$ac_top_builddir_sub
63123    ac_abs_top_srcdir=$ac_pwd ;;
63124  [\\/]* | ?:[\\/]* )  # Absolute name.
63125    ac_srcdir=$srcdir$ac_dir_suffix;
63126    ac_top_srcdir=$srcdir
63127    ac_abs_top_srcdir=$srcdir ;;
63128  *) # Relative name.
63129    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
63130    ac_top_srcdir=$ac_top_build_prefix$srcdir
63131    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
63132esac
63133ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
63134
63135
63136  case $ac_mode in
63137  :F)
63138  #
63139  # CONFIG_FILE
63140  #
63141
63142_ACEOF
63143
63144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63145# If the template does not know about datarootdir, expand it.
63146# FIXME: This hack should be removed a few years after 2.60.
63147ac_datarootdir_hack=; ac_datarootdir_seen=
63148ac_sed_dataroot='
63149/datarootdir/ {
63150  p
63151  q
63152}
63153/@datadir@/p
63154/@docdir@/p
63155/@infodir@/p
63156/@localedir@/p
63157/@mandir@/p'
63158case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
63159*datarootdir*) ac_datarootdir_seen=yes;;
63160*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
63161  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
63162$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
63163_ACEOF
63164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63165  ac_datarootdir_hack='
63166  s&@datadir@&$datadir&g
63167  s&@docdir@&$docdir&g
63168  s&@infodir@&$infodir&g
63169  s&@localedir@&$localedir&g
63170  s&@mandir@&$mandir&g
63171  s&\\\${datarootdir}&$datarootdir&g' ;;
63172esac
63173_ACEOF
63174
63175# Neutralize VPATH when `$srcdir' = `.'.
63176# Shell code in configure.ac might set extrasub.
63177# FIXME: do we really want to maintain this feature?
63178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63179ac_sed_extra="$ac_vpsub
63180$extrasub
63181_ACEOF
63182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63183:t
63184/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
63185s|@configure_input@|$ac_sed_conf_input|;t t
63186s&@top_builddir@&$ac_top_builddir_sub&;t t
63187s&@top_build_prefix@&$ac_top_build_prefix&;t t
63188s&@srcdir@&$ac_srcdir&;t t
63189s&@abs_srcdir@&$ac_abs_srcdir&;t t
63190s&@top_srcdir@&$ac_top_srcdir&;t t
63191s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
63192s&@builddir@&$ac_builddir&;t t
63193s&@abs_builddir@&$ac_abs_builddir&;t t
63194s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
63195$ac_datarootdir_hack
63196"
63197eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
63198  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
63199
63200test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
63201  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
63202  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
63203      "$ac_tmp/out"`; test -z "$ac_out"; } &&
63204  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63205which seems to be undefined.  Please make sure it is defined" >&5
63206$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63207which seems to be undefined.  Please make sure it is defined" >&2;}
63208
63209  rm -f "$ac_tmp/stdin"
63210  case $ac_file in
63211  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
63212  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
63213  esac \
63214  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
63215 ;;
63216
63217
63218
63219  esac
63220
63221done # for ac_tag
63222
63223
63224as_fn_exit 0
63225_ACEOF
63226ac_clean_files=$ac_clean_files_save
63227
63228test $ac_write_fail = 0 ||
63229  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
63230
63231
63232# configure is writing to config.log, and then calls config.status.
63233# config.status does its own redirection, appending to config.log.
63234# Unfortunately, on DOS this fails, as config.log is still kept open
63235# by configure, so config.status won't be able to write to it; its
63236# output is simply discarded.  So we exec the FD to /dev/null,
63237# effectively closing config.log, so it can be properly (re)opened and
63238# appended to by config.status.  When coming back to configure, we
63239# need to make the FD available again.
63240if test "$no_create" != yes; then
63241  ac_cs_success=:
63242  ac_config_status_args=
63243  test "$silent" = yes &&
63244    ac_config_status_args="$ac_config_status_args --quiet"
63245  exec 5>/dev/null
63246  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
63247  exec 5>>config.log
63248  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
63249  # would make configure fail if this is the last instruction.
63250  $ac_cs_success || as_fn_exit 1
63251fi
63252if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
63253  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
63254$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
63255fi
63256
63257
63258# After AC_OUTPUT, we need to do final work
63259
63260
63261  # Try to move config.log (generated by autoconf) to the configure-support directory.
63262  if test -e ./config.log; then
63263    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
63264  fi
63265
63266  # Rotate our log file (configure.log)
63267  if test -e "$OUTPUT_ROOT/configure.log.old"; then
63268    $RM -f "$OUTPUT_ROOT/configure.log.old"
63269  fi
63270  if test -e "$OUTPUT_ROOT/configure.log"; then
63271    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
63272  fi
63273
63274  # Move configure.log from current directory to the build output root
63275  if test -e ./configure.log; then
63276    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
63277  fi
63278
63279  # Make the compare script executable
63280  $CHMOD +x $OUTPUT_ROOT/compare.sh
63281
63282
63283# Finally output some useful information to the user
63284
63285  # Finally output some useful information to the user
63286
63287  printf "\n"
63288  printf "====================================================\n"
63289  if test "x$no_create" != "xyes"; then
63290    if test "x$IS_RECONFIGURE" != "xyes"; then
63291      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
63292    else
63293      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
63294    fi
63295  else
63296    if test "x$IS_RECONFIGURE" != "xyes"; then
63297      printf "A configuration has been successfully checked but not created\n"
63298    else
63299      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
63300    fi
63301  fi
63302  if test "x$CONFIGURE_COMMAND_LINE" != x; then
63303    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
63304  else
63305    printf "using default settings.\n"
63306  fi
63307
63308  printf "\n"
63309  printf "Configuration summary:\n"
63310  printf "* Debug level:    $DEBUG_LEVEL\n"
63311  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
63312  printf "* JDK variant:    $JDK_VARIANT\n"
63313  printf "* JVM variants:   $with_jvm_variants\n"
63314  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
63315  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
63316
63317  printf "\n"
63318  printf "Tools summary:\n"
63319  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
63320    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
63321  fi
63322  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
63323  if test "x$TOOLCHAIN_VERSION" != "x"; then
63324    print_version=" $TOOLCHAIN_VERSION"
63325  fi
63326  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
63327  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
63328  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
63329
63330  printf "\n"
63331  printf "Build performance summary:\n"
63332  printf "* Cores to use:   $JOBS\n"
63333  printf "* Memory limit:   $MEMORY_SIZE MB\n"
63334  if test "x$CCACHE_STATUS" != "x"; then
63335    printf "* ccache status:  $CCACHE_STATUS\n"
63336  fi
63337  printf "\n"
63338
63339  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
63340    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
63341    printf "will result in longer build times.\n"
63342    printf "\n"
63343  fi
63344
63345  if test "x$FOUND_ALT_VARIABLES" != "x"; then
63346    printf "WARNING: You have old-style ALT_ environment variables set.\n"
63347    printf "These are not respected, and will be ignored. It is recommended\n"
63348    printf "that you clean your environment. The following variables are set:\n"
63349    printf "$FOUND_ALT_VARIABLES\n"
63350    printf "\n"
63351  fi
63352
63353  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
63354    printf "WARNING: Your build output directory is not on a local disk.\n"
63355    printf "This will severely degrade build performance!\n"
63356    printf "It is recommended that you create an output directory on a local disk,\n"
63357    printf "and run the configure script again from that directory.\n"
63358    printf "\n"
63359  fi
63360
63361  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
63362    printf "WARNING: The result of this configuration has overridden an older\n"
63363    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
63364    printf "proper build. Failure to do so might result in strange build problems.\n"
63365    printf "\n"
63366  fi
63367
63368  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
63369    printf "WARNING: The result of this configuration was not saved.\n"
63370    printf "You should run without '--no-create | -n' to create the configuration.\n"
63371    printf "\n"
63372  fi
63373
63374
63375
63376  # Locate config.log.
63377  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
63378    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
63379  elif test -e "./config.log"; then
63380    CONFIG_LOG_PATH="."
63381  fi
63382
63383  if test -e "$CONFIG_LOG_PATH/config.log"; then
63384    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
63385    if test $? -eq 0; then
63386      printf "The following warnings were produced. Repeated here for convenience:\n"
63387      # We must quote sed expression (using []) to stop m4 from eating the [].
63388      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
63389      printf "\n"
63390    fi
63391  fi
63392
63393